/* ==========================================================================
   Sendero · Sistema de diseño
   Marca: navy profundo + latón. Papel cálido. Datos en mono.
   Base 14 px · tablas 13 px · etiquetas 10.5 px versalitas.
   ========================================================================== */

@import url('/fonts/fonts.css');

:root {
  /* Marca */
  --navy: #0c1d2e;
  --navy-800: #12293d;
  --navy-700: #1a3850;
  --navy-600: #24506f;
  --gold: #a9824a;
  --gold-600: #8f6b38;
  --gold-200: #e9d9bb;
  --gold-100: #f5ecdb;

  /* Neutros */
  --paper: #f3f0e9;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --surface-3: #f0ece3;
  --line: #e5dfd3;
  --line-strong: #d3cbba;
  --ink: #16202a;
  --ink-2: #2c3946;
  --muted: #5f6c77;
  --muted-2: #87929b;

  /* Estados */
  --ok: #1d6b4b;
  --ok-bg: #e7f2ec;
  --warn: #97620f;
  --warn-bg: #fbf0da;
  --danger: #a92a20;
  --danger-bg: #fbe8e5;
  --danger-700: #7f1d16;
  --info: #2b5b8a;
  --info-bg: #e8f0f8;

  /* Tipografía */
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: 'Archivo', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* Forma */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --shadow-1: 0 1px 2px rgba(22, 32, 42, .05), 0 1px 1px rgba(22, 32, 42, .03);
  --shadow-2: 0 4px 16px -4px rgba(22, 32, 42, .12), 0 1px 3px rgba(22, 32, 42, .06);
  --shadow-3: 0 24px 60px -20px rgba(12, 29, 46, .35);
  --sidebar-w: 258px;
  --topbar-h: 62px;
  --tabbar-h: 64px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
::selection { background: var(--gold-200); color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--navy-600);
  outline-offset: 2px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 300;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 8px;
  transition: top .15s;
}
.skip-link:focus { top: 12px; }

/* --------------------------------------------------------------------------
   Tipografía
   -------------------------------------------------------------------------- */
