@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600;800&display=swap');

/* ================================================================== */
/* --- VARIABLES DEL SISTEMA (ESTILO SUAVE / GLASSMORPHISM) ---       */
/* ================================================================== */
:root { 
    --cucara-red: #8e0000; 
    
    /* Paleta Glassmorphism */
    --bg-main: #f5f5f7;
    --bg-card: rgba(255, 255, 255, 0.7);
    --bg-input: rgba(255, 255, 255, 0.8);
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: rgba(0,0,0,0.05);
    --glass-border: rgba(255,255,255,0.9);
    color-scheme: light;
}

/* ================================================================== */
/* --- MODO OSCURO AUTOMÁTICO ---                                     */
/* ================================================================== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-main: #121212;
        --bg-card: rgba(30, 30, 30, 0.75);
        --bg-input: rgba(0, 0, 0, 0.5);
        --text-main: #f8f9fa;
        --text-muted: #a1a1aa;
        --border-color: rgba(255,255,255,0.1);
        --glass-border: rgba(255,255,255,0.05);
        color-scheme: dark;
    }
    
    .table-light, .table-dark, .bg-light, .bg-white, .bg-primary, .bg-dark, .bg-secondary { background-color: transparent !important; }
    h1, h2, h3, h4, h5, h6, p, label, .fw-bold { color: var(--text-main) !important; }
    .text-dark { color: var(--text-main) !important; }
    .text-muted { color: var(--text-muted) !important; }
    
    .card-header { background-color: transparent !important; }
    .id-readonly { background-color: var(--bg-input) !important; }
    
    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(1); opacity: 0.8; }
}

/* ================================================================== */
/* --- FORZAR TEMA SOBRE BOOTSTRAP (GLOBAL) ---                       */
/* ================================================================== */
.card-header.bg-dark, .card-header.bg-secondary, .card-header.bg-primary, 
.card-header.bg-danger, .card-header.bg-success, .card-header.bg-warning, .card-header.bg-info {
    background-color: transparent !important;
}
.card-header.text-white *, .card-header.text-white i, .card-header .text-white { color: var(--text-main) !important; }
.card-header h5 i[class*="text-"] { color: var(--cucara-red) !important; }

@media (prefers-color-scheme: dark) {
    .card-header h5 i[class*="text-"] { color: var(--text-main) !important; }
}

/* ================================================================== */
/* --- RESET Y BASE ---                                               */
/* ================================================================== */
::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
* { scrollbar-width: none !important; -ms-overflow-style: none !important; box-sizing: border-box; }

body { 
    font-family: 'Manrope', sans-serif !important; 
    background: var(--bg-main) !important; 
    color: var(--text-main) !important;
    overflow-x: hidden; 
    display: flex; flex-direction: column; min-height: 100vh; margin: 0;
    overscroll-behavior-y: contain; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
    position: relative;
    box-sizing: border-box;
}

input, textarea { -webkit-user-select: auto !important; user-select: auto !important; }
.table-responsive { -webkit-overflow-scrolling: touch; }

/* ================================================================== */
/* --- PANTALLA DE LOGIN CON GLASSMORPHISM REAL ---                   */
/* ================================================================== */
#login-container {
    position: relative;
    overflow: hidden;
    background: var(--bg-main);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    z-index: 0;
    animation: floatBlobs 10s ease-in-out infinite alternate;
}

/* Colores para las esferas (Rojo Cucara, Azul, Amarillo) */
.blob-1 { width: 350px; height: 350px; background: #8e0000; top: -50px; left: -100px; }
.blob-2 { width: 300px; height: 300px; background: #0d6efd; bottom: -50px; right: -50px; animation-delay: -3s; }
.blob-3 { width: 200px; height: 200px; background: #ffc107; top: 40%; left: 60%; animation-delay: -5s; }

@keyframes floatBlobs {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 30px) scale(1.1); }
}

.login-box {
    background: rgba(255, 255, 255, 0.45) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 45px 35px !important;
    border-radius: 36px !important;
    width: 100%;
    max-width: 420px;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.1) !important;
    z-index: 1;
}

.login-box .form-control {
    background: rgba(255, 255, 255, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.8) !important;
}

