/* ==========================================================================
   Nix Control Center — Design System
   Identidad: Nix 🦊 · dark premium · fox orange + violeta + cian
   ========================================================================== */

:root {
  /* superficies */
  --bg: #07090f;
  --bg-2: #0b0f1a;
  --bg-3: #101627;
  --bg-4: #172036;
  --border: rgba(148, 163, 200, 0.13);
  --border-strong: rgba(148, 163, 200, 0.24);

  /* texto */
  --text: #e9edf6;
  --text-2: #a4b0ca;
  --text-3: #626f8c;

  /* marca */
  --acc: #ff8c42;
  --acc-2: #ffb26b;
  --violet: #8b5cf6;
  --violet-2: #a78bfa;
  --cyan: #22d3ee;

  /* estados */
  --ok: #34d399;
  --ok-dim: rgba(52, 211, 153, 0.12);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.12);
  --err: #f87171;
  --err-dim: rgba(248, 113, 113, 0.12);
  --info: #60a5fa;
  --info-dim: rgba(96, 165, 250, 0.12);

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 34px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, Menlo,
          Consolas, "Liberation Mono", monospace;

  --sidebar-w: 248px;
  --topbar-h: 62px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(255, 140, 66, 0.07), transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(255, 140, 66, 0.35); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* utilidades */
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.hidden { display: none !important; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.row { display: flex; align-items: center; gap: 8px; }
.spacer { flex: 1; }

/* =================================================================== LOGIN */
#login-screen {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background:
    radial-gradient(900px 500px at 50% -20%, rgba(255, 140, 66, 0.12), transparent 60%),
    radial-gradient(700px 500px at 80% 110%, rgba(139, 92, 246, 0.14), transparent 55%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 400px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 38px 34px 30px;
  box-shadow: var(--shadow);
  animation: rise .5s var(--ease);
}
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,140,66,.22), rgba(139,92,246,.18));
  border: 1px solid var(--border-strong);
  color: var(--acc-2);
  box-shadow: 0 0 40px rgba(255, 140, 66, 0.18);
}
.login-card h1 { margin: 6px 0 2px; font-size: 21px; letter-spacing: .2px; text-align: center; }
.login-card .sub { text-align: center; color: var(--text-2); margin: 0 0 24px; font-size: 13px; }
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; letter-spacing: .3px; }
.field input {
  width: 100%; padding: 11px 13px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; outline: none; transition: border .2s, box-shadow .2s;
}
.field input:focus { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255,140,66,.15); }
.login-err {
  color: var(--err); font-size: 13px; min-height: 18px; margin: -4px 0 10px;
  text-align: center;
}

/* =================================================================== APP */
#app { display: none; height: 100vh; overflow: hidden; }
#app.ready { display: flex; }

/* ----------------------------------------------------------------- sidebar */
#sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(16,22,39,.9), rgba(11,15,26,.95));
  border-right: 1px solid var(--border);
  transition: width .3s var(--ease), margin .3s var(--ease);
  z-index: 40;
}
.brand {
  display: flex; align-items: center; gap: 11px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(255,140,66,.25), rgba(139,92,246,.2));
  border: 1px solid var(--border-strong);
  color: var(--acc-2);
}
.brand .b-t { font-weight: 700; font-size: 15.5px; letter-spacing: .2px; line-height: 1.15; }
.brand .b-s { font-size: 11px; color: var(--text-3); letter-spacing: .4px; }
#nav { flex: 1; overflow-y: auto; padding: 12px 10px 16px; }
.nav-group { margin-top: 14px; }
.nav-group:first-child { margin-top: 0; }
.nav-group-title {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-3); padding: 4px 10px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%; padding: 8.5px 11px; margin-bottom: 2px;
  background: none; border: 0; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; text-align: left;
  transition: background .18s, color .18s;
  position: relative;
}
.nav-item:hover { background: var(--bg-4); color: var(--text); }
.nav-item.active { background: linear-gradient(90deg, rgba(255,140,66,.16), rgba(255,140,66,.04)); color: var(--acc-2); }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px;
  border-radius: 3px; background: var(--acc);
  box-shadow: 0 0 12px rgba(255,140,66,.8);
}
.nav-item .ic { width: 19px; height: 19px; flex-shrink: 0; opacity: .92; }
.nav-item .dot {
  width: 7px; height: 7px; border-radius: 50%; margin-left: auto; flex-shrink: 0;
}
.nav-item .dot.ok { background: var(--ok); box-shadow: 0 0 8px rgba(52,211,153,.7); }
.nav-item .dot.warn { background: var(--warn); box-shadow: 0 0 8px rgba(251,191,36,.7); }
.nav-item .dot.error { background: var(--err); box-shadow: 0 0 8px rgba(248,113,113,.7); }
.nav-item .dot.live { animation: pulse 1.6s infinite; }

