:root {
  --bg:          #0f111a;
  --bg-gradient: radial-gradient(circle at top right, #161a2d 0%, #0f111a 100%);
  --bg2:         #1a1d2e;
  --card:        rgba(30, 35, 55, 0.6);
  --card-border: rgba(255, 255, 255, 0.08);
  --sidebar-w:   260px;
  --sidebar-bg:  #0a0c14;
  --accent:      #6366f1;
  --accent-h:    #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --accent-lt:   rgba(99, 102, 241, 0.15);
  --text:        #ffffff;
  --text2:       #cbd5e1;
  --text3:       #64748b;
  --border:      rgba(255, 255, 255, 0.1);
  --success:     #10b981;
  --warning:     #f59e0b;
  --danger:      #ef4444;
  --info:        #38bdf8;
  --radius:      16px;
  --radius-sm:   10px;
  --shadow:      0 10px 30px -10px rgba(0,0,0,0.5);
  --transition:  0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { font-size: 15px; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

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

/* ── SIDEBAR ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width var(--transition);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .brand-logo-wrap {
  width: 42px; height: 42px; min-width: 42px;
  background: rgba(255,255,255,0.1);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  padding: 3px;
}
.sidebar-brand .brand-logo {
  width: 36px; height: 36px;
  object-fit: contain;
  display: block;
}
.sidebar-brand .brand-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.sidebar-brand .brand-sub {
  font-size: 10px;
  color: var(--text3);
  font-weight: 400;
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text3);
  padding: 8px 20px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--text2);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 0;
  transition: all var(--transition);
  position: relative;
  cursor: pointer;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-item.active {
  color: var(--accent);
  background: var(--accent-lt);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 4px 4px 0;
}
.nav-item .nav-icon { font-size: 16px; width: 20px; text-align: center; flex-shrink: 0; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
}
.sidebar-user .avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { font-size: 12px; font-weight: 600; color: var(--text); }
.sidebar-user .user-role { font-size: 10px; color: var(--text3); }
.sidebar-user .logout-btn {
  background: none; border: none;
  color: var(--text3); cursor: pointer;
  font-size: 14px; padding: 4px;
  border-radius: 4px;
  transition: color var(--transition);
  text-decoration: none;
  display: flex; align-items: center;
}
.sidebar-user .logout-btn:hover { color: var(--danger); }

/* ── MAIN CONTENT ── */
.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0; /* Evita que el flexbox desborde */
  overflow-x: hidden;
}

/* ── TOPBAR ── */
.topbar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(26, 29, 46, 0.8);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 50;
}
.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.topbar-sub { font-size: 12px; color: var(--text3); margin-top: 1px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

/* ── BCV BADGE ── */
.bcv-badge {
  display: flex; align-items: center; gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text2);
}
.bcv-badge .bcv-rate {
  font-weight: 700;
  color: var(--success);
  font-size: 13px;
}
.bcv-badge .bcv-flag { font-size: 14px; }
.btn-bcv-refresh {
  background: none; border: none;
  color: var(--text3); cursor: pointer;
  font-size: 13px; padding: 2px 4px;
  border-radius: 4px; transition: all var(--transition);
}
.btn-bcv-refresh:hover { color: var(--success); transform: rotate(180deg); }

/* ── PAGE CONTENT ── */
.page-content { padding: 28px; flex: 1; }

/* ── CARDS ── */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  backdrop-filter: blur(8px);
}
.card-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); }
.card-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }

