/* =========================================
   SISTEMA JUGUETES - HOJA DE ESTILOS MAESTRA
   ========================================= */

:root {
    --bg-main: #f8fafc;
    --bg-sidebar: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --primary: #3b82f6;
    --success: #10b981;
    --danger: #ef4444;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-dark);
}

/* =========================================
   1. ESTRUCTURA BASE (SIDEBAR Y CONTENIDO)
   ========================================= */

.sidebar {
    width: 260px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 9999;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 25px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 20px 16px;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border-color);
    background-color: #f8fafc;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-header__title {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 8px;
}

.sidebar-header__subtitle {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.sidebar-header .logo {
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu li a {
    display: block;
    padding: 16px 25px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, padding-left 0.2s;
}

.sidebar-menu li a:hover {
    background-color: #f1f5f9;
    padding-left: 30px; /* Pequeño efecto al pasar el mouse */
    color: var(--primary);
}

.sidebar-menu li.active a {
    background-color: #eff6ff;
    color: var(--primary);
    font-weight: 600;
    border-left: 4px solid var(--primary);
    padding-left: 21px;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.sidebar-footer__user {
    margin: 0 0 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    word-break: break-word;
}

.sidebar-logout-form {
    margin: 0;
}

.sidebar-logout-btn {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff;
    color: var(--danger);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.sidebar-logout-btn:hover {
    background: #fef2f2;
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    max-width: none;
    flex: none;
    min-height: 100vh;
    padding: 20px;
    box-sizing: border-box;
}

/* Header superior (solo móvil) */
.app-header-bar {
    display: none;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0;
    border: #ffffff;    
    border-radius: 6px;
    background: #f8fafc;
    color: var(--text-dark);
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.15s ease;
}

.mobile-menu-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.mobile-menu-btn:active {
    transform: scale(0.94);
}

.mobile-menu-btn:focus {
    outline: none;
}

.mobile-menu-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.mobile-menu-btn.is-open,
.mobile-menu-btn[aria-expanded="true"] {
    background: #eff6ff;
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.mobile-menu-btn__icon {
    position: relative;
    display: block;
    width: 22px;
    height: 16px;
}

.mobile-menu-btn__bar {
    position: absolute;
    left: 0;
    right: 0;
    height: 2.5px;
    background: var(--text-dark);
    border-radius: 3px;
    transition:
        top 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        bottom 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.2s ease,
        background-color 0.2s ease;
}

.mobile-menu-btn__bar--top {
    top: 0;
}

.mobile-menu-btn__bar--mid {
    top: 50%;
    transform: translateY(-50%);
}

.mobile-menu-btn__bar--bot {
    bottom: 0;
}

.mobile-menu-btn.is-open .mobile-menu-btn__bar--top,
.mobile-menu-btn[aria-expanded="true"] .mobile-menu-btn__bar--top {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
}

.mobile-menu-btn.is-open .mobile-menu-btn__bar--mid,
.mobile-menu-btn[aria-expanded="true"] .mobile-menu-btn__bar--mid {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
}

.mobile-menu-btn.is-open .mobile-menu-btn__bar--bot,
.mobile-menu-btn[aria-expanded="true"] .mobile-menu-btn__bar--bot {
    bottom: auto;
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
}

body.menu-open {
    overflow: hidden;
    touch-action: none;
}

@media (prefers-reduced-motion: reduce) {
    .mobile-menu-btn__bar,
    .sidebar,
    .sidebar-overlay {
        transition: none !important;
    }

    .mobile-menu-btn:active {
        transform: none;
    }
}

.app-header-bar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.app-header-bar__logo {
    flex-shrink: 0;
    object-fit: contain;
}

.app-header-bar__title {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.app-header-bar__name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header-bar__subtitle {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* 
   3. ESTILOS DEL DASHBOARD (INICIO)
 */

.app-dashboard {
    width: 100%;
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Listados con tabla: ancho completo del área principal (sobreescribe max-width: 900px) */
.main-content > .app-dashboard.app-dashboard--tabla {
    max-width: none;
    width: 100%;
    margin: 24px 0 40px;
    padding: 0;
}

.app-header {
    text-align: center;
    margin-bottom: 40px;
}

.app-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.app-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.app-badge.municipal { background-color: #dbeafe; color: #1e40af; }
.app-badge.vecino { background-color: #fce7f3; color: #9d174d; }
.app-badge.superadmin { background-color: #ede9fe; color: #5b21b6; }

/* Contadores dashboard (edad 0–10, discapacidad, embarazada) */
.dashboard-stats {
    margin-bottom: 36px;
    padding: 0;
}

.dashboard-stats__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-stats__title {
    margin: 0 0 4px 0;
    font-size: 17px;
    color: #334155;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.dashboard-stats__subtitle {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 400;
}

.dashboard-stats__total {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 120px;
}

.dashboard-stats__total-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
}

.dashboard-stats__total-value {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.dashboard-edad-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

.dashboard-edad-panel__caption {
    margin: 0;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-edad-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dashboard-edad-row {
    display: grid;
    grid-template-columns: repeat(11, minmax(52px, 1fr));
    min-width: 572px;
}

.dashboard-edad-row--labels {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.dashboard-edad-row--values {
    background: #fff;
}

.dashboard-edad-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    text-align: center;
    border-right: 1px solid #f1f5f9;
}

.dashboard-edad-cell:last-child {
    border-right: none;
}

.dashboard-edad-row--labels .dashboard-edad-cell {
    padding: 8px 4px 10px;
}

.dashboard-edad-cell__age {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.dashboard-edad-cell__unit {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: lowercase;
    margin-top: 1px;
}

.dashboard-edad-cell__value {
    display: block;
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.dashboard-edad-cell__value.is-zero {
    color: #cbd5e1;
    font-weight: 500;
}

.dashboard-extra-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-extra-stat {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: #fff;
}

.dashboard-extra-stat__label {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.dashboard-extra-stat__value {
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
}

/* Página configuración */
.config-page .config-section {
    margin-bottom: 28px;
    padding: 24px;
}

.config-section__title {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 600;
    color: #334155;
}

.config-section__desc {
    margin: 0 0 18px 0;
    font-size: 14px;
    color: #64748b;
}

.config-fechas-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 16px;
}

.config-fechas-row .app-form-group {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}

.config-aviso-columna {
    margin: 0 0 16px 0;
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    font-size: 13px;
    color: #92400e;
}

.config-usuarios-table .config-acciones-cell {
    min-width: 200px;
}

.config-inline-form {
    display: inline-block;
    margin: 0 4px 4px 0;
}

.config-btn {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    color: #475569;
}

.config-btn--ok {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.config-btn--warn {
    border-color: #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.config-btn--neutral {
    background: #f8fafc;
}

.config-estado {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.config-estado--activo {
    background: #dcfce7;
    color: #166534;
}

.config-estado--inactivo {
    background: #f1f5f9;
    color: #64748b;
}

.config-badge-yo {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 10px;
}

.config-clave-details {
    display: inline-block;
    margin-top: 4px;
}

.config-clave-details summary {
    list-style: none;
}

.config-clave-details summary::-webkit-details-marker {
    display: none;
}

.config-clave-form {
    margin-top: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-width: 220px;
}

.config-clave-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin: 8px 0 4px 0;
}

.config-clave-form .app-form-control {
    margin-bottom: 8px;
}

.config-sin-usuarios {
    text-align: center;
    color: #64748b;
    padding: 24px;
}

@media (max-width: 768px) {
    .dashboard-stats__head {
        align-items: flex-start;
    }

    .dashboard-stats__total {
        align-items: flex-start;
    }

    .dashboard-extra-row {
        grid-template-columns: 1fr;
    }
}

/* Configuración — período de inscripción */
.config-periodo-estado {
    margin-bottom: 24px;
    padding: 16px 18px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.config-periodo-estado--abierto {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.config-periodo-estado--cerrado {
    border-color: #fecaca;
    background: #fef2f2;
}

.config-periodo-estado__label {
    margin: 0 0 4px 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
}

.config-periodo-estado__valor {
    margin: 0 0 6px 0;
    font-size: 17px;
    font-weight: 600;
    color: #1e293b;
}

.config-periodo-estado__detalle {
    margin: 0;
    font-size: 14px;
    color: #475569;
}

.config-periodo-ayuda {
    margin: 0 0 8px 0;
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.inscripcion-periodo-banner {
    margin-bottom: 20px;
    padding: 14px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.inscripcion-periodo-banner--abierto {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.inscripcion-periodo-banner--cerrado {
    background: #fffbeb;
    border-color: #fde68a;
}

.inscripcion-periodo-banner__estado {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

.inscripcion-periodo-banner__fechas {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.inscripcion-cerrada-panel {
    text-align: center;
    padding: 28px 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
}

.inscripcion-cerrada-panel p {
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.inscripcion-cerrada-panel__ayuda {
    font-size: 14px;
    color: #64748b;
}

.app-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.app-menu-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 25px;
    border-radius: 20px;
    text-decoration: none;
    color: #1e293b;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid white;
}

.app-menu-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06);
    border-color: var(--border-color);
}

.item-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 20px;
    flex-shrink: 0;
}

.icon-blue { background-color: #eff6ff; color: #3b82f6; }
.icon-indigo { background-color: #e0e7ff; color: #6366f1; }
.icon-slate { background-color: #f8fafc; color: #64748b; }
.icon-emerald { background-color: #ecfdf5; color: #10b981; }
.icon-amber { background-color: #fffbeb; color: #f59e0b; }

.item-content h3 { margin: 0 0 5px 0; font-size: 18px; }
.item-content p { margin: 0; color: #64748b; font-size: 14px; line-height: 1.4; }
.item-chevron { margin-left: auto; font-size: 24px; color: #cbd5e1; }

.app-logout-form {
    margin-top: 24px;
}

.app-logout-form .app-logout {
    width: 100%;
    cursor: pointer;
    font-family: inherit;
    font-size: inherit;
}

.app-logout {
    display: block;
    text-align: center;
    color: var(--danger);
    text-decoration: none;
    font-weight: 600;
    padding: 15px;
    border: 2px dashed #fca5a5;
    border-radius: 12px;
    max-width: 200px;
    margin: 0 auto;
    transition: background 0.2s;
}

.app-logout:hover { background: #fef2f2; }

/* 
   . ESTILOS DE FORMULARIOS (CREAR/INSCRIBIR)
 */

.app-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: calc(100vh - 80px); 
    padding: 20px;
    box-sizing: border-box;
}

.app-form-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid var(--border-color);
    box-sizing: border-box;
    text-align: center;
}

.app-form-header h2 {
    margin: 0 0 10px 0;
    color: var(--text-dark);
    font-size: 24px;
}

.app-form-header p {
    margin: 0 0 30px 0;
    color: var(--text-muted);
    font-size: 14.5px;
}

.app-form-group {
    margin-bottom: 20px;
    text-align: left;
}

.app-form-group label {
    display: block;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 14px;
}

.app-form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    background-color: white;
}

.app-form-control:focus {
    border-color: var(--primary);
}

.app-btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--success);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.2);
    transition: background-color 0.2s;
}

.app-btn-submit:hover {
    background-color: #059669;
}

.app-link-cancel {
    display: inline-block;
    margin-top: 20px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.app-link-cancel:hover {
    color: var(--text-dark);
    text-decoration: underline;
}

/*  REGLAS RESPONSIVAS (MÓVILES Y PANTALLAS PEQUEÑAS) */

@media (max-width: 768px) {

    .app-header-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9990;
        height: 75px;
        padding: 0 12px 0 10px;
        background: #fff;
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
        box-sizing: border-box;
    }

    .mobile-menu-btn {
        display: flex !important;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 56px;
    }

    .sidebar {
        top: 56px;
        height: calc(100vh - 56px);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        top: 56px;
    }

    .app-dashboard {
        margin: 20px auto;
        padding: 0;
    }

    .main-content > .app-dashboard.app-dashboard--tabla {
        max-width: none;
        width: 100%;
        margin: 16px 0 24px;
        padding: 0;
    }

    .app-header h1 {
        font-size: 26px;
    }

    .app-menu {
        grid-template-columns: 1fr;
    }

    .app-form-card {
        padding: 25px 20px;
    }
}

/* =========================================
   ESTADÍSTICAS DASHBOARD — Rediseño KPI (v1, reemplazado)
   ========================================= */

.ds-section {
    margin-bottom: 36px;
}

/* ── Fila de KPI ── */
.ds-kpi-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.ds-kpi {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 20px 22px 18px;
    position: relative;
    overflow: hidden;
}

.ds-kpi::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
}

.ds-kpi--blue::before   { background: #3b82f6; }
.ds-kpi--amber::before  { background: #f59e0b; }
.ds-kpi--violet::before { background: #8b5cf6; }

.ds-kpi__label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #94a3b8;
    margin-bottom: 6px;
}

.ds-kpi__value {
    display: block;
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    margin-bottom: 6px;
}

.ds-kpi--blue   .ds-kpi__value { color: #1d4ed8; }
.ds-kpi--amber  .ds-kpi__value { color: #b45309; }
.ds-kpi--violet .ds-kpi__value { color: #6d28d9; }

.ds-kpi__sub {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ── Caja de edades ── */
.ds-edad-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.ds-edad-box__head {
    padding: 16px 20px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.ds-edad-box__title {
    margin: 0 0 2px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.ds-edad-box__sub {
    margin: 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.ds-edad-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 0;
}

.ds-edad-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px 6px;
    text-align: center;
    border-right: 1px solid #f1f5f9;
    gap: 2px;
    transition: background 0.15s;
}

.ds-edad-card:last-child { border-right: none; }

.ds-edad-card--activa {
    background: #f0f7ff;
}

.ds-edad-card__num {
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
    line-height: 1.1;
}

.ds-edad-card__lbl {
    font-size: 0.62rem;
    color: #94a3b8;
    text-transform: lowercase;
    line-height: 1;
}

.ds-edad-card__val {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1d4ed8;
    font-variant-numeric: tabular-nums;
    margin-top: 6px;
    line-height: 1;
    display: block;
}

.ds-edad-card__val.is-zero {
    color: #cbd5e1;
    font-weight: 500;
}

@media (max-width: 768px) {
    .ds-kpi-row {
        grid-template-columns: 1fr;
    }

    .ds-edad-grid {
        grid-template-columns: repeat(6, 1fr);
        overflow-x: auto;
    }
}

/* =========================================
   ESTADÍSTICAS DASHBOARD — Barras (v2)
   ========================================= */

.ds2-section {
    margin-bottom: 36px;
}

/* ── Fila resumen ── */
.ds2-summary {
    display: flex;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

.ds2-summary__item {
    flex: 1;
    padding: 22px 28px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ds2-summary__sep {
    width: 1px;
    background: #f1f5f9;
    margin: 14px 0;
    flex-shrink: 0;
}

.ds2-summary__num {
    font-size: 2.6rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.ds2-summary__num--amber  { color: #b45309; }
.ds2-summary__num--violet { color: #6d28d9; }

.ds2-summary__label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

/* ── Gráfico de barras ── */
.ds2-chart {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px 16px;
}

.ds2-chart__title {
    margin: 0 0 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

.ds2-chart__bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 116px;
}

.ds2-chart__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.ds2-chart__count {
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 5px;
    line-height: 1;
    min-height: 14px;
    display: block;
}

.ds2-chart__count.is-zero { color: #cbd5e1; }

.ds2-chart__bar-wrap {
    width: 100%;
    display: flex;
    align-items: flex-end;
    flex: 1;
}

.ds2-chart__bar {
    width: 100%;
    background: #3b82f6;
    border-radius: 4px 4px 0 0;
    min-height: 0;
    transition: height 0.4s ease;
}

.ds2-chart__age {
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    margin-top: 8px;
    line-height: 1;
}

.ds2-chart__unit {
    font-size: 0.6rem;
    color: #94a3b8;
    margin-top: 1px;
    line-height: 1;
}

@media (max-width: 640px) {
    .ds2-summary {
        flex-direction: column;
    }

    .ds2-summary__sep {
        width: auto;
        height: 1px;
        margin: 0 14px;
    }

    .ds2-chart__bars {
        gap: 4px;
    }

    .ds2-chart__age,
    .ds2-chart__count {
        font-size: 0.65rem;
    }
}

/* =========================================
   ESTADÍSTICAS — Barras horizontales (v3, reemplazado)
   ========================================= */

.ds3-section {
    margin-bottom: 36px;
}

.ds3-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 6px 20px rgba(0,0,0,0.06);
}

/* ── Cabecera ── */
.ds3-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 28px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.ds3-card__title {
    margin: 0 0 3px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.ds3-card__sub {
    margin: 0;
    font-size: 0.78rem;
    color: #94a3b8;
}

.ds3-card__total {
    text-align: right;
    flex-shrink: 0;
    margin-left: 24px;
}

.ds3-card__total-num {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
}

.ds3-card__total-lbl {
    display: block;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #94a3b8;
    margin-top: 4px;
}

/* ── Barras ── */
.ds3-bars {
    padding: 16px 28px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ds3-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 5px 8px;
    border-radius: 6px;
    transition: background 0.12s;
}

.ds3-row:hover {
    background: #f8fafc;
}

.ds3-row__label {
    width: 44px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #334155;
    flex-shrink: 0;
    text-align: right;
    line-height: 1.1;
}

.ds3-row__label small {
    display: block;
    font-size: 0.62rem;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.2;
}

.ds3-row__track {
    flex: 1;
    height: 10px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
}

.ds3-row__bar {
    height: 100%;
    background: #2563eb;
    border-radius: 99px;
    box-shadow: 0 1px 4px rgba(37,99,235,0.3);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ds3-row__count {
    width: 30px;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #334155;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.ds3-row__pct {
    width: 36px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.ds3-row__count.is-zero,
.ds3-row__pct.is-zero {
    color: #cbd5e1;
    font-weight: 400;
}

/* ── Pie ── */
.ds3-footer {
    display: flex;
    border-top: 1px solid #e2e8f0;
}

.ds3-footer__item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 28px;
}

.ds3-footer__item + .ds3-footer__item {
    border-left: 1px solid #e2e8f0;
}

.ds3-footer__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ds3-footer__dot--amber  { background: #f59e0b; }
.ds3-footer__dot--violet { background: #8b5cf6; }

.ds3-footer__label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    flex: 1;
}

.ds3-footer__num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* ── Responsive ── */
@media (max-width: 560px) {
    .ds3-card__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .ds3-card__total { text-align: left; margin-left: 0; }

    .ds3-card__head,
    .ds3-bars,
    .ds3-footer__item { padding-left: 20px; padding-right: 20px; }

    .ds3-row__pct { display: none; }

    .ds3-footer { flex-direction: column; }

    .ds3-footer__item + .ds3-footer__item {
        border-left: none;
        border-top: 1px solid #e2e8f0;
    }
}

/* =========================================
   ESTADÍSTICAS — Tarjetas por edad (v4)
   ========================================= */

.ds4-section {
    margin-bottom: 36px;
}

/* ── Encabezado ── */
.ds4-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    gap: 16px;
}

.ds4-top__title {
    margin: 0 0 3px;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.ds4-top__sub {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
}

.ds4-total {
    text-align: right;
    flex-shrink: 0;
}

.ds4-total__num {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.ds4-total__lbl {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #94a3b8;
    margin-top: 3px;
}

/* ── Grilla de tarjetas ── */
.ds4-grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.ds4-tile {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 6px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    transition: border-color 0.15s, background 0.15s;
}

.ds4-tile--on {
    background: #ffffff;
    border-color: #bfdbfe;
    box-shadow: 0 1px 4px rgba(37,99,235,0.08);
}

.ds4-tile__age {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    line-height: 1;
}

.ds4-tile__unit {
    font-size: 0.6rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: lowercase;
    margin-bottom: 6px;
}

.ds4-tile__num {
    font-size: 1.6rem;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.ds4-tile__num.is-zero {
    font-size: 1.3rem;
    font-weight: 400;
    color: #cbd5e1;
}

/* ── Extra stats ── */
.ds4-extras {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 2px;
}

.ds4-extra {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ds4-extra--amber  { border-left: 4px solid #f59e0b; }
.ds4-extra--violet { border-left: 4px solid #8b5cf6; }

.ds4-extra__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
}

.ds4-extra__num {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .ds4-top { flex-direction: column; align-items: flex-start; }
    .ds4-total { text-align: left; }

    .ds4-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .ds4-extras {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   ESTADÍSTICAS — Tarjeta unificada (v5)
   ========================================= */

.ds5-section {
    margin-bottom: 36px;
}

.ds5-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.04);
}

/* ── Fila de estadísticas ── */
.ds5-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.ds5-stat {
    padding: 24px 28px 20px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-right: 1px solid #f1f5f9;
}

.ds5-stat:last-child {
    border-right: none;
}

.ds5-stat__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    line-height: 1.2;
}

.ds5-stat__num {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
    color: #1d4ed8;
}

.ds5-stat--amber  .ds5-stat__num { color: #b45309; }
.ds5-stat--violet .ds5-stat__num { color: #6d28d9; }

.ds5-stat__sub {
    font-size: 0.72rem;
    color: #cbd5e1;
    font-weight: 400;
    line-height: 1.3;
}

/* ── Separador con etiqueta centrada ── */
.ds5-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    margin: 2px 0;
}

.ds5-divider::before,
.ds5-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.ds5-divider__label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    white-space: nowrap;
    padding: 0 2px;
}

/* ── Fila de edades ── */
.ds5-ages-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
}

.ds5-ages {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    min-width: 520px;
    padding: 12px 20px 20px;
    gap: 6px;
}

.ds5-age {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 4px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
    border: 1px solid transparent;
    transition: background 0.12s, border-color 0.12s;
}

.ds5-age--on {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.ds5-age__lbl {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1;
}

.ds5-age__lbl small {
    display: block;
    font-size: 0.6rem;
    font-weight: 400;
    color: #94a3b8;
    margin-top: 1px;
}

.ds5-age__num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    display: block;
}

.ds5-age__num.is-zero {
    font-size: 1.25rem;
    font-weight: 400;
    color: #cbd5e1;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .ds5-stats {
        grid-template-columns: 1fr;
    }

    .ds5-stat {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 18px 20px;
    }

    .ds5-stat:last-child {
        border-bottom: none;
    }

    .ds5-stat__num { font-size: 2.2rem; }

    .ds5-divider { padding: 0 20px; }
}

/* =========================================
   DASHBOARD — Rediseño completo (v6)
   ========================================= */

.db6-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 48px;
}

/* ── Hero panel ── */
.db6-hero {
    background: #1c3d6e;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.db6-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 110% 0%, rgba(255,255,255,0.06) 0%, transparent 55%),
        radial-gradient(ellipse at -10% 110%, rgba(255,255,255,0.04) 0%, transparent 50%);
    pointer-events: none;
}

.db6-hero__inner {
    position: relative;
    z-index: 1;
    padding: 32px 36px 28px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.db6-hero__greeting {
    margin: 0 0 4px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.45);
}

.db6-hero__name {
    margin: 0 0 10px;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

/* ── Badges ── */
.db6-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.db6-badge--gold  { background: rgba(245,158,11,0.2);  color: #fcd34d; border: 1px solid rgba(245,158,11,0.35); }
.db6-badge--sky   { background: rgba(56,189,248,0.15); color: #7dd3fc; border: 1px solid rgba(56,189,248,0.3);  }
.db6-badge--green { background: rgba(52,211,153,0.15); color: #6ee7b7; border: 1px solid rgba(52,211,153,0.3);  }

/* ── Hero stats ── */
.db6-hero__stats {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.db6-hstat {
    flex: 1;
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.db6-hstat__sep {
    width: 1px;
    align-self: stretch;
    background: rgba(255,255,255,0.1);
    flex: 0 0 1px;
}

.db6-hstat__num {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
}

.db6-hstat__lbl {
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Card de edades ── */
.db6-ages-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 24px 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.db6-ages-card__title {
    margin: 0 0 14px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #475569;
}

.db6-ages-card__title span {
    color: #94a3b8;
    font-weight: 500;
}

.db6-ages-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.db6-ages-row {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    min-width: 500px;
    gap: 6px;
}

.db6-age {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid transparent;
    text-align: center;
    transition: background 0.12s, border-color 0.12s;
}

.db6-age--on {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.db6-age__num {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.db6-age__num.is-zero {
    font-size: 1.2rem;
    font-weight: 400;
    color: #cbd5e1;
}

.db6-age__label {
    font-size: 0.62rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: lowercase;
    line-height: 1;
}

/* ── Label de sección ── */
.db6-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    padding-left: 2px;
    margin-bottom: -8px;
}

/* ── Menú de acciones ── */
.db6-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.db6-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-left-width: 4px;
    border-radius: 10px;
    padding: 20px 22px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.db6-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.db6-card--indigo { border-left-color: #6366f1; }
.db6-card--slate  { border-left-color: #64748b; }
.db6-card--blue   { border-left-color: #3b82f6; }
.db6-card--emerald{ border-left-color: #10b981; }
.db6-card--amber  { border-left-color: #f59e0b; }

.db6-card--indigo:hover { border-color: #6366f1; }
.db6-card--slate:hover  { border-color: #64748b; }
.db6-card--blue:hover   { border-color: #3b82f6; }
.db6-card--emerald:hover{ border-color: #10b981; }
.db6-card--amber:hover  { border-color: #f59e0b; }

.db6-card__body {
    flex: 1;
    min-width: 0;
}

.db6-card__cat {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 4px;
}

.db6-card__title {
    margin: 0 0 4px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.db6-card__desc {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.45;
}

.db6-card__arrow {
    font-size: 1.1rem;
    color: #cbd5e1;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
}

.db6-card:hover .db6-card__arrow {
    color: #94a3b8;
    transform: translateX(3px);
}

/* ── Cerrar sesión ── */
.db6-logout-form {
    margin-top: 8px;
}

.db6-logout-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    padding: 12px 20px;
    background: transparent;
    border: 1.5px dashed #fca5a5;
    border-radius: 8px;
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, border-color 0.15s;
}

.db6-logout-btn:hover {
    background: #fef2f2;
    border-color: #f87171;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .db6-hero__inner {
        padding: 24px 20px 20px;
    }

    .db6-hero__name { font-size: 1.5rem; }

    .db6-hero__stats {
        flex-direction: column;
        gap: 0;
    }

    .db6-hstat { padding: 12px 16px; }

    .db6-hstat__sep {
        width: auto;
        height: 1px;
        align-self: auto;
        flex: 0 0 1px;
    }

    .db6-hstat__num { font-size: 1.6rem; }

    .db6-ages-card { padding: 16px 16px 14px; }

    .db6-menu { grid-template-columns: 1fr; }

    .db6-card { padding: 16px 18px; }
}

/* =========================================
   DASHBOARD — Lista unificada (v7)
   ========================================= */

.db7-wrap {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-bottom: 48px;
}

/* ── Bienvenida ── */
.db7-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
}

.db7-welcome__text {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.db7-welcome__hi {
    font-size: 1rem;
    color: #94a3b8;
    font-weight: 500;
}

.db7-welcome__name {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
}

.db7-role {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.db7-role--gold  { background: #fef3c7; color: #92400e; }
.db7-role--blue  { background: #dbeafe; color: #1e40af; }
.db7-role--green { background: #d1fae5; color: #065f46; }

/* ── Stats ── */
.db7-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.db7-stat {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-top-width: 4px;
    border-radius: 10px;
    padding: 20px 20px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.db7-stat--blue   { border-top-color: #3b82f6; }
.db7-stat--amber  { border-top-color: #f59e0b; }
.db7-stat--violet { border-top-color: #8b5cf6; }

.db7-stat__num {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
}

.db7-stat--blue   .db7-stat__num { color: #2563eb; }
.db7-stat--amber  .db7-stat__num { color: #d97706; }
.db7-stat--violet .db7-stat__num { color: #7c3aed; }

.db7-stat__label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

/* ── Edades ── */
.db7-ages {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 16px 20px 14px;
}

.db7-ages__title {
    margin: 0 0 12px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #64748b;
}

.db7-ages__title em {
    font-style: normal;
    color: #94a3b8;
    font-weight: 400;
}

.db7-ages__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.db7-ages__row {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    min-width: 480px;
    gap: 4px;
}

.db7-age {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 2px 8px;
    border-radius: 6px;
    background: #f8fafc;
    text-align: center;
}

.db7-age--on { background: #eff6ff; }

.db7-age__num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    display: block;
}

.db7-age__num.is-zero {
    font-weight: 400;
    color: #cbd5e1;
}

.db7-age__lbl {
    font-size: 0.6rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: lowercase;
    line-height: 1;
}

/* ── Menú lista ── */
.db7-nav {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.db7-nav__item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s;
}

.db7-nav__item:last-child { border-bottom: none; }

.db7-nav__item:hover { background: #f8fafc; }

.db7-nav__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.db7-nav__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.db7-nav__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.2;
}

.db7-nav__desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.3;
}

.db7-nav__arrow {
    font-size: 1.25rem;
    color: #cbd5e1;
    flex-shrink: 0;
    transition: transform 0.12s, color 0.12s;
    line-height: 1;
}

.db7-nav__item:hover .db7-nav__arrow {
    transform: translateX(3px);
    color: #94a3b8;
}

/* ── Cerrar sesión ── */
.db7-logout-wrap { text-align: center; margin-top: 4px; }

.db7-logout-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 6px;
    transition: color 0.12s, background 0.12s;
}

.db7-logout-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

/* ── Responsive ── */
@media (max-width: 580px) {
    .db7-welcome {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 16px 18px;
    }

    .db7-stats { grid-template-columns: 1fr; gap: 8px; }

    .db7-stat {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        text-align: left;
        border-top-width: 1px;
        border-left-width: 4px;
    }

    .db7-stat--blue   { border-left-color: #3b82f6; border-top-color: #e8ecf0; }
    .db7-stat--amber  { border-left-color: #f59e0b; border-top-color: #e8ecf0; }
    .db7-stat--violet { border-left-color: #8b5cf6; border-top-color: #e8ecf0; }

    .db7-stat__num { font-size: 2rem; }

    .db7-nav__item { padding: 14px 16px; }
}

/* =========================================
   DASHBOARD — Dos columnas (v8)
   ========================================= */

.db8-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 48px;
}

/* ── Layout dos columnas ── */
.db8-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    align-items: start;
}

/* ── Panel izquierdo oscuro ── */
.db8-panel {
    background: #1c3d6e;
    border-radius: 14px;
    padding: 28px 22px 22px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 16px;
}

.db8-panel__hi {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.4);
}

.db8-panel__name {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.db8-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.db8-chip--gold  { background: rgba(251,191,36,0.2);  color: #fcd34d; }
.db8-chip--sky   { background: rgba(56,189,248,0.15); color: #7dd3fc; }
.db8-chip--green { background: rgba(52,211,153,0.15); color: #6ee7b7; }

/* ── Stats en panel ── */
.db8-panel__stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.db8-pstat {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.db8-pstat--row {
    flex-direction: row;
    align-items: center;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.db8-pstat__half {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
}

.db8-pstat__divider {
    width: 1px;
    align-self: stretch;
    background: rgba(255,255,255,0.1);
}

.db8-pstat__num {
    font-size: 2.2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.04em;
}

.db8-pstat__num--sm {
    font-size: 1.5rem;
}

.db8-pstat__lbl {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

/* ── Logout en panel ── */
.db8-panel__logout {
    margin-top: auto;
}

.db8-logout-btn {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    padding: 10px;
    text-align: center;
    transition: background 0.12s, color 0.12s;
}

.db8-logout-btn:hover {
    background: rgba(239,68,68,0.15);
    border-color: rgba(239,68,68,0.3);
    color: #fca5a5;
}

/* ── Acciones columna derecha ── */
.db8-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.db8-action {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 18px 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s, transform 0.12s;
}

.db8-action:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.07);
    transform: translateX(4px);
}

.db8-action__body {
    flex: 1;
    min-width: 0;
}

.db8-action__cat {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    margin-bottom: 3px;
}

.db8-action__title {
    margin: 0 0 3px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.db8-action__desc {
    margin: 0;
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.4;
}

.db8-action__go {
    font-size: 1.1rem;
    color: #cbd5e1;
    flex-shrink: 0;
    transition: transform 0.12s, color 0.12s;
}

.db8-action:hover .db8-action__go {
    transform: translateX(4px);
    color: #64748b;
}

/* ── Distribución por edad ── */
.db8-ages {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 10px;
    padding: 16px 20px 14px;
}

.db8-ages__label {
    margin: 0 0 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
}

.db8-ages__label em {
    font-style: normal;
    font-weight: 400;
    color: #94a3b8;
}

.db8-ages__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.db8-ages__row {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    min-width: 480px;
    gap: 4px;
}

.db8-age {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 9px 2px 7px;
    border-radius: 6px;
    background: #f8fafc;
    text-align: center;
}

.db8-age--on { background: #eff6ff; }

.db8-age__num {
    font-size: 1.3rem;
    font-weight: 800;
    color: #2563eb;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    display: block;
}

.db8-age__num.is-zero { font-weight: 400; color: #cbd5e1; }

.db8-age__lbl {
    font-size: 0.6rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1;
}

/* ── Responsive ── */
@media (max-width: 680px) {
    .db8-layout {
        grid-template-columns: 1fr;
    }

    .db8-panel {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        padding: 20px;
        gap: 16px;
    }

    .db8-panel__user { flex: 1; min-width: 140px; }

    .db8-panel__stats {
        flex-direction: row;
        flex: 100%;
    }

    .db8-panel__logout { flex: 100%; }

    .db8-logout-btn { max-width: 160px; }

    .db8-pstat { flex: 1; }
}

/* =========================================
   DASHBOARD — Diseño profesional (pro)
   ========================================= */

/* Tokens de diseño:
   --radius: 12px
   --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.05)
   --border: 1px solid #e2e8f0
*/

.pro-wrap {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 56px;
}

/* ── Cabecera ── */
.pro-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.pro-header__greeting {
    margin: 0 0 3px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

.pro-header__name {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.pro-header__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.pro-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pro-badge--gold  { background: #fef3c7; color: #92400e; }
.pro-badge--navy  { background: #dbeafe; color: #1e40af; }
.pro-badge--teal  { background: #ccfbf1; color: #0f766e; }

.pro-header__org {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
}

/* ── Panel estadísticas ── */
.pro-stats {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.04);
}

/* ── KPIs ── */
.pro-stats__kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #f1f5f9;
}

.pro-kpi {
    padding: 28px 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-right: 1px solid #f1f5f9;
    position: relative;
}

.pro-kpi:last-child { border-right: none; }

.pro-kpi::before {
    content: '';
    position: absolute;
    top: 0; left: 28px;
    width: 36px;
    height: 3px;
    border-radius: 0 0 3px 3px;
}

.pro-kpi--primary::before { background: #1c3d6e; }
.pro-kpi--amber::before   { background: #f59e0b; }
.pro-kpi--violet::before  { background: #8b5cf6; }

.pro-kpi__label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-top: 10px;
}

.pro-kpi__num {
    font-size: 3rem;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
}

.pro-kpi--primary .pro-kpi__num { color: #1c3d6e; }
.pro-kpi--amber   .pro-kpi__num { color: #b45309; }
.pro-kpi--violet  .pro-kpi__num { color: #6d28d9; }

.pro-kpi__sub {
    font-size: 0.75rem;
    color: #cbd5e1;
    font-weight: 400;
}

/* ── Distribución por edad ── */
.pro-stats__ages {
    padding: 18px 28px 20px;
}

.pro-ages__title {
    margin: 0 0 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748b;
}

.pro-ages__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.pro-ages__grid {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    min-width: 500px;
    gap: 5px;
}

.pro-age {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 4px 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid transparent;
    text-align: center;
    transition: background 0.12s, border-color 0.12s;
}

.pro-age--on {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.pro-age__num {
    font-size: 1.4rem;
    font-weight: 800;
    color: #1c3d6e;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    display: block;
}

.pro-age__num.is-zero {
    font-size: 1.2rem;
    font-weight: 400;
    color: #cbd5e1;
}

.pro-age__label {
    font-size: 0.62rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: lowercase;
    line-height: 1;
}

/* ── Encabezado de sección ── */
.pro-section-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: -8px;
}

.pro-section-head::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.pro-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
    white-space: nowrap;
}

/* ── Grid de acciones ── */
.pro-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.pro-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: box-shadow 0.18s, border-color 0.18s, transform 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.pro-card:hover {
    border-color: #c7d2e8;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.pro-card__accent {
    width: 4px;
    flex-shrink: 0;
    border-radius: 0;
}

.pro-card__body {
    flex: 1;
    padding: 18px 16px 16px 18px;
    min-width: 0;
}

.pro-card__title {
    margin: 0 0 5px;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.pro-card__desc {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.5;
}

.pro-card__icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    align-self: center;
    margin-right: 18px;
    color: #cbd5e1;
    transform: rotate(-90deg);
    transition: color 0.15s, transform 0.15s;
}

.pro-card:hover .pro-card__icon {
    color: #64748b;
    transform: rotate(-90deg) translateX(-2px);
}

/* ── Footer ── */
.pro-footer {
    text-align: center;
    padding-top: 4px;
}

.pro-logout {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 6px;
    transition: color 0.12s, background 0.12s;
    letter-spacing: 0.01em;
}

.pro-logout:hover {
    color: #dc2626;
    background: #fef2f2;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .pro-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 18px 20px;
    }

    .pro-header__right { align-items: flex-start; }

    .pro-header__name { font-size: 1.25rem; }

    .pro-stats__kpis {
        grid-template-columns: 1fr;
    }

    .pro-kpi {
        border-right: none;
        border-bottom: 1px solid #f1f5f9;
        padding: 20px 20px 16px;
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }

    .pro-kpi:last-child { border-bottom: none; }

    .pro-kpi::before {
        left: 0; top: 20px;
        width: 3px;
        height: 36px;
        border-radius: 0 3px 3px 0;
    }

    .pro-kpi__label { margin-top: 0; }

    .pro-kpi__num { font-size: 2.2rem; }

    .pro-stats__ages { padding: 16px 20px 18px; }

    .pro-grid { grid-template-columns: 1fr; }

    .pro-card__body { padding: 16px 14px 14px 16px; }
}

/* =========================================
   DASHBOARD — Bold & Llamativo
   ========================================= */

.bold-wrap {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 52px;
}

/* ── Hero ── */
.bold-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 60%, #3b82f6 100%);
    border-radius: 16px;
    padding: 32px 32px 0;
    position: relative;
    overflow: hidden;
}

.bold-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}

.bold-hero::after {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
    pointer-events: none;
}

.bold-hero__top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 32px;
}

.bold-hero__hi {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.5);
}

.bold-hero__name {
    margin: 0 0 6px;
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.bold-hero__org {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
}

.bold-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-top: 4px;
}

.bold-badge--white { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25); }
.bold-badge--gold  { background: rgba(251,191,36,0.25);  color: #fcd34d; border: 1px solid rgba(251,191,36,0.4); }

/* ── KPIs dentro del hero ── */
.bold-kpis {
    position: relative;
    z-index: 1;
    display: flex;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    backdrop-filter: blur(4px);
}

.bold-kpi {
    flex: 1;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bold-kpi--sep {
    flex: 0 0 1px;
    background: rgba(255,255,255,0.1);
    padding: 0;
    margin: 14px 0;
}

.bold-kpi__num {
    font-size: 2.4rem;
    font-weight: 900;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.05em;
}

.bold-kpi__lbl {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
}

/* ── Edades ── */
.bold-ages {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.bold-ages__title {
    margin: 0 0 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #475569;
}

.bold-ages__title span {
    color: #94a3b8;
    font-weight: 400;
}

.bold-ages__scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bold-ages__row {
    display: grid;
    grid-template-columns: repeat(11, 1fr);
    min-width: 480px;
    gap: 4px;
}

.bold-age {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 3px 8px;
    border-radius: 8px;
    background: #f8fafc;
    text-align: center;
    transition: background 0.12s;
}

.bold-age--on { background: #eff6ff; }

.bold-age__num {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    display: block;
}

.bold-age__num.is-zero { font-weight: 400; color: #cbd5e1; }

.bold-age__lbl {
    font-size: 0.6rem;
    font-weight: 600;
    color: #94a3b8;
    line-height: 1;
}

/* ── Label sección ── */
.bold-section {
    margin: 4px 0 -4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #94a3b8;
}

/* ── Grid de acciones ── */
.bold-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 10px;
}

.bold-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 18px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.18s, transform 0.15s, border-color 0.15s, background 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.bold-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    transform: translateY(-3px);
    border-color: #c7d2e8;
}

.bold-card__ico {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.02em;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);
}

.bold-card__text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.bold-card__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    display: block;
}

.bold-card__desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    display: block;
}

.bold-card__arrow {
    font-size: 1.6rem;
    color: #cbd5e1;
    flex-shrink: 0;
    line-height: 1;
    transition: color 0.15s, transform 0.15s;
}

.bold-card:hover .bold-card__arrow {
    color: #475569;
    transform: translateX(4px);
}

/* ── Footer ── */
.bold-footer { text-align: center; margin-top: 4px; }

.bold-logout {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.8125rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 6px;
    transition: color 0.12s, background 0.12s;
}

.bold-logout:hover { color: #dc2626; background: #fef2f2; }

/* ── Responsive ── */
@media (max-width: 620px) {
    .bold-hero { padding: 24px 20px 0; }

    .bold-hero__top {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 24px;
    }

    .bold-hero__name { font-size: 1.6rem; }

    .bold-kpis {
        flex-direction: column;
    }

    .bold-kpi--sep {
        flex: 0 0 1px;
        margin: 0 16px;
        width: auto;
        height: 1px;
        background: rgba(255,255,255,0.1);
    }

    .bold-kpi { padding: 14px 20px; }

    .bold-kpi__num { font-size: 1.8rem; }

    .bold-grid { grid-template-columns: 1fr; }

    .bold-card { padding: 15px 15px; }
}

/* =========================================
   INSCRIBIR BENEFICIARIO — Diseño nuevo
   ========================================= */

.ib-wrap {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px 56px;
    min-height: calc(100vh - 80px);
    box-sizing: border-box;
}

.ib-card {
    width: 100%;
    max-width: 560px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

/* ── Encabezado ── */
.ib-card__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 32px 24px;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
}

.ib-card__header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.2);
}

.ib-card__header-icon svg {
    width: 24px;
    height: 24px;
    color: #fff;
}

.ib-card__title {
    margin: 0 0 4px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.ib-card__subtitle {
    margin: 0;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.45;
}

/* ── Período ── */
.ib-periodo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 32px;
    font-size: 0.8125rem;
    border-bottom: 1px solid #f1f5f9;
}

.ib-periodo--open  { background: #f0fdf4; }
.ib-periodo--closed { background: #fffbeb; }

.ib-periodo__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ib-periodo--open  .ib-periodo__dot  { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
.ib-periodo--closed .ib-periodo__dot { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,0.2); }

.ib-periodo__estado {
    display: block;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.8125rem;
}

.ib-periodo__fechas {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    margin-top: 1px;
}

/* ── Alertas ── */
.ib-alert {
    margin: 20px 32px 0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
}

.ib-alert--error   { background: #fef2f2; border-left: 3px solid #ef4444; color: #b91c1c; }
.ib-alert--success { background: #f0fdf4; border-left: 3px solid #22c55e; color: #15803d; }

/* ── Cerrado ── */
.ib-closed {
    padding: 40px 32px;
    text-align: center;
}

.ib-closed__icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    line-height: 1;
}

.ib-closed__msg {
    margin: 0 0 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.5;
}

.ib-closed__hint {
    margin: 0 0 24px;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.5;
}

.ib-closed__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* ── Formulario ── */
.ib-form {
    padding: 28px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ib-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ib-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    line-height: 1.3;
}

.ib-label em {
    font-style: normal;
    font-weight: 400;
    color: #94a3b8;
}

.ib-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.ib-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.ib-input::placeholder { color: #9ca3af; }

.ib-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

/* ── Fila fecha + sexo ── */
.ib-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* ── Checkboxes especiales ── */
.ib-checks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 2px;
}

.ib-check {
    cursor: pointer;
    user-select: none;
}

.ib-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ib-check__box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
    transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
    text-align: center;
}

.ib-check__box:hover {
    border-color: #93c5fd;
    background: #f0f9ff;
}

.ib-check input:checked ~ .ib-check__box {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.ib-check__emoji {
    font-size: 26px;
    line-height: 1;
}

.ib-check__lbl {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    line-height: 1.2;
}

.ib-check input:checked ~ .ib-check__box .ib-check__lbl {
    color: #1d4ed8;
}

/* ── Botones ── */
.ib-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

.ib-btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    border: none;
    box-sizing: border-box;
}

.ib-btn--primary {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 2px 8px rgba(37,99,235,0.3);
}

.ib-btn--primary:hover {
    background: #1d4ed8;
    box-shadow: 0 4px 14px rgba(37,99,235,0.4);
    transform: translateY(-1px);
}

.ib-btn--ghost {
    background: #f8fafc;
    color: #64748b;
    border: 1.5px solid #e2e8f0;
}

.ib-btn--ghost:hover {
    background: #f1f5f9;
    color: #374151;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .ib-wrap { padding: 0 0 40px; align-items: stretch; }

    .ib-card {
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;
        max-width: 100%;
    }

    .ib-card__header { padding: 22px 20px 20px; }

    .ib-form { padding: 22px 20px 28px; }

    .ib-alert { margin: 16px 20px 0; }

    .ib-periodo { padding: 12px 20px; }

    .ib-row { grid-template-columns: 1fr; }
}

/* =========================================
   INSCRIBIR BENEFICIARIO — Split (ib2)
   ========================================= */

body:has(.ib2-split) .main-content {
    padding: 0;
    max-width: none;
    min-height: calc(100vh - 56px);
    display: flex;
}

.ib2-split {
    display: flex;
    width: 100%;
    min-height: calc(100vh - 56px);
}

/* ── Panel izquierdo ── */
.ib2-panel {
    flex: 0 0 360px;
    background: #1c3d6e;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 40px;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.ib2-panel::before {
    content: '';
    position: absolute;
    bottom: -60px; right: -60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
    pointer-events: none;
}

.ib2-panel__logo {
    width: 52px;
    height: 52px;
    margin-bottom: 32px;
}

.ib2-panel__logo svg {
    width: 52px;
    height: 52px;
}

.ib2-panel__title {
    margin: 0 0 14px;
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.ib2-panel__desc {
    margin: 0 0 28px;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.65;
}

/* ── Status pill ── */
.ib2-panel__status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 28px;
}

.ib2-panel__status--open   { background: rgba(34,197,94,0.12);  border: 1px solid rgba(34,197,94,0.25); }
.ib2-panel__status--closed { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); }

.ib2-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ib2-panel__status--open   .ib2-status-dot { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,0.25); }
.ib2-panel__status--closed .ib2-status-dot { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,0.25); }

.ib2-panel__status strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.ib2-panel__status span {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
}

/* ── Hints ── */
.ib2-panel__hints {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ib2-panel__hints li {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.38);
    padding-left: 14px;
    position: relative;
    line-height: 1.5;
}

.ib2-panel__hints li::before {
    content: '·';
    position: absolute;
    left: 0;
    color: rgba(255,255,255,0.3);
}

.ib2-panel__footer {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.25);
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 18px;
    margin-top: 32px;
}

/* ── Panel formulario ── */
.ib2-form-panel {
    flex: 1;
    background: #f7f9fc;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 52px 40px;
    box-sizing: border-box;
    overflow-y: auto;
}

.ib2-form-wrap {
    width: 100%;
    max-width: 420px;
}

.ib2-form-title {
    margin: 0 0 28px;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.025em;
}

/* ── Alertas ── */
.ib2-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.45;
    margin-bottom: 20px;
}

.ib2-alert--error   { background: #fef2f2; border-left: 3px solid #ef4444; color: #b91c1c; }
.ib2-alert--success { background: #f0fdf4; border-left: 3px solid #22c55e; color: #15803d; }

/* ── Cerrado ── */
.ib2-closed {
    padding: 20px 0;
}

.ib2-closed__title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.ib2-closed__msg {
    margin: 0 0 24px;
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.55;
}

.ib2-closed__links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ── Campos ── */
.ib2-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ib2-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ib2-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
}

.ib2-label small {
    font-weight: 400;
    color: #9ca3af;
    font-size: 0.75rem;
}

.ib2-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #111827;
    background: #fff;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.ib2-input:focus {
    border-color: #1c3d6e;
    box-shadow: 0 0 0 3px rgba(28,61,110,0.1);
}

.ib2-input::placeholder { color: #9ca3af; }

.ib2-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.ib2-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ── Toggles condiciones ── */
.ib2-toggles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}

.ib2-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.ib2-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ib2-toggle__track {
    width: 38px;
    height: 22px;
    border-radius: 11px;
    background: #d1d5db;
    flex-shrink: 0;
    position: relative;
    transition: background 0.2s;
}

.ib2-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}

.ib2-toggle input:checked ~ .ib2-toggle__track {
    background: #1c3d6e;
}

.ib2-toggle input:checked ~ .ib2-toggle__track::after {
    transform: translateX(16px);
}

.ib2-toggle__label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
}

.ib2-toggle__ico { font-size: 1.1rem; line-height: 1; }

/* ── Footer form ── */
.ib2-form-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 8px;
}

.ib2-btn {
    display: block;
    width: 100%;
    padding: 13px;
    background: #1c3d6e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    box-sizing: border-box;
}

.ib2-btn:hover  { background: #163260; }
.ib2-btn:active { transform: scale(0.99); }

.ib2-link {
    display: block;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    padding: 6px;
    border-radius: 6px;
    transition: color 0.12s;
}

.ib2-link:hover { color: #0f172a; }

/* ── Responsive ── */
@media (max-width: 860px) {
    .ib2-panel { flex: 0 0 300px; padding: 40px 28px; }
    .ib2-panel__title { font-size: 1.6rem; }
}

@media (max-width: 660px) {
    body:has(.ib2-split) .main-content { display: block; }

    .ib2-split { flex-direction: column; min-height: auto; }

    .ib2-panel {
        flex: none;
        padding: 24px 20px;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
    }

    .ib2-panel::before { display: none; }

    .ib2-panel__logo { display: none; }

    .ib2-panel__title {
        font-size: 1.15rem;
        margin-bottom: 0;
        flex: 1;
    }

    .ib2-panel__desc,
    .ib2-panel__hints,
    .ib2-panel__footer { display: none; }

    .ib2-panel__status {
        flex: 100%;
        margin-bottom: 0;
        padding: 10px 14px;
    }

    .ib2-form-panel {
        padding: 28px 20px 40px;
        background: #fff;
    }

    .ib2-row { grid-template-columns: 1fr; }
}