#sidebar-foot {
  padding: 12px 16px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--text-3);
}
#sidebar-foot .ver { display: flex; align-items: center; gap: 6px; }

/* ----------------------------------------------------------------- topbar */
#main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
#topbar {
  height: var(--topbar-h); flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 0 22px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 15, 26, 0.72);
  backdrop-filter: blur(12px);
  z-index: 30;
}
#page-title { font-size: 16.5px; font-weight: 650; letter-spacing: .2px; }
#topbar .live-clock { font-family: var(--mono); font-size: 12.5px; color: var(--text-3); }

.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .3px;
  border: 1px solid transparent;
}
.pill .pdot { width: 7px; height: 7px; border-radius: 50%; }
.pill.ok { background: var(--ok-dim); color: var(--ok); border-color: rgba(52,211,153,.3); }
.pill.ok .pdot { background: var(--ok); box-shadow: 0 0 8px rgba(52,211,153,.8); }
.pill.warn { background: var(--warn-dim); color: var(--warn); border-color: rgba(251,191,36,.3); }
.pill.warn .pdot { background: var(--warn); box-shadow: 0 0 8px rgba(251,191,36,.8); animation: pulse 1.4s infinite; }
.pill.error { background: var(--err-dim); color: var(--err); border-color: rgba(248,113,113,.3); }
.pill.error .pdot { background: var(--err); box-shadow: 0 0 8px rgba(248,113,113,.8); animation: pulse 1s infinite; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--bg-3); border: 1px solid var(--border);
  color: var(--text-2); transition: all .18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-4); }
.icon-btn.spin .ic { animation: spin 1s linear infinite; }

