/* ========================================
   VARIABLES Y RESET (Actualizado: 2026-06-25 - Estilos de Modales y Reservas)
   ======================================== */
:root {
    --admin-primary: #1a2a5a;
    --admin-primary-light: #2a3a7a;
    --admin-primary-hover: #3a4a8a;
    --admin-accent: #fecb00;
    --admin-accent-hover: #e5b800;
    --admin-bg: #f0f2f5;
    --admin-sidebar-bg: #0f1b3d;
    --admin-sidebar-hover: #1a2a5a;
    --admin-card-bg: #ffffff;
    --admin-border: #e2e8f0;
    --admin-text: #1e293b;
    --admin-text-muted: #64748b;
    --admin-text-light: #94a3b8;
    --admin-success: #22c55e;
    --admin-success-bg: rgba(34, 197, 94, 0.1);
    --admin-danger: #ef4444;
    --admin-danger-bg: rgba(239, 68, 68, 0.1);
    --admin-warning: #f59e0b;
    --admin-radius: 12px;
    --admin-radius-sm: 8px;
    --admin-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --admin-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --admin-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --admin-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--admin-bg);
    color: var(--admin-text);
    min-height: 100vh;
}

/* ========================================
   PANTALLA DE LOGIN
   ======================================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1b3d 0%, #1a2a5a 50%, #2a3a7a 100%);
    padding: 2rem;
}

.login-card {
    background: var(--admin-card-bg);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: loginAppear 0.6s ease-out;
}

@keyframes loginAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-logo {
    width: 80px;
    height: 80px;
    background: var(--admin-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    box-shadow: 0 8px 20px rgba(26, 42, 90, 0.3);
}

.login-logo .material-symbols-outlined {
    font-size: 2.5rem;
    color: var(--admin-accent);
}

.login-card h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.login-card .login-subtitle {
    color: var(--admin-text-muted);
    font-size: 0.9rem;
    margin-bottom: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
    text-align: left;
}

.login-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--admin-text);
    margin-bottom: 0.5rem;
}

.login-form input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: var(--admin-transition);
    background: #f8fafc;
}

.login-form input:focus {
    outline: none;
    border-color: var(--admin-primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(26, 42, 90, 0.1);
}

.login-btn {
    width: 100%;
    padding: 0.9rem;
    background: var(--admin-primary);
    color: white;
    border: none;
    border-radius: var(--admin-radius-sm);
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--admin-transition);
    margin-top: 0.5rem;
}

.login-btn:hover {
    background: var(--admin-primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 42, 90, 0.3);
}

.login-error {
    background: var(--admin-danger-bg);
    color: var(--admin-danger);
    padding: 0.75rem 1rem;
    border-radius: var(--admin-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   LAYOUT PRINCIPAL (DASHBOARD)
   ======================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--admin-sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-logo {
    width: 44px;
    height: 44px;
    background: var(--admin-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-logo .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--admin-primary);
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
}

.sidebar-title small {
    font-size: 0.7rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.5);
    display: block;
    margin-top: 2px;
}

/* Navegación del sidebar */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-section-title {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    padding: 1rem 1.5rem 0.5rem;
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--admin-transition);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.sidebar-link:hover {
    background: var(--admin-sidebar-hover);
    color: white;
}

.sidebar-link.active {
    background: rgba(254, 203, 0, 0.08);
    color: var(--admin-accent);
    border-left-color: var(--admin-accent);
}

.sidebar-link .material-symbols-outlined {
    font-size: 1.3rem;
}

.sidebar-link .badge {
    margin-left: auto;
    background: var(--admin-accent);
    color: var(--admin-primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Footer del sidebar */
.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: var(--admin-transition);
}

.sidebar-footer a:hover {
    color: var(--admin-danger);
}

/* --- Contenido principal --- */
.admin-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
}

/* Topbar */
.admin-topbar {
    background: var(--admin-card-bg);
    border-bottom: 1px solid var(--admin-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--admin-shadow);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-left h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--admin-text);
}

.topbar-left .breadcrumb {
    font-size: 0.8rem;
    color: var(--admin-text-muted);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--admin-text);
    padding: 0.5rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

