/* NetVagt – UI styles (all assets are local – works without internet) */
@font-face { font-family: Inter; src: url(../vendor/fonts/inter.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Inter; src: url(../vendor/fonts/inter-ext.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-024F, U+1E00-1EFF; }
@font-face { font-family: "JetBrains Mono"; src: url(../vendor/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 400; font-display: swap; }
:root, [data-theme="dark"] {
  --bg: #0b1020;
  --bg-2: #0f1529;
  --panel: #131a31;
  --panel-2: #182040;
  --line: #232c4d;
  --line-2: #2d3860;
  --text: #e6e9f5;
  --muted: #8a93b5;
  --faint: #5c6589;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --grad: linear-gradient(135deg, #22d3ee 0%, #6366f1 100%);
  --ok: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --info: #60a5fa;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .55);
  --radius: 14px;
  --chart-grid: rgba(138, 147, 181, .12);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #eef1f8;
  --panel: #ffffff;
  --panel-2: #f7f8fc;
  --line: #e3e7f1;
  --line-2: #d4daea;
  --text: #1a2038;
  --muted: #5f6889;
  --faint: #9aa2bf;
  --accent: #0284c7;
  --accent-2: #6366f1;
  --ok: #059669;
  --warn: #d97706;
  --bad: #dc2626;
  --info: #2563eb;
  --shadow: 0 8px 24px -14px rgba(30, 41, 80, .25);
  --chart-grid: rgba(95, 104, 137, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code, .mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; }
h1, h2, h3, h4 { margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h2 { font-size: 18px; } h3 { font-size: 15px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.right { text-align: right; }
.ico { width: 18px; height: 18px; flex-shrink: 0; }

/* ------------------------------------------------------------ Layout */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 232px; flex-shrink: 0; background: var(--bg-2); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--text); font-weight: 700; font-size: 17px; }
.brand:hover { text-decoration: none; }
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; flex: 1; overflow-y: auto; }
.sidebar nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-weight: 500; position: relative;
}
.sidebar nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.sidebar nav a.active { background: var(--panel-2); color: var(--text); }
.sidebar nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--grad); }
.sidebar nav a.active .ico { color: var(--accent); }
.badge-count { margin-left: auto; background: var(--bad); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 99px; }
.sidebar-foot { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--faint); font-size: 12px; }
.collector-state { display: flex; align-items: center; gap: 8px; color: var(--muted); margin-bottom: 4px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 26px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px);
}
.topbar h1 { font-size: 20px; margin: 0; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.content { padding: 24px 26px 60px; max-width: 1800px; width: 100%; }

.user-menu { position: relative; }
.user-chip { display: flex; align-items: center; gap: 9px; background: none; border: 1px solid transparent; border-radius: 12px; padding: 4px 8px 4px 4px; color: var(--text); cursor: pointer; }
.user-chip:hover { border-color: var(--line); }
.avatar { width: 32px; height: 32px; border-radius: 10px; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 700; }
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; }
.user-meta small { color: var(--muted); font-size: 11.5px; }
.dropdown { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 180px; padding: 6px; }
.user-menu.open .dropdown { display: block; }
.dropdown a { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--text); }
.dropdown a:hover { background: var(--panel-2); text-decoration: none; }

