Files
NexaPG/frontend/src/styles.css
nessi 8c94a30a81 Add transaction rate and enhance chart tooltips
Added transaction-per-second (TPS) metric calculation to the TargetDetailPage and updated the chart to display it. Improved tooltip design and functionality for better readability, including dynamic metrics display and styled components.
2026-02-12 11:04:38 +01:00

417 lines
6.4 KiB
CSS

:root {
--bg: #0b1020;
--bg2: #131a30;
--card: #1b233d;
--text: #e5edf7;
--muted: #98a6c0;
--accent: #38bdf8;
--danger: #ef4444;
}
* {
box-sizing: border-box;
}
body {
margin: 0;
font-family: "Space Grotesk", "Segoe UI", sans-serif;
color: var(--text);
background: radial-gradient(circle at top right, #1d335f, #0b1020 55%);
overflow: hidden;
}
a {
color: var(--accent);
text-decoration: none;
}
.shell {
display: grid;
grid-template-columns: 260px 1fr;
height: 100vh;
overflow: hidden;
}
.sidebar {
background: linear-gradient(180deg, #10182f, #0a1022);
border-right: 1px solid #223056;
padding: 20px;
display: flex;
flex-direction: column;
gap: 20px;
height: 100vh;
position: sticky;
top: 0;
overflow: hidden;
}
.sidebar-nav {
display: flex;
flex-direction: column;
gap: 10px;
}
.nav-btn {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
border: 1px solid #223056;
border-radius: 10px;
background: linear-gradient(180deg, #101b3a, #0d1530);
color: #c6d5ef;
transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.nav-btn:hover {
border-color: #2e4f98;
background: linear-gradient(180deg, #13224b, #101b3a);
transform: translateY(-1px);
}
.nav-btn.active {
border-color: #38bdf8;
box-shadow: inset 0 0 0 1px #38bdf860;
background: linear-gradient(180deg, #16305f, #101f43);
color: #ecf5ff;
}
.nav-icon {
width: 26px;
height: 26px;
border-radius: 8px;
display: grid;
place-items: center;
font-size: 11px;
font-weight: 700;
border: 1px solid #2b3f74;
background: #0d1631;
}
.nav-label {
font-size: 15px;
font-weight: 600;
}
.profile {
margin-top: auto;
border-top: 1px solid #223056;
padding-top: 16px;
}
.role {
color: var(--muted);
margin-bottom: 10px;
}
.main {
padding: 24px;
height: 100vh;
overflow-y: auto;
}
.card {
background: color-mix(in oklab, var(--card), black 10%);
border: 1px solid #2a3a66;
border-radius: 14px;
padding: 16px;
margin-bottom: 16px;
}
.grid {
display: grid;
gap: 12px;
}
.grid.two {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid.three {
grid-template-columns: repeat(3, minmax(0, 1fr));
}
.stat strong {
font-size: 28px;
display: block;
}
input,
select,
button {
background: #10182f;
color: var(--text);
border: 1px solid #2b3f74;
border-radius: 10px;
padding: 10px;
}
.field {
display: grid;
gap: 6px;
}
.field label {
font-size: 13px;
color: #b9c6dc;
}
.field small {
font-size: 12px;
color: #8fa0bf;
}
.tips p {
margin: 8px 0;
color: #bfd0ea;
}
button {
cursor: pointer;
}
.logout-btn {
width: 100%;
margin-top: 8px;
border-color: #374f8f;
background: linear-gradient(180deg, #13224b, #101b3a);
}
.logout-btn:hover {
border-color: #38bdf8;
}
table {
width: 100%;
border-collapse: collapse;
font-size: 14px;
}
th,
td {
text-align: left;
border-bottom: 1px solid #223056;
padding: 8px 6px;
}
.error {
color: #fecaca;
border-color: #7f1d1d;
}
.range-picker {
display: flex;
gap: 8px;
margin-bottom: 10px;
}
.range-picker .active {
border-color: var(--accent);
}
.login-wrap {
min-height: 100vh;
display: grid;
place-items: center;
padding: 24px;
background:
radial-gradient(900px 500px at 20% 15%, #15356a44, transparent),
radial-gradient(900px 500px at 80% 90%, #1c4a7a33, transparent);
}
.login-card {
width: min(460px, 95vw);
display: grid;
gap: 10px;
border-color: #335aa4;
padding: 26px;
background: linear-gradient(180deg, #182548f0, #141f3df0);
box-shadow: 0 20px 50px #050b1f66;
backdrop-filter: blur(6px);
animation: loginEnter 0.5s ease;
}
.login-eyebrow {
font-size: 12px;
color: #a8badb;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.login-card h2 {
margin: 0;
font-size: 34px;
line-height: 1.05;
}
.login-subtitle {
margin: 0 0 2px 0;
color: #9db0d2;
font-size: 14px;
}
.input-shell {
border: 1px solid #2b3f74;
border-radius: 12px;
padding: 0;
background: #0e1731;
transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}
.input-shell:focus-within {
border-color: #38bdf8;
box-shadow: 0 0 0 3px #38bdf820;
transform: translateY(-1px);
}
.input-shell input {
width: 100%;
border: 0;
outline: none;
background: transparent;
padding: 11px 12px;
font-size: 15px;
}
.login-cta {
margin-top: 4px;
font-weight: 700;
border-color: #3f74d6;
background: linear-gradient(90deg, #2e7cd4, #265fb4);
padding: 11px 12px;
}
.login-cta:hover {
border-color: #6aa8ff;
filter: brightness(1.05);
}
.login-card input:-webkit-autofill,
.login-card input:-webkit-autofill:hover,
.login-card input:-webkit-autofill:focus {
-webkit-text-fill-color: #e5edf7;
-webkit-box-shadow: 0 0 0px 1000px #0e1731 inset;
transition: background-color 9999s ease-out 0s;
}
@keyframes loginEnter {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.query {
max-width: 400px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.overview-kv span,
.overview-metrics span {
display: block;
font-size: 12px;
color: #97a7c8;
}
.overview-kv strong,
.overview-metrics strong {
font-size: 15px;
}
.overview-metrics {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 10px;
}
.pill {
text-transform: uppercase;
letter-spacing: 0.04em;
}
.pill.primary {
color: #4ade80;
}
.pill.standby {
color: #f59e0b;
}
.lag-bad {
color: #ef4444;
}
.partial-warning {
margin-top: 12px;
border: 1px solid #7f1d1d;
border-radius: 10px;
padding: 10px;
color: #fecaca;
}
.partial-warning ul {
margin: 8px 0 0 18px;
}
.chart-tooltip {
background: #0f1934ee;
border: 1px solid #2f4a8b;
border-radius: 10px;
padding: 10px 12px;
min-width: 170px;
}
.chart-tooltip-time {
font-size: 12px;
color: #9cb2d8;
margin-bottom: 6px;
}
.chart-tooltip-item {
font-size: 14px;
margin: 3px 0;
}
.chart-tooltip-item.c1 {
color: #38bdf8;
}
.chart-tooltip-item.c2 {
color: #22c55e;
}
.chart-tooltip-item.c3 {
color: #f59e0b;
}
@media (max-width: 980px) {
body {
overflow: auto;
}
.shell {
grid-template-columns: 1fr;
height: auto;
overflow: visible;
}
.sidebar {
position: sticky;
top: 0;
z-index: 2;
height: auto;
}
.grid.two,
.grid.three {
grid-template-columns: 1fr;
}
.main {
height: auto;
overflow: visible;
}
}