/* ═══════════════════════════════════════════════════════════
   PANTALLAS: LOGIN + PICKER
═══════════════════════════════════════════════════════════ */

.screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
  display: flex;
  align-items: stretch;
}

/* ─── LOGIN ─── */
.login-bg {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px;
  color: #fff;
}

.login-brand {
  margin-bottom: 48px;
}
.login-logo {
  font-size: 52px;
  display: block;
  margin-bottom: 16px;
}
.login-brand h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}
.login-brand p {
  font-size: 16px;
  opacity: .75;
}
.login-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-features li {
  font-size: 15px;
  opacity: .9;
}

.login-right {
  width: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #f8fafc;
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  overflow: hidden;
}

.login-card-header {
  padding: 32px 32px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #eff6ff, #fff);
}
.login-icon { font-size: 36px; margin-bottom: 12px; }
.login-card-header h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.login-card-header p  { font-size: 13px; color: var(--text-muted); }

.login-form { padding: 28px 32px; display: flex; flex-direction: column; gap: 0; }

.input-icon-wrap { position: relative; }
.input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}
.input-icon-wrap input { padding-left: 38px; }

.login-error {
  color: #dc2626;
  font-size: 13px;
  min-height: 20px;
  margin-bottom: 8px;
  text-align: center;
}

.btn-login {
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 15px;
  border-radius: 10px;
}

.login-hint {
  padding: 14px 32px 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ─── PICKER ─── */
.picker-wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0 24px;
  height: 100vh;
}

.picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.picker-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.picker-brand span { font-size: 26px; }

.picker-user-info {
  display: flex;
  align-items: center;
  gap: 16px;
}
.picker-username { font-weight: 700; font-size: 14px; }
.picker-role     { font-size: 12px; color: var(--text-muted); }

.picker-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 0;
}

.picker-title { text-align: center; margin-bottom: 28px; }
.picker-title h2 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.picker-title p  { font-size: 14px; color: var(--text-muted); }

.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.picker-card {
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  transition: all .2s;
  box-shadow: var(--shadow);
}
.picker-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37,99,235,.15);
}

.picker-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  font-size: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.picker-card-body { flex: 1; min-width: 0; }
.picker-card-name { font-weight: 700; font-size: 15px; margin-bottom: 3px; }
.picker-card-addr { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker-card-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); }
.picker-card-arrow { font-size: 24px; color: var(--text-muted); flex-shrink: 0; }

.picker-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.picker-footer {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  gap: 12px;
}

/* ─── TOPBAR CONSORCIO NAME ─── */
.topbar-consorcio-name {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid var(--border);
}

/* ─── USER MENU ─── */
.user-menu-wrap { position: relative; }

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all .15s;
}
.user-menu-btn:hover { background: var(--bg); }
.chevron { font-size: 11px; color: var(--text-muted); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
  min-width: 220px;
  z-index: 500;
  overflow: hidden;
  display: none;
}
.user-dropdown.open { display: block; }

.dropdown-header {
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 14px;
}
.dropdown-role { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-top: 2px; }
.dropdown-divider { height: 1px; background: var(--border); }

.dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  border: none;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background .1s;
}
.dropdown-item:hover { background: var(--bg); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: #fff1f2; }

/* ─── AUTH MODALS ─── */
.auth-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
.auth-modal-overlay.open { display: flex; }

.auth-modal {
  background: #fff;
  border-radius: 14px;
  width: 540px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  display: none;
}
.auth-modal.open { display: block; }

/* ─── CHECK GROUP ─── */
.check-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  cursor: pointer;
}
.check-label input { width: auto; }

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --bg: #f1f5f9;
  --sidebar-bg: #1e293b;
  --sidebar-text: #94a3b8;
  --sidebar-active: #2563eb;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --text: #1e293b;
  --text-muted: #64748b;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  height: 100vh;
  overflow: hidden;
}

#app { display: flex; height: 100vh; }

/* ─── SIDEBAR ─── */
.sidebar {
  width: 220px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 16px;
  border-bottom: 1px solid #334155;
}

