/* ==========================================================================
   Firefighter Shift-Pay Budget System
   Design System — premium dashboard aesthetic
   ========================================================================== */

:root{
  /* Brand palette */
  --navy-950:#0a0f1a;
  --navy-900:#0e1524;
  --navy-800:#141d31;
  --navy-700:#1b2740;
  --navy-600:#25334f;
  --navy-500:#33445f;
  --slate-400:#7c8aa5;
  --slate-300:#9fabc2;
  --slate-200:#c7d0e0;
  --slate-100:#e7ebf2;
  --paper-0:#ffffff;
  --paper-50:#f6f8fb;
  --paper-100:#eef1f6;

  --red-600:#c8102e;
  --red-500:#e0293f;
  --red-100:#fde5e7;
  --gold-500:#e3a733;
  --gold-100:#fbf0d9;
  --green-600:#1c8a52;
  --green-500:#25a866;
  --green-100:#e1f6ea;
  --amber-600:#b9760a;
  --amber-100:#fdf1dc;
  --blue-600:#2461c4;
  --blue-100:#e5eefc;
  --income-teal:#0d9488;

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

  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:18px;
  --radius-xl:24px;

  --shadow-sm:0 1px 2px rgba(10,15,26,.06), 0 1px 1px rgba(10,15,26,.04);
  --shadow-md:0 6px 16px rgba(10,15,26,.08), 0 2px 6px rgba(10,15,26,.05);
  --shadow-lg:0 16px 40px rgba(10,15,26,.14), 0 4px 12px rgba(10,15,26,.08);

  --bg-app: var(--paper-50);
  --bg-surface: var(--paper-0);
  --bg-surface-2: var(--paper-100);
  --bg-sidebar: linear-gradient(180deg,var(--navy-900) 0%, var(--navy-950) 100%);
  --text-primary: var(--navy-950);
  --text-secondary:#4a5670;
  --text-muted:#7c8aa5;
  --text-on-dark:#eef1f6;
  --border-subtle:#e3e8f0;
  --border-strong:#cdd6e4;
  --accent: var(--red-600);
  --accent-2: var(--gold-500);
  --focus-ring: 0 0 0 3px rgba(200,16,46,.25);
  --transition-fast:120ms ease;
  --transition-med:220ms cubic-bezier(.4,0,.2,1);
}

:root[data-theme="dark"]{
  --bg-app: var(--navy-950);
  --bg-surface: var(--navy-900);
  --bg-surface-2: var(--navy-800);
  --text-primary: var(--slate-100);
  --text-secondary: var(--slate-300);
  --text-muted: var(--slate-400);
  --border-subtle: var(--navy-700);
  --border-strong: var(--navy-600);
  --shadow-md:0 6px 20px rgba(0,0,0,.35);
  --shadow-lg:0 20px 48px rgba(0,0,0,.45);
  --red-100: rgba(224,41,63,.16);
  --gold-100: rgba(227,167,51,.16);
  --green-100: rgba(37,168,102,.16);
  --amber-100: rgba(185,118,10,.2);
  --blue-100: rgba(36,97,196,.2);
}

@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg-app: var(--navy-950);
    --bg-surface: var(--navy-900);
    --bg-surface-2: var(--navy-800);
    --text-primary: var(--slate-100);
    --text-secondary: var(--slate-300);
    --text-muted: var(--slate-400);
    --red-100: rgba(224,41,63,.16);
    --gold-100: rgba(227,167,51,.16);
    --green-100: rgba(37,168,102,.16);
    --amber-100: rgba(185,118,10,.2);
    --blue-100: rgba(36,97,196,.2);
    --border-subtle: var(--navy-700);
    --border-strong: var(--navy-600);
    --shadow-md:0 6px 20px rgba(0,0,0,.35);
    --shadow-lg:0 20px 48px rgba(0,0,0,.45);
  }
}

