/* =========================================================
   Sistema Integral — Estudio Giraud
   Paleta: brandboard Estudio Giraud (navy #3D4B6B, taupe #C4B5A5)
   Tipografía: Inter (body) + Playfair Display (display headings)
   Ref: Pilot, Mercury Banking, Ramp
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

/* ─── Tokens ──────────────────────────────────────────────── */
:root {
  /* Brand */
  --brand:        #3D4B6B;
  --brand-dark:   #2C3854;
  --brand-hover:  #2C3854;
  --brand-tint:   #EEF1FA;
  --brand-tint-2: #F7F8FD;

  /* Warm accent (taupe from brandboard) */
  --warm:         #C4B5A5;
  --warm-light:   #F5F1EE;

  /* Neutrals */
  --dark:         #1A2035;
  --text-primary: #1A2035;
  --text-body:    #3D4460;
  --text-label:   #5E6A88;
  --text-muted:   #8B98B4;
  --white:        #FFFFFF;

  /* Surfaces */
  --surface:      #F2F4F9;
  --surface-2:    #F8F9FC;

  /* Borders */
  --border:       #E2E7F2;
  --border-mid:   #C8D0E8;

  /* Sidebar */
  --sidebar-bg:   #1C2540;
  --sidebar-text: rgba(255,255,255,.72);
  --sidebar-muted: rgba(255,255,255,.32);
  --sidebar-active: #ffffff;
  --sidebar-hover:  rgba(255,255,255,.08);
  --sidebar-border: rgba(255,255,255,.07);

  /* Status */
  --success:      #15803D;
  --success-bg:   #DCFCE7;
  --error:        #B91C1C;
  --error-bg:     #FEE2E2;
  --warn:         #B45309;
  --warn-bg:      #FEF3C7;

  /* Layout */
  --rail-w:       60px;
  --sub-w:        200px;
  --sidebar-w:    234px;
  --header-h:     56px;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow-card:  0 1px 3px rgba(29,36,65,.06), 0 4px 16px rgba(29,36,65,.05);
  --shadow-lg:    0 8px 30px rgba(29,36,65,.14), 0 2px 8px rgba(29,36,65,.06);
}

/* ─── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C8D0E8; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand); }

body {
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--text-primary);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Layout ─────────────────────────────────────────────── */
.layout { display: flex; min-height: 100vh; }

/* ─── Sidebar (rail de íconos) ───────────────────────────── */
.sidebar {
  width: var(--rail-w);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  overflow: visible;
  z-index: 100;
  border-right: 1px solid var(--sidebar-border);
  padding: 8px 0 6px;
  gap: 2px;
  transition: none;
}

/* ── Rail: logo ── */
.rail-logo {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 4px; flex-shrink: 0;
  border-radius: 10px; text-decoration: none;
  transition: background .12s;
}
.rail-logo:hover { background: rgba(255,255,255,.07); }
.rail-logo img { height: 30px; opacity: .92; }

/* ── Rail: search button ── */
.rail-cmd {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 40px; height: 36px; border-radius: 8px; border: none;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.38);
  cursor: pointer; gap: 2px; flex-shrink: 0; margin-bottom: 6px;
  transition: background .12s, color .12s;
}
.rail-cmd:hover { background: rgba(255,255,255,.11); color: rgba(255,255,255,.7); }
.rail-cmd-hint {
  font-size: 7.5px; letter-spacing: .3px; font-family: inherit;
  color: rgba(255,255,255,.22);
}

/* ── Rail: module buttons ── */
.rail-modules {
  display: flex; flex-direction: column; gap: 1px; width: 100%;
  align-items: center; overflow-y: auto; overflow-x: hidden;
  flex: 1; min-height: 0;   /* flex:1+min-height:0 → bounded height + scrollable */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.rail-modules::-webkit-scrollbar { width: 3px; }
.rail-modules::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }
.rail-modules::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.45); }

.rail-mod {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 46px; border-radius: 9px; border: none;
  background: transparent; color: rgba(255,255,255,.65);
  cursor: pointer; gap: 3px; padding: 0; font-family: inherit;
  transition: background .12s, color .12s;
  position: relative;
}
.rail-mod:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.85); }
.rail-mod.active {
  background: rgba(255,255,255,.13);
  color: #fff;
}
.rail-mod.active::before {
  content: '';
  position: absolute; left: -8px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0;
  background: rgba(255,255,255,.7);
}
.rail-mod-icon { font-size: 16px; line-height: 1; }
.rail-mod-label { font-size: 7.5px; letter-spacing: .2px; font-weight: 500; line-height: 1; white-space: nowrap; }

