:root {
    --bg-dark: #0a0a0b;
    --card-bg: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.08);
    --accent: #d4af37; /* Cinematic Gold */
    --accent-hover: #f0c950;
    --text-main: #f5f5f7;
    --text-muted: #9ea3b0;
    --font-ui: 'Outfit', sans-serif;
    --font-heading: 'Outfit', sans-serif; /* Totalmente Sans-Serif como pidió el usuario */
    --success: #4CAF50;
    --warning: #FF9800;
    --info: #2196F3;
}

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

/* Padding Utilities */
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 2.5rem !important; }

body {
    background-color: var(--bg-dark);
    color: #e0e0e6;
    font-family: var(--font-ui);
    overflow-x: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navigation Bar */
.sidebar {
    width: 100%;
    height: 70px;
    background: rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid var(--border-glass);
    padding: 0 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: 0.3s;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0;
    flex: 1;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-area h1 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
}

.nav-links {
    list-style: none;
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
}

.nav-links li {
    margin-bottom: 0;
}

.nav-btn {
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 400;
    white-space: nowrap;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #e0e0e6;
}

.nav-btn.active {
    background: var(--accent);
    color: var(--bg-dark);
    font-weight: 600;
}

.admin-link {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.admin-link a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
}

/* Content Area */
.content-area {
    flex-grow: 1;
    padding: 3rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tab-header {
    margin-bottom: 2.5rem;
}

.tab-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.tab-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Grids and Cards */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    transition: 0.3s;
}

.card {
    padding: 2rem;
}

.card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
}

.card h3 {
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* Schedules Table */
.schedule-grid {
    width: 100%;
    border-collapse: collapse;
}

.schedule-grid th {
    text-align: left;
    padding: 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.schedule-grid td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-glass);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: var(--bg-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

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

/* Tool Views */
.tool-view {
    animation: slideIn 0.3s ease;
}

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

.calculator-container {
    padding: 2rem;
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

input, select, textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-glass);
    padding: 0.75rem;
    border-radius: 8px;
    color: #e0e0e6;
    font-family: var(--font-ui);
}

.calculator-results {
    margin-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.result-box {
    background: rgba(255,255,255,0.02);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
}

.result-box h4 {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.result-box p {
    font-size: 1.25rem;
    font-weight: 600;
}

.result-box.highlight {
    grid-column: span 2;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent);
}
.result-box.highlight h4 {
    color: var(--accent);
}

/* --- CALENDAR V10 (DARK & PRO) --- */
.calendar-grid-month {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 1.5rem;
}
.day-header {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    padding: 12px;
    text-align: center;
    font-weight: bold;
    font-size: 0.75rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-glass);
}
.day-cell {
    background: transparent;
    min-height: 140px;
    padding: 8px;
    position: relative;
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #e0e0e6;
    border: 0.5px solid var(--border-glass);
    overflow: hidden; /* Evitar que se ensanche en mobile */
}
.day-cell:hover { background: rgba(255, 255, 255, 0.05); }
.day-cell.other-month { background: rgba(0,0,0,0.2); opacity: 0.4; }

.day-number { font-size: 0.85rem; font-weight: bold; color: var(--text-muted); margin-bottom: 5px; }

/* Vista Semana V10 (Grilla de tiempo) */
.week-container-v10 {
    display: grid;
    grid-template-columns: 60px repeat(7, 1fr);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    overflow: hidden;
}
.week-time-col {
    display: grid;
    grid-template-rows: 50px repeat(14, 60px); /* 8am to 10pm */
    border-right: 1px solid var(--border-glass);
    background: rgba(0,0,0,0.2);
}
.week-day-col {
    display: grid;
    grid-template-rows: 50px repeat(14, 60px);
    border-right: 1px solid var(--border-glass);
    position: relative;
}
.time-slot-label {
    height: 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--text-muted);
    padding-top: 5px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}
.week-day-header {
    height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--border-glass);
}
.week-day-header span:first-child { font-size: 0.6rem; text-transform: uppercase; opacity: 0.6; }
.week-day-header span:last-child { font-size: 1rem; font-weight: bold; color: var(--accent); }

.week-event-card {
    position: absolute;
    width: calc(100% - 4px);
    left: 2px;
    border-radius: 4px;
    padding: 4px;
    font-size: 0.65rem;
    color: #000;
    font-weight: bold;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border-left: 3px solid rgba(0,0,0,0.2);
}
.event-pill-v8 {
    font-size: 0.6rem; /* Un poco más pequeña para mobile */
    padding: 2px 8px;
    border-radius: 20px;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%; /* No se sale del padre */
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    display: block;
    line-height: 1.3;
}
.event-pill-v8:hover { filter: brightness(1.1); transform: scale(1.02); z-index: 10; }

