﻿:root {
  color-scheme: dark;
  --bg: #07111f;
  --sidebar: #091727;
  --panel: #0d1d30;
  --panel-soft: #10243a;
  --panel-raised: #132a43;
  --line: rgba(156, 185, 218, .13);
  --line-strong: rgba(156, 185, 218, .22);
  --text: #eef5ff;
  --muted: #8297b2;
  --subtle: #abc0d9;
  --blue: #4c9aff;
  --cyan: #39d3c2;
  --green: #49d68b;
  --amber: #f4b65c;
  --red: #ff7385;
  --violet: #aa8cff;
  --shadow: 0 20px 50px rgba(0, 0, 0, .18);
  font-family: Inter, "SF Pro Display", "Segoe UI", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 1120px; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 244px; flex: 0 0 244px; padding: 24px 16px; background: linear-gradient(180deg, #0a1b2d 0%, #071321 100%); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 12px 30px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg, #4c9aff, #725cff); box-shadow: 0 9px 22px rgba(76, 154, 255, .25); }
.brand-mark svg { width: 21px; height: 21px; }
.brand-name { font-weight: 700; letter-spacing: .2px; font-size: 15px; }
.brand-caption { display: block; color: var(--muted); font-size: 10px; letter-spacing: .8px; margin-top: 3px; }
.nav-label { color: #5d7491; font-size: 10px; letter-spacing: 1.5px; padding: 0 12px 9px; text-transform: uppercase; }
.nav { display: grid; gap: 6px; }
.nav button { border: 0; border-radius: 10px; background: transparent; display: flex; align-items: center; gap: 12px; padding: 12px; color: #8fa5bf; cursor: pointer; text-align: left; transition: .18s ease; }
.nav button:hover { background: rgba(76, 154, 255, .08); color: #d9e7f9; }
.nav button.active { color: #f4f8ff; background: linear-gradient(90deg, rgba(76,154,255,.20), rgba(76,154,255,.06)); box-shadow: inset 3px 0 var(--blue); }
.nav button > svg { width: 18px; height: 18px; flex: 0 0 18px; color: currentColor; }
.nav-text { font-size: 13px; flex: 1; }
.nav-count { color: var(--red); font-size: 11px; font-weight: 700; }
.sidebar-bottom { margin-top: auto; padding: 16px 10px 4px; }
.connection { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); padding: 13px; }
.connection-title { display: flex; align-items: center; gap: 7px; color: var(--subtle); font-size: 11px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(244,182,92,.11); }
.connection-copy { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 9px 0 0; }
.connection-tag { display: inline-flex; color: #f5ca80; background: rgba(244,182,92,.10); padding: 3px 7px; border-radius: 5px; margin-top: 9px; font-size: 10px; }

.main { flex: 1; padding: 25px 31px 38px; max-width: 1600px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 27px; }
.breadcrumb { color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--subtle); font-weight: 500; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.demo-badge { display: inline-flex; gap: 7px; align-items: center; color: #d3c3ff; background: rgba(170,140,255,.11); border: 1px solid rgba(170,140,255,.22); border-radius: 20px; padding: 7px 11px; font-size: 11px; }
.demo-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 4px rgba(170,140,255,.1); }
.icon-button { border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 9px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--subtle); cursor: pointer; }
.icon-button:hover { background: rgba(255,255,255,.07); }
.icon-button svg { width: 16px; height: 16px; }
.user { display: flex; align-items: center; gap: 9px; padding-left: 7px; }
.avatar { width: 31px; height: 31px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #33b8b3, #2c6ee8); color: white; font-size: 11px; font-weight: 700; }
.user-name { font-size: 11px; color: var(--subtle); }
.user-role { color: var(--muted); font-size: 9px; margin-top: 3px; }

.hero { display: flex; justify-content: space-between; align-items: end; margin-bottom: 24px; }
.eyebrow { color: var(--blue); font-size: 11px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 11px; }
h1 { font-size: 28px; letter-spacing: -.7px; line-height: 1.15; margin: 0; }
.hero-copy { color: var(--muted); font-size: 12px; margin: 10px 0 0; }
.updated { color: var(--muted); font-size: 11px; padding-bottom: 3px; }
.updated strong { color: var(--subtle); font-weight: 500; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 17px; }
.kpi { position: relative; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(18, 42, 67, .98), rgba(11, 28, 47, .98)); border-radius: 13px; padding: 17px 18px 16px; box-shadow: var(--shadow); }
.kpi::after { content: ""; position: absolute; width: 90px; height: 90px; right: -35px; top: -30px; border-radius: 50%; background: var(--accent); opacity: .08; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.kpi-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-value { font-size: 27px; font-weight: 680; letter-spacing: -1px; margin-top: 16px; }
.kpi-foot { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 10px; margin-top: 8px; }
.positive { color: var(--green); }
.warning { color: var(--amber); }
.danger { color: var(--red); }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.54fr) minmax(340px, .96fr); gap: 17px; }
.panel { border: 1px solid var(--line); background: var(--panel); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.panel-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid var(--line); }
.panel-title { font-size: 13px; font-weight: 650; }
.panel-subtitle { color: var(--muted); font-size: 10px; margin-top: 5px; }
.text-button { color: var(--blue); background: transparent; border: 0; cursor: pointer; font-size: 11px; padding: 5px 0; }
.text-button:hover { color: #8fc1ff; }
.search { display: flex; align-items: center; gap: 8px; width: 155px; border: 1px solid var(--line); background: rgba(0,0,0,.12); border-radius: 8px; padding: 7px 9px; color: var(--muted); }
.search svg { flex: 0 0 auto; width: 13px; height: 13px; }
.search input { width: 100%; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font-size: 10px; }
.search input::placeholder { color: #5c7591; }
.table-wrap { overflow: hidden; }
table { border-collapse: collapse; width: 100%; }
th { color: #637d9a; text-align: left; font-size: 9px; text-transform: uppercase; letter-spacing: .9px; font-weight: 550; padding: 12px 19px 10px; }
td { border-top: 1px solid rgba(156,185,218,.08); padding: 13px 19px; color: var(--subtle); font-size: 11px; white-space: nowrap; }
tbody tr:hover { background: rgba(76,154,255,.045); }
.device-cell { display: flex; align-items: center; gap: 10px; }
.device-avatar { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: #172f49; color: #6fb5ff; }
.device-avatar svg { width: 15px; height: 15px; }
.device-name { color: var(--text); font-size: 11px; font-weight: 550; }
.device-id { color: var(--muted); font-size: 9px; margin-top: 3px; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; font-size: 9px; padding: 4px 8px; }
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.status-good { color: #6ee7a5; background: rgba(73,214,139,.10); }
.status-good::before { background: var(--green); }
.status-warn { color: #f4ca7d; background: rgba(244,182,92,.10); }
.status-warn::before { background: var(--amber); }
.status-risk { color: #ff9ca8; background: rgba(255,115,133,.10); }
.status-risk::before { background: var(--red); }

.risk-list { padding: 4px 18px 9px; }
.risk-item { display: grid; grid-template-columns: 9px 1fr auto; gap: 11px; padding: 14px 1px; border-bottom: 1px solid rgba(156,185,218,.08); align-items: start; }
.risk-item:last-child { border-bottom: 0; }
.risk-severity { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; }
.risk-critical { background: var(--red); box-shadow: 0 0 0 4px rgba(255,115,133,.10); }
.risk-high { background: var(--amber); box-shadow: 0 0 0 4px rgba(244,182,92,.10); }
.risk-medium { background: var(--blue); box-shadow: 0 0 0 4px rgba(76,154,255,.10); }
.risk-name { color: var(--text); font-size: 11px; font-weight: 560; }
.risk-meta { color: var(--muted); font-size: 9px; margin-top: 5px; }
.risk-count { color: #f4a4af; font-size: 11px; font-weight: 650; padding-top: 2px; }

.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; margin-top: 17px; }
.coverage-body { padding: 18px 19px 20px; display: grid; grid-template-columns: 118px 1fr; align-items: center; gap: 22px; }
.ring { --value: 86%; width: 105px; height: 105px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--cyan) var(--value), rgba(74,109,140,.20) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--panel); }
.ring-content { position: relative; text-align: center; }
.ring-value { font-size: 23px; font-weight: 700; letter-spacing: -1px; }
.ring-label { color: var(--muted); font-size: 9px; margin-top: 2px; }
.coverage-bars { display: grid; gap: 12px; }
.coverage-row { display: grid; grid-template-columns: 92px 1fr 35px; align-items: center; gap: 9px; color: var(--subtle); font-size: 10px; }
.bar { height: 5px; border-radius: 99px; background: #1a3249; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--cyan); }
.bar.warning-bar i { background: var(--amber); }
.coverage-percent { text-align: right; color: var(--muted); font-size: 9px; }

.activity-list { padding: 9px 19px 10px; }
.activity { display: flex; gap: 11px; padding: 9px 0; align-items: flex-start; }
.activity-icon { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; border-radius: 7px; color: var(--cyan); background: rgba(57,211,194,.10); }
.activity-icon.warn { color: var(--amber); background: rgba(244,182,92,.10); }
.activity-icon.blue { color: var(--blue); background: rgba(76,154,255,.10); }
.activity-icon svg { width: 13px; height: 13px; }
.activity-text { color: var(--subtle); font-size: 10px; line-height: 1.45; }
.activity-text strong { color: var(--text); font-weight: 550; }
.activity-time { color: var(--muted); font-size: 9px; margin-top: 3px; }

.toast { position: fixed; right: 27px; bottom: 24px; padding: 10px 14px; border-radius: 9px; border: 1px solid rgba(73,214,139,.28); background: #102a2a; color: #9cf0c2; font-size: 11px; box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); }
.empty-row { color: var(--muted); text-align: center; padding: 28px; }

@media (max-width: 1200px) {
  body { min-width: 980px; }
  .main { padding-left: 24px; padding-right: 24px; }
  .sidebar { width: 220px; flex-basis: 220px; }
  td, th { padding-left: 14px; padding-right: 14px; }
}