.topbar-avatar {
    width: 36px;
    height: 36px;
    background: var(--admin-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--admin-accent);
    font-weight: 700;
    font-size: 0.85rem;
}

/* Área del módulo */
.module-content {
    padding: 2rem;
}

/* ========================================
   MÓDULO: AJUSTES WEB
   ======================================== */
.settings-header {
    margin-bottom: 2rem;
}

.settings-header p {
    color: var(--admin-text-muted);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Tarjetas de sección */
.section-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--admin-shadow);
    transition: var(--admin-transition);
}

.section-card:hover {
    box-shadow: var(--admin-shadow-md);
}

.section-card.disabled {
    opacity: 0.6;
}

.section-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    user-select: none;
    transition: var(--admin-transition);
}

.section-header:hover {
    background: #f8fafc;
}

.section-icon {
    width: 44px;
    height: 44px;
    background: rgba(26, 42, 90, 0.06);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    transition: var(--admin-transition);
}

.section-icon .material-symbols-outlined {
    font-size: 1.4rem;
    color: var(--admin-primary);
}

.section-info {
    flex: 1;
}

.section-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--admin-text);
    margin-bottom: 2px;
}

.section-info span {
    font-size: 0.78rem;
    color: var(--admin-text-light);
}

.section-toggle {
    margin-left: 1rem;
}

.section-expand {
    margin-left: 0.5rem;
    color: var(--admin-text-light);
    transition: transform 0.3s ease;
}

.section-expand.rotated {
    transform: rotate(180deg);
}

/* Subsecciones */
.subsections-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: #f8fafc;
    border-top: 1px solid var(--admin-border);
}

.subsections-panel.open {
    border-top-color: var(--admin-border);
}

.subsection-item {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem 0.85rem 4.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: var(--admin-transition);
}

.subsection-item:last-child {
    border-bottom: none;
}

.subsection-item:hover {
    background: rgba(26, 42, 90, 0.02);
}

.subsection-item .sub-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--admin-primary);
    margin-right: 0.75rem;
    flex-shrink: 0;
    opacity: 0.3;
}

.subsection-item .sub-dot.active {
    opacity: 1;
    background: var(--admin-success);
}

.subsection-item .sub-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--admin-text);
}

/* ========================================
   TOGGLE SWITCH
   ======================================== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: var(--admin-transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: var(--admin-transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked+.toggle-slider {
    background: var(--admin-success);
}

.toggle-switch input:checked+.toggle-slider::before {
    transform: translateX(22px);
}

.toggle-switch input:focus+.toggle-slider {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* ========================================
   BOTÓN GUARDAR Y TOAST
   ======================================== */
.save-bar {
    position: fixed;
    bottom: -80px;
    left: var(--sidebar-width);
    right: 0;
    background: var(--admin-card-bg);
    border-top: 1px solid var(--admin-border);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 90;
    transition: bottom 0.3s ease;
}

.save-bar.visible {
    bottom: 0;
}