/* ── Rail: spacer and footer ── */
.rail-spacer { display: none; }
.rail-foot {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding-top: 6px; border-top: 1px solid var(--sidebar-border); width: 100%;
}
.rail-btn {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 36px; border-radius: 8px;
  color: rgba(255,255,255,.38); text-decoration: none;
  transition: background .12s, color .12s;
  border: none; background: transparent; cursor: pointer; font-family: inherit;
}
.rail-btn:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.8); }

/* ── Sub-panel ── */
.sidebar-sub {
  position: fixed;
  left: var(--rail-w); top: 0;
  height: 100vh;
  width: 0;
  overflow: hidden;
  background: #1a2240;
  color: rgba(255,255,255,.75);
  border-right: 1px solid var(--sidebar-border);
  box-shadow: 4px 0 24px rgba(0,0,0,.22);
  transition: width .22s cubic-bezier(.4,0,.2,1);
  z-index: 99;
  display: flex; flex-direction: column;
}
.sidebar-sub.open { width: var(--sub-w); }

.sub-header {
  padding: 16px 14px 9px; flex-shrink: 0;
  font-size: 9px; font-weight: 800; letter-spacing: 1.4px;
  text-transform: uppercase; color: rgba(255,255,255,.28);
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}
.sub-scroll {
  flex: 1; overflow-y: auto; padding: 6px 0 16px;
}
.sub-scroll::-webkit-scrollbar { width: 3px; }
.sub-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.28); border-radius: 2px; }
.sub-scroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.5); }

.sub-section {
  padding: 10px 14px 3px;
  font-size: 8px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: rgba(255,255,255,.2);
  white-space: nowrap; overflow: hidden;
}
.sub-section:first-child { padding-top: 6px; }

.sub-item {
  display: block; padding: 6px 14px;
  font-size: 12px; color: rgba(255,255,255,.6);
  text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transition: background .1s, color .1s;
  border-left: 2px solid transparent;
}
.sub-item:hover {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.9);
  border-left-color: rgba(255,255,255,.15);
}
.sub-item.active {
  color: #fff; font-weight: 700;
  background: rgba(255,255,255,.1);
  border-left-color: rgba(255,255,255,.55);
}

