:root {
  color-scheme: dark;
  --bg: #0a0e12;
  --surface: #10161c;
  --surface-2: #151d24;
  --line: #25313a;
  --text: #e9f0f2;
  --muted: #83929b;
  --green: #54d58d;
  --amber: #e8b864;
  --red: #f27b7b;
  --accent: #8bdde2;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 80% -10%, #17333a 0, transparent 34%), var(--bg); color: var(--text); font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; background: url("./startec-logo.png") center 52% / min(520px, 62vw) auto no-repeat; opacity: .035; filter: grayscale(1) saturate(.4); }.shell { position: relative; z-index: 1; }
button { font: inherit; }
.shell { width: min(1240px, calc(100% - 48px)); margin: 0 auto; }
.topbar { min-height: 96px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); gap: 24px; }
.brand-lockup { display: flex; align-items: center; gap: 14px; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #3d7980; border-radius: 10px; color: var(--accent); font-weight: 800; font-size: 19px; box-shadow: 0 0 28px #57d7e01b; }.startec-logo { width: 68px; height: 52px; object-fit: contain; border-radius: 10px; filter: drop-shadow(0 0 12px #54d5e044); }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 10px; letter-spacing: .16em; font-weight: 750; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 18px; letter-spacing: -.02em; }
h2 { margin-bottom: 0; font-size: 20px; letter-spacing: -.03em; }
.top-meta, .legend, footer { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 9px; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); }
.separator { color: #3e515d; }
.refresh { border: 1px solid #38515a; color: var(--text); background: transparent; border-radius: 7px; padding: 8px 12px; cursor: pointer; margin-left: 8px; }
.refresh:hover { border-color: var(--accent); color: var(--accent); }
.admin-link { color: var(--accent); text-decoration: none; border-bottom: 1px solid transparent; }.admin-link:hover { border-color: var(--accent); }
.icon-btn { border: 1px solid #38515a; color: var(--accent); background: transparent; border-radius: 7px; width: 34px; height: 34px; cursor: pointer; margin-left: 8px; font-size: 16px; transition: transform .2s, border-color .2s; }
.icon-btn:hover { border-color: var(--accent); transform: rotate(28deg); }
main { padding: 34px 0 12px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 18px; }
.section-note { max-width: 390px; margin: 0; color: var(--muted); text-align: right; font-size: 12px; }
.compact-heading { margin-bottom: 13px; align-items: center; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi { padding: 18px 20px 19px 0; margin-right: 20px; border-right: 1px solid var(--line); }
.kpi:last-child { border-right: 0; }
.kpi span, .kpi small { color: var(--muted); display: block; font-size: 11px; }
.kpi strong { display: block; margin: 7px 0 2px; font-size: 27px; font-weight: 600; letter-spacing: -.04em; }
.sites { margin-top: 42px; }
.legend { gap: 6px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-left: 10px; }
.legend-dot:first-child { margin-left: 0; }
.healthy { background: var(--green); }.standby { background: var(--amber); }
.site-list { display: grid; gap: 10px; }
.site-row { display: grid; grid-template-columns: minmax(200px, 1.15fr) minmax(180px, 1fr) minmax(180px, .9fr) minmax(170px, .9fr) auto; align-items: center; gap: 18px; padding: 19px 20px; background: rgba(16, 22, 28, .8); border-left: 2px solid var(--green); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); transition: background .2s, transform .2s; }
.site-row:hover { background: var(--surface-2); transform: translateX(2px); }
.site-identity { display: flex; align-items: center; gap: 13px; }.site-name { font-size: 16px; font-weight: 650; }.site-sub { color: var(--muted); font-size: 11px; margin-top: 3px; }
.dvr-photo-frame { position: relative; width: 92px; height: 54px; flex: 0 0 92px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: linear-gradient(145deg, #25343a, #0a1014 72%); border: 1px solid #3b5a62; box-shadow: 0 8px 18px #0005; }.dvr-photo { width: 100%; height: 100%; object-fit: contain; }.dvr-photo-led { position: absolute; right: 7px; bottom: 9px; width: 8px; height: 8px; border-radius: 50%; border: 1px solid #091014; }.dvr-photo-led.is-online { background: var(--green); box-shadow: 0 0 10px var(--green); }.dvr-photo-led.is-pending { background: var(--amber); box-shadow: 0 0 10px var(--amber); }.dvr-photo-led.is-offline { background: var(--red); box-shadow: 0 0 10px var(--red); }
.dvr-illustration { width: 54px; height: 30px; border: 1px solid #56727a; border-radius: 4px; background: linear-gradient(145deg, #24343b, #0a1014 70%); display: flex; align-items: center; justify-content: flex-end; gap: 4px; padding: 0 5px; position: relative; box-shadow: inset 0 0 0 2px #0b1318, 0 6px 12px #0005; }.dvr-illustration::before { content: "DVR"; position: absolute; left: 6px; top: 8px; color: #71888f; font: 7px ui-monospace, monospace; letter-spacing: .08em; }.dvr-illustration::after { content: ""; position: absolute; left: 7px; bottom: 4px; width: 18px; height: 1px; background: #36525a; }.dvr-illustration i, .dvr-led { width: 4px; height: 4px; border-radius: 50%; background: #3b5960; display: block; }.dvr-led { background: var(--green); box-shadow: 0 0 7px var(--green); }
.status { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 750; }.status.is-offline { color: var(--red); }.status.is-online { color: var(--green); }.status.is-pending { color: var(--amber); }.status.is-pending::before { box-shadow: 0 0 8px var(--amber); }
.health-detail { color: var(--muted); font-size: 10px; margin-top: 3px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.metric-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .09em; }.metric-value { margin-top: 4px; font-size: 13px; }
.route { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.site-action { color: var(--muted); font-size: 11px; text-align: right; white-space: nowrap; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }.gauge { --value: 100; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--value) * 1%), #24313a 0); display: grid; place-items: center; position: relative; }.gauge.is-pending { background: conic-gradient(var(--amber) calc(var(--value) * 1%), #24313a 0); }.gauge.is-offline { background: conic-gradient(var(--red) calc(var(--value) * 1%), #24313a 0); }.gauge::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface-2); }.gauge strong { position: relative; z-index: 1; color: var(--text); font-size: 8px; }
.telemetry { margin-top: 42px; }
.telemetry-grid { display: grid; grid-template-columns: 1.6fr .8fr; gap: 30px; }
.chart-block, .health-block { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0 12px; }
.chart-title { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .09em; }
.chart-title strong { color: var(--text); font-size: 20px; letter-spacing: -.03em; text-transform: none; }
.traffic-chart { display: block; width: 100%; height: 180px; margin-top: 8px; overflow: visible; }
.traffic-chart .gridline { stroke: #24313a; stroke-width: 1; stroke-dasharray: 3 6; }.traffic-chart .area { fill: url(#trafficFill); opacity: .8; }.traffic-chart .line { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 6px #8bdde277); }.traffic-chart .point { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.health-rings { display: flex; align-items: center; justify-content: space-around; gap: 12px; min-height: 180px; }
.ring-wrap { display: grid; justify-items: center; gap: 9px; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }.ring { --value: 100; width: 108px; height: 108px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--value) * 1%), #24313a 0); position: relative; }.ring.is-pending { background: conic-gradient(var(--amber) calc(var(--value) * 1%), #24313a 0); }.ring.is-offline { background: conic-gradient(var(--red) calc(var(--value) * 1%), #24313a 0); }.ring::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--surface); }.ring strong { position: relative; z-index: 1; color: var(--text); font-size: 22px; letter-spacing: -.06em; }
.lower-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 42px; }
.panel-block { border-top: 1px solid var(--line); padding-top: 17px; }
.tunnel-table { display: grid; gap: 0; border-top: 1px solid var(--line); }
.tunnel-row { display: grid; grid-template-columns: 56px 1fr 1fr auto; gap: 13px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.tun-id { color: var(--accent); font: 12px ui-monospace, SFMono-Regular, Menlo, monospace; }.tun-site, .tun-ip { font-size: 12px; }.tun-ip { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }.tun-ok { color: var(--green); font-size: 11px; }
.event-count { color: var(--muted); font-size: 11px; }.event-list { border-top: 1px solid var(--line); }.event { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }.event time { color: var(--muted); font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }.event span { color: #c4ced2; }.empty { color: var(--muted); padding: 18px 0; font-size: 12px; }
footer { justify-content: space-between; padding: 26px 0 34px; border-top: 1px solid var(--line); margin-top: 42px; }
.settings-dialog { width: min(560px, calc(100% - 28px)); padding: 0; border: 1px solid #38515a; border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 30px 100px #000b; }.settings-dialog::backdrop { background: #020609b8; backdrop-filter: blur(4px); }.settings-dialog form { padding: 24px; }.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; }.close-btn { border: 0; background: none; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }.close-btn:hover { color: var(--text); }.dialog-note { color: var(--muted); font-size: 12px; margin: 15px 0 20px; }.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }.form-grid label { color: var(--muted); font-size: 11px; }.form-grid input { display: block; width: 100%; margin-top: 6px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #0b1116; outline: none; }.form-grid input:focus { border-color: var(--accent); }.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }.cancel-btn, .save-btn { border-radius: 7px; padding: 10px 14px; cursor: pointer; }.cancel-btn { border: 1px solid var(--line); color: var(--muted); background: transparent; }.save-btn { border: 1px solid var(--accent); color: #081014; background: var(--accent); font-weight: 700; }
@media (max-width: 860px) { .shell { width: min(100% - 28px, 680px); }.topbar { align-items: flex-start; flex-direction: column; padding: 22px 0; gap: 16px; }.top-meta { flex-wrap: wrap; }.kpi-grid { grid-template-columns: repeat(2, 1fr); }.kpi:nth-child(2) { border-right: 0; }.kpi:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.site-row { grid-template-columns: 1fr 1fr; }.site-action { text-align: left; }.lower-grid, .telemetry-grid { grid-template-columns: 1fr; gap: 34px; }.section-heading { align-items: flex-start; flex-direction: column; }.section-note { text-align: left; }.legend { align-self: flex-start; } }
@keyframes startec-flapping-neon { 0%, 100% { box-shadow: 0 0 0 1px rgba(232,184,100,.75), 0 0 10px rgba(232,184,100,.22), inset 0 0 0 rgba(232,184,100,0); } 50% { box-shadow: 0 0 0 2px rgba(255,214,96,.98), 0 0 26px rgba(255,196,67,.72), inset 0 0 22px rgba(232,184,100,.08); } }
.refresh.is-loading { border-color: var(--amber); color: var(--amber); cursor: wait; opacity: .86; }
.site-row.is-flapping { border-left-color: var(--amber); animation: startec-flapping-neon 1.35s ease-in-out infinite; }
.dvr-photo-frame.is-flapping { border-color: var(--amber); animation: startec-flapping-neon 1.1s ease-in-out infinite; }
.status.is-flapping { color: var(--amber); }
.status.is-flapping::before { box-shadow: 0 0 12px var(--amber); }
.gauge.is-flapping, .ring.is-flapping { filter: drop-shadow(0 0 7px rgba(232,184,100,.72)); }
@media (prefers-reduced-motion: reduce) { .site-row.is-flapping, .dvr-photo-frame.is-flapping { animation: none; } }
@media (max-width: 480px) { .shell { width: min(100% - 22px, 680px); }.topbar { gap: 11px; }.brand-lockup { gap: 9px; }.startec-logo { width: 54px; height: 42px; }.top-meta { width: 100%; }.refresh { margin-left: auto; }.kpi { padding-right: 12px; margin-right: 12px; }.kpi strong { font-size: 23px; }.site-row { grid-template-columns: 1fr; gap: 12px; padding: 15px 13px; }.site-identity { gap: 10px; }.dvr-photo-frame { width: 84px; height: 50px; flex-basis: 84px; }.site-action { justify-content: flex-start; text-align: left; }.tunnel-row { grid-template-columns: 48px 1fr auto; }.tun-ip { grid-column: 2; }.tun-ok { grid-column: 3; grid-row: 1 / span 2; }.form-grid { grid-template-columns: 1fr; }.traffic-chart { height: 135px; }.ring { width: 90px; height: 90px; } footer { flex-direction: column; align-items: flex-start; gap: 7px; } }