.save-bar p {
    font-size: 0.9rem;
    color: var(--admin-text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.save-bar p .material-symbols-outlined {
    color: var(--admin-warning);
    font-size: 1.2rem;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: var(--admin-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: var(--admin-transition);
}

.btn-save:hover {
    background: #bbf7d0;
    color: #15803d;
    transform: translateY(-1px);
}

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

.btn-save .material-symbols-outlined {
    font-size: 1.1rem;
}

/* Toast de notificación */
.toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--admin-shadow-lg);
    z-index: 200;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 4px solid var(--admin-success);
}

.toast.error {
    border-left: 4px solid var(--admin-danger);
}

.toast .toast-icon {
    font-size: 1.4rem;
}

.toast.success .toast-icon {
    color: var(--admin-success);
}

.toast.error .toast-icon {
    color: var(--admin-danger);
}

.toast .toast-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   LINK A LA WEB
   ======================================== */
.btn-link-web {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(26, 42, 90, 0.06);
    color: var(--admin-primary);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: var(--admin-transition);
}

.btn-link-web:hover {
    background: var(--admin-primary);
    color: white;
}

.btn-link-web .material-symbols-outlined {
    font-size: 1rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 992px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .save-bar {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 600px) {
    .module-content {
        padding: 1rem;
    }

    .admin-topbar {
        padding: 1rem;
    }

    .section-header {
        padding: 1rem;
    }

    .subsection-item {
        padding-left: 3rem;
    }

    .save-bar {
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-save {
        width: 100%;
        justify-content: center;
    }
}

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

.section-card {
    animation: fadeIn 0.4s ease forwards;
    opacity: 0;
}

.section-card:nth-child(1) { animation-delay: 0.05s; }
.section-card:nth-child(2) { animation-delay: 0.1s; }
.section-card:nth-child(3) { animation-delay: 0.15s; }
.section-card:nth-child(4) { animation-delay: 0.2s; }
.section-card:nth-child(5) { animation-delay: 0.25s; }
.section-card:nth-child(6) { animation-delay: 0.3s; }
.section-card:nth-child(7) { animation-delay: 0.35s; }
.section-card:nth-child(8) { animation-delay: 0.4s; }
.section-card:nth-child(9) { animation-delay: 0.45s; }

/* Spinner de carga */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    display: none;
}

.btn-save.loading .spinner {
    display: block;
}

.btn-save.loading .btn-text {
    display: none;
}

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

/* ========================================
   DASHBOARD GRID & CARDS
   ======================================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.dashboard-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: var(--admin-transition);
}

.dashboard-card:hover {
    box-shadow: var(--admin-shadow-md);
    transform: translateY(-2px);
}

.dashboard-card .card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(26, 42, 90, 0.02);
}

.dashboard-card .card-header .material-symbols-outlined {
    font-size: 1.4rem;
    color: var(--admin-primary);
}

.dashboard-card .card-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--admin-primary);
}

.dashboard-card .card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Widget Fichaje --- */
.fichaje-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.fichaje-status .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.fichaje-status.fichado .status-dot {
    background: var(--admin-success);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.fichaje-status.fichado .status-text {
    color: var(--admin-success);
}

.fichaje-status.no-fichado .status-dot {
    background: var(--admin-text-light);
}

.fichaje-status.no-fichado .status-text {
    color: var(--admin-text-muted);
}

.weekly-counter {
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.weekly-counter .counter-label {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

.weekly-counter .counter-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--admin-primary);
}

.btn-fichaje {
    width: 100%;
    padding: 0.9rem;
    border: none;
    border-radius: var(--admin-radius-sm);
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--admin-transition);
}

.btn-fichaje.btn-entrada {
    background: var(--admin-primary);
    color: white;
}

.btn-fichaje.btn-entrada:hover {
    background: var(--admin-primary-light);
    box-shadow: 0 4px 12px rgba(26, 42, 90, 0.2);
}

.btn-fichaje.btn-salida {
    background: var(--admin-danger);
    color: white;
}

.btn-fichaje.btn-salida:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* --- Widget Económico --- */
.chart-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-item {
    flex: 1;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-item .stat-lbl {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.stat-item .stat-val {
    font-size: 1.15rem;
    font-weight: 800;
}

.stat-item .stat-val.positive {
    color: var(--admin-success);
}

.stat-item .stat-val.negative {
    color: var(--admin-danger);
}

.progress-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--admin-text-muted);
}

.progress-label .percentage {
    color: var(--admin-primary);
    font-weight: 800;
}

.progress-bar-container {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--admin-primary);
    border-radius: 4px;
}

/* --- Widget Alertas --- */
.alert-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: var(--admin-radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.alert-item.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border-left: 4px solid var(--admin-warning);
}

.alert-item.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border-left: 4px solid #3b82f6;
}

.alert-item .material-symbols-outlined {
    font-size: 1.25rem;
}

/* --- Accesos rápidos Portal --- */
.portal-shortcuts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.shortcut-card {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 1rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    text-decoration: none;
    transition: var(--admin-transition);
    background: #f8fafc;
}

.shortcut-card:hover {
    background: rgba(26, 42, 90, 0.04);
    border-color: var(--admin-primary);
}

.shortcut-card .material-symbols-outlined {
    font-size: 1.5rem;
    color: var(--admin-primary);
    margin-bottom: 4px;
}

.shortcut-card h5 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--admin-text);
}

.shortcut-card p {
    font-size: 0.75rem;
    color: var(--admin-text-muted);
}

/* ========================================
   MÓDULO SECRETARÍA Y SOCIOS: PESTAÑAS (TABS)
   ======================================== */
