/* ============================================================
   ARCHIVO: assets/css/main.css
   DESCRIPCIÓN: Estilos globales del sistema LIO-Gestión

   PALETA DE COLORES:
   --black:      #000000  → Fondo principal
   --black-soft: #0f0f0f  → Fondo de tarjetas
   --black-mid:  #1a1a1a  → Fondo de elementos secundarios
   --black-light:#2a2a2a  → Bordes y divisores
   --gold:       #FFD700  → Color Liaopastel (acento principal)
   --gold-dark:  #e6c200  → Hover del amarillo
   --text-white: #ffffff  → Texto principal
   --text-gray:  #999999  → Texto secundario
   --green:      #22c55e  → Estado OK / turno completado
   --yellow-warn:#f59e0b  → Estado advertencia
   --red:        #ef4444  → Estado error / merma alta

   ESTRUCTURA:
   1. Variables CSS y Reset
   2. Tipografía
   3. Layout (contenedores, grid)
   4. Componentes (botones, tarjetas, inputs, badges)
   5. Navegación inferior
   6. Header / Topbar
   7. Estados de semáforo
   8. Tablas
   9. Formularios
   10. Animaciones
   11. Utilidades
   12. Media queries (responsive)
   ============================================================ */

/* ──────────────────────────────────────────────────────────────
   1. VARIABLES CSS Y RESET
   ────────────────────────────────────────────────────────────── */
:root {
    /* Colores */
    --black:        #000000;
    --black-soft:   #0f0f0f;
    --black-mid:    #1a1a1a;
    --black-light:  #2a2a2a;
    --black-border: #333333;
    --gold:         #FFD700;
    --gold-dark:    #e6c200;
    --gold-soft:    rgba(255, 215, 0, 0.15);
    --gold-glow:    rgba(255, 215, 0, 0.3);
    --text-white:   #ffffff;
    --text-light:   #e0e0e0;
    --text-gray:    #999999;
    --text-muted:   #666666;
    --green:        #22c55e;
    --green-soft:   rgba(34, 197, 94, 0.15);
    --yellow-warn:  #f59e0b;
    --yellow-soft:  rgba(245, 158, 11, 0.15);
    --red:          #ef4444;
    --red-soft:     rgba(239, 68, 68, 0.15);
    --blue:         #3b82f6;

    /* Espaciado */
    --space-xs:  4px;
    --space-sm:  8px;
    --space-md:  16px;
    --space-lg:  24px;
    --space-xl:  32px;
    --space-2xl: 48px;

    /* Tipografía */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs:  11px;
    --font-size-sm:  13px;
    --font-size-md:  15px;
    --font-size-lg:  18px;
    --font-size-xl:  22px;
    --font-size-2xl: 28px;
    --font-size-3xl: 36px;

    /* Bordes */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Sombras */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.7);
    --shadow-gold: 0 0 20px rgba(255, 215, 0, 0.2);

    /* Transiciones */
    --transition: 0.2s ease;
    --transition-slow: 0.4s ease;

    /* Altura del navbar inferior */
    --nav-height: 64px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-md);
    background-color: var(--black);
    color: var(--text-white);
    line-height: 1.6;
    min-height: 100vh;
    /* Espacio inferior para el navbar */
    padding-bottom: calc(var(--nav-height) + 16px);
    -webkit-font-smoothing: antialiased;
}