/* ── STAT CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 22px;
  display: flex; gap: 16px;
  align-items: center;
  transition: all var(--transition);
  backdrop-filter: blur(8px);
}
.stat-card:hover {
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.stat-icon.accent { background: var(--accent-lt); }
.stat-icon.success { background: rgba(16,185,129,0.1); }
.stat-icon.warning { background: rgba(245,158,11,0.1); }
.stat-icon.danger { background: rgba(239,68,68,0.1); }
.stat-icon.info { background: rgba(6,182,212,0.1); }
.stat-value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-label { font-size: 12px; color: var(--text3); margin-top: 4px; }
.stat-trend { font-size: 11px; color: var(--text3); margin-top: 6px; }

/* ── TABLES ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: rgba(255,255,255,0.03);
  color: var(--text3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.025); }
tbody td { padding: 10px; color: var(--text2); vertical-align: middle; }
tbody td strong { color: var(--text); }

/* ── BADGES ── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
}
.badge-danger  { background: rgba(239,68,68,0.15);   color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.15);  color: var(--warning); }
.badge-success { background: rgba(16,185,129,0.15);  color: var(--success); }
.badge-info    { background: rgba(6,182,212,0.15);   color: var(--info); }
.badge-accent  { background: var(--accent-lt);       color: var(--accent); }
.badge-muted   { background: rgba(255,255,255,0.07); color: var(--text3); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}
.btn-primary:hover { background: var(--accent-h); box-shadow: 0 6px 20px var(--accent-glow); }
.btn-secondary { background: rgba(255,255,255,0.07); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }
.btn-danger:hover { background: rgba(239,68,68,0.25); }
.btn-success { background: rgba(16,185,129,0.15); color: var(--success); border: 1px solid rgba(16,185,129,0.2); }
.btn-success:hover { background: rgba(16,185,129,0.25); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-icon { padding: 8px; min-width: 36px; min-height: 36px; justify-content: center; border-radius: var(--radius-sm); }

/* ── FORMS ── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; gap: 18px; }
.form-row.col2 { grid-template-columns: 1fr 1fr; }
.form-row.col3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row.col4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--text2); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=number], input[type=password],
input[type=date], select, textarea {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 13.5px;
  font-family: 'Inter', sans-serif;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--text3); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
select option { background: var(--bg2); color: var(--text); }
textarea { resize: vertical; min-height: 80px; }
.form-help { font-size: 11px; color: var(--text3); margin-top: 4px; }

/* ── SEARCH BAR ── */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex: 1;
  max-width: 420px;
  min-height: 42px;
}
.search-bar input {
  border: none; background: transparent;
  padding: 8px 0; flex: 1; font-size: 14px;
  color: var(--text);
  box-shadow: none !important;
}
.search-bar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-icon { color: var(--text3); font-size: 16px; }

/* ── FILTER GROUP ── */
.filter-group {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; width: 100%;
}
.filter-group > * { min-height: 42px; }

@media (max-width: 768px) {
  .search-bar { max-width: 100%; width: 100%; }
  .filter-group { flex-direction: column; align-items: stretch; }
  .filter-group select, .filter-group button, .filter-group .search-bar { width: 100%; max-width: 100%; }
}

/* ── MODALS ── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  width: 90%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--transition);
  box-shadow: var(--shadow);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--text); }
.modal-close {
  background: none; border: none;
  color: var(--text3); font-size: 20px;
  cursor: pointer; padding: 4px;
  border-radius: 4px; transition: color var(--transition);
}
.modal-close:hover { color: var(--danger); }
.modal-footer {
  display: flex; justify-content: flex-end;
  gap: 10px; margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── ALERTS ── */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 18px;
}
.alert-danger  { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.2);   color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.1);  border: 1px solid rgba(16,185,129,0.2);  color: #6ee7b7; }
.alert-warning { background: rgba(245,158,11,0.1);  border: 1px solid rgba(245,158,11,0.2);  color: #fcd34d; }
.alert-info    { background: rgba(6,182,212,0.1);   border: 1px solid rgba(6,182,212,0.2);   color: #67e8f9; }

/* ── PAGINATION ── */
.pagination {
  display: flex; align-items: center; gap: 6px;
  margin-top: 18px;
}
.page-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--text2);
  cursor: pointer; text-decoration: none;
  transition: all var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.page-btn:disabled { opacity: 0.4; cursor: default; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text3);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 16px; color: var(--text2); margin-bottom: 8px; }