*,*::before,*::after{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font-sans);
  background:var(--bg-app);
  color:var(--text-primary);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  transition:background var(--transition-med), color var(--transition-med);
}
h1,h2,h3,h4,h5{ margin:0 0 .4em; font-weight:700; letter-spacing:-.01em; }
h1{ font-size:1.7rem; }
h2{ font-size:1.3rem; }
h3{ font-size:1.05rem; }
p{ margin:0 0 .8em; color:var(--text-secondary); }
a{ color:var(--accent); text-decoration:none; }
button{ font-family:inherit; }
::selection{ background:var(--red-100); }

.mono{ font-family:var(--font-mono); }
.text-muted{ color:var(--text-muted); }
.text-secondary{ color:var(--text-secondary); }
.text-pos{ color:var(--green-600); }
.text-neg{ color:var(--red-600); }
.sr-only{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; }

/* ---------------------------------------------------------------------- */
/* App shell                                                               */
/* ---------------------------------------------------------------------- */
.app-shell{
  display:grid;
  grid-template-columns:264px 1fr;
  min-height:100vh;
}
.sidebar{
  background:var(--bg-sidebar);
  color:var(--text-on-dark);
  padding:22px 16px 16px;
  position:sticky;
  top:0;
  height:100vh;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  padding:6px 10px 20px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:14px;
}
.brand-badge{
  width:38px;height:38px;border-radius:10px;
  background:linear-gradient(135deg,var(--red-600),#8c0c20);
  display:flex;align-items:center;justify-content:center;
  box-shadow:0 4px 10px rgba(200,16,46,.35);
  flex-shrink:0;
}
.brand-badge svg{ width:22px;height:22px; }
.brand-text .brand-title{ font-weight:800; font-size:.95rem; color:#fff; letter-spacing:.01em; }
.brand-text .brand-sub{ font-size:.7rem; color:var(--slate-300); text-transform:uppercase; letter-spacing:.08em; }

.nav-group{ margin-bottom:6px; }
.nav-label{
  font-size:.68rem; text-transform:uppercase; letter-spacing:.09em;
  color:var(--slate-400); padding:14px 12px 6px;
  font-weight:700;
}
.nav-link{
  display:flex; align-items:center; gap:10px;
  padding:9px 12px; border-radius:10px;
  color:var(--slate-200); font-size:.87rem; font-weight:600;
  cursor:pointer; border:1px solid transparent; user-select:none;
  transition:background var(--transition-fast), color var(--transition-fast);
}
.nav-link .ico{ width:18px; height:18px; flex-shrink:0; opacity:.85; }
.nav-link:hover{ background:rgba(255,255,255,.06); color:#fff; }
.nav-link.active{
  background:linear-gradient(135deg, rgba(200,16,46,.9), rgba(140,12,32,.9));
  color:#fff;
  box-shadow:0 4px 12px rgba(200,16,46,.3);
}
.sidebar-footer{
  margin-top:auto; padding:14px 12px 4px;
  border-top:1px solid rgba(255,255,255,.08);
  font-size:.72rem; color:var(--slate-400);
}

.main-col{ display:flex; flex-direction:column; min-width:0; }
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; padding:16px 28px;
  background:var(--bg-surface);
  border-bottom:1px solid var(--border-subtle);
  position:sticky; top:0; z-index:20;
}
.topbar-title h1{ margin:0; }
.topbar-title .crumb{ font-size:.78rem; color:var(--text-muted); font-weight:600; text-transform:uppercase; letter-spacing:.06em; }
.topbar-actions{ display:flex; align-items:center; gap:10px; }

.view-container{ padding:26px 28px 60px; max-width:1400px; width:100%; margin:0 auto; }
.view{ display:none; animation:fadeIn .25s ease; }
.view.active{ display:block; }
@keyframes fadeIn{ from{opacity:0; transform:translateY(4px);} to{opacity:1; transform:none;} }

/* ---------------------------------------------------------------------- */
/* Grid + cards                                                           */
/* ---------------------------------------------------------------------- */
.grid{ display:grid; gap:18px; }
.grid-4{ grid-template-columns:repeat(4,1fr); }
.grid-3{ grid-template-columns:repeat(3,1fr); }
.grid-2{ grid-template-columns:repeat(2,1fr); }
@media (max-width:1200px){ .grid-4{grid-template-columns:repeat(2,1fr);} .grid-3{grid-template-columns:repeat(2,1fr);} }
@media (max-width:760px){ .grid-4,.grid-3,.grid-2{grid-template-columns:1fr;} .app-shell{grid-template-columns:1fr;} .sidebar{position:relative; height:auto;} }

.card{
  background:var(--bg-surface);
  border:1px solid var(--border-subtle);
  border-radius:var(--radius-lg);
  padding:20px;
  box-shadow:var(--shadow-sm);
  transition:box-shadow var(--transition-med);
}
.card.hover-raise:hover{ box-shadow:var(--shadow-md); }
.card-header{ display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:14px; gap:10px; }
.card-header h2,.card-header h3{ margin:0; }
.card-sub{ font-size:.8rem; color:var(--text-muted); margin-top:2px; }
.card-flush{ padding:0; overflow:hidden; }

.stat-card{ position:relative; overflow:hidden; }
.stat-card .stat-label{ font-size:.76rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); }
.stat-card .stat-value{ font-size:1.9rem; font-weight:800; margin:6px 0 2px; letter-spacing:-.02em; }
.stat-card .stat-delta{ font-size:.8rem; font-weight:600; }
.stat-card .stat-icon{
  position:absolute; right:16px; top:16px; width:38px; height:38px; border-radius:10px;
  display:flex; align-items:center; justify-content:center;
}
.stat-icon.red{ background:var(--red-100); color:var(--red-600); }
.stat-icon.gold{ background:var(--gold-100); color:var(--amber-600); }
.stat-icon.green{ background:var(--green-100); color:var(--green-600); }
.stat-icon.blue{ background:var(--blue-100); color:var(--blue-600); }
:root[data-theme="dark"] .stat-icon.red,body:not([data-force-light]) [data-theme="dark"] .stat-icon.red{ background:rgba(224,41,63,.15); }

/* ---------------------------------------------------------------------- */
/* Buttons + inputs                                                       */
/* ---------------------------------------------------------------------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 16px; border-radius:10px; font-size:.86rem; font-weight:700;
  border:1px solid transparent; cursor:pointer; white-space:nowrap;
  transition:all var(--transition-fast);
}
.btn:focus-visible{ box-shadow:var(--focus-ring); outline:none; }
.btn-primary{ background:linear-gradient(135deg,var(--red-600),#9c0e24); color:#fff; box-shadow:0 4px 12px rgba(200,16,46,.28); }
.btn-primary:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.btn-secondary{ background:var(--bg-surface-2); color:var(--text-primary); border-color:var(--border-strong); }
.btn-secondary:hover{ background:var(--border-subtle); }
.btn-ghost{ background:transparent; color:var(--text-secondary); }
.btn-ghost:hover{ background:var(--bg-surface-2); }
.btn-gold{ background:linear-gradient(135deg,var(--gold-500),#c88a1f); color:#fff; }
.btn-danger{ background:var(--red-100); color:var(--red-600); }
.btn-sm{ padding:6px 11px; font-size:.78rem; border-radius:8px; }
.btn-icon{ width:36px; height:36px; padding:0; border-radius:9px; }
.btn:disabled{ opacity:.5; cursor:not-allowed; }

label{ display:block; font-size:.78rem; font-weight:700; color:var(--text-secondary); margin-bottom:5px; }
.field{ margin-bottom:14px; }
.field-hint{ font-size:.74rem; color:var(--text-muted); margin-top:4px; }
.field-error{ font-size:.74rem; color:var(--red-600); margin-top:4px; font-weight:600; display:none; }
.field.has-error .field-error{ display:block; }
.field.has-error input,.field.has-error select{ border-color:var(--red-500); background:var(--red-100); }

input[type="text"],input[type="number"],input[type="date"],input[type="email"],input[type="password"],
select,textarea{
  width:100%; padding:10px 12px; border-radius:10px;
  border:1.5px solid var(--border-strong); background:var(--bg-surface);
  color:var(--text-primary); font-size:.88rem; font-family:inherit;
  transition:border-color var(--transition-fast), box-shadow var(--transition-fast);
}
textarea{ resize:vertical; min-height:70px; }
input:focus,select:focus,textarea:focus{ outline:none; border-color:var(--accent); box-shadow:var(--focus-ring); }
input::placeholder{ color:var(--text-muted); }
.input-group{ position:relative; }
.input-group .prefix{ position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--text-muted); font-weight:600; font-size:.86rem; }
.input-group input{ padding-left:26px; }
.input-row{ display:flex; gap:12px; }
.input-row > *{ flex:1; }

.toggle{ display:inline-flex; border:1px solid var(--border-strong); border-radius:10px; overflow:hidden; }
.toggle button{ border:none; background:var(--bg-surface); color:var(--text-secondary); padding:8px 14px; font-size:.8rem; font-weight:700; cursor:pointer; }
.toggle button.active{ background:var(--navy-900); color:#fff; }
:root[data-theme="dark"] .toggle button.active{ background:var(--red-600); }

/* ---------------------------------------------------------------------- */
/* Tables                                                                  */
/* ---------------------------------------------------------------------- */
table{ width:100%; border-collapse:collapse; font-size:.86rem; }
th{ text-align:left; font-size:.72rem; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); padding:9px 12px; border-bottom:1px solid var(--border-subtle); }
td{ padding:10px 12px; border-bottom:1px solid var(--border-subtle); color:var(--text-primary); }
tr:last-child td{ border-bottom:none; }
tbody tr{ transition:background var(--transition-fast); }
tbody tr:hover{ background:var(--bg-surface-2); }
td.num{ text-align:right; font-variant-numeric:tabular-nums; }
th.num{ text-align:right; }
.table-scroll{ overflow-x:auto; }

