Files
ucvl-zonghengjia-open-source/backend/static/css/node_traffic.css
T
2026-10-11 23:23:20 +00:00

234 lines
7.4 KiB
CSS

:root {
--traffic-navy: #08234a;
--traffic-blue: #1478e6;
--traffic-cyan: #09b7dc;
--traffic-green: #0c9b71;
--traffic-red: #d64a61;
--traffic-muted: #6d8299;
--traffic-border: #d8e5f0;
--traffic-bg: #f2f7fb;
}
#content { padding: 0; }
#content-main { float: none; }
.traffic-monitor {
min-height: calc(100vh - 120px);
padding: 28px clamp(18px, 3vw, 48px) 44px;
color: var(--traffic-navy);
background:
radial-gradient(circle at 88% 2%, rgba(9, 183, 220, .13), transparent 28%),
linear-gradient(180deg, #f8fbfe 0%, var(--traffic-bg) 100%);
box-sizing: border-box;
}
.traffic-hero,
.traffic-toolbar,
.traffic-chart-heading,
.traffic-help,
.traffic-summary,
.traffic-node-strip { display: flex; }
.traffic-hero {
justify-content: space-between;
align-items: flex-start;
gap: 24px;
margin-bottom: 22px;
}
.traffic-eyebrow {
color: var(--traffic-blue);
font-size: 13px;
font-weight: 800;
letter-spacing: .08em;
}
.traffic-hero h1 {
margin: 7px 0 8px;
font-size: clamp(26px, 3vw, 38px);
line-height: 1.15;
color: var(--traffic-navy);
}
.traffic-hero p {
max-width: 760px;
margin: 0;
color: var(--traffic-muted);
font-size: 15px;
line-height: 1.7;
}
.traffic-live {
display: inline-flex;
align-items: center;
gap: 9px;
flex: 0 0 auto;
padding: 10px 14px;
border: 1px solid #cfe9df;
border-radius: 999px;
color: var(--traffic-green);
background: #edf9f5;
font-weight: 700;
}
.traffic-live i,
.node-online-dot {
width: 9px;
height: 9px;
border-radius: 50%;
background: currentColor;
box-shadow: 0 0 0 5px rgba(12, 155, 113, .12);
}
.node-online-dot { color: var(--traffic-green); }
.traffic-live.is-error { color: var(--traffic-red); border-color: #f0ccd3; background: #fff2f4; }
.traffic-toolbar {
align-items: center;
justify-content: space-between;
gap: 18px;
margin-bottom: 18px;
}
.traffic-range {
display: inline-flex;
gap: 4px;
padding: 4px;
border: 1px solid var(--traffic-border);
border-radius: 12px;
background: #fff;
}
.traffic-range button {
min-width: 76px;
padding: 8px 13px;
border: 0;
border-radius: 8px;
color: #60758a;
background: transparent;
cursor: pointer;
font: inherit;
font-weight: 700;
}
.traffic-range button.is-active { color: #fff; background: var(--traffic-blue); box-shadow: 0 4px 12px rgba(20, 120, 230, .25); }
.traffic-refresh { display: flex; gap: 12px; color: var(--traffic-muted); font-size: 13px; }
.traffic-refresh b { color: var(--traffic-blue); }
.traffic-node-strip {
gap: 12px;
overflow-x: auto;
padding: 2px 2px 12px;
scrollbar-width: thin;
}
.traffic-node,
.traffic-loading {
min-width: 245px;
border: 1px solid var(--traffic-border);
border-radius: 15px;
padding: 15px 17px;
background: rgba(255, 255, 255, .88);
box-sizing: border-box;
}
.traffic-node { text-align: left; color: var(--traffic-navy); cursor: pointer; font: inherit; transition: transform .18s, border-color .18s, box-shadow .18s; }
.traffic-node:hover { transform: translateY(-2px); border-color: #a9cdec; }
.traffic-node.is-active { border-color: var(--traffic-blue); box-shadow: 0 8px 24px rgba(21, 95, 164, .13); }
.traffic-node-head { display: flex; justify-content: space-between; gap: 10px; }
.traffic-node-name { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 800; }
.traffic-node.is-offline .node-online-dot { color: var(--traffic-red); box-shadow: 0 0 0 5px rgba(214, 74, 97, .1); }
.traffic-node-region { display: block; margin: 7px 0 11px 18px; color: var(--traffic-muted); font-size: 12px; }
.traffic-node-speed { display: flex; justify-content: space-between; gap: 12px; color: #48647d; font-size: 12px; }
.traffic-node-speed b { display: block; margin-top: 3px; color: var(--traffic-navy); font-size: 14px; }
.traffic-loading { min-width: 100%; color: var(--traffic-muted); text-align: center; }
.traffic-summary {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 14px;
margin: 8px 0 16px;
}
.metric-card {
position: relative;
overflow: hidden;
padding: 18px 20px;
border: 1px solid var(--traffic-border);
border-radius: 16px;
background: #fff;
box-shadow: 0 7px 24px rgba(15, 65, 105, .05);
}
.metric-card::after {
position: absolute;
content: "";
top: 0; right: 0;
width: 72px; height: 72px;
border-radius: 0 0 0 72px;
background: rgba(20, 120, 230, .06);
}
.metric-card--down::after { background: rgba(20, 120, 230, .11); }
.metric-card--up::after { background: rgba(9, 183, 220, .12); }
.metric-card span { color: var(--traffic-muted); font-size: 13px; font-weight: 700; }
.metric-card strong { display: block; margin: 8px 0 5px; color: var(--traffic-navy); font-size: clamp(22px, 2.2vw, 31px); line-height: 1; }
.metric-card small { color: #8a9bad; }
.traffic-chart-card {
padding: 22px 24px 18px;
border: 1px solid var(--traffic-border);
border-radius: 18px;
background: #fff;
box-shadow: 0 9px 30px rgba(15, 65, 105, .06);
}
.traffic-chart-heading { align-items: flex-start; justify-content: space-between; gap: 20px; }
.traffic-chart-heading h2 { margin: 5px 0 0; color: var(--traffic-navy); font-size: 21px; }
.traffic-legend { display: flex; gap: 18px; color: var(--traffic-muted); font-size: 13px; }
.traffic-legend span { display: inline-flex; align-items: center; gap: 7px; }
.traffic-legend i { width: 22px; height: 3px; border-radius: 4px; }
.legend-download { background: var(--traffic-blue); }
.legend-upload { background: var(--traffic-cyan); }
.traffic-chart-wrap { position: relative; height: clamp(280px, 40vh, 430px); margin-top: 16px; }
#traffic-chart { display: block; width: 100%; height: 100%; }
.traffic-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #8da0b1; pointer-events: none; }
.traffic-tooltip { position: absolute; z-index: 3; min-width: 150px; padding: 9px 11px; border: 1px solid var(--traffic-border); border-radius: 9px; color: var(--traffic-navy); background: rgba(255,255,255,.96); box-shadow: 0 8px 22px rgba(8,35,74,.14); font-size: 12px; pointer-events: none; }
.traffic-tooltip b { display: block; margin-bottom: 4px; }
.traffic-tooltip span { display: block; line-height: 1.6; }
.traffic-help {
align-items: center;
gap: 28px;
margin-top: 16px;
padding: 16px 20px;
border: 1px solid #dbe8f2;
border-radius: 14px;
color: var(--traffic-muted);
background: rgba(255,255,255,.68);
}
.traffic-help div { display: flex; gap: 8px; flex: 1; }
.traffic-help b { flex: 0 0 auto; color: var(--traffic-navy); }
.traffic-help a { flex: 0 0 auto; padding: 9px 14px; border-radius: 9px; color: #fff; background: var(--traffic-blue); text-decoration: none; font-weight: 700; }
@media (max-width: 980px) {
.traffic-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.traffic-help { align-items: stretch; flex-direction: column; gap: 10px; }
.traffic-help a { align-self: flex-start; }
}
@media (max-width: 650px) {
.traffic-monitor { padding: 18px 12px 30px; }
.traffic-hero, .traffic-toolbar { align-items: stretch; flex-direction: column; }
.traffic-live { align-self: flex-start; }
.traffic-range { display: grid; grid-template-columns: repeat(4, 1fr); }
.traffic-range button { min-width: 0; padding-inline: 7px; }
.traffic-refresh { justify-content: space-between; }
.traffic-summary { grid-template-columns: 1fr; }
.traffic-chart-card { padding: 18px 12px 12px; }
.traffic-chart-heading { align-items: flex-start; flex-direction: column; }
.traffic-chart-wrap { height: 300px; }
}