:root {
  color-scheme: dark;
  --bg: #0b1020;
  --surface: #111a2d;
  --border: #25324c;
  --text: #eef2ff;
  --muted: #8794af;
  --blue: #7387ff;
  --green: #46d6a0;
  --red: #ff6e7a;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: radial-gradient(ellipse at 48% -18%, #1a2950 0, transparent 45%), var(--bg); color: var(--text); font-family: var(--font); }
.topbar { position: sticky; top: 0; z-index: 3; display: flex; height: 72px; align-items: center; gap: 36px; padding: 0 max(calc((100vw - 1260px) / 2), 28px); border-bottom: 1px solid #ffffff12; background: #0b1020e8; backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 20px; font-weight: 800; letter-spacing: -.8px; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #87a0ff, #5369ea); color: #fff; }
.brand-dot { color: var(--blue); }
.app-links { display: flex; flex: 1; align-items: center; gap: 22px; }
.app-links a { color: #a9b4ca; font-size: 12px; text-decoration: none; white-space: nowrap; }
.app-links a:hover { color: #fff; }
.top-status, .updated { display: flex; align-items: center; gap: 9px; color: #9caac1; font-size: 11px; white-space: nowrap; }
.pulse, .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #46d6a080; }
.pulse { animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
main { max-width: 1260px; margin: 0 auto; padding: 52px 28px 80px; }
.intro { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; }
.eyebrow { color: #8195ff; font-size: 10px; font-weight: 800; letter-spacing: 1.7px; }
.intro h1 { margin: 7px 0 8px; font-size: 34px; letter-spacing: -1.3px; }
.intro p, .architecture-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.updated { padding: 10px 13px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.live-dot { width: 6px; height: 6px; }
.tabs { display: flex; gap: 6px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.tab { padding: 13px 18px; border: 0; border-bottom: 2px solid transparent; background: none; color: #91a0bb; font: 600 13px var(--font); cursor: pointer; }
.tab.active { border-color: #7588ff; color: var(--text); }
.panel.hidden { display: none; }
.alerts { display: grid; gap: 8px; margin-bottom: 12px; }
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 15px; border: 1px solid #604d31; border-radius: 10px; background: #2d2518; color: #f5d291; font-size: 12px; }
.alert.critical { border-color: #663843; background: #301c27; color: #ff9da6; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card, .surface { border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(145deg, #121b2e, #101828); }
.metric-card { min-height: 148px; padding: 20px 20px 17px; }
.metric-label { display: flex; justify-content: space-between; color: #aab5ca; font-size: 12px; }
.metric-label span { color: #7383a1; font-size: 9px; letter-spacing: 1px; }
.metric-value { margin: 15px 0 11px; font-size: 32px; font-weight: 700; letter-spacing: -1px; }
.metric-value small { margin-left: 3px; color: #8492ad; font-size: 14px; }
.metric-value.compact { font-size: 24px; }
.meter { height: 5px; overflow: hidden; border-radius: 8px; background: #26334a; }
.meter i { display: block; width: 0; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #7286ff, #45d7a5); transition: width .6s; }
.meter i.warn { background: #f8bc59; }
.meter i.danger { background: var(--red); }
.metric-foot { margin-top: 9px; color: #75839d; font-size: 10px; }
.charts-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; margin-top: 14px; }
.chart-card { min-height: 270px; padding: 20px 21px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.section-heading h2, .architecture-intro h2 { margin: 0 0 5px; font-size: 15px; letter-spacing: -.2px; }
.section-heading p { margin: 0; color: var(--muted); font-size: 10px; }
.chart-legend, .legend { display: flex; align-items: center; gap: 8px; color: #94a1b8; font-size: 9px; }
.chart-legend i, .legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.legend-blue { background: #7488ff; }
.legend-violet { background: #c18cff; }
.chart { width: 100%; height: 205px; margin-top: 14px; overflow: visible; }
.gridline { stroke: #28334a; stroke-width: 1; }
.axis-label { fill: #72809a; font-size: 10px; }
.chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.traffic { display: flex; gap: 42px; margin: 40px 6px 27px; }
.traffic > div { display: flex; align-items: center; gap: 13px; }
.traffic-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; background: #16312e; color: #56dbac; font-size: 22px; }
.traffic-icon.up { background: #202947; color: #98a7ff; }
.traffic strong, .traffic small { display: block; }
.traffic strong { font-size: 16px; }
.traffic small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.request-note { padding-top: 14px; border-top: 1px solid var(--border); color: #9aa6bd; font-size: 10px; }
.services-card { margin-top: 14px; padding: 20px 21px; }
.availability { color: var(--green); font-size: 23px; font-weight: 700; text-align: right; }
.availability small { display: block; color: var(--muted); font-size: 9px; font-weight: 500; }
.service-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 18px; }
.service { min-width: 0; padding: 12px; border: 1px solid #29354c; border-radius: 9px; background: #131e31; }
.service-top { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.service-name { font-size: 10px; font-weight: 700; }
.service-indicator { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.service-indicator.down { background: var(--red); box-shadow: 0 0 9px #ff6e7a70; }
.service-meta { margin-top: 7px; color: #8190aa; font-size: 9px; }
.placeholder { color: var(--muted); font-size: 11px; }
.footnote { margin-top: 12px; color: #65738c; font-size: 9px; }
.architecture-intro { display: flex; align-items: end; justify-content: space-between; margin: 31px 0 17px; }
.architecture-intro h2 { margin: 8px 0; font-size: 21px; }
.legend { gap: 9px; }
.legend-dash { width: 14px !important; height: 1px !important; border-radius: 0 !important; background: repeating-linear-gradient(90deg, #67748f 0 3px, transparent 3px 6px); }
.diagram-wrap { overflow-x: auto; padding: 18px 25px 15px; }
.diagram-wrap svg { width: 100%; min-width: 710px; height: auto; }
.edge { fill: none; stroke: #6578ec; stroke-width: 2; marker-end: url(#arrow); }
.edge.muted { stroke: #65748f; stroke-dasharray: 6 5; marker-end: url(#arrow-muted); }
.node { cursor: pointer; outline: none; }
.node rect { fill: #172238; stroke: #35415e; stroke-width: 1.2; transition: fill .2s, stroke .2s; }
.node:hover rect, .node:focus rect { fill: #202d49; stroke: #8697ff; stroke-width: 2; }
.node.primary rect { fill: #1b2851; stroke: #677bed; }
.node.muted-node rect { fill: #17202e; stroke: #566175; }
.node text { fill: #e7edff; font-family: var(--font); font-size: 12px; font-weight: 700; }
.node .sub { fill: #93a2bd; font-size: 9px; font-weight: 500; }
.node .info { fill: #28385d; stroke: #7d90ff; stroke-width: 1; }
.node .info-mark { fill: #b9c5ff; font-size: 10px; font-weight: 700; }
.diagram-hint { padding: 13px 5px 0; border-top: 1px solid var(--border); color: #7887a1; font-size: 10px; }
.relation-card { display: flex; align-items: baseline; gap: 20px; margin-top: 12px; padding: 17px 20px; color: #9daac0; font-size: 11px; }
.relation-card strong { color: #e4eaff; white-space: nowrap; }
.info-dialog { position: relative; width: min(460px, calc(100vw - 32px)); padding: 28px; border: 1px solid #35415e; border-radius: 16px; background: #121c30; color: var(--text); box-shadow: 0 24px 90px #0009; }
.info-dialog::backdrop { background: #050916bb; backdrop-filter: blur(4px); }
.info-dialog h2 { margin: 10px 0; font-size: 22px; }
.info-dialog p { color: #a5b1c7; font-size: 12px; line-height: 1.8; }
.close-dialog { position: absolute; top: 12px; right: 16px; border: 0; background: none; color: #aab6cb; font-size: 25px; cursor: pointer; }
.dialog-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dialog-links a { padding: 8px 10px; border: 1px solid #38466a; border-radius: 7px; color: #bcc8ff; font-size: 10px; text-decoration: none; }
footer { display: flex; justify-content: space-between; padding: 22px max(calc((100vw - 1260px) / 2), 28px); border-top: 1px solid #ffffff10; color: #697792; font-size: 10px; }
footer span { color: #505e77; }
@media (max-width: 960px) {
  .app-links { gap: 12px; }
  .app-links a { font-size: 10px; }
  .topbar { gap: 20px; padding: 0 20px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .service-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .topbar { min-height: 64px; height: auto; flex-wrap: wrap; gap: 12px; padding: 12px 16px; }
  .app-links { order: 3; flex-basis: 100%; overflow-x: auto; padding: 4px 0 5px; }
  .top-status { margin-left: auto; }
  .top-status #header-state { display: none; }
  main { padding: 34px 16px 55px; }
  .intro { align-items: flex-start; flex-direction: column; gap: 17px; }
  .intro h1 { font-size: 29px; }
  .updated { font-size: 9px; }
  .metric-grid { gap: 9px; }
  .metric-card { min-height: 139px; padding: 15px; }
  .metric-value { font-size: 28px; }
  .charts-grid { grid-template-columns: 1fr; }
  .chart-card { min-height: 245px; }
  .service-list { grid-template-columns: repeat(2, 1fr); }
  .architecture-intro { align-items: flex-start; flex-direction: column; gap: 13px; }
  .diagram-wrap { padding: 12px; }
  .relation-card { align-items: flex-start; flex-direction: column; gap: 8px; }
  .traffic { gap: 22px; margin: 33px 0 24px; }
  footer { padding: 20px 16px; }
}