/* ------------------------------------------------------------------ content */
#content { flex: 1; overflow-y: auto; padding: 24px 26px 60px; scroll-behavior: smooth; }
.page { max-width: 1280px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: .2px; }
.page-head .desc { color: var(--text-2); margin-top: 3px; font-size: 13.5px; max-width: 640px; }
.page-head .updated { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* hero estado global */
.hero {
  display: grid; grid-template-columns: minmax(280px, 1.1fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.hero-main {
  grid-row: span 1;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, var(--bg-3), var(--bg-2));
  padding: 22px;
  position: relative; overflow: hidden;
}
.hero-main::after {
  content: "🦊"; position: absolute; right: -6px; bottom: -14px;
  font-size: 88px; opacity: .07; transform: rotate(-8deg);
}
.hero-main .h-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--text-3); }
.hero-main .h-status { font-size: 26px; font-weight: 750; margin: 6px 0 2px; display: flex; align-items: center; gap: 10px; }
.hero-main .h-sub { color: var(--text-2); font-size: 13px; }
.hero-main.ok .h-status { color: var(--ok); }
.hero-main.warn .h-status { color: var(--warn); }
.hero-main.error .h-status { color: var(--err); }
.hero-stat {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: var(--bg-3); padding: 16px 18px;
  display: flex; flex-direction: column; justify-content: center;
  animation: rise .45s var(--ease) both;
}
.hero-stat .v { font-size: 21px; font-weight: 700; font-family: var(--mono); }
.hero-stat .k { font-size: 11.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.hero-stat .s { font-size: 11.5px; color: var(--text-2); }

/* alertas de atención */
.attention {
  border-radius: var(--radius);
  border: 1px solid rgba(251,191,36,.28);
  background: linear-gradient(180deg, rgba(251,191,36,.07), rgba(251,191,36,.02));
  padding: 16px 18px; margin-bottom: 20px;
}
.attention.ok-all { border-color: rgba(52,211,153,.25); background: linear-gradient(180deg, rgba(52,211,153,.06), transparent); }
.attention h3 { margin: 0 0 10px; font-size: 13px; letter-spacing: .4px; text-transform: uppercase; color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.attention ul { margin: 0; padding: 0; list-style: none; }
.attention li { display: flex; gap: 10px; padding: 6px 0; font-size: 13.5px; align-items: baseline; }
.attention li .lvl { font-size: 10.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; flex-shrink: 0; }
.attention li .lvl.warn { background: var(--warn-dim); color: var(--warn); }
.attention li .lvl.error { background: var(--err-dim); color: var(--err); }

/* grid de módulos */
.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-3), rgba(16,22,39,.75));
  padding: 18px;
  transition: transform .22s var(--ease), border-color .22s, box-shadow .22s;
  animation: rise .45s var(--ease) both;
  position: relative; overflow: hidden;
}
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.card .c-head { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.card .c-ic {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--bg-4); color: var(--acc-2);
  border: 1px solid var(--border);
}
.card .c-title { font-weight: 650; font-size: 14.5px; }
.card .c-sub { font-size: 11.5px; color: var(--text-3); }
.card .c-body { display: flex; flex-direction: column; gap: 8px; }
.card .c-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); display: flex; justify-content: space-between; align-items: center; }
.card.clickable { cursor: pointer; }
.big-val { font-size: 24px; font-weight: 750; font-family: var(--mono); }
.big-val small { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* chips kv */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.chip {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-3); padding: 11px 13px;
  transition: border-color .2s;
}
.chip .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: var(--text-3); }
.chip .v { font-size: 17px; font-weight: 700; font-family: var(--mono); margin-top: 2px; }
.chip .hint { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.chip.ok .v { color: var(--ok); }
.chip.warn .v { color: var(--warn); }
.chip.error .v { color: var(--err); }

/* items */
.items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-3);
  transition: border-color .18s, background .18s;
}
.item:hover { border-color: var(--border-strong); background: var(--bg-4); }
.item .i-ic { width: 30px; height: 30px; border-radius: 8px; flex-shrink: 0; display: grid; place-items: center; background: var(--bg-4); color: var(--text-2); }
.item .i-tx { flex: 1; min-width: 0; }
.item .i-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .i-sub { font-size: 11.8px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .i-val { font-size: 12.5px; font-weight: 650; font-family: var(--mono); flex-shrink: 0; }
.item.ok .i-val { color: var(--ok); }
.item.warn .i-val { color: var(--warn); }
.item.error .i-val { color: var(--err); }
.item.info .i-val { color: var(--info); }

/* tablas */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 18px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; min-width: 560px; }
.tbl th {
  text-align: left; padding: 9px 13px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px;
  color: var(--text-3); background: var(--bg-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.tbl td { padding: 8.5px 13px; border-bottom: 1px solid rgba(148,163,200,.07); color: var(--text-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: rgba(148,163,200,.04); }
.tbl td.mono, .tbl td.num { font-family: var(--mono); font-size: 12.2px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 650; letter-spacing: .3px; }
.badge.ok { background: var(--ok-dim); color: var(--ok); }
.badge.warn { background: var(--warn-dim); color: var(--warn); }
.badge.error { background: var(--err-dim); color: var(--err); }
.badge.info { background: var(--info-dim); color: var(--info); }

/* charts */
.chart-box { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-3); padding: 14px 16px; margin-bottom: 14px; }
.chart-box .c-label { font-size: 12px; color: var(--text-2); margin-bottom: 8px; display: flex; justify-content: space-between; }
.chart-box .c-label .last { font-family: var(--mono); color: var(--acc-2); font-weight: 700; }
.chart-box svg { width: 100%; height: 92px; display: block; }
.spark { height: 40px; margin-top: 8px; }
.spark svg { height: 40px; width: 100%; }

/* skeleton */
.skeleton {
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(100deg, var(--bg-3) 40%, var(--bg-4) 50%, var(--bg-3) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite linear;
  height: 120px;
}
@keyframes shimmer { to { background-position: -200% 0; } }

/* modal */
.modal-back {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(4, 6, 10, 0.72); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 18px;
  animation: fade .2s ease;
}
.modal {
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 24px;
  box-shadow: var(--shadow);
  animation: rise .3s var(--ease);
}
.modal h3 { margin: 0 0 6px; font-size: 16.5px; }
.modal .m-desc { color: var(--text-2); font-size: 13px; margin-bottom: 16px; }
.modal input[type="text"] {
  width: 100%; padding: 10px 12px; margin: 10px 0 14px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-family: var(--mono); outline: none;
}
.modal input[type="text"]:focus { border-color: var(--acc); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* botones */
.btn {
  padding: 9px 16px; border-radius: 10px; border: 1px solid var(--border-strong);
  background: var(--bg-4); color: var(--text); font-size: 13px; font-weight: 600;
  transition: all .18s;
}
.btn:hover { background: var(--bg-3); border-color: var(--text-3); }
.btn.primary { background: linear-gradient(135deg, var(--acc), #ff6f2c); border: 0; color: #1a0e05; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: var(--err-dim); border-color: rgba(248,113,113,.4); color: var(--err); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* toast */
#toasts { position: fixed; bottom: 18px; right: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 11px 16px; border-radius: 11px; font-size: 13px;
  background: var(--bg-3); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); animation: rise .3s var(--ease);
  display: flex; gap: 9px; align-items: center; max-width: 340px;
}
.toast.ok { border-color: rgba(52,211,153,.4); }
.toast.error { border-color: rgba(248,113,113,.45); }
.toast.warn { border-color: rgba(251,191,36,.4); }

/* notas */
.notes { margin-top: 16px; font-size: 11.5px; color: var(--text-3); border-top: 1px dashed var(--border); padding-top: 10px; }
.notes p { margin: 3px 0; }

/* empty / stale */
.stale-note {
  display: flex; gap: 10px; align-items: center;
  padding: 12px 15px; margin-bottom: 16px;
  border-radius: var(--radius-sm); border: 1px solid rgba(251,191,36,.3);
  background: var(--warn-dim); color: var(--warn); font-size: 13px;
}
.empty { color: var(--text-3); text-align: center; padding: 30px 10px; font-size: 13px; }

/* footer */
.page-foot { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-3); display: flex; gap: 18px; flex-wrap: wrap; }

/* acciones */
.action-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.action-tile {
  flex: 1; min-width: 220px;
  border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-3); padding: 13px 15px; text-align: left;
  transition: border-color .2s, background .2s;
}
.action-tile:hover { border-color: var(--acc); background: var(--bg-4); }
.action-tile .a-t { font-weight: 650; font-size: 13.5px; }
.action-tile .a-d { font-size: 11.8px; color: var(--text-3); margin-top: 2px; }

/* animaciones */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: .25; } }