/* ──────────────────────────────────────────────────────────────
   2. TIPOGRAFÍA
   ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-white);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }

.text-gold    { color: var(--gold); }
.text-gray    { color: var(--text-gray); }
.text-muted   { color: var(--text-muted); }
.text-green   { color: var(--green); }
.text-red     { color: var(--red); }
.text-warning { color: var(--yellow-warn); }
.text-sm      { font-size: var(--font-size-sm); }
.text-xs      { font-size: var(--font-size-xs); }
.text-lg      { font-size: var(--font-size-lg); }
.text-xl      { font-size: var(--font-size-xl); }
.font-bold    { font-weight: 700; }
.text-center  { text-align: center; }
.text-right   { text-align: right; }

/* ──────────────────────────────────────────────────────────────
   3. LAYOUT
   ────────────────────────────────────────────────────────────── */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-sm {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Grid de tarjetas de estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Grid general */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* ──────────────────────────────────────────────────────────────
   4. COMPONENTES
   ────────────────────────────────────────────────────────────── */

/* Tarjeta base */
.card {
    background: var(--black-soft);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.card-sm { padding: var(--space-md); }
.card-gold { border-color: var(--gold); box-shadow: var(--shadow-gold); }

/* Tarjeta de estadística */
.stat-card {
    background: var(--black-soft);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    transition: border-color var(--transition);
}

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

.stat-card .stat-value {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--gold);
    display: block;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: var(--space-xs);
    display: block;
}

.stat-card .stat-sub {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: 2px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--font-size-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

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

.btn-primary {
    background: var(--gold);
    color: var(--black);
}

.btn-primary:hover { background: var(--gold-dark); }

.btn-secondary {
    background: var(--black-mid);
    color: var(--text-white);
    border: 1px solid var(--black-border);
}

.btn-secondary:hover { border-color: var(--gold); color: var(--gold); }

.btn-danger {
    background: var(--red-soft);
    color: var(--red);
    border: 1px solid var(--red);
}

.btn-success {
    background: var(--green-soft);
    color: var(--green);
    border: 1px solid var(--green);
}

.btn-lg {
    padding: 16px 32px;
    font-size: var(--font-size-lg);
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 8px 14px;
    font-size: var(--font-size-sm);
    border-radius: var(--radius-sm);
}

.btn-full { width: 100%; }
.btn-icon { padding: 10px; width: 40px; height: 40px; }

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Botones +/- para cantidades */
.qty-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--black-mid);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm) var(--space-md);
}

.qty-btn button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    border: 1px solid var(--black-border);
    background: var(--black-light);
    color: var(--text-white);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.qty-btn button:active { transform: scale(0.88); }

.qty-btn .btn-minus:hover,
.qty-btn .btn-minus:active { background: var(--red-soft); border-color: var(--red); color: var(--red); }

.qty-btn .btn-plus:hover,
.qty-btn .btn-plus:active { background: var(--green-soft); border-color: var(--green); color: var(--green); }

.qty-btn .qty-value {
    min-width: 40px;
    text-align: center;
    font-size: var(--font-size-xl);
    font-weight: 800;
    color: var(--gold);
}

.qty-btn .qty-value.is-zero { color: var(--text-muted); }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gold    { background: var(--gold-soft);   color: var(--gold);        border: 1px solid var(--gold); }
.badge-green   { background: var(--green-soft);  color: var(--green);       border: 1px solid var(--green); }
.badge-yellow  { background: var(--yellow-soft); color: var(--yellow-warn); border: 1px solid var(--yellow-warn); }
.badge-red     { background: var(--red-soft);    color: var(--red);         border: 1px solid var(--red); }
.badge-gray    { background: var(--black-mid);   color: var(--text-gray);   border: 1px solid var(--black-border); }

/* ──────────────────────────────────────────────────────────────
   5. NAVEGACIÓN INFERIOR (Mobile-first)
   ────────────────────────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--black-soft);
    border-top: 1px solid var(--black-border);
    display: flex;
    align-items: stretch;
    z-index: 100;
    padding-bottom: env(safe-area-inset-bottom, 0); /* iOS safe area */
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    transition: color var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family);
}

.nav-item:hover,
.nav-item.active {
    color: var(--gold);
}

.nav-item .nav-icon {
    font-size: 22px;
    line-height: 1;
}

.nav-item .nav-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Indicador activo */
.nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    width: 32px;
    height: 2px;
    background: var(--gold);
    border-radius: 0 0 2px 2px;
}

/* ──────────────────────────────────────────────────────────────
   6. HEADER / TOPBAR
   ────────────────────────────────────────────────────────────── */