/* ── Sub-panel: secciones colapsables ── */
.sub-group {
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sub-group:last-child { border-bottom: none; }
.sub-group > summary.sub-group-title {
  list-style: none;
  display: flex; align-items: center;
  padding: 9px 14px 6px;
  font-size: 9px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  cursor: pointer; user-select: none;
}
.sub-group > summary.sub-group-title::after {
  content: '›';
  font-size: 13px;
  margin-left: auto;
  opacity: .5;
  transition: transform .18s;
  transform: rotate(90deg);
  display: inline-block;
}
.sub-group:not([open]) > summary.sub-group-title::after {
  transform: rotate(0deg);
}
.sub-group-title::-webkit-details-marker { display: none; }
.sub-group > .sub-item { padding-left: 20px; }

/* ── Hidden source nav (command palette) ── */
#sidebar-nav-source { display: none !important; }

/* ─── Main ───────────────────────────────────────────────── */
.main {
  margin-left: var(--rail-w);
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  transition: margin-left .22s cubic-bezier(.4,0,.2,1);
}
.layout.sub-open .main { margin-left: calc(var(--rail-w) + var(--sub-w)); }

.main-header {
  height: var(--header-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 0 var(--border), 0 2px 8px rgba(29,36,65,.04);
}
.main-header h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -.01em;
}

.header-user {
  font-size: 12px;
  color: var(--text-label);
  background: var(--brand-tint);
  padding: 5px 14px;
  border-radius: 99px;
  border: 1px solid #D0D7EF;
  font-weight: 500;
}

/* padding-bottom extra para que los botones flotantes (IA, VOZ) no tapen el último contenido */
.content { padding: 24px 28px 110px; flex: 1; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-header {
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
}
.card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -.01em;
}
.card-body { padding: 18px; }

/* ─── Toolbar ────────────────────────────────────────────── */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.search-input {
  padding: 7px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 13px;
  width: 240px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  color: var(--text-primary);
  font-family: inherit;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(61,75,107,.11);
}

select.form-select-sm {
  padding: 7px 10px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  background: #fff;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
}
select.form-select-sm:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(61,75,107,.11);
  outline: none;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .14s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  line-height: 1.35;
  font-family: inherit;
  letter-spacing: -.01em;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 1px 3px rgba(61,75,107,.25), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover {
  background: var(--brand-dark);
  box-shadow: 0 3px 10px rgba(61,75,107,.3);
  transform: translateY(-1px);
}
.btn-primary:active { transform: none; box-shadow: none; }

.btn-secondary {
  background: #fff;
  color: var(--text-body);
  border: 1px solid var(--border-mid);
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.btn-secondary:hover {
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand);
}
.btn-danger {
  background: #DC2626;
  color: #fff;
  box-shadow: 0 1px 3px rgba(220,38,38,.25);
}
.btn-danger:hover { background: #B91C1C; box-shadow: 0 3px 8px rgba(220,38,38,.3); transform: translateY(-1px); }
.btn-success {
  background: #16A34A;
  color: #fff;
  box-shadow: 0 1px 3px rgba(22,163,74,.25);
}
.btn-success:hover { background: #15803D; transform: translateY(-1px); }
.btn-warning { background: #D97706; color: #fff; }
.btn-warning:hover { background: #B45309; }
.btn-sm { padding: 4px 11px; font-size: 11.5px; }

/* ─── Tables ─────────────────────────────────────────────── */
.table-container { overflow-x: auto; }

/* Indicador de scroll horizontal: sombra en el borde derecho cuando hay contenido oculto */
.table-container-scroll {
  overflow-x: auto;
  /* Scrolling shadows technique (Lea Verou):
     dos capas locales "cubren" los extremos; dos capas scroll crean la sombra */
  background:
    linear-gradient(to right, var(--surface) 0%, transparent 100%),
    linear-gradient(to left,  var(--surface) 0%, transparent 100%),
    linear-gradient(to right, rgba(0,0,0,.06) 0%, transparent 100%),
    linear-gradient(to left,  rgba(0,0,0,.06) 0%, transparent 100%);
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-color: var(--surface);
  background-size: 20px 100%, 20px 100%, 8px 100%, 8px 100%;
  background-attachment: local, local, scroll, scroll;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  padding: 9px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 10.5px;
  color: var(--text-label);
  letter-spacing: .4px;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid var(--border-mid);
  position: sticky;
  top: 0;
  z-index: 1;
}
thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background .1s;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #EEF1FA; }
tbody tr:hover td { color: var(--text-primary); }
tbody td { padding: 9.5px 14px; vertical-align: middle; color: var(--text-body); }
.td-actions { white-space: nowrap; display: flex; gap: 4px; }

/* ─── Stats grid ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: var(--shadow-lg); }
.stat-label {
  font-size: 10.5px;
  color: var(--text-label);
  text-transform: uppercase;
  letter-spacing: .7px;
  font-weight: 700;
}
.stat-value {
  font-size: 25px;
  font-weight: 800;
  color: var(--brand);
  margin: 5px 0 3px;
  letter-spacing: -.025em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat-sub { font-size: 11.5px; color: var(--text-muted); }

/* ─── Modal ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,28,52,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn .15s;
  backdrop-filter: blur(2px);
}
@keyframes fadeIn { from { opacity:0 } to { opacity:1 } }

.modal {
  background: #fff;
  border-radius: 12px;
  width: 580px;
  max-width: 96vw;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 32px 80px rgba(20,28,52,.28), 0 0 0 1px rgba(0,0,0,.04);
  animation: slideUp .18s cubic-bezier(.2,.8,.4,1);
}
@keyframes slideUp {
  from { transform: translateY(16px) scale(.99); opacity:0 }
  to   { transform: none; opacity:1 }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
  border-radius: 12px 12px 0 0;
}
.modal-title { font-size: 15px; font-weight: 700; color: var(--text-primary); letter-spacing: -.01em; }
.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: color .12s, background .12s;
}
.modal-close:hover { color: var(--text-primary); background: var(--surface); }

/* Quick-create inline button (+ Nuevo) that appears next to ABM selects */
.btn-nr {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 5px;
  border: 1px solid var(--border-mid);
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.8;
  white-space: nowrap;
  transition: background .12s;
}
.btn-nr:hover { background: var(--brand-tint); }

.modal-body { padding: 18px 20px; }
.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 0 0 12px 12px;
}

/* ─── Forms ──────────────────────────────────────────────── */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-label);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .55px;
}
.form-control {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  font-family: inherit;
  color: var(--text-primary);
  line-height: 1.4;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(61,75,107,.11);
}
.form-control:disabled, .form-control[readonly] {
  background: var(--surface);
  color: var(--text-label);
  cursor: not-allowed;
}
.form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-check { display: flex; align-items: center; gap: 7px; font-size: 13px; cursor: pointer; }
.form-check input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--brand); }