.tabs-container {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    overflow: hidden;
}

.tabs-header {
    display: flex;
    background: rgba(26, 42, 90, 0.02);
    border-bottom: 1px solid var(--admin-border);
}

.tab-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1.1rem 2rem;
    color: var(--admin-text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--admin-transition);
    border-bottom: 3px solid transparent;
}

.tab-link:hover {
    color: var(--admin-primary);
    background: rgba(26, 42, 90, 0.01);
}

.tab-link.active {
    color: var(--admin-primary);
    border-bottom-color: var(--admin-primary);
    background: white;
}

.tab-link .material-symbols-outlined {
    font-size: 1.25rem;
}

.tab-content {
    padding: 2rem;
}

/* ========================================
   FILTROS Y ACCIONES DE TABLAS
   ======================================== */
.section-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filters-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex: 1;
}

.filter-field {
    position: relative;
}

.search-field {
    flex: 1;
    min-width: 250px;
}

.search-field input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--admin-transition);
}

.search-field input:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(26, 42, 90, 0.08);
}

.search-field .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--admin-text-light);
    font-size: 1.2rem;
}

.filter-field select, .filter-field input[type="date"] {
    padding: 0.65rem 1.25rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-size: 0.9rem;
    color: var(--admin-text);
    background-color: white;
    cursor: pointer;
    font-family: inherit;
}

.filter-field select:focus, .filter-field input[type="date"]:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.btn-filter {
    padding: 0.65rem 1.5rem;
    background: #e0e7ff;
    color: var(--admin-primary);
    border: 1px solid #c7d2fe;
    border-radius: var(--admin-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--admin-transition);
}

.btn-filter:hover {
    background: #c7d2fe;
}

.btn-clear-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--admin-border);
    background: white;
    color: var(--admin-text-muted);
    text-decoration: none;
    transition: var(--admin-transition);
}

.btn-clear-filter:hover {
    background: var(--admin-bg);
    color: var(--admin-danger);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.5rem;
    background: #e0e7ff;
    color: var(--admin-primary);
    border: 1px solid #c7d2fe;
    border-radius: var(--admin-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--admin-transition);
    cursor: pointer;
}

.btn-primary:hover {
    background: #c7d2fe;
    color: var(--admin-primary);
}

/* ========================================
   TABLAS DE GESTIÓN ADMINISTRATIVA
   ======================================== */
.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
    padding: 1rem 1.25rem;
    font-weight: 700;
    color: var(--admin-primary);
    border-bottom: 2px solid var(--admin-border);
}

.admin-table td {
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--admin-border);
    color: var(--admin-text);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background-color: rgba(26, 42, 90, 0.01);
}

.font-mono {
    font-family: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

.bold-text {
    font-weight: 600;
}

.txt-center {
    text-align: center !important;
}

.text-muted {
    color: var(--admin-text-light);
}

/* Tablas pequeñas para Informes */
.mini-table th {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
}

.mini-table td {
    padding: 0.65rem 0.75rem;
}

/* ========================================
   BADGES DE ROLES Y ESTADOS
   ======================================== */
.roles-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    text-transform: capitalize;
}

.badge-rol-socio {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.badge-rol-alumno {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}

.badge-rol-musico {
    background: rgba(139, 92, 246, 0.12);
    color: #6d28d9;
}

.badge-rol-director {
    background: rgba(14, 165, 233, 0.12);
    color: #0284c7;
}

.badge-rol-profesor {
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
}

.badge-rol-administrativo {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.badge-rol-trabajador {
    background: rgba(20, 184, 166, 0.12);
    color: #0f766e;
}

.badge-rol-pagador {
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

.badge-gray {
    background: #e2e8f0;
    color: #475569;
}

/* Estado de cuenta */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #166534;
}

.status-active .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--admin-success);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

.status-inactive .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--admin-danger);
}

.status-reserva {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.status-reserva .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--admin-warning);
}

.pagador-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
}

/* ========================================
   BOTONES DE ACCIÓN EN TABLA
   ======================================== */
.actions-group {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
    background: white;
    cursor: pointer;
    transition: var(--admin-transition);
}

.btn-edit-action {
    background: #f1f5f9;
    color: var(--admin-primary);
    border-color: #cbd5e1;
}