.topbar {
    background: var(--black-soft);
    border-bottom: 1px solid var(--black-border);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.topbar-logo .logo-icon {
    font-size: 24px;
}

.topbar-logo .logo-text {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--gold);
    letter-spacing: 1px;
}

.topbar-info {
    text-align: right;
}

.topbar-info .user-name {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-white);
}

.topbar-info .user-role {
    font-size: var(--font-size-xs);
    color: var(--gold);
}

/* ──────────────────────────────────────────────────────────────
   7. SEMÁFORO DE CUMPLIMIENTO
   ────────────────────────────────────────────────────────────── */
.compliance-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: var(--space-xs);
}

.compliance-dot.green  { background: var(--green);       box-shadow: 0 0 6px var(--green); }
.compliance-dot.yellow { background: var(--yellow-warn); box-shadow: 0 0 6px var(--yellow-warn); }
.compliance-dot.red    { background: var(--red);          box-shadow: 0 0 6px var(--red); }

.compliance-row {
    display: flex;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--black-border);
}

.compliance-row:last-child { border-bottom: none; }

/* ──────────────────────────────────────────────────────────────
   8. TABLAS
   ────────────────────────────────────────────────────────────── */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--black-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--font-size-sm);
}

thead tr {
    background: var(--black-mid);
}

thead th {
    padding: 12px var(--space-md);
    text-align: left;
    font-weight: 700;
    color: var(--gold);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

tbody tr {
    border-bottom: 1px solid var(--black-border);
    transition: background var(--transition);
}

tbody tr:hover { background: var(--black-mid); }
tbody tr:last-child { border-bottom: none; }

tbody td {
    padding: 10px var(--space-md);
    color: var(--text-light);
    vertical-align: middle;
}

/* Top waste ranking */
.rank-number {
    font-size: var(--font-size-lg);
    font-weight: 800;
    color: var(--gold);
    min-width: 32px;
}

.rank-number.rank-1 { color: #FFD700; }
.rank-number.rank-2 { color: #C0C0C0; }
.rank-number.rank-3 { color: #CD7F32; }

/* ──────────────────────────────────────────────────────────────
   9. FORMULARIOS E INPUTS
   ────────────────────────────────────────────────────────────── */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    background: var(--black-mid);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    color: var(--text-white);
    font-size: var(--font-size-md);
    font-family: var(--font-family);
    padding: 12px var(--space-md);
    transition: border-color var(--transition);
    outline: none;
    -webkit-appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23FFD700' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

/* PIN input grande */
.pin-input {
    font-size: 32px;
    font-weight: 800;
    text-align: center;
    letter-spacing: 12px;
    padding: 20px;
    background: var(--black-mid);
    border: 2px solid var(--black-border);
    border-radius: var(--radius-lg);
    color: var(--gold);
    width: 100%;
}

.pin-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-soft);
}

/* Filter bar */
.filter-bar {
    background: var(--black-soft);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    align-items: flex-end;
}

.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

/* ──────────────────────────────────────────────────────────────
   10. ANIMACIONES
   ────────────────────────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.fade-in   { animation: fadeIn 0.3s ease; }
.spin      { animation: spin 1s linear infinite; }
.pulse     { animation: pulse 1.5s ease infinite; }
.slide-up  { animation: slideUp 0.3s ease; }

/* Loading spinner */
.loader {
    width: 40px;
    height: 40px;
    border: 3px solid var(--black-border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: var(--space-xl) auto;
}

.loader-sm {
    width: 18px;
    height: 18px;
    border-width: 2px;
    display: inline-block;
    vertical-align: middle;
}

/* ──────────────────────────────────────────────────────────────
   11. UTILIDADES Y COMPONENTES VARIOS
   ────────────────────────────────────────────────────────────── */

/* Toast / Notificación */
.toast {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--black-soft);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    z-index: 200;
    animation: slideUp 0.3s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    max-width: 90vw;
}

.toast-success { border-color: var(--green); color: var(--green); }
.toast-error   { border-color: var(--red);   color: var(--red); }
.toast-warning { border-color: var(--yellow-warn); color: var(--yellow-warn); }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 150;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--space-md);
    animation: fadeIn 0.2s ease;
}