/* ---------------------------------------------------------------------- */
/* Badges, pills, progress                                                */
/* ---------------------------------------------------------------------- */
.badge{ display:inline-flex; align-items:center; gap:5px; padding:3px 9px; border-radius:99px; font-size:.7rem; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.badge-red{ background:var(--red-100); color:var(--red-600); }
.badge-green{ background:var(--green-100); color:var(--green-600); }
.badge-gold{ background:var(--gold-100); color:var(--amber-600); }
.badge-blue{ background:var(--blue-100); color:var(--blue-600); }
.badge-gray{ background:var(--bg-surface-2); color:var(--text-muted); }

.progress{ height:10px; border-radius:99px; background:var(--bg-surface-2); overflow:hidden; position:relative; }
.progress-bar{ height:100%; border-radius:99px; background:linear-gradient(90deg,var(--red-600),var(--gold-500)); transition:width .5s cubic-bezier(.4,0,.2,1); }
.progress-bar.green{ background:linear-gradient(90deg,#1c8a52,#25a866); }
.progress-bar.blue{ background:linear-gradient(90deg,#2461c4,#5a8de0); }
.progress-bar.warn{ background:linear-gradient(90deg,#b9760a,#e3a733); }
.progress-bar.over{ background:linear-gradient(90deg,#c8102e,#8c0c20); }
.progress-label{ display:flex; justify-content:space-between; font-size:.78rem; margin-bottom:6px; font-weight:600; color:var(--text-secondary); }

.chip{ display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:8px; background:var(--bg-surface-2); font-size:.76rem; font-weight:700; color:var(--text-secondary); border:1px solid var(--border-subtle); }

/* ---------------------------------------------------------------------- */
/* Calendar                                                                */
/* ---------------------------------------------------------------------- */
.calendar-toolbar{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; flex-wrap:wrap; gap:10px; }
.calendar-grid{ display:grid; grid-template-columns:repeat(7,1fr); gap:8px; }
.calendar-dow{ text-align:center; font-size:.7rem; font-weight:800; text-transform:uppercase; color:var(--text-muted); padding-bottom:4px; letter-spacing:.05em; }
.cal-day{
  min-height:92px; border-radius:12px; border:1px solid var(--border-subtle);
  padding:8px; cursor:pointer; position:relative; background:var(--bg-surface);
  transition:transform var(--transition-fast), box-shadow var(--transition-fast);
  display:flex; flex-direction:column; gap:4px;
}
.cal-day:hover{ transform:translateY(-2px); box-shadow:var(--shadow-md); }
.cal-day.outside{ opacity:.35; }
.cal-day .d-num{ font-size:.82rem; font-weight:800; }
.cal-day.is-shift{ background:linear-gradient(160deg,var(--red-100),var(--bg-surface)); border-color:var(--red-500); }
.cal-day.is-kelly{ background:linear-gradient(160deg,var(--gold-100),var(--bg-surface)); border-color:var(--gold-500); }
.cal-day.is-off{ }
.cal-day.is-today{ box-shadow:0 0 0 2px var(--accent) inset; }
.cal-tags{ display:flex; flex-wrap:wrap; gap:3px; margin-top:auto; }
.cal-tag{ font-size:.6rem; font-weight:800; padding:2px 6px; border-radius:6px; text-transform:uppercase; letter-spacing:.03em; border:1px solid transparent; }
.cal-day.has-outside-income{ box-shadow:0 0 0 2px var(--income-teal,#0d9488) inset; }
.cal-day-income-flag{ position:absolute; top:6px; right:6px; width:8px; height:8px; border-radius:50%; background:var(--income-teal,#0d9488); }
.cal-legend{ display:flex; flex-direction:column; gap:8px; font-size:.78rem; color:var(--text-secondary); margin-top:14px; }
.cal-legend-group{ display:flex; flex-wrap:wrap; gap:10px 14px; align-items:baseline; }
.cal-legend-group-label{ font-size:.68rem; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--text-muted); min-width:132px; }
.cal-legend .dot{ display:inline-block; width:10px; height:10px; border-radius:3px; margin-right:6px; vertical-align:middle; }

/* Entry list rows inside the "Add calendar entry" modal */
.entry-row{ display:flex; align-items:center; gap:10px; padding:10px 0; border-bottom:1px solid var(--border-subtle); }
.entry-row:last-of-type{ border-bottom:none; }
.entry-row .entry-dot{ width:10px; height:10px; border-radius:3px; flex-shrink:0; }
.entry-row .entry-main{ flex:1; min-width:0; }
.entry-row .entry-title{ font-weight:700; font-size:.85rem; display:flex; align-items:center; gap:6px; }
.entry-row .entry-sub{ font-size:.74rem; color:var(--text-muted); }
.entry-badge{ font-size:.6rem; font-weight:800; padding:1px 6px; border-radius:5px; text-transform:uppercase; letter-spacing:.03em; border:1px solid transparent; }

/* ---------------------------------------------------------------------- */
/* Modal + toast                                                          */
/* ---------------------------------------------------------------------- */
.overlay{ position:fixed; inset:0; background:rgba(8,12,20,.55); display:none; align-items:center; justify-content:center; z-index:100; padding:20px; backdrop-filter:blur(2px); }
.overlay.open{ display:flex; }
.modal{ background:var(--bg-surface); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); width:100%; max-width:520px; max-height:88vh; overflow-y:auto; padding:24px; }
.modal.modal-lg{ max-width:760px; }
.modal-header{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.modal-close{ background:none; border:none; cursor:pointer; color:var(--text-muted); font-size:1.3rem; line-height:1; padding:4px; }
.modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }

.toast-stack{ position:fixed; bottom:22px; right:22px; display:flex; flex-direction:column; gap:10px; z-index:200; }
.toast{ background:var(--navy-950); color:#fff; padding:12px 18px; border-radius:12px; font-size:.85rem; font-weight:600; box-shadow:var(--shadow-lg); display:flex; align-items:center; gap:10px; animation:toastIn .25s ease; }
.toast.success{ background:linear-gradient(135deg,#1c8a52,#136339); }
.toast.error{ background:linear-gradient(135deg,var(--red-600),#8c0c20); }
@keyframes toastIn{ from{opacity:0; transform:translateY(8px);} to{opacity:1; transform:none;} }

/* ---------------------------------------------------------------------- */
/* Tabs                                                                    */
/* ---------------------------------------------------------------------- */
.tabs{ display:flex; gap:4px; border-bottom:1px solid var(--border-subtle); margin-bottom:18px; overflow-x:auto; }
.tab-btn{ background:none; border:none; padding:10px 16px; font-size:.86rem; font-weight:700; color:var(--text-muted); cursor:pointer; border-bottom:2px solid transparent; white-space:nowrap; }
.tab-btn:hover{ color:var(--text-primary); }
.tab-btn.active{ color:var(--accent); border-color:var(--accent); }
.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation:fadeIn .2s ease; }

/* ---------------------------------------------------------------------- */
/* Setup wizard                                                            */
/* ---------------------------------------------------------------------- */
.wizard-overlay{ position:fixed; inset:0; background:var(--bg-app); z-index:300; display:flex; align-items:center; justify-content:center; padding:24px; }
.wizard-shell{ width:100%; max-width:720px; }
.wizard-steps{ display:flex; gap:8px; margin-bottom:22px; }
.wizard-steps .step-dot{ flex:1; height:5px; border-radius:99px; background:var(--border-subtle); }
.wizard-steps .step-dot.done{ background:var(--accent); }
.wizard-steps .step-dot.current{ background:var(--gold-500); }
.wizard-card{ background:var(--bg-surface); border-radius:var(--radius-xl); box-shadow:var(--shadow-lg); padding:34px; border:1px solid var(--border-subtle); }
.wizard-nav{ display:flex; justify-content:space-between; margin-top:26px; }
.option-tile{
  border:1.5px solid var(--border-strong); border-radius:14px; padding:14px; cursor:pointer;
  transition:all var(--transition-fast); display:flex; flex-direction:column; gap:4px;
}
.option-tile:hover{ border-color:var(--accent); }
.option-tile.selected{ border-color:var(--accent); background:var(--red-100); box-shadow:0 0 0 1px var(--accent); }
:root[data-theme="dark"] .option-tile.selected{ background:rgba(224,41,63,.12); }
.option-tile .opt-title{ font-weight:800; font-size:.9rem; }
.option-tile .opt-desc{ font-size:.76rem; color:var(--text-muted); }

/* ---------------------------------------------------------------------- */
/* Misc utility                                                            */
/* ---------------------------------------------------------------------- */
.flex{ display:flex; }
.flex-between{ display:flex; align-items:center; justify-content:space-between; }
.flex-gap{ display:flex; gap:10px; align-items:center; }
.flex-wrap{ flex-wrap:wrap; }
.mt-0{margin-top:0;} .mt-1{margin-top:8px;} .mt-2{margin-top:16px;} .mt-3{margin-top:24px;}
.mb-0{margin-bottom:0;} .mb-1{margin-bottom:8px;} .mb-2{margin-bottom:16px;}
.w-full{ width:100%; }
.divider{ height:1px; background:var(--border-subtle); margin:18px 0; border:none; }
.empty-state{ text-align:center; padding:40px 20px; color:var(--text-muted); }
.empty-state svg{ width:48px; height:48px; opacity:.4; margin-bottom:10px; }
.icon-btn-row{ display:flex; gap:6px; }
.section-help{ background:var(--blue-100); border:1px solid rgba(36,97,196,.25); color:var(--blue-600); border-radius:12px; padding:12px 14px; font-size:.8rem; margin-bottom:16px; font-weight:600; }
.section-help.gold{ background:var(--gold-100); color:var(--amber-600); border-color:rgba(227,167,51,.35); }
.section-help.red{ background:var(--red-100); color:var(--red-600); border-color:rgba(200,16,46,.3); }

.chart-wrap{ width:100%; }
.chart-wrap svg{ width:100%; height:auto; display:block; }
.legend-row{ display:flex; flex-wrap:wrap; gap:14px; margin-top:12px; font-size:.78rem; }
.legend-row .dot{ width:10px; height:10px; border-radius:3px; display:inline-block; margin-right:6px; }

.kpi-row{ display:flex; gap:22px; flex-wrap:wrap; }
.kpi{ min-width:140px; }
.kpi .kpi-label{ font-size:.72rem; color:var(--text-muted); text-transform:uppercase; font-weight:700; letter-spacing:.04em; }
.kpi .kpi-value{ font-size:1.35rem; font-weight:800; }

.list-row{ display:flex; align-items:center; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--border-subtle); gap:12px; }
.list-row:last-child{ border-bottom:none; }
.list-row .lr-main{ display:flex; flex-direction:column; }
.list-row .lr-title{ font-weight:700; font-size:.87rem; }
.list-row .lr-sub{ font-size:.76rem; color:var(--text-muted); }
.list-row .lr-actions{ display:flex; gap:6px; }

@media print{
  .sidebar,.topbar-actions,.btn,.nav-link{ display:none !important; }
  .app-shell{ grid-template-columns:1fr; }
  .card{ box-shadow:none; border:1px solid #ccc; break-inside:avoid; }
}

/* ---------------------------------------------------------------------- */
/* Auth pages (login / register / password reset)                        */
/* ---------------------------------------------------------------------- */
.auth-shell{
  min-height:100vh; display:flex; align-items:center; justify-content:center;
  padding:24px; background:var(--bg-app);
}
.auth-card{
  width:100%; max-width:420px; background:var(--bg-surface);
  border:1px solid var(--border-subtle); border-radius:var(--radius-xl);
  box-shadow:var(--shadow-lg); padding:36px;
}
.auth-brand{ display:flex; align-items:center; gap:10px; margin-bottom:22px; }
.auth-brand .brand-badge{ width:38px;height:38px;border-radius:10px;background:linear-gradient(135deg,var(--red-600),#8c0c20);display:flex;align-items:center;justify-content:center;flex-shrink:0; }
.auth-brand .brand-badge svg{ width:22px;height:22px; }
.auth-brand-title{ font-weight:800; font-size:1rem; }
.auth-foot{ text-align:center; margin-top:18px; font-size:.85rem; color:var(--text-muted); }
.auth-foot a{ font-weight:700; }
.auth-alert{ border-radius:12px; padding:12px 14px; font-size:.85rem; font-weight:600; margin-bottom:16px; display:none; }
.auth-alert.show{ display:block; }
.auth-alert.error{ background:var(--red-100); color:var(--red-600); border:1px solid rgba(200,16,46,.25); }
.auth-alert.success{ background:var(--green-100); color:var(--green-600); border:1px solid rgba(37,168,102,.25); }
.auth-divider{ display:flex; align-items:center; gap:10px; margin:18px 0; color:var(--text-muted); font-size:.78rem; }
.auth-divider::before,.auth-divider::after{ content:""; flex:1; height:1px; background:var(--border-subtle); }
