:root {
  color-scheme: dark;
  --bg: #07100e;
  --panel: rgba(17, 30, 27, 0.78);
  --panel-strong: #12221e;
  --border: rgba(166, 213, 194, 0.12);
  --text: #edf8f3;
  --muted: #789188;
  --green: #43e5a0;
  --green-soft: rgba(67, 229, 160, 0.12);
  --blue: #58a6ff;
  --cyan: #46d9e6;
  --purple: #a88cff;
  --amber: #ffbb55;
  --red: #ff6b70;
  --radius: 18px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(33, 124, 92, 0.18), transparent 32rem),
    radial-gradient(circle at 92% 22%, rgba(65, 58, 126, 0.13), transparent 34rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.9'/%3E%3C/svg%3E");
}

.shell { width: min(1420px, calc(100% - 48px)); margin: 0 auto; padding: 38px 0 52px; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.brand { display: flex; align-items: center; gap: 15px; }
.brand h1 { margin: 2px 0 0; font-size: 25px; line-height: 1; letter-spacing: -.03em; }
.eyebrow { margin: 0; color: var(--green); font-size: 10px; font-weight: 800; letter-spacing: .2em; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; padding: 10px; border: 1px solid rgba(67,229,160,.28); border-radius: 13px; color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 14px rgba(67,229,160,.04); }
.brand-mark svg { width: 22px; height: 22px; filter: drop-shadow(0 0 8px rgba(67,229,160,.25)); }
.live-state { display: flex; align-items: center; gap: 11px; padding: 8px 13px; border: 1px solid var(--border); border-radius: 12px; background: rgba(12, 23, 20, .7); }
.live-state div { display: flex; flex-direction: column; gap: 2px; }
.live-state strong { font-size: 12px; }
.live-state span:last-child { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 5px rgba(255,187,85,.08); }
.live-dot.online { background: var(--green); box-shadow: 0 0 0 5px rgba(67,229,160,.09), 0 0 14px rgba(67,229,160,.5); animation: pulse 2s infinite; }
.live-dot.offline { background: var(--red); box-shadow: 0 0 0 5px rgba(255,107,112,.09); }

.hero-grid, .address-grid, .details-grid { display: grid; gap: 16px; margin-bottom: 16px; }
.hero-grid { grid-template-columns: minmax(0, 1.45fr) minmax(350px, .9fr); }
.traffic-stack { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 16px; }
.address-grid { grid-template-columns: 1fr 1fr; }
.details-grid { grid-template-columns: minmax(0, 1.35fr) minmax(350px, .8fr); align-items: start; }
.details-side { display: grid; min-width: 0; gap: 16px; }
.card { position: relative; overflow: hidden; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, rgba(20, 37, 32, .86), rgba(12, 23, 20, .9)); box-shadow: 0 16px 45px rgba(0,0,0,.16); backdrop-filter: blur(14px); }
.card::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(115deg, rgba(255,255,255,.025), transparent 30%); }
.card-heading { position: relative; display: flex; align-items: center; gap: 10px; color: #bfd1ca; font-size: 12px; font-weight: 700; letter-spacing: .025em; }
.card-icon { width: 26px; height: 26px; display: inline-grid; place-items: center; flex: none; border-radius: 8px; color: var(--green); background: var(--green-soft); font-size: 12px; font-weight: 900; }
.card-icon svg { width: 14px; height: 14px; stroke-width: 1.9; }
.card-icon.blue { color: var(--blue); background: rgba(88,166,255,.12); }
.card-icon.cyan { color: var(--cyan); background: rgba(70,217,230,.12); }
.card-icon.purple { color: var(--purple); background: rgba(168,140,255,.12); }
.card-icon.amber { color: var(--amber); background: rgba(255,187,85,.12); }
.card-icon.green { color: var(--green); }
.card-icon.red { color: var(--red); background: rgba(255,107,112,.12); }
.status-pill, .count, .subtle { margin-left: auto; }
.status-pill { padding: 5px 9px; border-radius: 20px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 10px; }
.status-pill.connected { color: var(--green); background: var(--green-soft); }
.status-pill.disconnected { color: var(--red); background: rgba(255,107,112,.1); }
.count { display: grid; min-width: 24px; height: 24px; place-items: center; border-radius: 8px; color: #a6bbb3; background: rgba(255,255,255,.045); font-size: 10px; }
.subtle { color: var(--muted); font-size: 10px; font-weight: 500; }
.card-heading-meta { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.card-heading-meta .subtle,
.card-heading-meta .count { margin-left: 0; }
.dhcp-card #lan-insights-period { padding: 4px 7px; border-radius: 6px; background: rgba(255,255,255,.025); font-size: 9px; }
.wg-card #wg-count { width: auto; padding: 0 7px; }

.connection-card { min-height: 246px; }
.connection-card::after { content: ""; position: absolute; width: 260px; height: 260px; right: -100px; top: -120px; border-radius: 50%; background: rgba(67,229,160,.05); filter: blur(4px); }
.connection-main { position: relative; display: flex; justify-content: space-between; align-items: flex-end; margin: 28px 0 23px; }
.label { margin: 0 0 8px; color: var(--muted); font-size: 11px; }
.hero-value { margin: 0; font-size: clamp(26px, 3vw, 40px); font-weight: 650; letter-spacing: -.045em; }
.pd-prefix { display: flex; align-items: center; gap: 10px; margin: 13px 0 0; color: var(--muted); font-size: 9px; }
.pd-prefix strong { overflow: hidden; color: var(--cyan); font-size: 11px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.signal { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(67,229,160,.12); border-radius: 11px; color: var(--green); background: rgba(67,229,160,.055); }
.signal svg { width: 20px; height: 20px; filter: drop-shadow(0 0 8px rgba(67,229,160,.25)); }
.interface-stat-row { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); padding: 12px 0; border-top: 1px solid var(--border); }
.interface-stat-row div { min-width: 0; padding: 0 15px; border-right: 1px solid var(--border); }
.interface-stat-row div:first-child { padding-left: 0; }
.interface-stat-row div:last-child { padding-right: 0; border: 0; }
.interface-stat-row span, .interface-stat-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.interface-stat-row span { margin-bottom: 5px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.interface-stat-row strong { color: #b8d1c7; font-size: 10px; font-weight: 600; }
.stat-row { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-row div { padding: 0 15px; border-right: 1px solid var(--border); }
.stat-row div:first-child { padding-left: 0; }
.stat-row div:last-child { padding-right: 0; border: 0; }
.stat-row span, .stat-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-row span { margin-bottom: 5px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.stat-row strong { color: #c7d8d1; font-size: 11px; font-weight: 600; }

.traffic-card { display: flex; min-height: 0; padding: 16px 18px; isolation: isolate; flex-direction: column; }
.traffic-card::before { z-index: 1; }
.traffic-card > :not(.traffic-history) { position: relative; z-index: 2; }
.traffic-history {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  filter: blur(.65px);
  transform: scale(1.01);
  transform-origin: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.4) 18%, #000 48%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.4) 18%, #000 48%);
}
.cross-border-card { background: linear-gradient(145deg, rgba(37, 30, 20, .86), rgba(21, 17, 12, .9)); }
.traffic-card .card-icon { width: 22px; height: 22px; border-radius: 7px; font-size: 10px; }
.traffic-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 11px 0 9px; }
.traffic-numbers > div { display: flex; align-items: center; gap: 11px; }
.direction { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; font-size: 14px; }
.direction svg { width: 15px; height: 15px; stroke-width: 2; }
.direction.down { color: var(--cyan); background: rgba(70,217,230,.1); }
.direction.up { color: var(--purple); background: rgba(168,140,255,.1); }
.amber-direction { color: var(--amber); background: rgba(255,187,85,.1); }
.red-direction { color: var(--red); background: rgba(255,107,112,.1); }
.traffic-numbers p { margin: 0; }
.traffic-numbers small, .traffic-numbers strong { display: block; }
.traffic-numbers small { margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.traffic-numbers strong { font-size: 14px; }
.traffic-rate { display: inline-grid !important; grid-template-columns: 5ch 5ch auto; align-items: baseline; white-space: nowrap; font-variant-numeric: tabular-nums; }
.traffic-rate-number { text-align: right; }
.traffic-rate-unit { text-align: left; }
.traffic-rate-ratio { margin-left: .5ch; color: var(--amber); font-size: 9px; font-style: normal; }
.traffic-bar { display: flex; height: 5px; margin-top: auto; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.04); }
.traffic-bar span { transition: width .5s ease; }
#traffic-rx-bar-broadband { width: 75%; background: linear-gradient(90deg, #25aebd, var(--cyan)); }
#traffic-tx-bar-broadband { width: 25%; background: linear-gradient(90deg, #886adb, var(--purple)); }
#traffic-rx-bar-crossBorder { width: 75%; background: linear-gradient(90deg, #e09a2b, var(--amber)); }
#traffic-tx-bar-crossBorder { width: 25%; background: linear-gradient(90deg, #da6b48, var(--red)); }
.traffic-total { display: flex; justify-content: flex-end; gap: 12px; margin: 9px 0 0; color: var(--muted); font-size: 9px; }
.traffic-total + .traffic-total { margin-top: 5px; }
.traffic-total span:first-child { margin-right: auto; }
.traffic-total span:nth-child(2),
.traffic-total span:nth-child(3) { width: 76px; text-align: right; white-space: nowrap; }
.cross-border-card .traffic-total span:nth-child(2),
.cross-border-card .traffic-total span:nth-child(3) { width: 110px; }
.traffic-total strong { color: #9fb4ac; font-weight: 600; }
.traffic-total em { color: var(--amber); font-style: normal; font-variant-numeric: tabular-nums; }

.compact { min-height: 174px; }
.address-list { display: grid; gap: 8px; margin-top: 19px; }
.address-item { display: grid; grid-template-columns: minmax(90px, .55fr) minmax(0, 1.45fr) auto; align-items: center; gap: 14px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.035); border-radius: 10px; background: rgba(1,8,6,.18); }
.address-item .interface { overflow: hidden; color: #9bb0a8; font-size: 11px; font-weight: 650; text-overflow: ellipsis; }
.address-item .address { overflow: hidden; color: #d4e5de; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.tag { padding: 3px 6px; border-radius: 5px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 8px; text-transform: uppercase; }
.empty { padding: 18px 4px; color: #60736c; font-size: 11px; text-align: center; }

.table-wrap {
  margin: 17px -6px -4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-color: rgba(166,213,194,.25) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.table-wrap::-webkit-scrollbar { height: 6px; }
.table-wrap::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(166,213,194,.25); }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap:focus-visible { outline: 1px solid var(--green); outline-offset: 4px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 8px 10px; color: #60736c; font-size: 8px; font-weight: 700; letter-spacing: .08em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 11px 10px; border-top: 1px solid rgba(166,213,194,.07); color: #94aaa1; font-size: 10px; white-space: nowrap; }
td:first-child { color: #d6e5df; font-weight: 650; }
.dhcp-table { min-width: 850px; }
.dhcp-table th,
.dhcp-table td { padding: 7px 10px 5px 10px; }
.dhcp-table th:nth-last-child(-n+3),
.dhcp-table td:nth-last-child(-n+3) { text-align: right; }
.table-sort { display: inline-flex; align-items: center; gap: 4px; padding: 3px 0; border: 0; color: inherit; background: transparent; font: inherit; font-weight: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.dhcp-table th:nth-last-child(-n+3) .table-sort { justify-content: flex-end; }
.table-sort:hover, .table-sort.active { color: #a6bbb3; }
.table-sort:focus-visible { outline: 1px solid var(--green); outline-offset: 3px; border-radius: 3px; }
.sort-icon { display: inline-grid; width: 12px; height: 12px; place-items: center; color: #52675f; }
.sort-icon svg { width: 10px; height: 10px; }
.table-sort.active .sort-icon { color: var(--green); }
.lan-insights-empty-row td { padding: 0; white-space: normal; }
.lan-insights-empty { display: flex; min-height: 190px; align-items: center; justify-content: center; flex-direction: column; gap: 7px; color: #60736c; text-align: center; }
.lan-insights-empty strong { color: #8da49b; font-size: 11px; font-weight: 650; }
.lan-insights-empty > span:last-child { font-size: 9px; }
.lan-insights-empty-icon { display: grid; width: 38px; height: 38px; margin-bottom: 3px; place-items: center; border: 1px solid rgba(168,140,255,.14); border-radius: 12px; color: var(--purple); background: rgba(168,140,255,.07); }
.lan-insights-empty-icon svg { width: 18px; height: 18px; }
.traffic-byte { font-family: "SFMono-Regular", Consolas, monospace; font-variant-numeric: tabular-nums; }
.traffic-byte.down { color: var(--cyan); }
.traffic-byte.up { color: var(--purple); }
.traffic-byte.total { color: #d6e5df; font-weight: 700; }
.dhcp-tabs { display: flex; gap: 7px; margin: 17px -5px 0; padding: 0 5px 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.dhcp-tab { display: inline-flex; flex: none; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid rgba(166,213,194,.08); border-radius: 8px; color: var(--muted); background: rgba(255,255,255,.025); font: inherit; font-size: 9px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.dhcp-tab span { display: grid; min-width: 18px; height: 18px; padding: 0 4px; place-items: center; border-radius: 6px; background: rgba(255,255,255,.045); font-size: 8px; }
.dhcp-tab:hover { color: #b8cbc4; background: rgba(255,255,255,.045); }
.dhcp-tab.active { border-color: rgba(67,229,160,.2); color: var(--green); background: var(--green-soft); }
.dhcp-tab:focus-visible { outline: 1px solid var(--green); outline-offset: 2px; }
.dhcp-tabs + .table-wrap { margin-top: 8px; }
.device { display: flex; align-items: center; gap: 8px; }
.device-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px rgba(67,229,160,.45); }
.device-name { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; }
.device-mac { height: 18px; margin-left: -6px; font-weight: 400; }
.device-mac .copy-value { padding-block: 1px; }
.static-device { background: rgba(70,217,230,.025); }
.static-device .device-dot { background: var(--cyan); box-shadow: 0 0 7px rgba(70,217,230,.4); }
.wireguard-device { background: rgba(168,140,255,.035); }
.wireguard-device .device-dot { background: var(--purple); box-shadow: 0 0 7px rgba(168,140,255,.45); }
.unmanaged-device { background: rgba(255,187,85,.035); }
.unmanaged-device td { color: #c9a86f; border-top-color: rgba(255,187,85,.12); }
.unmanaged-device td:first-child, .unmanaged-device .copy-value { color: var(--amber); }
.unmanaged-device .device-dot { background: var(--amber); box-shadow: 0 0 7px rgba(255,187,85,.45); }
.ip-stack { display: flex; min-width: 0; flex-direction: column; gap: 0; }
.ip-line { display: flex; min-width: 0; align-items: center; gap: 3px; height: 18px; }
.ip-version { flex: none; width: 14px; color: #60736c; font-size: 8px; font-weight: 700; }
.ip-more { display: inline-grid; flex: none; min-width: 20px; height: 17px; padding: 0 4px; place-items: center; border-radius: 5px; color: var(--cyan); background: rgba(70,217,230,.08); font-size: 8px; }
.ip-empty { color: #52645d; }
.ip-line .copy-value { padding-block: 1px; }
.copy-value { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px; border: 0; border-radius: 6px; color: #94aaa1; background: transparent; font-size: 10px; cursor: pointer; transition: color .15s ease, background .15s ease; }
.copy-value span { overflow: hidden; text-overflow: ellipsis; }
.copy-value i, .copy-value svg { width: 12px; height: 12px; flex: none; color: #60736c; font-family: ui-sans-serif, system-ui, sans-serif; font-size: 10px; font-style: normal; stroke-width: 1.8; }
.copy-value:hover { color: var(--text); background: rgba(255,255,255,.055); }
.copy-value:hover i { color: var(--green); }
.copy-value.copied { color: var(--green); background: var(--green-soft); }
.copy-value.copy-failed { color: var(--red); background: rgba(255,107,112,.1); }
.copy-value:focus-visible { outline: 1px solid var(--green); outline-offset: 2px; }

.wg-list { display: grid; gap: 10px; margin-top: 17px; }
.wg-interface { padding: 13px; border: 1px solid rgba(255,255,255,.04); border-radius: 12px; background: rgba(1,8,6,.18); }
.wg-interface-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.wg-interface-head strong { font-size: 12px; }
.wg-interface-head span { color: var(--muted); font-size: 9px; }
.peer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid rgba(255,255,255,.045); }
.peer-state { width: 7px; height: 7px; border-radius: 50%; background: #50635b; }
.peer-state.online { background: var(--green); box-shadow: 0 0 8px rgba(67,229,160,.4); }
.peer-identity { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.peer-identity > strong { overflow: hidden; color: #c5d7d0; font-size: 10px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.peer-target-separator { color: #52675f; font-weight: 400; }
.peer-target { color: #8da49b; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; font-weight: 500; }
.peer-key { overflow: hidden; color: #9bb0a8; font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.peer-meta { color: var(--muted); font-size: 8px; text-align: right; }
.peer-meta strong { display: block; margin-bottom: 2px; color: #a8bbb4; font-size: 9px; }
.stream-toggle { margin-left: auto; padding: 6px 9px; border: 1px solid rgba(70,217,230,.18); border-radius: 8px; color: var(--cyan); background: rgba(70,217,230,.08); font: inherit; font-size: 9px; font-weight: 650; cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease; }
.stream-toggle:hover { border-color: rgba(70,217,230,.35); background: rgba(70,217,230,.14); }
.stream-toggle.active { border-color: rgba(255,107,112,.2); color: var(--red); background: rgba(255,107,112,.08); }
.stream-toggle:focus-visible { outline: 1px solid var(--cyan); outline-offset: 2px; }
.dns-log-state { margin-top: 13px; color: var(--muted); font-size: 9px; }
.dns-log-state.connected { color: var(--green); }
.dns-log-state.error { color: var(--red); }
.dns-log-list { display: grid; max-height: 330px; gap: 7px; margin: 10px -5px -5px; padding: 0 5px 5px; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-color: rgba(166,213,194,.25) transparent; scrollbar-width: thin; }
.dns-log-entry { min-width: 0; padding: 9px 10px; border: 1px solid rgba(255,255,255,.04); border-radius: 9px; background: rgba(1,8,6,.18); }
.dns-log-main { display: flex; min-width: 0; align-items: center; gap: 7px; }
.dns-type { flex: none; min-width: 33px; padding: 2px 5px; border-radius: 5px; color: var(--cyan); background: rgba(70,217,230,.09); font-size: 8px; font-weight: 750; text-align: center; }
.dns-domain { min-width: 0; overflow: hidden; color: #d3e4dd; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dns-duration { flex: none; margin-left: auto; color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.dns-log-meta { display: flex; min-width: 0; gap: 8px; margin-top: 5px; color: #60736c; font-size: 8px; }
.dns-log-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dns-log-meta .dns-result { margin-left: auto; color: #829a91; text-align: right; }
.error-card { margin-top: 16px; border-color: rgba(255,107,112,.16); }
.error-card.hidden { display: none; }
#error-list { display: grid; gap: 7px; margin-top: 13px; color: #c98f91; font-size: 10px; }

@keyframes pulse { 50% { opacity: .62; } }

@media (max-width: 900px) {
  .hero-grid, .details-grid { grid-template-columns: 1fr; }
  .address-grid { grid-template-columns: 1fr; }
  .traffic-card { min-height: 150px; }
}

@media (max-width: 600px) {
  .shell { width: min(100% - 24px, 1420px); padding-top: 20px; }
  .topbar { margin-bottom: 18px; }
  .brand h1 { font-size: 20px; }
  .card { padding: 17px; border-radius: 15px; }
  .live-state { padding: 8px 10px; }
  .live-state strong { font-size: 10px; }
  .live-state span:last-child { display: none; }
  .hero-value { font-size: 25px; }
  .stat-row { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .stat-row div:nth-child(odd) { padding-left: 0; }
  .stat-row div:nth-child(2) { border-right: 0; }
  .interface-stat-row { grid-template-columns: 1fr 1fr; gap: 12px 0; }
  .interface-stat-row div:nth-child(odd) { padding-left: 0; }
  .interface-stat-row div:nth-child(2) { border-right: 0; }
  .address-item { grid-template-columns: 65px minmax(0, 1fr) auto; gap: 8px; }
  .traffic-numbers { gap: 5px; }
  .traffic-card { min-height: 145px; }
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .7);
  backdrop-filter: blur(8px);
}

.auth-dialog {
  width: min(340px, calc(100% - 40px));
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(20, 37, 32, .96), rgba(12, 23, 20, .98));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
}

.auth-dialog h2 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 18px;
}

.auth-dialog p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  background: rgba(1, 8, 6, .5);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .15s ease;
}

.auth-input:focus {
  border-color: var(--green);
}

.auth-error {
  margin: 10px 0 0;
  font-size: 11px;
}

.auth-submit {
  width: 100%;
  margin-top: 14px;
  padding: 11px 0;
  border: 0;
  border-radius: 10px;
  color: #07100e;
  background: var(--green);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.auth-submit:hover {
  background: #3ad295;
}