/* ── STOCK INDICATOR ── */
.stock-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.stock-bar {
  flex: 1; height: 5px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px; overflow: hidden;
}
.stock-bar-fill { height: 100%; border-radius: 3px; transition: width 0.4s; }
.stock-val { font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ── COTIZACION PRINT ── */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .page-content { padding: 0; }
  body { background: #fff; color: #000; }
  .card { border: 1px solid #ddd; background: #fff; }
  .cotizacion-print-header { color: #000; }
}

/* ── UTILITIES ── */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-3 { margin-top: 12px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text3); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent); }
.font-bold { font-weight: 700; }
.w-full { width: 100%; }

/* ── LOGIN PAGE ── */
.login-body {
  min-height: 100vh;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  position: relative; overflow: hidden;
}
.login-bg-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.15) 0%, transparent 70%);
  top: -200px; left: -200px;
  pointer-events: none;
}
.login-bg-glow2 {
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  bottom: -100px; right: -100px;
  pointer-events: none;
}
.login-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 48px 40px;
  width: 100%;
  max-width: 420px;
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  position: relative; z-index: 1;
  animation: fadeUp 0.4s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-logo {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px var(--accent-glow);
}
.login-title {
  text-align: center;
  font-size: 22px; font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.login-sub {
  text-align: center;
  font-size: 13px; color: var(--text3);
  margin-bottom: 32px;
}
.input-icon-wrap { position: relative; }
.input-icon-wrap input { padding-left: 40px; }
.input-icon-wrap .ico {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--text3); font-size: 15px;
  pointer-events: none;
}
.login-submit {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent), #818cf8);
  color: #fff;
  font-size: 15px; font-weight: 700;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: 0 6px 20px var(--accent-glow);
  transition: all var(--transition);
  margin-top: 8px;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 28px var(--accent-glow); }
.login-submit:active { transform: translateY(0); }

/* ── COTIZACION BUILDER ── */
.cot-table th { font-size: 11px; }
.cot-table input { padding: 6px 8px; font-size: 13px; }
.cot-total-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  min-width: 280px;
}
.cot-total-row {
  display: flex; justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.cot-total-row:last-child { border-bottom: none; font-size: 16px; font-weight: 800; color: var(--text); }
.cot-total-row .label { color: var(--text3); }

/* ── MENU TOGGLE ── */
.menu-toggle {
  display: none;
  background: none; border: none; color: var(--text);
  font-size: 24px; cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hide-tablet { display: none !important; }
}

@media (max-width: 768px) {
  :root { --sidebar-w: 280px; }
  
  .menu-toggle { display: block; }
  
  .sidebar {
    left: calc(var(--sidebar-w) * -1);
    transition: left var(--transition);
    box-shadow: 20px 0 50px rgba(0,0,0,0.8);
  }
  .sidebar.open { left: 0; }
  
  .main { margin-left: 0; }
  
  .sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px); z-index: 90;
    display: none;
  }
  .sidebar-overlay.open { display: block; }

  /* Transformar Tablas en Tarjetas en Móvil */
  .table-wrap { overflow: visible; }
  table, thead, tbody, th, td, tr { display: block; }
  thead tr { position: absolute; top: -9999px; left: -9999px; }
  
  tbody tr {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    padding: 12px;
    position: relative;
    box-shadow: var(--shadow);
  }
  
  tbody td {
    border: none;
    padding: 6px 0 6px 45%;
    position: relative;
    text-align: right;
    min-height: 32px;
  }
  
  tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 0; top: 6px;
    width: 40%;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    color: var(--text3);
    text-transform: uppercase;
  }

  /* Ajustes específicos para celdas con botones o badges */
  tbody td.actions, tbody td.full-mobile { 
    padding-left: 0; text-align: center; margin-top: 10px; border-top: 1px solid var(--border); padding-top: 12px;
  }
  tbody td.actions::before { display: none; }
  
  .hide-mobile { display: none !important; }
  .form-row.col2, .form-row.col3, .form-row.col4 { grid-template-columns: 1fr; }
  
  .topbar { padding: 10px 12px; }
  .topbar-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
  .topbar-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
  .topbar-sub { display: none; }
  .bcv-badge { padding: 5px 8px; font-size: 11px; gap: 4px; }
  .bcv-badge > span:nth-child(2) { display: none; } /* Ocultar texto "BCV:" */
  #pwa-install-btn { padding: 6px 10px; font-size: 11px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .page-content { padding: 16px; }
  .card { padding: 16px; }
  .pwa-btn-text { display: none; } /* Solo ícono en pantallas muy pequeñas */
}