.display { font-family: var(--display); font-weight: 600; letter-spacing: -.022em; line-height: 1.12; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.eyebrow {
  font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow--gold { color: var(--gold-600); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.text-gold { color: var(--gold-600); }
.text-navy { color: var(--navy); }
.tabular { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Shell
   -------------------------------------------------------------------------- */
.app-shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.app-shell--solo { grid-template-columns: minmax(0, 1fr); }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(36, 80, 111, .38), transparent 60%),
    linear-gradient(180deg, #0d2033 0%, #0a1928 100%);
  color: #e9eef3;
  padding: 22px 16px 16px;
  z-index: 40;
  border-right: 1px solid rgba(255, 255, 255, .06);
}
.sidebar::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.028) 0 1px, transparent 1px 11px);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; position: relative; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background:
    radial-gradient(120% 120% at 20% 10%, rgba(233,217,187,.16), transparent 55%),
    linear-gradient(150deg, #17324d, #0a1928);
  box-shadow: 0 0 0 1px rgba(233, 217, 187, .3), 0 6px 16px -6px rgba(0,0,0,.6);
  position: relative;
  overflow: hidden;
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset: 6%;
  background: url('/img/logo-sendero.png') center/contain no-repeat;
}
.brand-name { display: block; font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: .02em; line-height: 1.1; }
.brand-sub { display: block; font-size: 9.5px; color: #9fb0bf; letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }

.side-nav { position: relative; overflow-y: auto; flex: 1; padding-bottom: 12px; scrollbar-width: thin; }
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); border-radius: 4px; }
.nav-group { margin-bottom: 18px; }
.nav-label {
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: #7d90a1; padding: 0 10px 8px; font-weight: 600;
}
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; margin-bottom: 1px;
  font-size: 13px; font-weight: 450; color: #b9c6d2;
  transition: background .14s, color .14s;
  position: relative;
}
.nav-link svg { width: 17px; height: 17px; flex: none; opacity: .8; }
.nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-link.active { background: rgba(233, 217, 187, .13); color: #fff; font-weight: 550; }
.nav-link.active::before {
  content: ''; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--gold-200);
}
.nav-link.active svg { opacity: 1; color: var(--gold-200); }
.nav-badge {
  margin-left: auto; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
  min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px;
}
.sidebar-foot { position: relative; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px;
  transition: background .14s;
}
.user-chip:hover { background: rgba(255, 255, 255, .06); }
.user-chip .avatar { background: rgba(233,217,187,.16); color: var(--gold-200); }
.user-chip-name { font-size: 12.5px; font-weight: 550; color: #f0f4f7; line-height: 1.2; }
.user-chip-role { font-size: 10.5px; color: #93a6b7; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex: none;
  display: flex; align-items: center; gap: 14px;
  padding: 0 30px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar-context { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.topbar-context strong { color: var(--ink); font-weight: 600; white-space: nowrap; }
.topbar-sep { color: var(--line-strong); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent;
  background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--ink-2);
  position: relative; transition: background .14s, border-color .14s;
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot-alert {
  position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px #fff;
}
.content { padding: 30px 30px 72px; width: 100%; max-width: 1280px; margin: 0 auto; }
.nav-toggle { display: none; }

/* --------------------------------------------------------------------------
   Encabezado de página
   -------------------------------------------------------------------------- */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.page-head-main { min-width: 0; }
.page-title {
  font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -.025em;
  line-height: 1.15; margin-top: 5px; color: var(--navy);
}
.page-sub { color: var(--muted); font-size: 13.5px; margin-top: 6px; max-width: 62ch; }
.page-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted);
  margin-bottom: 10px;
}
.back-link:hover { color: var(--ink); }
.back-link svg { width: 14px; height: 14px; transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   Grid
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; } .mt-5 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; } .mb-5 { margin-bottom: 32px; }
.gap-2 { gap: 8px; } .gap-3 { gap: 16px; } .gap-4 { gap: 24px; }
.full { grid-column: 1 / -1; }
.fill { flex: 1; }
.hide { display: none !important; }

/* --------------------------------------------------------------------------
   Tarjetas
   -------------------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); overflow: hidden;
}
.card--flush { overflow: visible; }
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 20px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.card-title { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.card-title svg { width: 16px; height: 16px; color: var(--muted); }
.card-head .link { font-size: 12px; color: var(--navy-600); font-weight: 500; }
.card-head .link:hover { text-decoration: underline; }
.card-body { padding: 20px; }
.card-foot { padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface-2); font-size: 12px; }

/* --------------------------------------------------------------------------
   KPI
   -------------------------------------------------------------------------- */
.kpi { padding: 18px 20px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 10.5px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.kpi-value { font-family: var(--mono); font-size: 25px; font-weight: 500; letter-spacing: -.03em; margin-top: 8px; line-height: 1.1; }
.kpi-value small { font-size: 13px; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.kpi-meta { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--muted); }
.kpi-icon {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--navy-700); border: 1px solid var(--line);
}
.kpi-icon svg { width: 17px; height: 17px; }
.trend { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 600; }
.trend-up { color: var(--ok); } .trend-down { color: var(--danger); }

/* --------------------------------------------------------------------------
   Tarjeta de saldo
   -------------------------------------------------------------------------- */