.btn-edit-action:hover {
    background: #cbd5e1;
}

.btn-deactivate-action {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.btn-deactivate-action:hover {
    background: #fca5a5;
    color: #7f1d1d;
}

.btn-activate-action {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}

.btn-activate-action:hover {
    background: #bbf7d0;
    color: #14532d;
}

.btn-resend-action {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}

.btn-resend-action:hover {
    background: #bae6fd;
    color: #075985;
}

.btn-action .material-symbols-outlined {
    font-size: 1.15rem;
}

/* ========================================
   BOTONES ESTÁNDAR PARA MODALES Y FORMULARIOS
   ======================================== */
.btn-modal-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    border-radius: var(--admin-radius-sm, 6px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--admin-transition, all 0.2s);
    text-decoration: none;
    width: auto;
    height: auto;
    white-space: nowrap;
}
.btn-modal-cancel:hover {
    background: #cbd5e1;
    color: #1e293b;
}

.btn-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.4rem;
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: var(--admin-radius-sm, 6px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--admin-transition, all 0.2s);
    text-decoration: none;
    width: auto;
    height: auto;
    white-space: nowrap;
}
.btn-save:hover {
    background: #bbf7d0;
    color: #14532d;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.25rem;
    background: #e0e7ff;
    color: var(--admin-primary, #1a2a5a);
    border: 1px solid #c7d2fe;
    border-radius: var(--admin-radius-sm, 6px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--admin-transition, all 0.2s);
    text-decoration: none;
    width: auto;
    height: auto;
    white-space: nowrap;
}
.btn-primary:hover {
    background: #c7d2fe;
    color: var(--admin-primary, #1a2a5a);
}

.btn-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.25rem;
    background: #e0e7ff;
    color: var(--admin-primary, #1a2a5a);
    border: 1px solid #c7d2fe;
    border-radius: var(--admin-radius-sm, 6px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--admin-transition, all 0.2s);
    text-decoration: none;
    width: auto;
    height: auto;
    white-space: nowrap;
}
.btn-filter:hover {
    background: #c7d2fe;
    color: var(--admin-primary, #1a2a5a);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.25rem;
    background: #f1f5f9;
    color: var(--admin-primary, #1a2a5a);
    border: 1px solid #cbd5e1;
    border-radius: var(--admin-radius-sm, 6px);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--admin-transition, all 0.2s);
    text-decoration: none;
    width: auto;
    height: auto;
    white-space: nowrap;
}
.btn-secondary:hover {
    background: #cbd5e1;
    color: var(--admin-primary, #1a2a5a);
}

/* ========================================
   PAGINACIÓN
   ======================================== */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--admin-text-muted);
}

.pagination-links {
    display: flex;
    gap: 0.25rem;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    text-decoration: none;
    color: var(--admin-text);
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--admin-transition);
    background: white;
}

.page-link:hover {
    background: var(--admin-bg);
    border-color: var(--admin-text-muted);
}

.page-link.active {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

.page-link .material-symbols-outlined {
    font-size: 1.2rem;
}

/* ========================================
   MÓDULO: FICHA DE SOCIO (DETALLE/EDICIÓN)
   ======================================== */
.ficha-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--admin-border);
    background: white;
    border-radius: var(--admin-radius-sm);
    text-decoration: none;
    color: var(--admin-text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--admin-transition);
}

.btn-back:hover {
    background: var(--admin-bg);
    color: var(--admin-text);
}

.btn-back .material-symbols-outlined {
    font-size: 1.1rem;
}

.ficha-layout {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .ficha-layout {
        grid-template-columns: 1fr;
    }
}

.ficha-main-card, .ficha-side-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    padding: 2rem;
    box-shadow: var(--admin-shadow);
}

.ficha-form-section {
    border-bottom: 1px dashed var(--admin-border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.ficha-form-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.ficha-form-section h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--admin-primary);
    margin-bottom: 1rem;
}

.ficha-form-section h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--admin-text);
    margin-bottom: 0.75rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 768px) {
    .form-grid-2, .form-grid-3 {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--admin-text);
}

.form-group input, .form-group select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-size: 0.92rem;
    font-family: inherit;
    background-color: white;
    transition: var(--admin-transition);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(26, 42, 90, 0.08);
}