.modal-overlay.center { align-items: center; }

.modal {
    background: var(--black-soft);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: var(--space-xl) var(--space-lg);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal.modal-center {
    border-radius: var(--radius-xl);
}

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

.modal-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--gold);
}

/* Divider */
.divider {
    height: 1px;
    background: var(--black-border);
    margin: var(--space-lg) 0;
}

/* Section title */
.section-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--gold-soft), transparent);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: var(--space-2xl) var(--space-lg);
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: var(--space-md); }
.empty-state p { font-size: var(--font-size-md); }

/* Offline banner */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--yellow-warn);
    color: var(--black);
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--font-size-sm);
    font-weight: 700;
    z-index: 300;
    display: none;
}

.offline-banner.visible { display: block; }

/* Progress bar */
.progress-bar {
    height: 6px;
    background: var(--black-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--gold);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.progress-fill.high  { background: var(--red); }
.progress-fill.med   { background: var(--yellow-warn); }
.progress-fill.low   { background: var(--green); }

/* Turno selector */
.shift-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.shift-btn {
    padding: var(--space-md);
    background: var(--black-mid);
    border: 2px solid var(--black-border);
    border-radius: var(--radius-md);
    color: var(--text-gray);
    font-size: var(--font-size-sm);
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition);
    position: relative;
}

.shift-btn:hover { border-color: var(--gold); color: var(--text-white); }

.shift-btn.active {
    border-color: var(--gold);
    background: var(--gold-soft);
    color: var(--gold);
}

.shift-btn.completed::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 10px;
    color: var(--green);
}

/* Categoría pill selector */
.pill-selector {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    padding-bottom: var(--space-sm);
    scrollbar-width: none;
}

.pill-selector::-webkit-scrollbar { display: none; }

.pill {
    flex-shrink: 0;
    padding: 6px 16px;
    background: var(--black-mid);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.pill:hover,
.pill.active {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold);
}

/* Línea de producto en entrada de datos */
.product-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--black-border);
    transition: background var(--transition);
}

.product-row:last-child { border-bottom: none; }
.product-row.has-value { background: rgba(255, 215, 0, 0.03); }

.product-name {
    font-size: var(--font-size-sm);
    color: var(--text-light);
    flex: 1;
    margin-right: var(--space-md);
}

/* Contenedor del chart */
.chart-container {
    position: relative;
    background: var(--black-soft);
    border: 1px solid var(--black-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
}

.chart-title {
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--gold);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ──────────────────────────────────────────────────────────────
   12. MEDIA QUERIES
   ────────────────────────────────────────────────────────────── */

/* Tablet y desktop */
@media (min-width: 768px) {
    body { padding-bottom: 0; }

    /* En desktop el nav puede ir a la izquierda o arriba */
    .bottom-nav {
        position: static;
        height: auto;
        border-top: none;
        border-bottom: 1px solid var(--black-border);
        padding: 0 var(--space-lg);
    }

    .nav-item {
        flex-direction: row;
        padding: var(--space-md) var(--space-lg);
        flex: none;
        gap: var(--space-sm);
    }

    .nav-item .nav-icon { font-size: 18px; }
    .nav-item .nav-label { font-size: var(--font-size-sm); }

    .stats-grid { grid-template-columns: repeat(4, 1fr); }

    .modal-overlay { align-items: center; }
    .modal { border-radius: var(--radius-xl); }
}

@media (min-width: 1024px) {
    .container { padding: 0 var(--space-xl); }
}

/* Print styles (para PDF) */
@media print {
    .bottom-nav, .topbar .btn, .filter-bar { display: none; }
    body { background: #fff; color: #000; }
    .card { border: 1px solid #ddd; }
}