.balance-card {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  background:
    radial-gradient(100% 120% at 100% 0%, rgba(169, 130, 74, .28), transparent 55%),
    linear-gradient(135deg, #0d2135 0%, #12293d 55%, #0a1928 100%);
  color: #f2f5f7; padding: 24px 26px; min-height: 196px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.balance-card::after {
  content: ''; position: absolute; right: -40px; bottom: -70px; width: 260px; height: 260px;
  border-radius: 50%; border: 1px solid rgba(233, 217, 187, .16);
  box-shadow: 0 0 0 30px rgba(233,217,187,.045), 0 0 0 64px rgba(233,217,187,.028);
  pointer-events: none;
}
.balance-label { font-size: 10.5px; letter-spacing: .15em; text-transform: uppercase; color: #a9b8c6; font-weight: 600; }
.balance-value { font-family: var(--mono); font-size: 40px; font-weight: 500; letter-spacing: -.04em; line-height: 1; margin-top: 9px; }
.balance-value small { font-size: 14px; color: #a9b8c6; font-family: var(--sans); letter-spacing: 0; }
.balance-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 20px; position: relative; z-index: 1; }
.balance-note { font-size: 11.5px; color: #9fb0bf; }

/* --------------------------------------------------------------------------
   Botones
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 9px;
  border: 1px solid transparent; background: transparent;
  font-size: 13px; font-weight: 550; letter-spacing: -.005em; cursor: pointer;
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s;
  white-space: nowrap; text-decoration: none;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; box-shadow: 0 1px 2px rgba(12,29,46,.25); }
.btn-primary:hover { background: var(--navy-700); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--gold-600); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--muted-2); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger-700); }
.btn-danger-soft { background: var(--danger-bg); color: var(--danger-700); border-color: #f0cfc9; }
.btn-danger-soft:hover { background: #f7dcd7; }
.btn-ok-soft { background: var(--ok-bg); color: var(--ok); border-color: #cfe5d9; }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; }

/* --------------------------------------------------------------------------
   Pills / badges
   -------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2.5px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 550; line-height: 1.45; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2); border: 1px solid transparent;
}
.pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-danger { background: var(--danger-bg); color: var(--danger-700); }
.pill-info { background: var(--info-bg); color: var(--info); }
.pill-gold { background: var(--gold-100); color: var(--gold-600); }
.pill-navy { background: #e8eef3; color: var(--navy-700); }
.pill-neutral { background: var(--surface-3); color: var(--muted); }
.pill-outline { background: transparent; border-color: var(--line-strong); color: var(--muted); }
.pill-lg { font-size: 12.5px; padding: 4px 11px; }

/* --------------------------------------------------------------------------
   Tablas
   -------------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-size: 10px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); padding: 10px 16px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fcfbf7; }
table.data .num, table.data .monto { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data .center { text-align: center; }
table.data .tight { padding-top: 9px; padding-bottom: 9px; }
table.data .row-action { text-align: right; width: 1%; white-space: nowrap; }
.cell-main { font-weight: 550; color: var(--ink); line-height: 1.35; }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.cell-house {
  display: inline-flex; align-items: center; justify-content: center; min-width: 44px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; color: var(--navy-700);
  background: #eef2f5; border: 1px solid #dde5ea; border-radius: 6px; padding: 3px 7px;
}
.total-row td { background: var(--surface-2); font-weight: 600; border-top: 1px solid var(--line-strong); }

/* --------------------------------------------------------------------------
   Formularios
   -------------------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .label {
  font-size: 10.5px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2);
}
.label .req { color: var(--danger); margin-left: 2px; }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 9px;
  font-size: 13.5px; color: var(--ink);
  transition: border-color .14s, box-shadow .14s;
}
.textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6c77' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(36, 80, 111, .12); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:disabled, .select:disabled { background: var(--surface-3); color: var(--muted); }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(169, 42, 32, .09); }
.error-text { font-size: 11.5px; color: var(--danger); display: flex; gap: 5px; align-items: flex-start; line-height: 1.4; }
.error-text svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.input-prefix { position: relative; }
.input-prefix span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-family: var(--mono); font-size: 13px; }
.input-prefix .input { padding-left: 28px; font-family: var(--mono); }
.form-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding-top: 18px; border-top: 1px solid var(--line); margin-top: 4px;
}
.form-actions .left { margin-right: auto; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.check small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.segmented { display: inline-flex; background: var(--surface-3); border-radius: 9px; padding: 3px; gap: 2px; }
.segmented a, .segmented button {
  padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--muted); border: 0; background: transparent; cursor: pointer;
}
.segmented a.active, .segmented button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 600; }

/* --------------------------------------------------------------------------
   Buscador y filtros
   -------------------------------------------------------------------------- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search { position: relative; min-width: 220px; flex: 1; max-width: 340px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-2); pointer-events: none; }
.search .input { padding-left: 34px; height: 36px; font-size: 13px; }
.select--sm { height: 36px; font-size: 12.5px; width: auto; min-width: 130px; }

/* --------------------------------------------------------------------------
   Banners
   -------------------------------------------------------------------------- */
.banner {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-radius: var(--r);
  font-size: 13px; line-height: 1.45; border: 1px solid transparent;
}
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.banner strong { font-weight: 650; }
.banner-ok { background: var(--ok-bg); color: #14523a; border-color: #cfe5d9; }
.banner-warn { background: var(--warn-bg); color: #6f460a; border-color: #efdcb7; }
.banner-danger { background: var(--danger-bg); color: var(--danger-700); border-color: #f0cfc9; }
.banner-info { background: var(--info-bg); color: #1f486e; border-color: #cfe0f0; }
.banner .banner-body { flex: 1; }
.banner .banner-close { background: transparent; border: 0; cursor: pointer; color: inherit; opacity: .6; padding: 2px; }

.toast-stack { position: fixed; top: 76px; right: 22px; z-index: 120; display: flex; flex-direction: column; gap: 8px; max-width: 380px; }
.toast {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  background: var(--navy); color: #f2f5f7; border-radius: 11px; box-shadow: var(--shadow-3);
  font-size: 13px; animation: toastIn .22s ease-out;
}
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; color: var(--gold-200); }
.toast-success { background: #14523a; } .toast-error { background: var(--danger-700); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   Estado vacío
   -------------------------------------------------------------------------- */
.empty { text-align: center; padding: 54px 24px; }
.empty-icon {
  width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px;
  display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line);
  color: var(--muted);
}
.empty-icon svg { width: 23px; height: 23px; }
.empty h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 5px; }
.empty p { font-size: 12.5px; color: var(--muted); max-width: 38ch; margin: 0 auto 16px; }

/* --------------------------------------------------------------------------
   Listas y timeline
   -------------------------------------------------------------------------- */
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 20px;
  border-bottom: 1px solid var(--line);
}
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: #fcfbf7; }
.list-icon {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--navy-700);
}
.list-icon svg { width: 16px; height: 16px; }
.list-main { flex: 1; min-width: 0; }
.list-title { font-size: 13px; font-weight: 550; line-height: 1.35; }
.list-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.list-meta { font-size: 11.5px; color: var(--muted); text-align: right; white-space: nowrap; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -22px; top: 3px; width: 13px; height: 13px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--line-strong);
}
.tl-item.is-ok .tl-dot { border-color: var(--ok); background: var(--ok-bg); }
.tl-item.is-warn .tl-dot { border-color: var(--warn); background: var(--warn-bg); }
.tl-item.is-danger .tl-dot { border-color: var(--danger); background: var(--danger-bg); }
.tl-title { font-size: 12.5px; font-weight: 550; }
.tl-sub { font-size: 11.5px; color: var(--muted); }

/* --------------------------------------------------------------------------
   Avatares
   -------------------------------------------------------------------------- */
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: #e7ecf0; color: var(--navy-700);
  font-size: 12px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase;
}
.avatar-sm { width: 28px; height: 28px; font-size: 10.5px; }
.avatar-lg { width: 46px; height: 46px; font-size: 15px; }
.avatar-gold { background: var(--gold-100); color: var(--gold-600); }

/* --------------------------------------------------------------------------
   Avisos
   -------------------------------------------------------------------------- */
.notice { display: flex; gap: 13px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.notice:last-child { border-bottom: 0; }
.notice-unread { background: #fbfaf5; }
.notice-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex: none; }
.notice-title { font-size: 13px; font-weight: 600; line-height: 1.35; }
.notice-body { font-size: 12.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
.notice-meta { font-size: 11px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; align-items: center; }

/* --------------------------------------------------------------------------
   Calendario / reservas
   -------------------------------------------------------------------------- */
.day-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.day-chip {
  flex: none; width: 74px; padding: 9px 6px; border-radius: 11px; text-align: center;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  transition: border-color .14s, background .14s;
}
.day-chip:hover { border-color: var(--line-strong); background: var(--surface-2); }
.day-chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.day-chip .dw { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }
.day-chip.active .dw { color: #a9b8c6; }
.day-chip .dn { font-family: var(--mono); font-size: 19px; font-weight: 500; line-height: 1.2; margin-top: 2px; }
.day-chip .dm { font-size: 10px; color: var(--muted); }
.day-chip.active .dm { color: #c8d3dc; }

.slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.slot {
  display: flex; align-items: center; gap: 11px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  text-align: left; width: 100%; cursor: pointer; transition: border-color .14s, background .14s;
}
.slot:hover:not(:disabled) { border-color: var(--navy-600); background: #fbfcfa; }
.slot:disabled { cursor: not-allowed; opacity: .72; background: var(--surface-2); }
.slot-code { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--navy-700); }
.slot-state { font-size: 11.5px; color: var(--muted); }
.slot-occupied { background: var(--surface-3); border-color: var(--line); }
.slot-occupied .slot-code { color: var(--muted); }
.slot-own { border-color: var(--gold); background: var(--gold-100); }

.pass-card {
  max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden;
}
.pass-top { background: var(--navy); color: #fff; padding: 20px; text-align: center; }
.pass-code { font-family: var(--mono); font-size: 30px; letter-spacing: .18em; font-weight: 500; margin-top: 6px; }
.pass-qr { display: grid; place-items: center; padding: 22px; }
.pass-qr img, .pass-qr svg { width: 190px; height: 190px; }

/* --------------------------------------------------------------------------
   Pánico
   -------------------------------------------------------------------------- */
.panic-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 60;
  width: 62px; height: 62px; border-radius: 50%; border: 0;
  background: var(--danger); color: #fff; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px -6px rgba(169, 42, 32, .55), 0 0 0 1px rgba(255,255,255,.25) inset;
  transition: transform .14s, background .14s;
}
.panic-fab:hover { background: var(--danger-700); transform: translateY(-1px); }
.panic-fab svg { width: 26px; height: 26px; }
.panic-fab::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(169, 42, 32, .35); animation: panicPulse 2.6s ease-out infinite;
}
@keyframes panicPulse {
  0% { transform: scale(.92); opacity: .9; }
  70% { transform: scale(1.18); opacity: 0; }
  100% { opacity: 0; }
}
.panic-fab-label {
  position: fixed; right: 96px; bottom: 44px; z-index: 59;
  background: var(--navy); color: #fff; font-size: 11.5px; padding: 5px 10px; border-radius: 7px;
  box-shadow: var(--shadow-2); pointer-events: none; opacity: 0; transition: opacity .15s;
}
.panic-fab:hover ~ .panic-fab-label { opacity: 1; }
body[data-path="/panico"] .panic-fab, body[data-path="/panico"] .panic-fab-label,
body[data-path^="/alertas"] .panic-fab, body[data-path^="/alertas"] .panic-fab-label { display: none; }

.panic-screen {
  position: fixed; inset: 0; z-index: 200; color: #fff;
  background:
    radial-gradient(90% 90% at 50% 0%, rgba(255, 92, 74, .35), transparent 60%),
    linear-gradient(160deg, #6d0f09 0%, #430804 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px; text-align: center; overflow-y: auto;
}
.panic-screen::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .18;
  background: repeating-linear-gradient(135deg, #fff 0 1px, transparent 1px 16px);
}
.panic-kicker { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: #ffd9d3; font-weight: 700; }
.panic-house { font-family: var(--display); font-size: clamp(88px, 19vw, 210px); font-weight: 700; letter-spacing: -.05em; line-height: .9; margin: 8px 0 4px; text-shadow: 0 8px 40px rgba(0,0,0,.3); }
.panic-house-label { font-size: 15px; color: #ffd9d3; letter-spacing: .02em; }
.panic-time { font-family: var(--mono); font-size: 13px; color: #ffb8ad; margin-top: 10px; }
.panic-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 28px; position: relative; z-index: 2; }
.panic-actions .btn { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.28); color: #fff; height: 46px; padding: 0 20px; }
.panic-actions .btn:hover { background: rgba(255,255,255,.2); }
.panic-actions .btn-primary { background: #fff; color: #6d0f09; border-color: #fff; font-weight: 650; }
.panic-actions .btn-primary:hover { background: #ffe9e4; }
.panic-close { position: absolute; top: 18px; right: 18px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); color: #fff; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.panic-help { margin-top: 22px; font-size: 12px; color: #ffb8ad; max-width: 46ch; position: relative; z-index: 2; }
.panic-acuses { margin-top: 14px; font-size: 12.5px; color: #ffe3de; position: relative; z-index: 2; }

.panic-hold { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.panic-hold-btn {
  width: 190px; height: 190px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #d8443a, #8f1c15 70%);
  color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 0 0 10px rgba(169,42,32,.14), 0 20px 50px -10px rgba(120, 20, 12, .6);
  position: relative; user-select: none; -webkit-user-select: none; touch-action: none;
}
.panic-hold-btn svg { width: 42px; height: 42px; margin: 0 auto 6px; }
.panic-hold-btn::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(rgba(255,255,255,.32) var(--hold, 0%), transparent 0);
  mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
}
.panic-hold-hint { font-size: 12px; color: #ffcfc8; }

.alert-live {
  display: flex; align-items: center; gap: 12px; padding: 11px 16px;
  background: var(--danger); color: #fff; font-size: 13px; font-weight: 550;
}
.alert-live .pulse {
  width: 9px; height: 9px; border-radius: 50%; background: #fff; flex: none;
  animation: livePulse 1.4s infinite;
}
@keyframes livePulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }

/* --------------------------------------------------------------------------
   Auth
   -------------------------------------------------------------------------- */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1.02fr .98fr; background: var(--paper); }
.auth-brand {
  position: relative; overflow: hidden; color: #eef3f7; padding: 48px 52px;
  background:
    radial-gradient(80% 60% at 85% 10%, rgba(169, 130, 74, .28), transparent 60%),
    linear-gradient(150deg, #0d2135 0%, #0a1928 70%, #07131f 100%);
  display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh;
}
.auth-brand::before {
  content: ''; position: absolute; inset: 0; opacity: .4;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 1px, transparent 1px 13px);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { width: 78px; height: 78px; border-radius: 18px; background: radial-gradient(120% 120% at 20% 10%, rgba(233,217,187,.16), transparent 55%), linear-gradient(150deg, #17324d, #0a1928); box-shadow: 0 0 0 1px rgba(233,217,187,.3), 0 8px 20px -8px rgba(0,0,0,.6); position: relative; overflow: hidden; }
.auth-logo::before { content: ''; position: absolute; inset: 10%; background: url('/img/logo-sendero.png') center/contain no-repeat; }
.auth-brand h1 { font-family: var(--display); font-size: 40px; font-weight: 600; letter-spacing: -.035em; line-height: 1.06; margin-top: 34px; }
.auth-brand h1 em { font-style: normal; color: var(--gold-200); }
.auth-brand p { color: #a9b8c6; font-size: 14px; max-width: 38ch; margin-top: 16px; line-height: 1.6; }
.auth-points { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; }
.auth-point { display: flex; gap: 12px; align-items: flex-start; }
.auth-point-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(233,217,187,.1); border: 1px solid rgba(233,217,187,.16); color: var(--gold-200); flex: none; }
.auth-point-icon svg { width: 15px; height: 15px; }
.auth-point strong { display: block; font-size: 12.5px; font-weight: 600; }
.auth-point span { font-size: 11.5px; color: #9fb0bf; }
.auth-foot { font-size: 11px; color: #7d90a1; }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-card { width: min(420px, 100%); }
.auth-card h2 { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.025em; margin-bottom: 4px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; }
.auth-card .form { gap: 16px; }
.auth-alt { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); text-align: center; }
.auth-alt a { color: var(--navy-600); font-weight: 550; }
.auth-secure { display: flex; align-items: center; gap: 6px; justify-content: center; font-size: 11px; color: var(--muted-2); margin-top: 24px; }
.auth-secure svg { width: 13px; height: 13px; }
.auth-demo {
  margin-top: 18px; padding: 13px 14px; background: var(--surface-2); border: 1px dashed var(--line-strong);
  border-radius: 10px; font-size: 11.5px; color: var(--muted);
}
.auth-demo code { font-family: var(--mono); color: var(--ink); font-size: 11px; }

/* --------------------------------------------------------------------------
   Página pública
   -------------------------------------------------------------------------- */
.public-body { background: #f6f3ec; }
.public-nav {
  display: flex; align-items: center; gap: 12px; padding: 18px 5vw; max-width: 1180px; margin: 0 auto;
}
.public-nav .brand-name { color: var(--navy); }
.public-nav .brand-sub { color: var(--muted); }
.public-nav-actions { margin-left: auto; display: flex; gap: 8px; }
.public-hero { max-width: 1180px; margin: 0 auto; padding: 56px 5vw 32px; }
.public-hero h1 { font-family: var(--display); font-size: clamp(34px, 5vw, 54px); line-height: 1.04; letter-spacing: -.04em; color: var(--navy); max-width: 18ch; }
.public-hero h1 em { font-style: normal; color: var(--gold-600); }
.public-hero p { font-size: 15px; color: var(--muted); max-width: 56ch; margin-top: 16px; }
.public-wrap { max-width: 1180px; margin: 0 auto; padding: 0 5vw 72px; }
.public-foot { border-top: 1px solid var(--line); padding: 24px 5vw; text-align: center; font-size: 11.5px; color: var(--muted-2); }
.big-fund {
  background: var(--navy); color: #fff; border-radius: var(--r-xl); padding: 30px 32px;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
  background-image: radial-gradient(90% 120% at 100% 0%, rgba(169,130,74,.3), transparent 60%);
}
.big-fund .kpi-label { color: #a9b8c6; }
.big-fund .big { font-family: var(--mono); font-size: clamp(38px, 6vw, 58px); letter-spacing: -.04em; line-height: 1; }
.big-fund .meta { color: #a9b8c6; font-size: 12.5px; text-align: right; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; padding: 8px 0; }
.bar-track { height: 8px; background: var(--surface-3); border-radius: 5px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 5px; background: var(--navy-700); }
.bar-fill.gold { background: var(--gold); }

/* --------------------------------------------------------------------------
   Utilidades
   -------------------------------------------------------------------------- */
.divider { height: 1px; background: var(--line); margin: 18px 0; }
.section-title { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); margin-bottom: 12px; }
.link-arrow { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 550; color: var(--navy-600); }
.link-arrow svg { width: 14px; height: 14px; }
.link-arrow:hover { gap: 8px; }
.dot-sep { color: var(--line-strong); }
.badge-count { font-family: var(--mono); font-size: 11px; background: var(--surface-3); color: var(--muted); border-radius: 5px; padding: 1px 6px; }
.code-block {
  font-family: var(--mono); font-size: 12px; background: var(--navy); color: #e9eef3;
  padding: 16px; border-radius: 10px; overflow-x: auto; line-height: 1.6;
}
.qr-box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px; }

/* --------------------------------------------------------------------------
   Tabbar móvil
   -------------------------------------------------------------------------- */
.tabbar { display: none; }
.tabbar-inner { display: flex; align-items: center; justify-content: space-around; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 0 6px; font-size: 9.5px; color: var(--muted); font-weight: 550;
}
.tab svg { width: 20px; height: 20px; }
.tab.active { color: var(--navy); }
.tab.active svg { color: var(--navy); }
.tab-fab {
  width: 50px; height: 50px; border-radius: 50%; background: var(--danger); color: #fff;
  display: grid; place-items: center; margin-top: -20px; box-shadow: 0 8px 18px -6px rgba(169,42,32,.55);
  border: 3px solid var(--surface); flex: none;
}
.tab-fab svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 282px; transform: translateX(-102%);
    transition: transform .22s ease; box-shadow: var(--shadow-3);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ''; position: fixed; inset: 0; background: rgba(12, 29, 46, .45); z-index: 35;
  }
  .nav-toggle { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px 96px; }
  .tabbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
  }
  .panic-fab { display: none; }
  .page-title { font-size: 23px; }
  .page-head { margin-bottom: 18px; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; background: var(--paper); }
}
@media (max-width: 720px) {
  .hide-sm { display: none !important; }
  .topbar-sep { display: none; }
  .balance-card .row { flex-wrap: nowrap !important; }
  .balance-card .row .btn { flex: 1; padding: 0 9px; font-size: 12px; }
  .topbar-context { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head { align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .card-head { padding: 13px 16px; }
  .card-body { padding: 16px; }
  .slot-grid { grid-template-columns: minmax(0, 1fr); }
  .balance-value { font-size: 34px; }
  .kpi-value { font-size: 22px; }
  .toast-stack { left: 12px; right: 12px; top: 68px; max-width: none; }
  .bar-row { grid-template-columns: 110px 1fr 74px; }
  .modal { width: calc(100vw - 24px); }
  table.data th, table.data td { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 420px) {
  .content { padding-left: 12px; padding-right: 12px; }
  .btn { padding: 0 12px; }
  .day-chip { width: 66px; }
}

/* --------------------------------------------------------------------------
   Diálogos
   -------------------------------------------------------------------------- */
dialog.modal {
  border: 0; border-radius: var(--r-lg); padding: 0; width: min(480px, calc(100vw - 32px));
  box-shadow: var(--shadow-3); background: var(--surface); color: var(--ink);
}
dialog.modal::backdrop { background: rgba(12, 29, 46, .55); backdrop-filter: blur(2px); }
.modal-head { padding: 20px 22px 0; }
.modal-title { font-family: var(--display); font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.modal-sub { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; }

/* --------------------------------------------------------------------------
   Impresión (recibos y cortes)
   -------------------------------------------------------------------------- */
@media print {
  .sidebar, .topbar, .tabbar, .panic-fab, .page-actions, .no-print, .toast-stack { display: none !important; }
  .app-shell { grid-template-columns: 1fr; }
  body { background: #fff; font-size: 11pt; }
  .content { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #ccc; break-inside: avoid; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* --------------------------------------------------------------------------
   Gráficas
   -------------------------------------------------------------------------- */
.chart { display: flex; align-items: flex-end; gap: 12px; height: 168px; padding-top: 12px; }
.chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; min-width: 0; }
.chart-bars { display: flex; gap: 3px; align-items: flex-end; height: 128px; width: 100%; justify-content: center; }
.chart-bar { width: 11px; border-radius: 3px 3px 0 0; background: var(--navy-700); min-height: 2px; transition: height .3s; }
.chart-bar.gold { background: var(--gold); }
.chart-label { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.chart-legend { display: flex; gap: 14px; align-items: center; font-size: 11px; color: var(--muted); }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-swatch { width: 9px; height: 9px; border-radius: 2px; background: var(--navy-700); }
.chart-swatch.gold { background: var(--gold); }

/* Vistas de impresión en pantalla */
body.print .sidebar, body.print .topbar, body.print .tabbar,
body.print .panic-fab, body.print .panic-fab-label, body.print .page-actions { display: none !important; }
body.print .app-shell { grid-template-columns: 1fr; }
body.print .content { max-width: 940px; padding: 28px 20px 60px; }

/* Botón para desbloquear audio en el overlay de pánico */
.panic-screen .panic-sound {
  margin-top: 16px; position: relative; z-index: 2;
  background: #fff; color: var(--danger-700); border: 1px solid #fff; font-weight: 650;
}
.panic-screen .panic-sound:hover { background: #ffe9e4; }
.panic-screen .panic-sound[hidden] { display: none !important; }

/* Aviso persistente para activar notificaciones de pánico */
#push-banner { align-items: flex-start; flex-wrap: wrap; }
#push-banner .banner-body { min-width: 220px; }
#push-banner .btn { margin-left: auto; }
@media (max-width: 720px) {
  #push-banner .btn { margin-left: 0; width: 100%; }
}