/* ========================================
   INFORMES SOCIALES GRID
   ======================================== */
.informes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 992px) {
    .informes-grid {
        grid-template-columns: 1fr;
    }
}

.inline-filters {
    background-color: #f8fafc;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--admin-border);
}

/* ========================================
   ETIQUETAS POSTALES (IMPRESIÓN)
   ======================================== */
.labels-container {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--admin-border);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.labels-page {
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid var(--admin-border);
}

.labels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px; /* Distancia entre etiquetas */
}

@media (max-width: 992px) {
    .labels-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .labels-grid {
        grid-template-columns: 1fr;
    }
}

.label-card {
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 12px;
    font-size: 0.8rem;
    line-height: 1.3;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 95px; /* Altura sugerida para emular las proporciones 3x11 en pantalla */
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.label-recipient {
    font-weight: 700;
    font-size: 0.85rem;
    color: #000;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.label-address {
    color: #334155;
}

.label-location {
    color: #334155;
}

/* ========================================
   MODALES Y DIÁLOGOS DE CONFIRMACIÓN
   ======================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 27, 61, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.3s ease;
}

.modal-box {
    background: var(--admin-card-bg, #ffffff);
    border-radius: var(--admin-radius, 12px);
    padding: 0;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--admin-shadow-lg);
    border: 1px solid var(--admin-border);
    animation: modalSlideUp 0.3s ease;
    overflow: hidden;
}

.modal-header {
    background: var(--admin-primary, #1a2a5a);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: none;
}

.modal-header h3, .modal-header h4 {
    font-size: 1.25rem;
    color: #ffffff !important;
    font-weight: 700;
    margin: 0;
}

.modal-header span {
    color: #ffffff !important;
}

.modal-body {
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--admin-text);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    border-top: 1px solid var(--admin-border);
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* ESTILOS DE IMPRESIÓN (PRINT MEDIA) */
@media print {
    /* Ocultar elementos que no deben imprimirse */
    .admin-sidebar,
    .admin-topbar,
    .tabs-header,
    .no-print-section,
    .ficha-header,
    .sidebar-overlay,
    .btn-save,
    .save-bar,
    .toast {
        display: none !important;
    }

    /* Quitar márgenes del layout para la impresión */
    .admin-content {
        margin-left: 0 !important;
        padding: 0 !important;
        background: white !important;
    }

    .module-content {
        padding: 0 !important;
    }

    .tabs-container {
        border: none !important;
        box-shadow: none !important;
        background: white !important;
    }

    .tab-content {
        padding: 0 !important;
    }

    @page {
        size: A4;
        margin: 0 !important;
    }

    .labels-container {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        display: block !important;
        box-shadow: none !important;
    }

    .labels-page {
        width: 210mm !important;
        height: 297mm !important;
        page-break-after: always !important;
        box-sizing: border-box !important;
        padding-top: 9mm !important; /* Margen superior de Apli 1276 */
        padding-bottom: 9mm !important; /* Margen inferior */
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
        background: white !important;
        overflow: hidden !important;
    }

    .labels-page:last-child {
        page-break-after: avoid !important;
    }

    /* Maquetar etiquetas para hojas adhesivas estándar (3x11 por página A4) */
    body {
        background: white !important;
        color: black !important;
        font-family: Arial, sans-serif !important;
    }

    .labels-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 70mm) !important; /* Ancho de etiqueta: 70mm */
        grid-auto-rows: 25.4mm !important; /* Alto de etiqueta: 25.4mm */
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .label-card {
        width: 70mm !important;
        height: 25.4mm !important;
        min-height: 25.4mm !important;
        max-height: 25.4mm !important;
        box-sizing: border-box !important;
        padding: 2mm 5mm !important; /* Margen interno reducido */
        border: 1px dashed #ddd !important; /* Líneas muy suaves de guías de corte */
        box-shadow: none !important;
        page-break-inside: avoid !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        overflow: hidden !important;
        background: white !important;
    }

    .label-recipient {
        font-size: 8pt !important; /* Tipografía disminuida */
        font-weight: 700 !important;
        margin-bottom: 2px !important;
        color: #000 !important;
        text-transform: uppercase !important;
    }

    .label-address {
        font-size: 7.5pt !important; /* Tipografía disminuida */
        color: #1e293b !important;
        margin-bottom: 1px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .label-location {
        font-size: 7.5pt !important; /* Tipografía disminuida */
        color: #1e293b !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
}

/* ========================================
   MÓDULO: AGRUPACIONES Y EVENTOS / CALENDARIOS
   ======================================== */
.agrupacion-selector-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.agrupacion-selector-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.agrupacion-selector-group label {
    font-weight: 700;
    color: var(--admin-primary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.agrupacion-selector-group select {
    padding: 0.6rem 1.25rem;
    border: 1.5px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--admin-primary);
    background-color: white;
    cursor: pointer;
    min-width: 220px;
}

.agrupacion-selector-group select:focus {
    outline: none;
    border-color: var(--admin-primary);
}

/* Calendario Grid & Layout */
.calendar-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius);
    box-shadow: var(--admin-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: #f8fafc;
    border-bottom: 1px solid var(--admin-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    background: white;
    color: var(--admin-primary);
    cursor: pointer;
    transition: var(--admin-transition);
    text-decoration: none;
}

.calendar-nav-btn:hover {
    background: #e0e7ff;
    border-color: #c7d2fe;
}

.calendar-nav-btn .material-symbols-outlined {
    font-size: 1.25rem;
}

.calendar-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.calendar-month-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--admin-primary);
    text-transform: capitalize;
    margin: 0;
}

.calendar-year-select {
    padding: 0.4rem 0.8rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--admin-primary);
    background: white;
    cursor: pointer;
}

