/* ═══════════════════════════════════════════════════════════
   RICARDO ABANTO CONSULTING × MyFreelancer
   styles.css — Sistema visual completo
   Tema A (Navy+Gold) · Tema B (Verde+Gold)
   ═══════════════════════════════════════════════════════════ */

/* ── 1. TOKENS DE COLOR ─────────────────────────────────── */
:root,
[data-theme="navy"] {
  --bg-base:        #0c1c3a;
  --bg-sidebar:     #0a1628;
  --bg-card:        #0d1b4b;
  --bg-card-hover:  #112255;
  --bg-input:       #0a1628;
  --nav-active-bg:  #1e3a8a;
  --nav-hover-bg:   #0f2240;
  --brand-primary:  #2563eb;
  --brand-hover:    #1d4ed8;
  --brand-light:    #60a5fa;
  --border:         #1e3a8a;
  --border-subtle:  #0f2240;
  --gold-deep:      #3d2a00;
  --gold-dark:      #8b6508;
  --gold-main:      #c8960c;
  --gold-light:     #f0c040;
  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --bar-green:      #10b981;
  --bar-red:        #ef4444;
  --bar-blue:       #3b82f6;
  --bar-amber:      #f59e0b;
  --shadow:         0 4px 24px rgba(0,0,0,0.4);
  --radius:         8px;
  --radius-sm:      5px;
  --sidebar-w:      220px;
  --header-h:       52px;
  --topbar-gold-line: linear-gradient(90deg,#8b6508,#c8960c,#f0c040,#c8960c,#8b6508);
}

[data-theme="verde"] {
  --bg-base:        #020c07;
  --bg-sidebar:     #031008;
  --bg-card:        #041a0f;
  --bg-card-hover:  #062414;
  --bg-input:       #031008;
  --nav-active-bg:  #065f46;
  --nav-hover-bg:   #042a1e;
  --brand-primary:  #10b981;
  --brand-hover:    #059669;
  --brand-light:    #34d399;
  --border:         #065f46;
  --border-subtle:  #042a1e;
  --gold-deep:      #3d2a00;
  --gold-dark:      #8b6508;
  --gold-main:      #c8960c;
  --gold-light:     #f0c040;
  --text-primary:   #f0fdf4;
  --text-secondary: #94a3b8;
  --text-muted:     #6b7280;
  --bar-green:      #10b981;
  --bar-red:        #ef4444;
  --bar-blue:       #3b82f6;
  --bar-amber:      #f59e0b;
  --shadow:         0 4px 24px rgba(0,0,0,0.5);
  --radius:         8px;
  --radius-sm:      5px;
  --sidebar-w:      220px;
  --header-h:       52px;
  --topbar-gold-line: linear-gradient(90deg,#8b6508,#c8960c,#f0c040,#c8960c,#8b6508);
}

/* ── 2. RESET Y BASE ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  transition: background 0.25s, color 0.25s;
}

a { color: var(--brand-light); text-decoration: none; }
a:hover { color: var(--brand-primary); }

/* ── 3. LAYOUT ──────────────────────────────────────────── */
.layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ── 4. SIDEBAR ─────────────────────────────────────────── */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

/* Logo / brand */
.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-row span {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-main);
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Search (si existe en otros layouts) */
.sidebar-search {
  margin: 10px 10px 4px;
}
.sidebar-search input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  padding: 6px 10px;
  outline: none;
}
.sidebar-search input::placeholder { color: var(--text-muted); }
.sidebar-search input:focus { border-color: var(--brand-primary); }

/* Nav */
.nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 8px;
  gap: 2px;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}

.nav a:hover {
  background: var(--nav-hover-bg);
  color: var(--text-primary);
}

.nav a.active {
  background: var(--nav-active-bg);
  color: var(--text-primary);
  font-weight: 600;
}

.nav-section {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 10px 10px 4px;
  margin-top: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  border-radius: 4px;
  transition: color .15s;
}
.nav-section:hover { color: var(--gold-main); }
.nav-section.open  { color: var(--gold-light); }

.nav-arrow {
  font-size: 11px;
  line-height: 1;
  transition: transform .2s;
  color: inherit;
}

.nav-group {
  overflow: hidden;
}

/* Logout */
.sidebar .btn-ghost {
  margin: 10px;
  font-size: 12px;
  color: var(--text-muted);
  justify-content: center;
}

/* ── 5. MAIN ────────────────────────────────────────────── */
.main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
}