/* ─── Combo Buscador (autocomplete dinámico) ──────────────── */
.combo-buscador { position: relative; }
.combo-buscador-results {
  display: none;
  position: fixed;       /* fixed: escapa de overflow:hidden/auto de cualquier padre */
  max-height: 228px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 9500;
}
.combo-buscador-results.open { display: block; }
.combo-buscador-item {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.combo-buscador-item:last-child { border-bottom: none; }
.combo-buscador-item:hover, .combo-buscador-item.active {
  background: var(--brand-tint);
  color: var(--brand);
}
.combo-buscador-item-sub { color: var(--text-muted); font-size: 11px; }
.combo-buscador-empty { padding: 9px 12px; font-size: 12px; color: var(--text-muted); }
.combo-buscador-clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: var(--text-muted); font-size: 15px; line-height: 1; display: none;
}
.combo-buscador[data-has-value="1"] .combo-buscador-clear { display: block; }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: 11px 15px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 14px;
  font-weight: 500;
}
.alert-success { background: var(--success-bg); color: #166534; border: 1px solid #A7F3C0; }
.alert-error   { background: var(--error-bg);   color: #991B1B; border: 1px solid #FECACA; }
.alert-info    { background: var(--brand-tint);  color: var(--brand); border: 1px solid #C8D4F0; }
.alert-warn    { background: var(--warn-bg);     color: #92400E; border: 1px solid #FDE68A; }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}
.badge-green  { background: #DCFCE7; color: #166534; }
.badge-blue   { background: var(--brand-tint); color: var(--brand); }
.badge-grey   { background: var(--surface); color: var(--text-label); border: 1px solid var(--border); }
.badge-red    { background: var(--error-bg); color: #991B1B; }
.badge-yellow { background: var(--warn-bg); color: #92400E; }
.badge-purple { background: #F3E8FF; color: #7E22CE; }
.badge-orange { background: #FFF7ED; color: #C2410C; }

/* ─── Empty state ────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  color: var(--text-muted);
}
.empty-state-icon { font-size: 38px; margin-bottom: 12px; opacity: .7; }

/* ─── Upload area ────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border-mid);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  color: var(--text-muted);
}
.upload-area:hover { border-color: var(--brand); background: var(--brand-tint); color: var(--brand); }

/* ─── HTMX indicators ────────────────────────────────────── */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: inline; }

/* ─── Login ──────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #4A5578;
}
/* .login-card kept for legacy compat — overridden by login.html */
.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 42px 40px;
  width: 480px;
  max-width: 95vw;
  box-shadow: 0 40px 100px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.06);
}
.login-logo { text-align: center; margin-bottom: 20px; }
.login-logo img { width: 100%; max-width: 400px; height: auto; display: block; margin: 0 auto; }
.login-title { font-size: 15px; font-weight: 700; margin-bottom: 20px; color: var(--text-primary); letter-spacing: -.01em; }
.login-btn { width: 100%; padding: 10px; font-size: 14px; font-weight: 700; margin-top: 6px; letter-spacing: .01em; }

/* ─── Local Combo (buscador client-side, sin HTMX) ─────────── */
.local-combo { position: relative; }
.local-combo-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  z-index: 2000;
  display: none;
  background: #fff;
  border: 1px solid var(--border-mid);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
}

/* ─── Page header utility ────────────────────────────────── */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.page-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -.015em;
}

/* ─── Dividers ───────────────────────────────────────────── */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* ─── Utilities ──────────────────────────────────────────── */
.text-right   { text-align: right; }
.text-muted   { color: var(--text-muted); }
.font-mono    { font-family: 'Consolas', 'SF Mono', 'Fira Code', monospace; font-size: 12.5px; }
.font-numeric { font-variant-numeric: tabular-nums; }
.mb-4         { margin-bottom: 16px; }
.mt-4         { margin-top: 16px; }
.flex         { display: flex; }
.gap-2        { gap: 8px; }
.items-center     { align-items: center; }
.justify-between  { justify-content: space-between; }
.w-full           { width: 100%; }

/* ─── Numeric en tablas ──────────────────────────────────── */
thead th.text-right { text-align: right; }

/* ─── Command palette (buscador nav Ctrl+K) ──────────────── */
#cmdPalette {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
  background: rgba(20,28,52,.45);
  backdrop-filter: blur(3px);
}
#cmdPalette.open { display: flex; }
#cmdPaletteBox {
  background: #fff;
  border-radius: 12px;
  width: 560px;
  max-width: 95vw;
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  overflow: hidden;
}
#cmdPaletteInput {
  width: 100%;
  border: none;
  outline: none;
  font-size: 15px;
  padding: 16px 20px;
  font-family: inherit;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
#cmdPaletteList {
  max-height: 340px;
  overflow-y: auto;
  padding: 6px;
}
.cmd-item {
  padding: 9px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-body);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background .08s;
}
.cmd-item:hover, .cmd-item.selected {
  background: var(--brand-tint);
  color: var(--brand);
}
.cmd-item-group { font-size: 10px; color: var(--text-muted); margin-left: auto; text-transform: uppercase; letter-spacing: .5px; }