@media (prefers-color-scheme: dark) {
    .login-box {
        background: rgba(30, 30, 30, 0.55) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    .login-box .form-control {
        background: rgba(0, 0, 0, 0.4) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }
    .login-blob { opacity: 0.35; }
}

/* ================================================================== */
/* --- COLORES PERSONALIZADOS PARA EL DOCK (ESCRITORIO Y MÓVIL) ---   */
/* ================================================================== */
[onclick*="mod-inicio"] { --dock-color: #0d6efd; --dock-bg: rgba(13, 110, 253, 0.15); }
[onclick*="mod-integrantes"] { --dock-color: #fd7e14; --dock-bg: rgba(253, 126, 20, 0.15); }
[onclick*="mod-cumpleanos"] { --dock-color: #d63384; --dock-bg: rgba(214, 51, 132, 0.15); }
[onclick*="mod-asistencia"] { --dock-color: #198754; --dock-bg: rgba(25, 135, 84, 0.15); }
[onclick*="mod-tesoreria"] { --dock-color: #ffc107; --dock-bg: rgba(255, 193, 7, 0.15); }
[onclick*="mod-cuotas"] { --dock-color: #0dcaf0; --dock-bg: rgba(13, 202, 240, 0.15); }
[onclick*="mod-secretaria"] { --dock-color: #6f42c1; --dock-bg: rgba(111, 66, 193, 0.15); }
[onclick*="mod-calendario"] { --dock-color: #dc3545; --dock-bg: rgba(220, 53, 69, 0.15); }
[onclick*="mod-cm"] { --dock-color: #20c997; --dock-bg: rgba(32, 201, 151, 0.15); }
[onclick*="mod-notificaciones"] { --dock-color: #e83e8c; --dock-bg: rgba(232, 62, 140, 0.15); }
[onclick*="mod-documentos"] { --dock-color: #007bff; --dock-bg: rgba(0, 123, 255, 0.15); }
[onclick*="mod-auditoria"] { --dock-color: #6c757d; --dock-bg: rgba(108, 117, 125, 0.15); }
[onclick*="mod-historial"] { --dock-color: #343a40; --dock-bg: rgba(52, 58, 64, 0.15); }
[onclick*="mod-perfil-individual"] { --dock-color: #6610f2; --dock-bg: rgba(102, 16, 242, 0.15); }

/* ================================================================== */
/* --- MACOS DOCK REFINADO (EFECTO ONDA / WAVE) ---                   */
/* ================================================================== */
.desktop-dock {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; align-items: flex-end;
    background: var(--bg-card); backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border); border-radius: 45px; padding: 10px 15px 12px 15px;
    z-index: 10000; box-shadow: 0 15px 40px rgba(0,0,0,0.15); transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    height: 75px; gap: 2px;
}
.desktop-dock.hide-dock { transform: translate(-50%, 150%) !important; opacity: 0; }
.dock-item {
    display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 8px 10px;
    color: var(--text-muted); cursor: pointer; transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1); transform-origin: bottom center;
    border-radius: 20px; min-width: 70px; height: 100%; position: relative;
}
.dock-item i { font-size: 1.5rem; margin-bottom: 2px; transition: inherit; width: auto; text-align: center; color: var(--dock-color, var(--text-muted)); opacity: 0.45; }
.dock-item span { font-size: 0.6rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; transition: inherit; overflow: visible; color: var(--text-muted); }

.dock-item:hover { transform: scale(1.4) translateY(-8px); z-index: 10; margin: 0 15px; }
.dock-item:has(+ .dock-item:hover) { transform: scale(1.15) translateY(-4px); margin: 0 5px; }
.dock-item:hover + .dock-item { transform: scale(1.15) translateY(-4px); margin: 0 5px; }

.dock-item:hover i, .dock-item.active i { opacity: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.dock-item:hover span, .dock-item.active span { color: var(--dock-color, var(--cucara-red)); }

.dock-item.active { background: transparent; font-weight: 800; }
.dock-item.active::after { content: ''; position: absolute; bottom: -2px; width: 5px; height: 5px; background: var(--dock-color, var(--cucara-red)); border-radius: 50%; }
.dock-separator { width: 1px; height: 35px; background: var(--border-color); margin: 0 15px 10px 15px; }

.dock-user-info { display: flex; align-items: center; gap: 15px; padding-right: 10px; margin-bottom: 8px; }
.dock-user-info small { font-weight: 800; font-size: 0.75rem; color: var(--text-main); max-width: 100px; line-height: 1; }
.btn-logout-dock {
    background: var(--bg-input); border: 1px solid var(--border-color); color: var(--cucara-red); width: 35px; height: 35px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all 0.3s;
}
.btn-logout-dock:hover { background: var(--cucara-red); color: white; transform: rotate(-15deg); }

/* ================================================================== */
/* --- CONTENIDO PRINCIPAL (EXPANSIÓN TOTAL 100%) ---                 */
/* ================================================================== */
.main-content {
    margin-left: 0 !important; width: 100% !important; max-width: 100% !important; margin: 0 auto !important;
    padding: 40px 3% 180px 3% !important; /* Espacio PC ajustado */
}
.section-module { display: none; animation: fadeIn 0.4s ease-out; }
.section-module.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ================================================================== */
/* --- TARJETAS GLASSMORPHISM Y BORDES SUAVES ---                     */
/* ================================================================== */
.card {
    background: var(--bg-card) !important; backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border-radius: 28px !important; border: 1px solid var(--glass-border) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04) !important; overflow: visible !important;
}
.card-header {
    background: transparent !important; border-bottom: 1px solid var(--border-color) !important;
    padding: 20px !important; border-radius: 28px 28px 0 0 !important;
}
.card-header h5, .card-header h6 { font-weight: 800 !important; color: var(--text-main) !important; }

/* ================================================================== */
/* --- DASHBOARD CARDS EN PC ---                                      */
/* ================================================================== */
.dash-card { cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; position: relative; }
.dash-card:hover { transform: translateY(-4px); box-shadow: 0 15px 35px rgba(0,0,0,0.08) !important; }
#dashboard-cards .dash-card .card-body { padding: 16px; text-align: left; }

.dash-card-icon {
    width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem; margin-bottom: 10px;
}
.dash-card-label { font-size: 0.68rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 5px; }
.dash-card-value { font-size: 1.5rem; font-weight: 800; color: var(--text-main); margin: 0; line-height: 1; }
.dash-card-value.sm { font-size: 1.2rem; }
.dash-card-arrow { position: absolute; bottom: 12px; right: 12px; font-size: 1rem; color: var(--text-muted); opacity: 0.4; transition: 0.3s; }
.dash-card:hover .dash-card-arrow { transform: translateX(5px); opacity: 1; color: var(--cucara-red); }

/* Colores suaves para los íconos */
.icon-blue   { background: rgba(13, 110, 253, 0.15); color: #0d6efd; }
.icon-green  { background: rgba(25, 135, 84, 0.15); color: #198754; }
.icon-red    { background: rgba(220, 53, 69, 0.15); color: #dc3545; }
.icon-amber  { background: rgba(255, 193, 7, 0.2); color: #d39e00; }
.icon-cyan   { background: rgba(13, 202, 240, 0.15); color: #08a1c4; }
.icon-pink   { background: rgba(214, 51, 132, 0.15); color: #d63384; }
.icon-grey   { background: rgba(108, 117, 125, 0.15); color: #6c757d; }
.icon-dark   { background: rgba(33, 37, 41, 0.1); color: #212529; }

/* ================================================================== */
/* --- INPUTS MODERNOS Y FORMULARIOS ---                              */
/* ================================================================== */
.form-control, .form-select {
    background: var(--bg-input) !important; color: var(--text-main) !important; border-radius: 18px !important;
    border: 1px solid var(--border-color) !important; padding: 14px 18px !important; font-weight: 600;
}
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 4px rgba(142,0,0,0.1) !important; border-color: var(--cucara-red) !important; }
.form-label { font-weight: 800 !important; font-size: 0.85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.id-readonly { background-color: var(--bg-input) !important; color: var(--cucara-red) !important; font-weight: bold !important; font-family: monospace !important; }
.form-floating > .form-control, .form-floating > .form-select { height: calc(3.5rem + 2px) !important; padding-top: 1.625rem !important; padding-bottom: 0.625rem !important; }
.form-floating > label { padding: 1rem 0.75rem !important; color: var(--text-muted) !important; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; }

/* ================================================================== */
/* --- BOTONES ESTILO APP NATIVA ---                                  */
/* ================================================================== */
.btn { border-radius: 24px !important; font-weight: 800 !important; padding: 14px 20px !important; border: none !important; }
.btn-danger { background: var(--cucara-red) !important; box-shadow: 0 8px 20px rgba(142,0,0,0.2) !important; color: white !important; }
.btn-primary { background: #0d6efd !important; box-shadow: 0 8px 20px rgba(13,110,253,0.2) !important; color: white !important; }
.btn-success { background: #10b981 !important; box-shadow: 0 8px 20px rgba(16,185,129,0.2) !important; color: white !important; }
.btn-info { background: #0ea5e9 !important; box-shadow: 0 8px 20px rgba(14,165,233,0.2) !important; color: white !important; }
.btn-warning { background: #ffc107 !important; box-shadow: 0 8px 20px rgba(255,193,7,0.2) !important; color: #1e293b !important; }
.btn-excel { background-color: #107c41 !important; color: white !important; box-shadow: 0 8px 20px rgba(16,124,65,0.2) !important; }
button[type="submit"] { text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; }

.btn-light[onclick*="cambiarMesAnalisis"], .btn-dark[onclick*="navegarFechaDetalle"], .btn-outline-danger[onclick*="cambiarMesCumple"], .btn-outline-light[onclick*="cambiarMesVistaCalendario"] {
    background: var(--bg-input) !important; color: var(--text-main) !important; border: 1px solid var(--border-color) !important; border-radius: 50% !important; padding: 8px 12px !important; box-shadow: 0 4px 10px rgba(0,0,0,0.05) !important;
}

/* ================================================================== */
/* --- CERO BORDES EN TABLAS ---                                      */
/* ================================================================== */
.table, .table > :not(caption) > * > *, .table > tbody > tr > td, .table > thead > tr > th, .table > tfoot > tr > td, .table > tfoot > tr > th {
    background-color: transparent !important; background: transparent !important; color: var(--text-main) !important; box-shadow: none !important;
}
.table, .table-bordered, .table > tbody > tr, .table > tbody > tr > td, .table > tbody > tr > th,
.table > thead > tr, .table > thead > tr > th, .table > thead > tr > td,
.table > tfoot > tr, .table > tfoot > tr > td, .table > tfoot > tr > th {
    border: none !important; --bs-table-border-color: transparent !important;
}
.table th { font-weight: 800; color: var(--text-muted) !important; text-transform: uppercase; font-size: 0.85rem; }
.table-hover > tbody > tr:hover > * { background-color: rgba(142, 0, 0, 0.08) !important; color: var(--text-main) !important; }
.table .text-success, .table .text-success i { color: #10b981 !important; }
.table .text-danger, .table .text-danger i { color: #ef4444 !important; }
.table .text-warning, .table .text-warning i { color: #f59e0b !important; }
.table .text-info, .table .text-info i { color: #0ea5e9 !important; }

/* ================================================================== */
/* --- MODALES GLASSMORPHISM ---                                      */
/* ================================================================== */
.modal-content {
    background: var(--bg-card) !important; backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
    border-radius: 28px !important; border: 1px solid var(--glass-border) !important; box-shadow: 0 20px 50px rgba(0,0,0,0.15) !important;
}
.modal-header { border-bottom: 1px solid var(--border-color) !important; }
.modal-footer { border-top: 1px solid var(--border-color) !important; }

/* Estilo para las listas dentro del nuevo modal de Detalle Dashboard */
.dash-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.dash-detail-stat { background: var(--bg-input); border-radius: 20px; padding: 14px 16px; text-align: center; border: 1px solid var(--border-color); }
.dash-detail-stat-val { font-size: 1.8rem; font-weight: 800; color: var(--text-main); margin-bottom: 4px; }
.dash-detail-stat-label { font-size: 0.72rem; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
.dash-detail-list { list-style: none; padding: 0; margin: 0; }
.dash-detail-list li { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border-color); font-size: 0.95rem; }
.dash-detail-list li:last-child { border-bottom: none; }
.dash-detail-list .li-label { color: var(--text-muted); font-weight: 800; }
.dash-detail-list .li-val   { font-weight: 800; color: var(--text-main); }

/* ================================================================== */
/* --- EXTRAS Y BADGES ---                                            */
/* ================================================================== */
#fecha-detalle-display, #mes-actual-display, #mes-cumple-display, #vista-mes-calendario, #anio-cuotas-display {
    background-color: var(--bg-input) !important; color: var(--text-main) !important; border: 1px solid var(--border-color) !important; border-radius: 18px; font-weight: 800; padding: 8px 16px !important; box-shadow: 0 4px 10px rgba(0,0,0,0.02);
}
.bg-ingreso-sutil { background-color: rgba(16, 185, 129, 0.08) !important; }
.bg-egreso-sutil { background-color: rgba(220, 53, 69, 0.08) !important; }
.fila-inactiva { opacity: 0.55; background-color: var(--bg-main) !important; transition: opacity 0.3s ease; }
.fila-inactiva:hover { opacity: 0.9; }

/* Footer centrado */
.footer-bottom { display: flex; justify-content: center; align-items: center; text-align: center; padding: 20px 0; margin-top: 40px; color: var(--text-muted); font-weight: 800; width: 100%; background: transparent; border: none; }

/* ================================================================== */
/* --- OCULTAR MENÚ MÓVIL EN ESCRITORIO ---                           */
/* ================================================================== */
.mobile-nav-bottom {
    display: none;
}

/* ================================================================== */
/* --- DISEÑO: NUEVO CALENDARIO ESTILO GRID FIJO Y RESPONSIVO ---     */
/* ================================================================== */
.calendar-wrapper {
    width: 100%;
    height: 650px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 12px;
}

.modern-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    min-height: 100%;
}

.calendar-header-day {
    text-align: center;
    font-weight: 800;
    color: #888;
    text-transform: uppercase;
    font-size: 0.8rem;
    padding-bottom: 5px;
}

.calendar-day {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    min-height: 100px;
    padding: 6px;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.calendar-day:hover:not(.empty) {
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
    border-color: #8e0000;
}

.calendar-day.today {
    border: 2px solid #8e0000;
    background: #fffcfc;
}

.day-number {
    font-weight: 800;
    font-size: 1rem;
    color: #444;
    text-align: right;
    margin-bottom: 5px;
}

.event-chip {
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    margin-bottom: 3px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; 
    display: block;
}

.event-chip:hover {
    opacity: 0.85;
}

/* ======================================================== */
/* --- MÓDULO DE RECONOCIMIENTO DE VOZ ---                  */
/* ======================================================== */
.toast-voz {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(50px);
    background: rgba(20, 20, 20, 0.95);
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 800;
    z-index: 1060;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    box-shadow: 0 10px 25px rgba(142,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
}
.toast-voz.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
@keyframes pulse-mic {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.6; }
    100% { transform: scale(1); opacity: 1; }
}
.pulse-anim {
    display: inline-block;
    animation: pulse-mic 1s infinite;
    color: #fff;
}

/* Ocultar dock de PC y barra móvil al abrir modales */
body.modal-open .desktop-dock,
body.modal-open .mobile-nav-bottom {
    display: none !important;
}

/* ================================================================== */
/* --- RESPONSIVE / CELULARES — DOCK IDÉNTICO AL DE PC (PÍLDORA)  --- */
/* ================================================================== */
@media (max-width: 768px) {
    .desktop-dock { display: none !important; } 
    
    /* Espaciado del cuerpo */
    .main-content { padding: 20px 15px 120px 15px !important; margin-left: 0 !important; }
    .login-box { padding: 25px !important; }
    .card-header h5, .card-header h6 { font-size: 1.05rem !important; text-align: center; }
    .form-control, .form-select { font-size: 16px !important; }
    .footer-bottom { padding: 15px 0 90px 0; width: 100%; }
    
    /* Cabecera módulo inicio */
    #mod-inicio .d-flex.justify-content-between.align-items-center.mb-4 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 15px;
    }
    #mod-inicio .fst-italic { display: none !important; }
    
    /* ------------------------------------------------ */
    /* GRILLA DE TARJETAS ESTILO APP NATIVA (2 COLUMNAS)*/
    /* ------------------------------------------------ */
    #dashboard-cards { 
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important; 
        margin: 0 !important;
    }
    #dashboard-cards > div { 
        width: 100% !important; 
        padding: 0 !important; 
        margin: 0 !important;
    }
    
    .dash-card {
        border-radius: 24px !important;
        border: 1px solid rgba(255,255,255,0.08) !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.03) !important;
    }
    
    .dash-card .card-body { 
        padding: 16px 14px !important; 
        display: flex;
        flex-direction: column;
        position: relative;
    }
    
    .dash-card-icon { 
        width: 38px; height: 38px; 
        font-size: 1.2rem; 
        margin-bottom: 12px; 
        border-radius: 12px; 
    }
    
    .dash-card-label { 
        font-size: 0.65rem; 
        white-space: normal;
        line-height: 1.2; 
        margin-bottom: 4px;
    }
    
    .dash-card-value { font-size: 1.35rem; }
    .dash-card-value.sm { font-size: 1.15rem; }
    
    .dash-card-arrow { 
        position: absolute;
        top: 16px; 
        right: 14px; 
        font-size: 0.9rem; 
        bottom: auto; 
    }

    /* Tarjetas en oscuro */
    @media (prefers-color-scheme: dark) {
        .dash-card {
            background: rgba(30, 30, 30, 0.6) !important;
        }
    }
    

/* ================================================ */
    /* ★ DOCK MÓVIL — FIX DE ÍCONOS CORTADOS            */
    /* ================================================ */
    .mobile-nav-bottom {
        display: flex !important;
        position: fixed; 
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        align-items: center;

        background: var(--bg-card) !important; 
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);

        border-radius: 45px;
        border: 1px solid var(--glass-border) !important;
        box-shadow: 0 15px 40px rgba(0,0,0,0.15);

        height: 85px;
        padding: 0 15px;
        gap: 2px;
        z-index: 10000;
        max-width: 92vw;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    }

    .mobile-nav-bottom.hide-dock { 
        transform: translate(-50%, 150%) !important; 
        opacity: 0; 
    }

    .mobile-nav-scroll { 
        display: flex;
        overflow-x: auto;
        overflow-y: visible;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch; 
        gap: 5px;
        align-items: center;
        height: 100%;
        width: 100%;
        padding: 12px 0;
    }
    .mobile-nav-scroll::-webkit-scrollbar { display: none; }
    
    /* ★ Ítems — idénticos a .dock-item del PC */
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 5px 10px;
        color: var(--text-muted);
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
        transform-origin: bottom center;
        border-radius: 20px;
        min-width: 65px;
        height: 100%;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    /* Feedback táctil: simula el scale del hover de PC */
    .mobile-nav-item:active {
        transform: scale(1.35) translateY(-8px);
    }

    /* ★ Íconos — idénticos a .dock-item i */
    .mobile-nav-item i { 
        font-size: 1.5rem;
        margin-bottom: 2px;
        transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
        color: var(--dock-color, var(--text-muted));
        opacity: 0.45;
        width: auto;
        text-align: center;
    }

    /* ★ Labels — idénticos a .dock-item span */
    .mobile-nav-item span { 
        font-size: 0.6rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.2s;
        color: var(--text-muted);
        overflow: visible;
    }

    /* ★ Estado ACTIVO — idéntico a .dock-item.active */
    .mobile-nav-item.active { background: transparent; font-weight: 800; }
    .mobile-nav-item.active i { 
        opacity: 1; 
        color: var(--dock-color, var(--cucara-red));
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
    }
    .mobile-nav-item.active span { color: var(--dock-color, var(--cucara-red)); }

    /* ★ Puntito indicador — idéntico a .dock-item.active::after */
    .mobile-nav-item.active::after { 
        content: '';
        position: absolute;
        bottom: -2px;
        width: 5px;
        height: 5px;
        background: var(--dock-color, var(--cucara-red));
        border-radius: 50%;
    }

    /* Ocultar dot viejo */
    .mobile-nav-item .dot { display: none !important; }

    /* Ajustes extra tablas en móvil */
    .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 0; padding-bottom: 10px; border-radius: 16px; border: 1px solid var(--border-color); }
    .table { min-width: 800px; }
    #tabla-matriz-cuotas { min-width: 1200px; }
    .table th, .table td { white-space: nowrap !important; vertical-align: middle; }
    .table td.text-start { white-space: normal !important; min-width: 250px; }
    .card { border-radius: 24px !important; }
    
    /* Calendario en móvil */
    .calendar-wrapper { height: 450px; }
    .modern-calendar-grid { gap: 3px; }
    .calendar-day { min-height: 60px; padding: 3px; }
    .day-number { font-size: 0.75rem; }
    .event-chip { font-size: 0.55rem; padding: 2px 3px; margin-bottom: 2px; }
    .calendar-header-day { font-size: 0.65rem; padding-bottom: 3px; }

} /* fin @media (max-width: 768px) */