/* ---------------------------------------------------------------------------
   Közös stílus-tokenek és komponensek (index.html / admin.html eredeti
   <style> blokkjaiból kiemelve, változtatás nélkül) + bal oldali navigáció.
--------------------------------------------------------------------------- */
:root {
  color-scheme: dark;
  --surface-1: #1a1a19;
  --plane: #0d0d0d;
  --text-primary: #ffffff;
  --text-secondary: #c3c2b7;
  --muted: #898781;
  --grid: #2c2c2a;
  --baseline: #383835;
  --border: rgba(255,255,255,0.10);
  --series-1: #3987e5;
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --card: #212120;
}
:root[data-theme="light"] {
  color-scheme: light;
  --surface-1: #fcfcfb;
  --plane: #f9f9f7;
  --text-primary: #0b0b0b;
  --text-secondary: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --baseline: #c3c2b7;
  --border: rgba(11,11,11,0.10);
  --series-1: #2a78d6;
  --card: #ffffff;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--plane);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}
header {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px; background: var(--surface-1);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10;
  flex-wrap: wrap;
}
header h1 { font-size: 18px; margin: 0; font-weight: 650; letter-spacing: .2px; }
header .spacer { flex: 1; }
.pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border);
}
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.muted { color: var(--muted); }
.btn {
  background: var(--card); color: var(--text-primary); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center;
}
.btn:hover { border-color: var(--muted); }
.btn:disabled { opacity: .5; cursor: default; }
main { padding: 20px; }
.panel {
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 14px;
  padding: 18px; margin-bottom: 20px;
}
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.flabel { display: block; font-size: 11.5px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-secondary); }
select, input[type=text], input[type=number], input[type=date], input[type=password] {
  background: var(--card); color: var(--text-primary); border: 1px solid var(--border);
  padding: 7px 10px; border-radius: 8px; font-size: 13px; min-width: 160px;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
th { color: var(--text-secondary); font-weight: 600; }
.totals { display: flex; gap: 24px; flex-wrap: wrap; margin-top: 14px; }
.tile { display: flex; flex-direction: column; gap: 2px; }
.tile .label { font-size: 11.5px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }
/* .tile .value mérete oldalanként eltér (élő kártya vs. riport tábla) – ezt
   szándékosan minden oldal a saját <style>-jében adja meg. */
.badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge.active { color: var(--good); background: color-mix(in srgb, var(--good) 15%, transparent); }
.badge.inactive { color: var(--muted); background: color-mix(in srgb, var(--muted) 15%, transparent); }

/* ---- Bal oldali navigáció (nav.js injektálja) ---- */
body {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100vh;
  overflow: hidden;
}
.sidenav {
  grid-column: 1;
  height: 100vh;
  overflow-y: auto;
  background: var(--surface-1);
  border-right: 1px solid var(--border);
  padding: 18px 0;
}
.sidenav-brand {
  font-weight: 700; font-size: 14.5px; padding: 0 18px 16px; letter-spacing: .2px;
}
.sidenav ul { list-style: none; margin: 0; padding: 0; }
.sidenav li { margin: 0; }
.sidenav a {
  display: block; padding: 9px 18px; font-size: 13.5px; font-weight: 600;
  color: var(--text-secondary); text-decoration: none; border-left: 3px solid transparent;
}
.sidenav a:hover { color: var(--text-primary); background: var(--card); }
.sidenav a.active {
  color: var(--text-primary); background: var(--card);
  border-left-color: var(--series-1);
}
.page-main {
  grid-column: 2;
  height: 100vh;
  overflow-y: auto;
  min-width: 0;
}
.stub-panel { max-width: 640px; }