/* ═══════════════════════════════════════════════════════════
   MEJORAS DE DISEÑO — pack 2
   ═══════════════════════════════════════════════════════════ */

/* ─── form-input: alias de form-control (usado en 39+ templates) ── */
.form-input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 13px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  background: #fff;
  font-family: inherit;
  color: var(--text-primary);
  line-height: 1.4;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(61,75,107,.11);
}
.form-input:disabled,
.form-input[readonly] {
  background: var(--surface);
  color: var(--text-label);
  cursor: not-allowed;
}

/* ─── Alert warning alias ──────────────────────────────── */
.alert-warning { background: var(--warn-bg); color: #92400E; border: 1px solid #FDE68A; }
.alert-danger  { background: var(--error-bg); color: #991B1B; border: 1px solid #FECACA; }

/* ─── Stat card accent variants — border-top + tinted label + value ── */
.stat-card-green  { border-top: 3px solid #16A34A; }
.stat-card-green .stat-label { color: #16A34A; }
.stat-card-green .stat-value { color: #16A34A; }

.stat-card-red    { border-top: 3px solid #DC2626; }
.stat-card-red .stat-label  { color: #DC2626; }
.stat-card-red .stat-value  { color: #DC2626; }

.stat-card-warn   { border-top: 3px solid #D97706; }
.stat-card-warn .stat-label { color: #D97706; }
.stat-card-warn .stat-value { color: #D97706; }

.stat-card-blue   { border-top: 3px solid var(--brand); }
.stat-card-blue .stat-label { color: var(--brand); }
.stat-card-blue .stat-value { color: var(--brand); }

.stat-card-purple { border-top: 3px solid #7C3AED; }
.stat-card-purple .stat-label { color: #7C3AED; }
.stat-card-purple .stat-value { color: #7C3AED; }

.stat-card-teal   { border-top: 3px solid #0891B2; }
.stat-card-teal .stat-label { color: #0891B2; }
.stat-card-teal .stat-value { color: #0891B2; }

/* ─── Botón ícono-only (cuadrado, sin texto) ─────────────── */
.btn-icon {
  width: 28px; height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
}
.btn-icon.btn-sm { width: 26px; height: 26px; font-size: 13px; }

/* ─── Botón eliminar en filas: ghost (no rojo constante) ─ */
.td-actions .btn-danger,
.row-actions .btn-danger {
  background: transparent;
  color: var(--error, #B91C1C);
  border: 1px solid #FECACA;
  box-shadow: none;
}
.td-actions .btn-danger:hover,
.row-actions .btn-danger:hover {
  background: var(--error-bg, #FEE2E2);
  border-color: #FCA5A5;
  color: #991B1B;
  transform: none;
  box-shadow: none;
}

/* ─── Row dropdown menu (details/summary pattern) ─────── */
.row-menu { position: relative; display: inline-block; }
.row-menu > summary { list-style: none; cursor: pointer; }
.row-menu > summary::-webkit-details-marker { display: none; }
.row-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 300;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12), 0 1px 4px rgba(0,0,0,.08);
  min-width: 168px;
  padding: 4px;
  display: flex;
  flex-direction: column;
}
.row-menu-dropdown button,
.row-menu-dropdown a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 12px;
  border: none;
  background: none;
  border-radius: 6px;
  color: var(--text-base);
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  font-family: inherit;
}
.row-menu-dropdown button:hover,
.row-menu-dropdown a:hover { background: var(--hover-bg, var(--bg-alt)); }
.row-menu-dropdown .danger { color: var(--error, #DC2626); }
.row-menu-dropdown .danger:hover { background: var(--error-bg, #FEE2E2) !important; }
.row-menu-dropdown hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 8px;
}

/* ─── Table: helpers ──────────────────────────────────── */
.table-sm th   { padding: 7px 12px; font-size: 10.5px; }
.table-sm td   { padding: 7px 12px; font-size: 12.5px; }
.col-num       { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr.selected { background: var(--brand-tint) !important; }

/* ─── Card: variantes de acento ───────────────────────── */
.card-accent {
  border-top: 3px solid var(--brand);
}
.card-accent-green  { border-top: 3px solid #16A34A; }
.card-accent-red    { border-top: 3px solid #DC2626; }
.card-accent-warn   { border-top: 3px solid #D97706; }

/* Encabezado de sección dentro de cards */
.section-label {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  color: var(--text-muted);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

/* ─── Chips / Tags ───────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text-label);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.chip-blue   { background: var(--brand-tint); color: var(--brand); border-color: #C8D4F0; }
.chip-green  { background: #DCFCE7; color: #166534; border-color: #A7F3C0; }
.chip-red    { background: var(--error-bg); color: #991B1B; border-color: #FECACA; }
.chip-warn   { background: var(--warn-bg); color: #92400E; border-color: #FDE68A; }
.chip-purple { background: #F3E8FF; color: #7E22CE; border-color: #DDD6FE; }

/* ─── Skeleton loading ───────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg,
    var(--surface) 25%,
    var(--border) 50%,
    var(--surface) 75%);
  background-size: 200% 100%;
  animation: skel-pulse 1.5s ease infinite;
  border-radius: 4px;
  color: transparent !important;
  user-select: none;
}
@keyframes skel-pulse {
  0%   { background-position: 200% 0 }
  100% { background-position: -200% 0 }
}
.skeleton-row { height: 14px; margin: 6px 0; border-radius: 3px; }

/* ─── Spinner inline ─────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--border-mid);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* ─── Progress bar ───────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--brand);
  border-radius: 99px;
  transition: width .3s;
}
.progress-bar-green  { background: #16A34A; }
.progress-bar-red    { background: #DC2626; }
.progress-bar-warn   { background: #D97706; }

/* ─── Separador visual con etiqueta ─────────────────── */
.divider-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .9px;
  font-weight: 700;
  color: var(--text-muted);
  margin: 16px 0;
}
.divider-label::before,
.divider-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Página de error / vacía ────────────────────────── */
.error-page {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.error-page-code {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 72px;
  font-weight: 700;
  color: var(--border-mid);
  line-height: 1;
  margin-bottom: 12px;
}
.error-page-msg { font-size: 16px; color: var(--text-label); margin-bottom: 20px; }

/* ─── Kbd / teclas ───────────────────────────────────── */
kbd {
  display: inline-block;
  padding: 1px 5px;
  font-size: 10px;
  font-family: 'Consolas', 'SF Mono', monospace;
  background: var(--surface);
  border: 1px solid var(--border-mid);
  border-radius: 3px;
  color: var(--text-label);
  box-shadow: 0 1px 0 var(--border-mid);
  white-space: nowrap;
}

/* ─── Tooltip ────────────────────────────────────────── */
[title] { cursor: default; }
.tooltip-wrap { position: relative; display: inline-flex; }
.tooltip-wrap:hover .tooltip-box { opacity: 1; pointer-events: auto; }
.tooltip-box {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: #fff;
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 9999;
}
.tooltip-box::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-top-color: var(--dark);
}

/* ─── Utilidades adicionales ─────────────────────────── */
.text-center    { text-align: center; }
.text-left      { text-align: left; }
.truncate       { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap         { white-space: nowrap; }
.cursor-pointer { cursor: pointer; }
.opacity-50     { opacity: .5; }
.rounded        { border-radius: var(--radius); }
.rounded-full   { border-radius: 99px; }
.border-top     { border-top: 1px solid var(--border); }
.border-bottom  { border-bottom: 1px solid var(--border); }
.p-0            { padding: 0 !important; }
.p-2            { padding: 8px !important; }
.p-3            { padding: 12px !important; }
.p-4            { padding: 16px !important; }
.py-2           { padding-top: 8px !important; padding-bottom: 8px !important; }
.px-3           { padding-left: 12px !important; padding-right: 12px !important; }
.gap-1          { gap: 4px; }
.gap-3          { gap: 12px; }
.gap-4          { gap: 16px; }
.flex-col       { flex-direction: column; }
.flex-wrap      { flex-wrap: wrap; }
.flex-1         { flex: 1; }
.self-start     { align-self: flex-start; }
.grid-2         { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3         { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.grid-4         { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }

/* ─── form-row-4 (4 columnas) ────────────────────────── */
.form-row-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }

/* ─── Scrollable table container full-height ─────────── */
.table-scroll {
  overflow-y: auto;
  max-height: 60vh;
}
.table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

/* ─── Inline number pill (moneda) ───────────────────── */
.num-pill {
  display: inline-block;
  padding: 1px 7px;
  background: var(--surface);
  border-radius: 5px;
  font-family: 'Consolas', 'SF Mono', monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--border);
  color: var(--text-body);
}
.num-pill-green { background: #DCFCE7; color: #166534; border-color: #A7F3C0; }
.num-pill-red   { background: var(--error-bg); color: #991B1B; border-color: #FECACA; }

/* ─── Link discreto ─────────────────────────────────── */
.link-muted {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
}
.link-muted:hover { color: var(--brand); text-decoration: underline; }

/* ─── Confirmación visual inline (flash) ────────────── */
@keyframes flash-success {
  0%, 100% { background: transparent; }
  30%       { background: #DCFCE7; }
}
.flash-success { animation: flash-success .9s ease; }

/* =========================================================
   D1 — RESPONSIVE / MOBILE
   Sidebar collapsa a un hamburger overlay en pantallas < 768px
   ========================================================= */

#sidebar-overlay {
  display: none;
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 99;
}
#sidebar-toggle {
  display: none;
  position: fixed; top: 14px; left: 14px; z-index: 200;
  background: var(--brand); color: #fff; border: none;
  border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

@media (max-width: 768px) {
  /* En mobile el rail ocupa 0 width visual pero el nav se activa con hamburguesa */
  :root { --sidebar-w: 0px; }

  #sidebar-toggle { display: flex; align-items: center; justify-content: center; }

  /* Rail: se oculta a la izquierda, se desliza al abrir */
  .sidebar {
    width: 60px;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.4,0,.2,1);
    z-index: 150;
    overflow: visible;
  }
  .sidebar.open { transform: translateX(0); }

  /* Sub-panel: posicionado a la derecha del rail, se desliza junto */
  .sidebar-sub {
    left: 60px !important;
    transform: translateX(calc(-100% - 60px)) !important;
    width: var(--sub-w) !important;
    transition: transform .22s cubic-bezier(.4,0,.2,1) !important;
    box-shadow: none !important;
  }
  /* .mobile-open lo agrega toggleSidebar() cuando hay módulo abierto */
  .sidebar-sub.mobile-open {
    transform: translateX(0) !important;
  }

  #sidebar-overlay.open { display: block; }

  .layout.sub-open .main { margin-left: 0; }
  .main { margin-left: 0; transition: none; }

  .main-header { padding: 0 14px 0 56px; }
  .main-header h1 { font-size: 14px; }

  .content { padding: 14px 12px; }

  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .toolbar, .card-header { flex-wrap: wrap; gap: 8px; }

  .form-row { flex-direction: column; }

  .btn { font-size: 12px; padding: 7px 12px; }

  .header-user { display: none; }
}

@media (max-width: 480px) {
  .content { padding: 10px 8px; }
  .card-header { padding: 10px 12px; }
}

/* =========================================================
   D2 — DARK MODE
   Activado con <html data-theme="dark"> (toggle manual)
   o automáticamente con prefers-color-scheme: dark
   ========================================================= */

/* Dark tokens (manual toggle: data-theme="dark") */
[data-theme="dark"] {
  --brand:         #7B8FBF;
  --brand-dark:    #5A6F9E;
  --brand-hover:   #5A6F9E;
  --brand-tint:    #1E2540;
  --brand-tint-2:  #181F36;
  --warm:          #A89580;
  --warm-light:    #2A2320;
  --dark:          #E8ECF7;
  --text-primary:  #E8ECF7;
  --text-body:     #B8C0D8;
  --text-label:    #8B97B8;
  --text-muted:    #5E6A88;
  --white:         #1A2035;
  --surface:       #131929;
  --surface-2:     #1A2035;
  --border:        #2A3352;
  --border-mid:    #3A4A70;
  --sidebar-bg:    #0E1528;
  --success-bg:    #1A3A2A;
  --error-bg:      #3A1A1A;
  --warn-bg:       #3A2A0A;
}
[data-theme="dark"] .main-header   { background: #1A2035; border-bottom-color: #2A3352; }
[data-theme="dark"] .card          { background: #1E2845; border-color: #2A3352; }
[data-theme="dark"] .card-header   { background: #1A2035; border-bottom-color: #2A3352; }
[data-theme="dark"] thead tr       { background: #1A2035 !important; color: #8B97B8 !important; }
[data-theme="dark"] tbody tr:hover { background: #1E2845 !important; }
[data-theme="dark"] tr             { border-bottom-color: #2A3352; }
[data-theme="dark"] .form-control  { background: #1A2035; border-color: #2A3352; color: #E8ECF7; }
[data-theme="dark"] .form-control:focus { border-color: var(--brand); background: #1E2845; }
[data-theme="dark"] select.form-control option { background: #1A2035; color: #E8ECF7; }
[data-theme="dark"] .alert-success { background: var(--success-bg); }
[data-theme="dark"] .alert-danger, [data-theme="dark"] .alert-error { background: var(--error-bg); }
[data-theme="dark"] .alert-warning { background: var(--warn-bg); }
[data-theme="dark"] .header-user   { background: #1E2845; border-color: #2A3352; color: #8B97B8; }
[data-theme="dark"] .badge-grey    { background: #2A3352; color: #8B97B8; }
[data-theme="dark"] .badge-green   { background: #1A3A2A; color: #4ADE80; }
[data-theme="dark"] .badge-red     { background: #3A1A1A; color: #F87171; }
[data-theme="dark"] .badge-orange  { background: #3A2A0A; color: #FBB040; }
[data-theme="dark"] .btn-secondary { background: #2A3352; border-color: #3A4A70; color: #B8C0D8; }
[data-theme="dark"] .btn-secondary:hover { background: #3A4A70; }
[data-theme="dark"] input[type="checkbox"] { accent-color: var(--brand); }
[data-theme="dark"] .sidebar-logo  { border-bottom-color: rgba(255,255,255,.05); }

/* Sistema oscuro automático (sin JS) — mismas reglas */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand:         #7B8FBF;
    --brand-dark:    #5A6F9E;
    --brand-hover:   #5A6F9E;
    --brand-tint:    #1E2540;
    --brand-tint-2:  #181F36;
    --dark:          #E8ECF7;
    --text-primary:  #E8ECF7;
    --text-body:     #B8C0D8;
    --text-label:    #8B97B8;
    --text-muted:    #5E6A88;
    --white:         #1A2035;
    --surface:       #131929;
    --surface-2:     #1A2035;
    --border:        #2A3352;
    --border-mid:    #3A4A70;
    --sidebar-bg:    #0E1528;
    --success-bg:    #1A3A2A;
    --error-bg:      #3A1A1A;
    --warn-bg:       #3A2A0A;
  }
  :root:not([data-theme="light"]) .main-header   { background: #1A2035; border-bottom-color: #2A3352; }
  :root:not([data-theme="light"]) .card          { background: #1E2845; border-color: #2A3352; }
  :root:not([data-theme="light"]) .card-header   { background: #1A2035; border-bottom-color: #2A3352; }
  :root:not([data-theme="light"]) thead tr       { background: #1A2035 !important; color: #8B97B8 !important; }
  :root:not([data-theme="light"]) tbody tr:hover { background: #1E2845 !important; }
  :root:not([data-theme="light"]) tr             { border-bottom-color: #2A3352; }
  :root:not([data-theme="light"]) .form-control  { background: #1A2035; border-color: #2A3352; color: #E8ECF7; }
  :root:not([data-theme="light"]) .form-control:focus { border-color: var(--brand); background: #1E2845; }
  :root:not([data-theme="light"]) .alert-success { background: var(--success-bg); }
  :root:not([data-theme="light"]) .alert-danger  { background: var(--error-bg); }
  :root:not([data-theme="light"]) .alert-warning { background: var(--warn-bg); }
  :root:not([data-theme="light"]) .header-user   { background: #1E2845; border-color: #2A3352; color: #8B97B8; }
  :root:not([data-theme="light"]) .btn-secondary { background: #2A3352; border-color: #3A4A70; color: #B8C0D8; }
  :root:not([data-theme="light"]) .btn-secondary:hover { background: #3A4A70; }
}

/* Dark mode toggle button (esquina inferior derecha) */
#dark-mode-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 500;
  background: var(--brand); color: #fff; border: none;
  border-radius: 50%; width: 40px; height: 40px;
  cursor: pointer; font-size: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
#dark-mode-toggle:hover { background: var(--brand-dark); }