.time-label-v8 {
    font-weight: bold;
    font-size: 0.6rem;
    background: rgba(0,0,0,0.1);
    padding: 0 3px;
    border-radius: 2px;
    margin-right: 4px;
}
/* Timeline V9 - Profesional */
.timeline-container-v9 {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 1rem;
}
.pc-row-v9 {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
}
.pc-row-v9 h4 {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--accent);
}
.timeline-track-v9 {
    position: relative;
    height: 45px;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 22px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}
.hour-markers-v9 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}
.hour-marker-v9 {
    width: 1px;
    height: 100%;
    background: rgba(255,255,255,0.05);
    position: relative;
}
.hour-marker-v9::after {
    content: attr(data-hour);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.6rem;
    color: var(--text-muted);
}
.booking-bar-v9 {
    position: absolute;
    height: 35px;
    top: 5px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 0.7rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,0.2);
}

.add-btn-v8 {
    opacity: 0;
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: black;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.day-cell:hover .add-btn-v8 { opacity: 1; transform: scale(1.1); }

/* --- SWITCH ANDROID --- */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* --- STORYBOARD CANVAS V4 --- */
#storyboard-canvas-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background: #111;
    padding: 20px;
    border-radius: 12px;
}

.story-frame-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #1a1a1a;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #333;
}

.story-frame {
    background: #000;
    border: 1px solid #444;
    aspect-ratio: 16/9;
    cursor: crosshair;
    width: 100%;
}

.story-frame.fullscreen {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    height: 90vh;
    z-index: 1000;
    aspect-ratio: unset;
    box-shadow: 0 0 100px rgba(0,0,0,0.9);
    border: 5px solid var(--accent);
}

.story-controls {
    display: flex;
    gap: 5px;
}

.story-controls button {
    flex: 1;
    font-size: 0.65rem;
    padding: 5px;
}

/* --- CALLSHEET PREMIUM V4 --- */
.callsheet-preview-container {
    background: #fdfdfd;
    color: #1a1a1a;
    padding: 3rem;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.callsheet-preview-container h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    letter-spacing: -1px;
    border-bottom: 3px solid #1a1a1a;
    margin-bottom: 0.5rem;
}

.callsheet-preview-container .meta-info {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
}

.callsheet-preview-container table {
    width: 100%;
    border-collapse: collapse;
}

.callsheet-preview-container th {
    background: #1a1a1a;
    color: #fff;
    padding: 10px;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.callsheet-preview-container td {
    border-bottom: 1px solid #eee;
    padding: 12px 10px;
}

/* --- MODAL REFINADO V4 --- */
#booking-modal {
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background-color: rgba(20, 20, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
}

.view-selector {
    display: flex;
    background: rgba(255,255,255,0.05);
    background: rgba(255,255,255,0.03);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
    gap: 4px;
}
.view-selector button {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.85rem;
    font-family: var(--font-ui);
}
.view-selector button.active {
    background: var(--accent);
    color: #000;
    font-weight: bold;
}
.warning-box {
    background: rgba(255, 77, 77, 0.1);
    border: 1px solid #ff4d4d;
    padding: 1rem;
    border-radius: 12px;
    color: #ff4d4d;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
    }
    .content-area {
        padding: 1.5rem;
    }
}

/* Estilización de Dropdowns (Select) V17 */
select {
    background-color: rgba(255, 255, 255, 0.05) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 18px !important;
    border: 1px solid var(--border-glass) !important;
    color: #f5f5f7 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-family: var(--font-ui) !important;
    font-size: 0.9rem !important;
    appearance: none !important;
    cursor: pointer !important;
    transition: 0.3s !important;
}

select:focus {
    border-color: var(--accent) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
    outline: none !important;
}

/* Forzar fondo oscuro en las opciones (Chrome/Edge Windows) */
select option {
    background-color: #0f0f11 !important;
    color: #ffffff !important;
    padding: 12px !important;
}

select optgroup {
    background-color: #050505 !important;
    color: var(--accent) !important;
    font-weight: 700 !important;
    font-style: normal !important;
    padding: 8px !important;
}

.day-cell.restricted {
    background: rgba(255, 0, 0, 0.08) !important;
    border-color: rgba(255, 0, 0, 0.2) !important;
}

/* Botones de Navegación del Calendario V14 */
.btn-nav {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--accent) !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 1.4rem !important;
    padding: 0 !important;
    line-height: 1 !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}
.btn-nav:hover {
    background: var(--accent) !important;
    color: #000 !important;
    transform: translateY(-2px) scale(1.05) !important;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3) !important;
}