/* ── 6. HEADER / TOPBAR ─────────────────────────────────── */
.header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
  /* Línea dorada inferior — sello RAC */
  box-shadow: 0 2px 0 0 var(--gold-dark), var(--shadow);
}

.page-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

/* Toggle de tema */
.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--gold-main);
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--gold-main); background: var(--gold-deep); }

/* User chip */
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 99px;
  cursor: default;
}

.user-chip .meta { display: flex; flex-direction: column; align-items: flex-end; }
.user-chip .name { font-size: 11px; font-weight: 600; color: var(--text-primary); line-height: 1.2; }
.user-chip .role {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold-main);
  line-height: 1.2;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--nav-active-bg), var(--brand-primary));
  border: 1.5px solid var(--gold-main);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── 7. CONTENT ─────────────────────────────────────────── */
.content {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* ── 8. FILTROS ─────────────────────────────────────────── */
.filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.input-group label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-group input,
.input-group select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12.5px;
  padding: 6px 10px;
  outline: none;
  min-width: 130px;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.input-group input:focus,
.input-group select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,0.15);
}

.input-group select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* ── 9. BOTONES ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: background 0.15s, opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-hover); color: #fff; }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover {
  background: var(--nav-hover-bg);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-gold {
  background: var(--gold-main);
  color: #000;
  font-weight: 700;
}
.btn-gold:hover { background: var(--gold-light); }

.btn-danger {
  background: #7f1d1d;
  color: #fca5a5;
}
.btn-danger:hover { background: #991b1b; }

.btn-auto { align-self: flex-end; }

.btn-sm { padding: 4px 10px; font-size: 11px; }
.btn-lg { padding: 10px 24px; font-size: 14px; }

/* Botón nueva acción (esquina superior derecha) */
.btn-new {
  position: fixed;
  top: calc(var(--header-h) + 12px);
  right: 20px;
  background: var(--brand-primary);
  color: #fff;
  z-index: 90;
}
.btn-new:hover { background: var(--brand-hover); color: #fff; }

/* ── 10. CARDS ──────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.15s, background 0.15s;
}

.card:hover { border-color: var(--border); }

.card h3 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

/* ── 11. KPI CARDS ──────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.kpi-card {
  padding: 14px 16px;
  cursor: default;
  display: block;
}

a.kpi-card {
  cursor: pointer;
  text-decoration: none;
}
a.kpi-card:hover {
  border-color: var(--brand-primary);
  background: var(--bg-card-hover);
}

.kpi-label {
  font-size: 10px;
  color: var(--brand-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  font-weight: 500;
}

.kpi-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-sub {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* KPI especial — balance */
.kpi-card.highlight .kpi-label { color: var(--gold-main); }
.kpi-card.highlight .kpi-value { color: var(--gold-light); }

/* ── 12. SECCIÓN TITLE ──────────────────────────────────── */
.section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

/* ── 13. CHARTS GRID ────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

/* ── 14. BAR CHARTS ─────────────────────────────────────── */
.bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.bar-label {
  width: 100px;
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.bar-track {
  flex: 1;
  height: 6px;
  background: var(--border-subtle);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.bar-green  { background: var(--bar-green); }
.bar-red    { background: var(--bar-red); }
.bar-blue   { background: var(--bar-blue); }
.bar-amber  { background: var(--bar-amber); }

.bar-value {
  font-size: 11px;
  color: var(--text-secondary);
  min-width: 80px;
  text-align: right;
  flex-shrink: 0;
}

/* ── 15. EMPTY STATE ────────────────────────────────────── */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  padding: 32px 16px;
}

/* ── 16. TABLAS ─────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

thead th {
  background: var(--bg-card);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-card-hover); }

/* ── 17. BADGES / ESTADOS ───────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green  { background: #064e3b; color: #34d399; }
.badge-red    { background: #7f1d1d; color: #fca5a5; }
.badge-blue   { background: #1e3a5f; color: #60a5fa; }
.badge-amber  { background: #3d2a00; color: #fbbf24; }
.badge-purple { background: #2e1065; color: #c4b5fd; }
.badge-gray   { background: var(--border-subtle); color: var(--text-muted); }

/* ── 18. FORMULARIOS ────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  padding: 8px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.form-group textarea { resize: vertical; min-height: 80px; }

/* ── 19. LOGIN PAGE ─────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  padding: 20px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow);
  /* Línea dorada superior */
  border-top: 2px solid var(--gold-main);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.login-brand img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.login-brand .brand-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold-main);
  letter-spacing: 0.5px;
}

.login-brand .brand-sub {
  font-size: 10px;
  color: var(--brand-light);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.login-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  text-align: center;
}

.login-card .subtitle {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 24px;
}

.login-footer {
  text-align: center;
  margin-top: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.login-footer a { color: var(--gold-main); }

/* ── 20. MODAL ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  backdrop-filter: blur(2px);
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
  border-top: 2px solid var(--gold-main);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

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

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}
.modal-close:hover { background: var(--nav-hover-bg); color: var(--text-primary); }

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

/* ── 21. ALERTAS / TOAST ────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  margin-bottom: 12px;
  border-left: 3px solid;
}
.alert-success { background: #064e3b22; border-color: #10b981; color: #34d399; }
.alert-error   { background: #7f1d1d22; border-color: #ef4444; color: #fca5a5; }
.alert-warning { background: #3d2a0022; border-color: var(--gold-main); color: var(--gold-light); }
.alert-info    { background: #1e3a5f22; border-color: #3b82f6; color: #60a5fa; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 12.5px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-left: 3px solid var(--brand-primary);
  color: var(--text-primary);
  animation: slideIn 0.2s ease;
  max-width: 320px;
}
.toast.success { border-left-color: #10b981; }
.toast.error   { border-left-color: #ef4444; }
.toast.warning { border-left-color: var(--gold-main); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);   opacity: 1; }
}

/* ── 22. DROPDOWN FILTROS ───────────────────────────────── */
select:focus { border-color: var(--brand-primary); }

/* ── 23. CONFIGURACIÓN PAGE ─────────────────────────────── */
.config-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.config-section h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: 0;
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.catalog-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 14px;
}

.catalog-card h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.catalog-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-primary);
}
.catalog-item:last-of-type { border: none; }