/* =============================================================== RESPONSIVE */
#menu-btn { display: none; }

@media (max-width: 1024px) {
  #sidebar { width: 64px; }
  #sidebar .brand .b-t, #sidebar .brand .b-s, #sidebar .nav-item .n-lbl, #sidebar-foot .ver span { display: none; }
  .nav-item { justify-content: center; padding: 10px 0; }
  .nav-item .dot { position: absolute; right: 8px; top: 8px; margin: 0; }
  .nav-group-title { text-align: center; padding: 4px 0; font-size: 9px; }
  .nav-item.active::before { left: -10px; }
}

@media (max-width: 760px) {
  #sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-105%);
    width: min(280px, 84vw);
    box-shadow: var(--shadow);
  }
  #sidebar.open { transform: none; }
  #sidebar .brand .b-t, #sidebar .brand .b-s, #sidebar .nav-item .n-lbl, #sidebar-foot .ver span { display: initial; }
  #sidebar .brand { display: flex; }
  .nav-item { justify-content: flex-start; padding: 8.5px 11px; }
  #sidebar-foot .ver span { display: inline; }
  #menu-btn { display: grid; }
  #content { padding: 16px 14px 84px; }
  #topbar { padding: 0 14px; gap: 9px; }
  #topbar .live-clock { display: none; }
  .hero { grid-template-columns: 1fr 1fr; }
  .hero-main { grid-column: 1 / -1; }
  .grid { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(4,6,10,.6); z-index: 35; }
}

@media (max-width: 420px) {
  .hero { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