.brand-icon { font-size: 24px; }
.brand-name { color: #f1f5f9; font-weight: 700; font-size: 14px; }
.brand-sub  { color: var(--sidebar-text); font-size: 11px; }

.sidebar-nav { padding: 12px 8px; flex: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--sidebar-text);
  text-decoration: none;
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: all .15s;
  cursor: pointer;
}

.nav-item:hover { background: #334155; color: #f1f5f9; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-icon { font-size: 16px; }

/* ─── MAIN ─── */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar h1 { font-size: 18px; font-weight: 700; }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.period-badge {
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* ─── SECTIONS ─── */
.section { display: none; flex-direction: column; gap: 16px; padding: 24px; overflow-y: auto; flex: 1; }
.section.active { display: flex; }

/* ─── CARDS ─── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  overflow: visible;
}

/* Tabla responsive — evita que .card corte columnas en pantallas angostas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Sorting headers */
.table th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.table th.sortable:hover { background: #e2e8f0; }
.table th.sort-asc::after  { content: ' ↑'; font-size: 10px; color: var(--primary); }
.table th.sort-desc::after { content: ' ↓'; font-size: 10px; color: var(--primary); }

/* Badge sin email */
.badge-sin-email { background: #fef3c7; color: #92400e; font-size: 10px; padding: 1px 5px; border-radius: 3px; }

/* Leyenda semáforo morosidad */
.semaforo-leyenda { font-size: 12px; color: var(--text-muted); padding: 8px 16px; border-top: 1px solid var(--border); }

.card-header {
  padding: 14px 18px;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ─── STATS ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-label { font-size: 11px; color: var(--text-muted); margin-bottom: 2px; white-space: nowrap; }
.stat-value { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── DASHBOARD GRID ─── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
  min-width: 0;
}

.dashboard-grid .card { min-width: 0; overflow: hidden; }

/* ─── TABLE ─── */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 10px 16px;
  background: #f8fafc;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .3px;
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

.table-footer {
  padding: 12px 16px;
  border-top: 2px solid var(--border);
  text-align: right;
  background: #f8fafc;
  font-size: 14px;
}

/* ─── BADGES ─── */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.badge-success { background: #dcfce7; color: var(--success); }
.badge-danger  { background: #fee2e2; color: var(--danger); }
.badge-warning { background: #fef3c7; color: var(--warning); }
.badge-info    { background: #dbeafe; color: var(--primary); }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-danger  { background: var(--danger); color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 11.5px; border-radius: 6px; }
.btn-icon { padding: 4px 8px; }

/* ─── TOOLBAR ─── */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ─── FORMS ─── */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input, select, textarea {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border .15s;
  width: 100%;
}

input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px #dbeafe; }
textarea { resize: vertical; font-family: inherit; }

/* ─── MODALES ─── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open { display: flex; }

.modal {
  background: #fff;
  border-radius: 14px;
  width: 520px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  display: none;
}

.modal.open { display: block; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 { font-size: 16px; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 2px 6px;
  border-radius: 6px;
}
.modal-close:hover { background: var(--bg); }

.modal-body { padding: 20px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

/* ─── LIQUIDACION ─── */
.liquidacion-header.card { padding: 24px; text-align: center; }
.liq-title { font-size: 20px; font-weight: 800; letter-spacing: 1px; color: var(--text); }
.liq-info { display: flex; justify-content: center; gap: 32px; margin-top: 8px; color: var(--text-muted); font-size: 13px; }

/* ─── REPORTES ─── */
.reportes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.reporte-card { min-height: 280px; }

/* ─── CHART CATEGORIAS ─── */
.chart-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-bottom: 1px solid #f1f5f9;
}
.chart-bar-label { width: 110px; font-size: 12px; color: var(--text-muted); flex-shrink: 0; }
.chart-bar-wrap { flex: 1; background: #f1f5f9; border-radius: 4px; height: 14px; overflow: hidden; }
.chart-bar-fill { height: 100%; border-radius: 4px; background: var(--primary); transition: width .4s; }
.chart-bar-val { width: 70px; text-align: right; font-size: 12px; font-weight: 600; color: var(--text); }

/* ─── ULTIMOS GASTOS ─── */
.gasto-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.gasto-item:last-child { border-bottom: none; }
.gasto-desc { font-weight: 500; }
.gasto-cat { font-size: 11px; color: var(--text-muted); }
.gasto-amount { font-weight: 700; color: var(--text); }

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  opacity: 0;
  transform: translateY(8px);
  transition: all .25s;
  z-index: 9999;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ─── EXTRAORDINARIOS ─── */
.btn-extr {
  background: #7c3aed;
  color: #fff;
  border: none;
}
.btn-extr:hover { background: #6d28d9; }
.badge-extr { background: #ede9fe; color: #6d28d9; }

/* ─── PAGO RESUMEN ─── */
.pago-resumen {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  display: none;
}
.pago-resumen.show { display: block; }
.pago-resumen strong { color: #15803d; }

/* ─── NAV DIVIDER ─── */
.nav-divider {
  height: 1px;
  background: #334155;
  margin: 8px 12px;
}

/* ─── BALANCE TABS ─── */
.balance-tabs {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  width: fit-content;
  flex-shrink: 0;
}

.bal-tab {
  padding: 7px 18px;
  border-radius: 7px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .15s;
}
.bal-tab:hover { background: var(--bg); color: var(--text); }
.bal-tab.active { background: var(--primary); color: #fff; }

.bal-panel { display: none; flex-direction: column; gap: 16px; }
.bal-panel.active { display: flex; }

/* ─── BALANCE GRID ─── */
.bal-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 16px;
}

/* ─── SALDO INICIAL ─── */
.saldo-inicial-display {
  text-align: center;
  padding: 20px;
  background: #f0fdf4;
  border-radius: 10px;
  border: 2px dashed #86efac;
}
.si-label { font-size: 12px; color: #15803d; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.si-valor { font-size: 32px; font-weight: 800; color: #15803d; margin-top: 4px; }

/* ─── BADGE MOV ─── */
.badge-ingreso { background: #dcfce7; color: #15803d; }
.badge-egreso  { background: #fee2e2; color: #dc2626; }

/* ─── EVOLUCION CHART ─── */
.evol-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 12px;
}
.evol-periodo { width: 100px; color: var(--text-muted); flex-shrink: 0; }
.evol-bar-wrap { flex: 1; position: relative; height: 18px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.evol-bar-pos { height: 100%; background: #4ade80; border-radius: 4px; }
.evol-bar-neg { height: 100%; background: #f87171; border-radius: 4px; }
.evol-val { width: 90px; text-align: right; font-weight: 700; flex-shrink: 0; }
.evol-val.pos { color: #16a34a; }
.evol-val.neg { color: #dc2626; }

/* ─── RESUMEN PERIODO ─── */
.resumen-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}
.resumen-item:last-child { border-bottom: none; }
.resumen-item.total { font-weight: 700; font-size: 15px; padding-top: 14px; }

/* ─── ESTADO DE RESULTADOS ─── */
.eer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.eer-header-ing {
  background: #f0fdf4 !important;
  color: #15803d !important;
  border-bottom-color: #bbf7d0 !important;
}
.eer-header-egr {
  background: #fff1f2 !important;
  color: #be123c !important;
  border-bottom-color: #fecdd3 !important;
}
.eer-cat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: #94a3b8;
  padding: 8px 16px 4px;
  border-bottom: 1px solid #f1f5f9;
}
.eer-comp { font-size: 11px; color: var(--text-muted); }
.eer-comp.up   { color: #dc2626; }
.eer-comp.down { color: #16a34a; }

.eer-resultado-card { padding: 0; }
.eer-resultado-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px;
  flex-wrap: wrap;
}
.eer-resultado-item { text-align: center; }
.eer-res-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 6px; }
.eer-res-val { font-size: 26px; font-weight: 800; }
.eer-res-val.ing  { color: #16a34a; }
.eer-res-val.egr  { color: #dc2626; }
.eer-res-val.neto.positive { color: #16a34a; }
.eer-res-val.neto.negative { color: #dc2626; }
.eer-resultado-op { font-size: 28px; font-weight: 300; color: var(--text-muted); }

/* ─── IMPORTADOR ─── */
#modal-import-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 4000; align-items: center; justify-content: center;
}
.import-templates {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; background: #f8fafc;
  border-radius: 8px; margin-bottom: 10px; border: 1px solid var(--border);
}
.import-tip {
  font-size: 12.5px; color: #6d28d9; background: #f5f3ff;
  border: 1px solid #ede9fe; border-radius: 8px; padding: 10px 14px;
  margin-bottom: 4px;
}
.import-sheet {
  border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; margin-top: 12px;
}
.import-sheet-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: #f8fafc;
  border-bottom: 1px solid var(--border); font-size: 13px;
}
.import-sheet-skip {
  padding: 10px 14px; background: #fffbeb;
  border: 1px solid #fde68a; border-radius: 8px;
  font-size: 12.5px; margin-top: 8px; color: #92400e;
}
.import-more {
  padding: 6px 14px; font-size: 11px; color: #94a3b8;
  border-top: 1px solid var(--border);
}
.import-errors-box {
  margin-top: 10px; padding: 12px 14px; background: #fff1f2;
  border: 1px solid #fecdd3; border-radius: 8px;
  font-size: 12px; color: #9f1239;
}
.import-errors-box ul { margin: 6px 0 0 16px; }
.import-errors-box li { margin-bottom: 2px; }

/* ─── PRINT ─── */
@media print {
  .sidebar, .topbar, .toolbar, .modal-overlay, .toast { display: none !important; }
  .main { overflow: visible; }
  .section { display: flex !important; padding: 0; }
  .section:not(#section-liquidacion) { display: none !important; }
  #section-liquidacion { display: flex !important; }
}

/* ─── DOCUMENTOS ─── */
.doc-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px;
}
.doc-icon { font-size: 28px; flex-shrink: 0; }
.doc-info { flex: 1; min-width: 0; }
.doc-nombre { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.doc-meta { font-size: 12px; color: #64748b; display: flex; align-items: center; gap: 6px; }
.doc-notas { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.doc-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ─── GASTO RECURRENTE / BADGE EXTRAS ─── */
.badge-extr { background: #f3e8ff; color: #6d28d9; }
.badge-ingreso { background: #dcfce7; color: #15803d; }
.badge-egreso { background: #fee2e2; color: #dc2626; }

/* ─── WIZARD DE CONFIGURACIÓN INICIAL ─── */
#wizard-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.78);
  z-index: 3000;
  align-items: center;
  justify-content: center;
}
#wizard-modal {
  background: #fff;
  border-radius: 16px;
  width: 780px;
  max-width: 97vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 80px rgba(0,0,0,.4);
  overflow: hidden;
}
.wiz-step-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #475569; color: #94a3b8;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  transition: background .25s, color .25s;
}
.wiz-step-dot.active { background: #2563eb; color: #fff; }
.wiz-step-dot.done   { background: #16a34a; color: #fff; }
.wiz-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wiz-table th {
  background: #f8fafc; padding: 8px 10px; text-align: left;
  border-bottom: 2px solid #e2e8f0; font-size: 11px;
  font-weight: 600; color: #64748b; white-space: nowrap;
}
.wiz-table td { padding: 5px 5px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.wiz-table input, .wiz-table select {
  padding: 6px 8px; border: 1px solid #e2e8f0; border-radius: 6px;
  font-size: 12px; width: 100%; box-sizing: border-box;
}
.wiz-table input:focus, .wiz-table select:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 2px #dbeafe; }
.wiz-rm {
  background: none; border: none; color: #dc2626;
  cursor: pointer; font-size: 14px; padding: 3px 7px;
  border-radius: 4px; line-height: 1;
}
.wiz-rm:hover { background: #fee2e2; }
.wiz-coef-total { font-size: 12px; font-weight: 600; }
.wiz-section-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; color: #0f172a; }
.wiz-section-sub   { font-size: 13px; color: #64748b; margin-bottom: 14px; }