/* Botones de Navegación V15 (Div-based) */
.cal-nav-btn {
    width: 44px !important;
    height: 44px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--accent) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
    backdrop-filter: blur(5px) !important;
}
.cal-nav-btn:hover {
    background: var(--accent) !important;
    color: #000 !important;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4) !important;
    border-color: var(--accent) !important;
}
.cal-nav-btn svg {
    width: 20px !important;
    height: 20px !important;
    transition: transform 0.3s ease !important;
}

/* --- EXPOSURE PRO V6 --- */
.mode-toggle {
    display: flex;
    background: rgba(255,255,255,0.05);
    padding: 4px;
    border-radius: 12px;
    border: 1px solid var(--border-glass);
}
.mode-btn {
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.75rem;
    transition: 0.3s;
}
.mode-btn.active {
    background: var(--accent);
    color: #000;
}
.lock-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1rem;
    transition: 0.3s;
}
.lock-btn.locked { color: var(--accent); }
.shutter-180-pill {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid var(--border-glass);
    gap: 10px;
    font-size: 0.8rem;
}
.shutter-180-pill input[type="checkbox"] { width:16px; height:16px; accent-color:var(--accent); }
.shutter-180-pill input[type="number"] { width:40px; background:transparent; border:none; color:var(--accent); font-weight:bold; text-align:center; padding:0; }

.suggestion-box {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
}
.suggestion-box h3 { font-size: 0.7rem; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; }
.result-item { display: flex; flex-direction: column; }
.result-item span { font-size: 0.65rem; color: var(--text-muted); }
.result-item strong { font-size: 1.75rem; color: var(--accent); }

input[type="range"] {
    width: 100%;
    margin-top: 10px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* Ajustes para la grilla de parámetros */
.param-group input[type="number"] {
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: var(--accent) !important;
    text-align: center;
    background: rgba(0,0,0,0.4) !important;
}

.result-item strong {
    font-size: 2.2rem !important;
    line-height: 1;
}

.history-item span {
    font-family: var(--font-ui);
    font-weight: 600;
}

/* Responsive Call Sheet */
@media (max-width: 992px) {
    .callsheet-grid {
        grid-template-columns: 1fr !important;
    }
    .callsheet-preview-wrapper {
        position: static !important;
        margin-top: 2rem;
        overflow-x: auto;
    }
    .callsheet-pdf-style {
        transform: scale(0.6);
        transform-origin: top center;
    }
}
/* --- MOBILE HAMBURGER BUTTON --- */
.mobile-only-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass) !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
    padding: 0 !important;
    font-size: 1.4rem;
    color: var(--accent);
    transition: all 0.3s ease;
}
.mobile-only-btn:hover {
    background: var(--accent) !important;
    color: #000;
}

/* --- MOBILE SIDEBAR OVERLAY --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1400;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-only-btn { display: flex; align-items: center; justify-content: center; }
    
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1500;
        transform: translateX(-100%);
        background: rgba(10, 10, 11, 0.97);
        backdrop-filter: blur(20px);
        width: 280px;
        height: 100vh;
        box-shadow: 20px 0 60px rgba(0,0,0,0.7);
        padding: 80px 1.5rem 2rem 1.5rem;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        overflow-y: auto;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0.25rem;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-btn {
        width: 100%;
        text-align: left;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .logo-area {
        margin-bottom: 1.5rem;
    }

    .admin-link {
        margin-top: auto;
        padding-top: 1.5rem;
        border-top: 1px solid var(--border-glass);
        width: 100%;
        justify-content: flex-start;
    }
    
    .content-area {
        padding: 4.5rem 1rem 2rem 1rem;
    }

    /* --- TOOLS GRID MOBILE FIX --- */
    .grid-container {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important;
        gap: 0.75rem !important;
    }

    .grid-container .card {
        padding: 1.25rem !important;
    }

    .grid-container .card h3 {
        font-size: 0.9rem;
    }

    .grid-container .card p {
        font-size: 0.75rem;
    }

    /* Tab headers mobile */
    .tab-header h2 {
        font-size: 1.6rem;
    }

    .tab-header p {
        font-size: 0.9rem;
    }

    /* Centrar pestañas de subnavegación en móvil y evitar solapamiento */
    .sub-nav-container {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }
    .sub-nav-tabs {
        justify-content: center !important;
        width: 100% !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }
    /* Botones de acción: grilla 2 columnas que ocupa el ancho completo */
    .sub-nav-actions {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }
    .sub-nav-actions button {
        width: 100% !important;
        text-align: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
    }
    /* Ocultar logo en mobile para ahorrar espacio en el sub-nav */
    .mobile-logo-subnav {
        display: none !important;
    }
    
    /* Espacio superior para páginas sin sub-nav como crear.php */
    .mobile-top-spacing {
        margin-top: 1rem !important;
    }
}