/* ------------------------------------------------------------ Controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--panel); color: var(--text); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; transition: .15s;
}
.btn:hover { border-color: var(--accent); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px rgba(99, 102, 241, .8); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.spin .ico { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { background: none; border: 1px solid transparent; color: var(--muted); border-radius: 10px; width: 36px; height: 36px; display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { border-color: var(--line); color: var(--text); }
.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 7px; cursor: pointer; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-2); }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field small { color: var(--faint); font-size: 12px; }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; width: 100%; transition: .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; cursor: pointer; }
.search { position: relative; }
.search .ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search input { padding-left: 36px; }

.switch-t { position: relative; width: 38px; height: 22px; display: inline-block; flex-shrink: 0; }
.switch-t input { opacity: 0; width: 0; height: 0; }
.switch-t span { position: absolute; inset: 0; background: var(--line-2); border-radius: 99px; transition: .2s; cursor: pointer; }
.switch-t span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.switch-t input:checked + span { background: var(--accent); }
.switch-t input:checked + span::after { transform: translateX(16px); }

/* ------------------------------------------------------------ Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; flex: 1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 220px; max-width: 420px; }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; border: 1px solid; font-size: 13.5px; }
.flash-success { background: color-mix(in srgb, var(--ok) 12%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.flash-error { background: color-mix(in srgb, var(--bad) 12%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.flash-warn { background: color-mix(in srgb, var(--warn) 12%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.flash-info { background: color-mix(in srgb, var(--info) 12%, transparent); border-color: color-mix(in srgb, var(--info) 35%, transparent); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.pill-ok i { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.pill-bad i { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.pill-warn i { background: var(--warn); }
.pill-info i { background: var(--info); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 6px; background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.role-admin { color: #f0abfc; border-color: rgba(240, 171, 252, .3); }
.role-edit { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }

/* ------------------------------------------------------------ Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: default; user-select: none; }
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]:hover { color: var(--text); }
.table th.asc::after { content: " ↑"; } .table th.desc::after { content: " ↓"; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.table.compact td, .table.compact th { padding: 7px 10px; }
.dev-cell { display: flex; align-items: center; gap: 10px; }
.dev-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--panel-2); color: var(--accent); border: 1px solid var(--line); flex-shrink: 0; }
.dev-ico.down { color: var(--bad); }
.dev-cell b { display: block; font-weight: 600; }
.dev-cell small { color: var(--faint); }
.bar { height: 6px; border-radius: 4px; background: var(--line); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: var(--grad); border-radius: 4px; }
.bar.hot > i { background: linear-gradient(90deg, var(--warn), var(--bad)); }

/* ------------------------------------------------------------ Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
.widget { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; min-height: 120px; display: flex; flex-direction: column; position: relative; animation: rise .35s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.widget.s { grid-column: span 3; } .widget.m { grid-column: span 4; } .widget.l { grid-column: span 6; } .widget.xl { grid-column: span 12; }
.widget-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.widget-head h3 { margin: 0; font-size: 14px; flex: 1; display: flex; align-items: center; gap: 8px; }
.widget-head h3 .ico { color: var(--accent); width: 16px; height: 16px; }
.widget-head .grip { cursor: grab; color: var(--faint); opacity: 0; transition: .15s; }
.widget:hover .grip { opacity: 1; }
.widget-body { flex: 1; position: relative; min-height: 0; }
.chart-box { position: relative; height: 240px; }
.widget.xl .chart-box { height: 280px; }
.sortable-ghost { opacity: .35; }
.widget.kpis { background: transparent; border: 0; box-shadow: none; padding: 0; min-height: 0; }

.kpi-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1500px) { .kpi-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 10px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: var(--grad); opacity: .7; }
.kpi.bad::before { background: var(--bad); opacity: 1; }
.kpi-label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 7px; }
.kpi-label .ico { width: 15px; height: 15px; }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; line-height: 1.2; }
.kpi-value small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi-sub { font-size: 12px; color: var(--faint); display: flex; gap: 8px; align-items: center; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.kpi canvas.spark { position: absolute; right: 0; bottom: 0; width: 60% !important; height: 34px !important; opacity: .55; pointer-events: none; }
.kpi-value, .kpi-sub, .kpi-label { position: relative; z-index: 1; }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 320px; overflow-y: auto; }
.feed li { display: flex; gap: 10px; padding: 8px 6px; border-radius: 8px; align-items: flex-start; }
.feed li:hover { background: var(--panel-2); }
.feed .dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.feed .dot.critical { background: var(--bad); box-shadow: 0 0 8px var(--bad); }
.feed .dot.warning { background: var(--warn); }
.feed .dot.info { background: var(--info); }
.feed .resolved { opacity: .5; }
.feed small { color: var(--faint); display: block; }

.infra-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.infra-tile { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--bg-2); display: flex; flex-direction: column; gap: 8px; color: var(--text); transition: .15s; }
.infra-tile:hover { border-color: var(--accent); text-decoration: none; transform: translateY(-1px); }
.infra-tile.down { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 7%, var(--bg-2)); }
.infra-tile .top { display: flex; gap: 10px; align-items: center; }
.infra-tile .top b { font-size: 13.5px; display: block; line-height: 1.25; }
.infra-tile .top small { color: var(--faint); font-size: 11.5px; }
.infra-tile .meters { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.infra-tile .stats { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }

.heatmap { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 3px; font-size: 10.5px; color: var(--faint); }
.heatmap .cell { aspect-ratio: 1.3; border-radius: 3px; background: var(--line); }
.heatmap .lbl { display: flex; align-items: center; }
.heatmap .hl { text-align: center; }

.topo-mini { height: 340px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.empty-state { text-align: center; color: var(--muted); padding: 40px 20px; }
.empty-state h2 { color: var(--text); }
.w-empty { color: var(--faint); font-size: 13px; text-align: center; padding: 30px 10px; }

.onboard { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: linear-gradient(135deg, color-mix(in srgb, #22d3ee 14%, var(--panel)), color-mix(in srgb, #6366f1 14%, var(--panel))); }
.onboard p { margin: 0; color: var(--muted); max-width: 720px; }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 380px; max-width: 92vw; background: var(--panel); border-left: 1px solid var(--line); z-index: 60; transform: translateX(100%); transition: transform .25s ease; padding: 20px; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer-head h3 { margin: 0; }
.drawer-foot { display: flex; gap: 8px; justify-content: flex-end; padding-top: 14px; border-top: 1px solid var(--line); }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(5, 8, 20, .5); z-index: 55; opacity: 0; pointer-events: none; transition: .2s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.widget-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.widget-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.widget-item .ico { color: var(--accent); }
.widget-item div { flex: 1; }
.widget-item b { display: block; font-size: 13.5px; }
.widget-item small { color: var(--faint); font-size: 12px; }
.widget-item select { width: auto; padding: 4px 6px; font-size: 12px; }

/* Modal */
.modal { position: fixed; inset: 0; background: rgba(5, 8, 20, .6); z-index: 70; display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 620px; padding: 22px; box-shadow: var(--shadow); animation: rise .2s ease; }
.modal-card .modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-card .modal-head h3 { margin: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
pre.code, .log-box { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px; overflow-x: auto; font-family: "JetBrains Mono", monospace; font-size: 12px; white-space: pre-wrap; word-break: break-all; }
.log-box { max-height: 320px; overflow-y: auto; }

/* Device page */
.dev-hero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.dev-hero .dev-ico { width: 56px; height: 56px; border-radius: 14px; }
.dev-hero .dev-ico .ico { width: 28px; height: 28px; }
.dev-hero h2 { margin: 0; font-size: 22px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat span { color: var(--muted); font-size: 12px; display: block; }
.stat b { font-size: 20px; font-weight: 700; }
.ports { display: flex; flex-wrap: wrap; gap: 6px; }
.port { width: 46px; text-align: center; padding: 6px 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); font-size: 11px; color: var(--faint); }
.port.up { border-color: color-mix(in srgb, var(--ok) 50%, transparent); color: var(--text); background: color-mix(in srgb, var(--ok) 10%, var(--bg-2)); }
.port.uplink { border-color: var(--accent); }
.port b { display: block; font-size: 13px; }

/* Topology */
.topo-wrap { position: relative; height: calc(100vh - 170px); min-height: 520px; border-radius: var(--radius); border: 1px solid var(--line); background:
  radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0/22px 22px, var(--panel); overflow: hidden; }
#topo { position: absolute; inset: 0; }
.topo-legend { position: absolute; left: 14px; bottom: 14px; background: color-mix(in srgb, var(--panel) 92%, transparent); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.topo-legend span { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.topo-legend i { width: 18px; height: 0; border-top: 2px solid; display: inline-block; }
.topo-panel { position: absolute; right: 14px; top: 14px; width: 270px; background: color-mix(in srgb, var(--panel) 95%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: none; box-shadow: var(--shadow); }
.topo-panel.open { display: block; }

/* ------------------------------------------------------------ Auth */
.auth-body { min-height: 100vh; }
.auth-bg { position: fixed; inset: 0; background: radial-gradient(ellipse at 20% 10%, rgba(34, 211, 238, .15), transparent 50%), radial-gradient(ellipse at 80% 90%, rgba(99, 102, 241, .18), transparent 50%), var(--bg); }
.auth-bg canvas { width: 100%; height: 100%; display: block; }
.auth-wrap { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: 100%; max-width: 400px; background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7); }
.auth-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.auth-brand h1 { margin: 0; font-size: 24px; }
.auth-brand p { margin: 0; color: var(--muted); }
.auth-foot { text-align: center; color: var(--faint); font-size: 12px; margin: 18px 0 0; }
.install-wrap { position: relative; max-width: 820px; margin: 0 auto; padding: 40px 20px; }
.auth-brand.big h1 { font-size: 30px; }

/* ------------------------------------------------------------ Responsive */
.mobile-only { display: none; }
@media (max-width: 1280px) {
  .widget.s { grid-column: span 6; } .widget.m { grid-column: span 6; } .widget.l { grid-column: span 12; }
}
@media (max-width: 900px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.open { transform: none; }
  .mobile-only { display: grid; }
  .widget.s, .widget.m, .widget.l { grid-column: span 12; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .content { padding: 18px 14px 50px; }
  .topbar { padding: 12px 14px; }
  .hide-sm, .user-meta { display: none; }
  .kv { grid-template-columns: 110px 1fr; }
}