.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f1f5f9;
    border-bottom: 1px solid var(--admin-border);
}

.calendar-weekday {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--admin-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-weekday.weekend {
    color: #e11d48;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--admin-border);
    gap: 1px;
}

.calendar-day-cell {
    background: white;
    min-height: 115px;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    transition: var(--admin-transition);
    cursor: pointer;
    position: relative;
}

.calendar-day-cell:hover {
    background: #f8fafc;
    box-shadow: inset 0 0 0 2px #c7d2fe;
    z-index: 2;
}

.calendar-day-cell.other-month {
    background: #fafafa;
    opacity: 0.5;
    cursor: default;
}

.calendar-day-cell.other-month:hover {
    box-shadow: none;
    background: #fafafa;
}

.calendar-day-cell.today {
    background: rgba(254, 203, 0, 0.08);
}

.calendar-day-cell.today .calendar-day-number {
    background: var(--admin-primary);
    color: #fecb00;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-day-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.calendar-day-number {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--admin-text);
}

.calendar-day-cell.other-month .calendar-day-number {
    color: var(--admin-text-light);
}

.calendar-day-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

/* Event & Rehearsal Pills */
.event-pill {
    padding: 3px 6px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.event-pill .material-symbols-outlined {
    font-size: 0.9rem;
    flex-shrink: 0;
}

.event-pill-rehearsal {
    background: #e0e7ff;
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.event-pill-holiday {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.event-pill-performance {
    background: #fdf4ff;
    color: #86198f;
    border: 1px solid #f5d0fe;
}

.event-pill-performance.cancelled {
    background: #f1f5f9;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    text-decoration: line-through;
}

/* Periodo de Ensayos Card */
.period-card {
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: var(--admin-shadow);
}

.period-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--admin-primary);
}

.period-form {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.period-dates-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.period-dates-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--admin-text-muted);
}

.period-dates-group input[type="date"] {
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    font-size: 0.9rem;
    background: white;
}

/* Semanal Days Table / Grid in Modal */
.weekdays-schedule-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.weekday-schedule-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--admin-border);
    border-radius: var(--admin-radius-sm);
    gap: 1rem;
    flex-wrap: wrap;
}

.weekday-schedule-row.active-day {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.weekday-name-chk {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--admin-primary);
    min-width: 130px;
    cursor: pointer;
}

.weekday-times {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.weekday-times input[type="time"] {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 0.88rem;
    background: white;
}

@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(7, minmax(40px, 1fr));
    }
    .calendar-day-cell {
        min-height: 80px;
        padding: 0.25rem;
    }
    .event-pill {
        font-size: 0.65rem;
        padding: 2px 4px;
    }
}