.catalog-add {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.catalog-add input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  padding: 5px 8px;
  outline: none;
}
.catalog-add input:focus { border-color: var(--brand-primary); }

/* ── 24. MONEDAS / TAGS ─────────────────────────────────── */
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  background: var(--nav-active-bg);
  color: var(--brand-light);
}
.tag.primary { background: var(--brand-primary); color: #fff; }
.tag.gold    { background: var(--gold-deep); color: var(--gold-main); }

/* ── 25. REPORTES ───────────────────────────────────────── */
.export-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid;
  text-decoration: none;
  transition: background 0.15s;
}

.export-excel {
  background: #064e3b22;
  border-color: #065f46;
  color: #34d399;
}
.export-excel:hover { background: #064e3b55; color: #34d399; }

.export-pdf {
  background: #7f1d1d22;
  border-color: #991b1b;
  color: #fca5a5;
}
.export-pdf:hover { background: #7f1d1d55; color: #fca5a5; }

/* ── 26. SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--brand-primary); }

/* ── 27. HAMBURGER ──────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── 28. RESPONSIVE ─────────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 0px; }

  .layout { grid-template-columns: 1fr; }

  .hamburger { display: flex; }

  .sidebar {
    position: fixed;
    left: -260px;
    width: 260px;
    z-index: 150;
    transition: left 0.25s ease;
    height: 100vh;
  }
  .sidebar.open { left: 0; box-shadow: 4px 0 24px rgba(0,0,0,0.5); }

  .sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 140;
  }
  .sidebar-overlay.visible { display: block; }

  /* Header compacto */
  .header { padding: 0 12px; gap: 8px; }
  .page-title { font-size: 14px; }
  .user-chip .meta { display: none; }
  .user-chip { padding: 4px 6px; }

  /* Contenido */
  .content { padding: 12px; }

  /* KPIs y gráficas */
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .charts-grid { grid-template-columns: 1fr; }

  /* Config */
  .config-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }

  /* Filtros */
  .filters-row { flex-direction: column; align-items: stretch; }
  .input-group { width: 100%; }
  .input-group input, .input-group select { min-width: unset; width: 100%; }

  /* Modal */
  .modal { max-width: 100%; border-radius: 8px; padding: 16px; }
  .modal-overlay { padding: 8px; align-items: flex-end; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .page-title { display: none; }
}

/* ── 29. UTILIDADES ─────────────────────────────────────── */
.d-flex   { display: flex; }
.gap-8    { gap: 8px; }
.gap-12   { gap: 12px; }
.mt-8     { margin-top: 8px; }
.mt-16    { margin-top: 16px; }
.mb-16    { margin-bottom: 16px; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); font-size: 11px; }
.fw-700   { font-weight: 700; }
.w-full   { width: 100%; }
