/* ═══════════════════════════════════════════════
   TOKENS — Solo en botones, bordes, iconos,
   hovers e indicadores. NUNCA en fondos ni texto.
═══════════════════════════════════════════════ */
:root {
    --bg: #ffffff;
    --bg-subtle: #f8fafc;
    --bg-hover: #f1f5f9;
    --border: #e5e7eb;
    --border-md: #d1d5db;
    --text-main: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, .08);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    background: var(--bg-subtle);
    color: var(--text-main);
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── TOPBAR ──────────────────────────────────── */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 60px;
    box-shadow: var(--shadow-sm);
    gap: 12px;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -.2px;
    white-space: nowrap;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}

/* NAV topbar */
.topbar-nav {
    display: flex;
    gap: 2px;
    align-items: center;
}

.topbar-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    transition: color .18s, background .18s;
    white-space: nowrap;
}

.topbar-nav a:hover {
    color: var(--text-main);
    background: var(--bg-hover);
}

.topbar-nav a.active {
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 8%, transparent);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 6px;
    background: none;
    border: none;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: all .25s;
}

/* ─── TOPBAR ACTIONS ──────────────────────────── */
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 15px;
    transition: all .18s;
    text-decoration: none;
    flex-shrink: 0;
}

.icon-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, white);
}

.notif-wrap {
    position: relative;
    flex-shrink: 0;
}

.notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--bg);
}

/* Search */
.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-wrap i {
    position: absolute;
    left: 10px;
    color: var(--text-light);
    font-size: 12px;
    pointer-events: none;
}

.search-input {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 7px 12px 7px 32px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-main);
    background: var(--bg-subtle);
    width: 180px;
    transition: all .2s;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-input:focus {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
    width: 220px;
}

/* Avatar */
.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    flex-shrink: 0;
    letter-spacing: .5px;
    user-select: none;
}

/* ─── BUTTONS ─────────────────────────────────── */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .18s;
    white-space: nowrap;
}

.btn-primary:hover {
    background: color-mix(in srgb, var(--primary) 85%, black);
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 28%, transparent);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all .18s;
    white-space: nowrap;
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 5%, white);
}

/* ─── DROPDOWN ────────────────────────────────── */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 195px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: all .18s;
    z-index: 150;
}

.dropdown-menu.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.dropdown-header {
    padding: 12px 14px 10px;
    border-bottom: 1px solid var(--border);
}

.dropdown-header strong {
    display: block;
    font-size: 13.5px;
    color: var(--text-main);
}

.dropdown-header small {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    color: var(--text-main);
    cursor: pointer;
    transition: background .12s;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    font-family: inherit;
}

.dropdown-item i {
    width: 16px;
    text-align: center;
    color: var(--text-muted);
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

.dropdown-item.danger {
    color: #f43f5e;
}

.dropdown-item.danger i {
    color: #f43f5e;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
}

/* ─── LAYOUT ──────────────────────────────────── */
.layout {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* ─── SIDEBAR ─────────────────────────────────── */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg);
    border-right: 1px solid var(--border);
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 60px;
    height: calc(100vh - 60px);
    overflow-y: auto;
    transition: transform .3s ease;
}

.sidebar-section {
    margin-bottom: 4px;
}

.sidebar-header {
    margin-bottom: 4px;
    color: var(--strong);
    letter-spacing: .02em;
    text-transform: uppercase;
    padding: 10px 12px 4px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--primary), var(--accent));
    border-image-slice: 1;
}

.sidebar-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    color: var(--text-light);
    text-transform: uppercase;
    padding: 10px 12px 4px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all .15s;
    cursor: pointer;
}

.sidebar-link i {
    width: 17px;
    text-align: center;
    font-size: 14px;
    color: var(--text-light);
    transition: color .15s;
    flex-shrink: 0;
}

.sidebar-link:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.sidebar-link:hover i {
    color: var(--text-muted);
}

.sidebar-link.active {
    background: color-mix(in srgb, var(--primary) 9%, white);
    color: var(--primary);
}

.sidebar-link.active i {
    color: var(--primary);
}

.sidebar-link .s-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ─── MAIN ────────────────────────────────────── */
.main {
    flex: 1;
    padding: 28px;
    overflow-x: hidden;
    min-width: 0;
}

/* ─── PAGE HEADER ─────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 21px;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -.3px;
}

.page-header p {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 3px;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ─── SETUP GRID ──────────────────────────────── */
.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.setup-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: all .2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.setup-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s;
}

.setup-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-md);
    transform: translateY(-2px);
}

.setup-card:hover::after {
    transform: scaleX(1);
}

.setup-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.setup-card-icon.blue {
    background: color-mix(in srgb, var(--primary) 10%, white);
    color: var(--primary);
}

.setup-card-icon.green {
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: var(--accent);
}

.setup-card-icon.amber {
    background: #fff7ed;
    color: #f59e0b;
}

.setup-card-icon.rose {
    background: #fff1f2;
    color: #f43f5e;
}

.setup-card-icon.violet {
    background: #f5f3ff;
    color: #7c3aed;
}

.setup-card-icon.sky {
    background: #f0f9ff;
    color: #0ea5e9;
}

.setup-card-body h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 3px;
}

.setup-card-body p {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.setup-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.setup-card-footer i {
    color: var(--primary);
    font-size: 13px;
}

/* ─── STATUS BADGE ────────────────────────────── */
.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}

.status-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .8;
    flex-shrink: 0;
}

.status-dot.done {
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: color-mix(in srgb, var(--accent) 80%, black);
}

.status-dot.pending {
    background: #fff7ed;
    color: #b45309;
}

.status-dot.empty {
    background: var(--bg-subtle);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ─── GRID 2 ──────────────────────────────────── */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    margin-bottom: 24px;
}

/* ─── CARD ────────────────────────────────────── */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow .2s;
}

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

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.card-head h2 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.card-body {
    padding: 20px;
}

/* ─── CHECKLIST ───────────────────────────────── */
.checklist {
    display: flex;
    flex-direction: column;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 20px;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    transition: background .12s;
    margin: 0 -20px;
}

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

.check-item:hover {
    background: var(--bg-hover);
}

.check-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
}

.check-icon.done {
    background: color-mix(in srgb, var(--accent) 12%, white);
    color: var(--accent);
}

.check-icon.pending {
    background: #fff7ed;
    color: #f59e0b;
}

.check-icon.empty {
    background: var(--bg-subtle);
    color: var(--text-light);
    border: 1px solid var(--border);
}

.check-label {
    font-size: 13.5px;
    color: var(--text-main);
    font-weight: 500;
    flex: 1;
}

.check-sub {
    font-size: 12px;
    color: var(--text-muted);
}

.check-arrow {
    color: var(--text-light);
    font-size: 11px;
    margin-left: auto;
    flex-shrink: 0;
}

/* ─── INFO CARD ───────────────────────────────── */
.info-row {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-item label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-light);
}

.info-item span {
    font-size: 13.5px;
    color: var(--text-main);
    font-weight: 500;
}

/* ─── PROGRESS ────────────────────────────────── */
.progress-bar {
    height: 6px;
    background: var(--border);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    border-radius: 99px;
    background: var(--primary);
    transition: width .7s ease;
}

.progress-fill.accent {
    background: var(--accent);
}

/* ─── QUICK ACTIONS ───────────────────────────── */
.quick-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    transition: all .18s;
    cursor: pointer;
    background: none;
    font-family: inherit;
    width: 100%;
    text-align: left;
}

.quick-item .qi-icon {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: all .18s;
}

.quick-item:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 4%, white);
}

.quick-item:hover .qi-icon {
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 10%, white);
}

.quick-arrow {
    margin-left: auto;
    color: var(--text-light);
    font-size: 11px;
    flex-shrink: 0;
}

/* ─── TOAST ───────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--secondary);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    transform: translateY(80px);
    opacity: 0;
    transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
    z-index: 200;
    pointer-events: none;
    max-width: calc(100vw - 48px);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ─── MOBILE OVERLAY ──────────────────────────── */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 90;
}

/* ─── ANIMATIONS ──────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.setup-grid>*:nth-child(1) {
    animation: fadeUp .35s ease .04s both;
}

.setup-grid>*:nth-child(2) {
    animation: fadeUp .35s ease .08s both;
}

.setup-grid>*:nth-child(3) {
    animation: fadeUp .35s ease .12s both;
}

.setup-grid>*:nth-child(4) {
    animation: fadeUp .35s ease .16s both;
}

.setup-grid>*:nth-child(5) {
    animation: fadeUp .35s ease .20s both;
}

.setup-grid>*:nth-child(6) {
    animation: fadeUp .35s ease .24s both;
}

.card {
    animation: fadeUp .35s ease .28s both;
}

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

/* Tablet grande → oculta nav topbar, muestra hamburger */
@media (max-width: 1024px) {
    .topbar-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 60px;
        left: 0;
        height: calc(100vh - 60px);
        z-index: 95;
        transform: translateX(-100%);
        box-shadow: var(--shadow-md);
    }

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

    .mobile-overlay.open {
        display: block;
    }
}

/* Tablet → grid 2 col pasa a 1 col */
@media (max-width: 960px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Tablet pequeña */
@media (max-width: 768px) {
    .main {
        padding: 20px 16px;
    }

    .setup-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .btn-primary,
    .page-header-actions .btn-ghost {
        flex: 1;
        justify-content: center;
    }

    .search-input {
        width: 140px;
    }

    .search-input:focus {
        width: 160px;
    }
}

/* Móvil */
@media (max-width: 520px) {
    .topbar {
        padding: 0 16px;
        gap: 8px;
    }

    .main {
        padding: 16px 12px;
    }

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

    .search-wrap {
        display: none;
    }

    /* search oculto en móvil muy pequeño */
    .toast {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}

/* ═══════════════════════════════════════════════
   CONFIG PAGE
═══════════════════════════════════════════════ */

/* Layout 2 columnas */
.config-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.config-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Card hint ──────────────────────────────── */
.card-hint {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 400;
}

/* ─── Fields ─────────────────────────────────── */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.required {
    color: #f43f5e;
}

.field-input {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 13px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-main);
    background: var(--bg);
    width: 100%;
    transition: all .18s;
    outline: none;
}

.field-input::placeholder {
    color: var(--text-light);
}

.field-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

.field-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.field-hint i {
    color: var(--primary);
}

/* ─── Logo upload ─────────────────────────────── */
.logo-upload-wrap {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.logo-preview-box {
    width: 100px;
    height: 100px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.logo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 12px;
}

.logo-placeholder i {
    font-size: 24px;
}

.logo-drop-zone {
    flex: 1;
    border: 2px dashed var(--border-md);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
}

.logo-drop-zone i {
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 2px;
}

.logo-drop-zone p {
    font-size: 13px;
    margin: 0;
    color: var(--text-main);
}

.logo-drop-zone span {
    font-size: 11.5px;
    color: var(--text-light);
}

.logo-drop-zone:hover,
.logo-drop-zone.drag-over {
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 4%, white);
}

.logo-drop-zone.drag-over i {
    transform: scale(1.15);
}

/* ─── Color grid ──────────────────────────────── */
.color-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.color-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.color-field:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.color-preview-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-shrink: 0;
    transition: background .2s;
}

.color-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.color-input-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker {
    -webkit-appearance: none;
    appearance: none;
    width: 40px;
    height: 36px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
    cursor: pointer;
    background: var(--bg);
    flex-shrink: 0;
    transition: border-color .18s;
}

.color-picker:hover {
    border-color: var(--primary);
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 5px;
}

.hex-input {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-main);
    background: var(--bg);
    width: 110px;
    transition: all .18s;
    outline: none;
}

.hex-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}


/* ─── Palette preview ─────────────────────────── */
.palette-preview {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.palette-label {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 10px;
}

.palette-swatches {
    display: flex;
    gap: 8px;
}

.ps {
    flex: 1;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    transition: background .2s;
}

/* ─── Actions ─────────────────────────────────── */
.config-actions {
    display: flex;
    justify-content: flex-end;
}

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

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

    .config-actions {
        justify-content: stretch;
    }

    .config-actions .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 520px) {
    .logo-upload-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .logo-preview-box {
        width: 100%;
        height: 120px;
    }

    .color-input-row {
        flex-wrap: wrap;
    }

    .hex-input {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════ */

/* ── BODY ── */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    background: var(--bg-subtle);
    position: relative;
    overflow: hidden;
}


/* ── WRAPPER ── */
.login-wrapper {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .10);
    overflow: hidden;
    animation: loginFadeUp .5s cubic-bezier(.34, 1.56, .64, 1) both;
}

@keyframes loginFadeUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* Franja de color arriba de la card */
.login-card-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.login-card-body {
    padding: 32px 32px 28px;
}

/* ── BOTÓN REGRESAR (dentro del card, arriba) ── */
.btn-back-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    padding: 10px;
    border-radius: 9px;
    border: 1px solid var(--border);
    margin-top: 10px;
    transition: all .18s;
    background: none;
}

.btn-back-bottom:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: color-mix(in srgb, var(--primary) 5%, white);
}

/* ── HEADER ── */
.login-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 28px;
    color: var(--primary);
    background: var(--bg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-header h2 {
    font-size: 21px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -.3px;
    margin-bottom: 4px;
}

.login-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── DIVIDER ── */
.login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-divider span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-light);
    white-space: nowrap;
}

/* ── FIELDS ── */
.login-field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.login-field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.login-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-field-wrap .f-icon {
    position: absolute;
    left: 13px;
    color: var(--text-light);
    font-size: 13px;
    pointer-events: none;
}

.login-field-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    padding: 11px 13px 11px 38px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-main);
    background: var(--bg-subtle);
    outline: none;
    transition: all .2s;
}

.login-field-input::placeholder {
    color: var(--text-light);
}

.login-field-input:focus {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

/* Ojo mostrar/ocultar contraseña */
.toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    padding: 4px;
    transition: color .15s;
    display: flex;
    align-items: center;
}

.toggle-pass:hover {
    color: var(--primary);
}

/* ── SUBMIT ── */
.btn-login {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    transition: all .2s;
    letter-spacing: .01em;
}

.btn-login:hover:not(:disabled) {
    background: color-mix(in srgb, var(--primary) 85%, black);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

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

/* ── FOOTER CARD ── */
.login-card-footer {
    padding: 14px 32px;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
    .login-card-body {
        padding: 24px 20px 20px;
    }

    .login-card-footer {
        padding: 12px 20px;
    }
}

/* ═══════════════════════════════════════════════
   INDEX / PORTAL INSTITUCIONAL
═══════════════════════════════════════════════ */

/* ── NAVBAR PORTAL ────────────────────────────── */
.navbar-portal {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 17px;
    color: var(--text-main);
    letter-spacing: -.2px;
    flex-shrink: 0;
}

.navbar-logo {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    flex-shrink: 0;
}

.navbar-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.navbar-tagline {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

.navbar-nav-portal {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-link-portal {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    transition: all .18s;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.nav-link-portal:hover {
    color: var(--text-main);
    background: var(--bg-subtle);
}

/* Dropdown portal */
.nav-dropdown-portal {
    position: relative;
}

.dropdown-toggle-portal {
    font-size: 13.5px;
    font-weight: 500;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, white);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: all .18s;
    white-space: nowrap;
    font-family: inherit;
}

.dropdown-toggle-portal:hover {
    background: color-mix(in srgb, var(--primary) 12%, white);
}

.dropdown-menu-portal {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: all .18s;
    z-index: 200;
}

.dropdown-menu-portal.open {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

.dropdown-label-portal {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--text-light);
    padding: 10px 14px 4px;
}

.dropdown-item-portal {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-main);
    text-decoration: none;
    transition: background .12s;
}

.dropdown-item-portal i {
    width: 16px;
    text-align: center;
    color: var(--primary);
    font-size: 14px;
}

.dropdown-item-portal:hover {
    background: var(--bg-subtle);
}

.dropdown-item-portal.muted {
    font-size: 13px;
    color: var(--text-muted);
}

.dropdown-item-portal.muted i {
    color: var(--text-muted);
}

.dropdown-divider-portal {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* Hamburger portal */
.hamburger-portal {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 6px;
}

.hamburger-portal span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: all .25s;
}

.mobile-nav-portal {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 12px 16px;
    flex-direction: column;
    gap: 4px;
    z-index: 99;
}

.mobile-nav-portal.open {
    display: flex;
}

.mobile-nav-portal .nav-link-portal {
    font-size: 14px;
    padding: 10px 12px;
}

/* ── HERO ─────────────────────────────────────── */
.hero {
    padding: 72px 24px 60px;
    text-align: center;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: color-mix(in srgb, var(--primary) 9%, white);
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, white);
    border-radius: 99px;
    padding: 5px 16px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.hero-logo {
    width: 90px;
    height: 90px;
    border-radius: 22px;
    border: 3px solid var(--border);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    font-size: 36px;
    color: var(--primary);
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -.5px;
    margin-bottom: 12px;
}

.hero-sub {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 32px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}

.btn-hero-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: all .2s;
}

.btn-hero-primary:hover {
    background: color-mix(in srgb, var(--primary) 85%, black);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 35%, transparent);
    color: #fff;
}

.btn-hero-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px 26px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: all .2s;
}

.btn-hero-outline:hover {
    background: color-mix(in srgb, var(--primary) 8%, white);
    transform: translateY(-2px);
    color: var(--primary);
}

/* Stats */
.hero-stats {
    display: flex;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 520px;
    margin: 0 auto;
    background: var(--bg);
    box-shadow: var(--shadow-sm);
}

.stat-item {
    flex: 1;
    padding: 18px 12px;
    text-align: center;
    border-right: 1px solid var(--border);
}

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

.stat-num {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -.5px;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* ── SECCIONES ────────────────────────────────── */
.section-portal {
    padding: 56px 24px;
}

.section-portal-alt {
    background: var(--bg-subtle);
}

.section-inner {
    max-width: 960px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -.3px;
    margin-bottom: 8px;
}

.section-header p {
    font-size: 15px;
    color: var(--text-muted);
}

/* Access cards */
.access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.access-card {
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: all .2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.access-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform .25s;
}

.access-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: var(--text-main);
}

.access-card:hover::after {
    transform: scaleX(1);
}

.access-icon {
    width: 52px;
    height: 52px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--primary) 10%, white);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: all .2s;
}

.access-card:hover .access-icon {
    background: var(--primary);
    color: #fff;
}

.access-title {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
}

.access-desc {
    font-size: 12.5px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Info cards */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.info-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}

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

.info-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-bottom: 14px;
}

.info-card-icon.blue {
    background: color-mix(in srgb, var(--primary) 10%, white);
    color: var(--primary);
}

.info-card-icon.green {
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: var(--accent);
}

.info-card-icon.amber {
    background: #fff7ed;
    color: #f59e0b;
}

.info-card-icon.violet {
    background: #f5f3ff;
    color: #7c3aed;
}

.info-card h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.info-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ── QUICK LINKS STRIP ────────────────────────── */
.quick-links-strip {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    padding: 28px 24px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.quick-link-portal {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .15s;
}

.quick-link-portal i {
    color: var(--primary);
    font-size: 14px;
}

.quick-link-portal:hover {
    color: var(--primary);
}

/* ── FOOTER PORTAL ────────────────────────────── */
.footer-portal {
    background: var(--secondary);
    color: rgba(255, 255, 255, .7);
    padding: 32px 24px;
}

.footer-inner {
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.footer-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, .15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #fff;
}

.footer-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color .15s;
}

.footer-links a:hover {
    color: #fff;
}

.footer-copy {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .4);
    width: 100%;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    margin-top: 8px;
}

/* ── RESPONSIVE PORTAL ────────────────────────── */
@media (max-width: 768px) {
    .navbar-nav-portal {
        display: none;
    }

    .hamburger-portal {
        display: flex;
    }

    .hero {
        padding: 48px 16px 40px;
    }

    .hero h1 {
        font-size: 28px;
    }

    .hero-sub {
        font-size: 15px;
    }

    .section-portal {
        padding: 40px 16px;
    }

    .hero-stats {
        max-width: 100%;
    }
}

@media (max-width: 520px) {
    .navbar-portal {
        padding: 0 16px;
    }

    .navbar-tagline {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-hero-primary,
    .btn-hero-outline {
        justify-content: center;
    }

    .stat-num {
        font-size: 18px;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-links-strip {
        gap: 16px;
        justify-content: flex-start;
    }
}
/* ===== AUTENTICADOR DESTACADO ===== */
.section-auth {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.auth-highlight {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 32px;
    align-items: center;
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 40px;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.auth-icon {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}

.auth-content h2 {
    font-size: 28px;
    margin-bottom: 10px;
}

.auth-content p {
    opacity: 0.9;
    margin-bottom: 20px;
}

.auth-benefits {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.auth-benefits li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-benefits i {
    color: var(--accent);
}

/* BOTONES */
.auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.btn-auth-primary {
    background: white;
    color: var(--primary);
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* TEXTO DE PRÓXIMAMENTE */
.auth-coming {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.85;
    font-size: 14px;
}

.auth-coming i {
    font-size: 18px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .auth-highlight {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .auth-icon {
        margin: 0 auto;
    }
}

.nav-auth-highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: black !important;
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: 0.3s;
}

.nav-auth-highlight:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
/* ═══════════════════════════════════════════════
   REGISTRO ASPIRANTE
═══════════════════════════════════════════════ */

/* ── BODY ── */
.registro-page {
    min-height: 100vh;
    background: var(--bg-subtle);
    padding: 32px 16px 48px;
    font-family: 'Segoe UI', sans-serif;
}

/* ── WRAPPER ── */
.registro-wrapper {
    max-width: 780px;
    margin: 0 auto;
}

/* ── CARD ── */
.registro-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .09);
    overflow: hidden;
    animation: loginFadeUp .45s ease both;
}

.registro-card-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

/* ── CARD HEADER ── */
.registro-card-header {
    padding: 24px 32px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--bg);
}

.registro-card-header h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -.2px;
}

.registro-card-header h3 i {
    color: var(--primary);
    font-size: 18px;
}

.badge-institucion {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: color-mix(in srgb, var(--primary) 9%, white);
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, white);
    border-radius: 99px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .01em;
}

/* ── CARD BODY ── */
.registro-card-body {
    padding: 28px 32px;
}

/* ── FLASH MESSAGES ── */
.flash-msg {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.flash-msg.success {
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: color-mix(in srgb, var(--accent) 80%, black);
    border-color: color-mix(in srgb, var(--accent) 25%, white);
}

.flash-msg.error {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.flash-msg i {
    margin-top: 1px;
    flex-shrink: 0;
}

.flash-msg .flash-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: inherit;
    opacity: .6;
    font-size: 13px;
    padding: 0;
    flex-shrink: 0;
}

.flash-msg .flash-close:hover {
    opacity: 1;
}

/* ── INFO ALERT ── */
.info-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    margin-bottom: 22px;
}

.info-alert i {
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── PROGRESS STEPS ── */
.progress-steps {
    display: flex;
    align-items: center;
    margin-bottom: 28px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.step-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-md);
    background: var(--bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: all .3s;
}

.step-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
    transition: color .3s;
}

.step.active .step-circle {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent);
}

.step.active .step-label {
    color: var(--primary);
}

.step.completed .step-circle {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.step.completed .step-label {
    color: var(--accent);
}

.step-connector {
    flex: 1;
    height: 2px;
    background: var(--border);
    margin: 0 10px;
    margin-bottom: 22px;
    transition: background .3s;
}

.step-connector.active {
    background: var(--accent);
}

/* ── STEP PANELS ── */
.step-panel {
    display: none;
}

.step-panel.active {
    display: block;
}

/* ── FORM FIELDS ── */
.reg-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 14px;
}

.reg-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.reg-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.reg-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.reg-input,
.reg-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 13px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-main);
    background: var(--bg-subtle);
    outline: none;
    transition: all .18s;
    width: 100%;
}

.reg-input::placeholder {
    color: var(--text-light);
}

.reg-input:focus,
.reg-select:focus {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

.reg-select {
    cursor: pointer;
    appearance: none;
}

.reg-hint {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.reg-hint i {
    color: var(--primary);
}

.reg-error {
    font-size: 12px;
    color: #f43f5e;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ── PHOTO SECTION ── */
.photo-section {
    border: 1.5px dashed var(--border-md);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    background: var(--bg-subtle);
}

.photo-section-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 14px;
}

.photo-section-label i {
    color: var(--primary);
}

.photo-options {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-upload {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--primary);
    background: color-mix(in srgb, var(--primary) 6%, white);
    color: var(--primary);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    font-family: inherit;
}

.btn-upload:hover {
    background: color-mix(in srgb, var(--primary) 12%, white);
}

.btn-camera-open {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-md);
    background: var(--bg);
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
    font-family: inherit;
}

.btn-camera-open:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 4%, white);
}

.or-divider {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* Cámara */
.camera-section {
    margin-top: 16px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--secondary);
    text-align: center;
    padding: 16px;
}

.camera-section video {
    width: 100%;
    max-width: 400px;
    border-radius: var(--radius-sm);
}

.camera-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-cam-action {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
}

.btn-cam-capture {
    background: var(--accent);
    color: #fff;
}

.btn-cam-capture:hover {
    background: color-mix(in srgb, var(--accent) 85%, black);
}

.btn-cam-close {
    background: #f43f5e;
    color: #fff;
}

.btn-cam-close:hover {
    background: color-mix(in srgb, #f43f5e 85%, black);
}

.btn-cam-retake {
    background: var(--primary);
    color: #fff;
}

.btn-cam-retake:hover {
    background: color-mix(in srgb, var(--primary) 85%, black);
}

/* Preview foto */
.photo-preview-small {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: color-mix(in srgb, var(--accent) 8%, white);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, white);
    border-radius: var(--radius-sm);
    margin-top: 14px;
}

.photo-preview-small img {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    object-fit: cover;
    border: 2px solid var(--border);
}

.photo-preview-small .preview-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.photo-preview-small .preview-info strong {
    font-size: 13px;
    color: var(--text-main);
    font-weight: 600;
}

.photo-preview-small .preview-info span {
    font-size: 12px;
    color: var(--text-muted);
}

.photo-preview-small i {
    color: var(--accent);
    font-size: 18px;
    flex-shrink: 0;
}

/* ── NAVIGATION BUTTONS ── */
.nav-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    gap: 12px;
}

.btn-nav-prev {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border-md);
    background: var(--bg);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
}

.btn-nav-prev:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-nav-next {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
}

.btn-nav-next:hover {
    background: color-mix(in srgb, var(--primary) 85%, black);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent);
}

.btn-submit-reg {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .18s;
}

.btn-submit-reg:hover {
    background: color-mix(in srgb, var(--accent) 85%, black);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 30%, transparent);
}

.btn-submit-reg:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ── DEBUG WARNING ── */
.debug-warn {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-size: 13px;
    color: #92400e;
    margin-top: 20px;
}

.debug-warn strong {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 6px;
}

.debug-warn ul {
    margin: 0;
    padding-left: 18px;
}

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
    .registro-card-body {
        padding: 20px 16px;
    }

    .registro-card-header {
        padding: 18px 16px;
    }

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

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

    .nav-buttons {
        flex-direction: column;
    }

    .btn-nav-prev,
    .btn-nav-next,
    .btn-submit-reg {
        width: 100%;
        justify-content: center;
    }

    .photo-options {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-upload,
    .btn-camera-open {
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════
    LOGIN ASPIRANTE
═══════════════════════════════════════════════ */

.login-aspirante-page {
    min-height: 100vh;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    font-family: 'Segoe UI', sans-serif;
}

.login-aspirante-wrapper {
    width: 100%;
    max-width: 420px;
    animation: loginFadeUp .45s ease both;
}

.login-aspirante-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .10);
    overflow: hidden;
}

.login-aspirante-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.login-aspirante-body {
    padding: 32px 32px 28px;
}

/* ── Logo ── */
.login-aspirante-logo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: var(--primary);
    background: var(--bg);
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.login-aspirante-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ── Header ── */
.login-aspirante-header {
    text-align: center;
    margin-bottom: 24px;
}

.login-aspirante-header h2 {
    font-size: 21px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -.3px;
    margin-bottom: 4px;
}

.login-aspirante-header p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ── Divider ── */
.login-aspirante-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
}

.login-aspirante-divider::before,
.login-aspirante-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.login-aspirante-divider span {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-light);
    white-space: nowrap;
}

/* ── Flash messages ── */
.login-aspirante-flash {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
    border: 1px solid transparent;
}

.login-aspirante-flash.error {
    background: #fff1f2;
    color: #be123c;
    border-color: #fecdd3;
}

.login-aspirante-flash.success {
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: color-mix(in srgb, var(--accent) 80%, black);
    border-color: color-mix(in srgb, var(--accent) 25%, white);
}

.login-aspirante-flash i {
    margin-top: 1px;
    flex-shrink: 0;
}

/* ── Fields ── */
.login-aspirante-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 14px;
}

.login-aspirante-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.login-aspirante-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-aspirante-wrap .f-icon {
    position: absolute;
    left: 13px;
    color: var(--text-light);
    font-size: 13px;
    pointer-events: none;
}

.login-aspirante-input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 9px;
    padding: 11px 13px 11px 38px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--text-main);
    background: var(--bg-subtle);
    outline: none;
    transition: all .2s;
}

.login-aspirante-input::placeholder {
    color: var(--text-light);
}

.login-aspirante-input:focus {
    border-color: var(--primary);
    background: var(--bg);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 10%, transparent);
}

/* Ojo contraseña */
.login-aspirante-eye {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 14px;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color .15s;
}

.login-aspirante-eye:hover {
    color: var(--primary);
}

/* ── Submit ── */
.login-aspirante-btn {
    width: 100%;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 16px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    transition: all .2s;
    letter-spacing: .01em;
}

.login-aspirante-btn:hover:not(:disabled) {
    background: color-mix(in srgb, var(--primary) 85%, black);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--primary) 35%, transparent);
}

.login-aspirante-btn:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}

/* ── Registro link ── */
.login-aspirante-register {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.login-aspirante-register a {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color .15s;
}

.login-aspirante-register a:hover {
    color: var(--primary);
}

/* ── Footer card ── */
.login-aspirante-footer {
    padding: 13px 32px;
    border-top: 1px solid var(--border);
    background: var(--bg-subtle);
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .login-aspirante-body {
        padding: 24px 20px 20px;
    }

    .login-aspirante-footer {
        padding: 12px 20px;
    }
}

/* ═══════════════════════════════════════════════
   PERFIL / DASHBOARD ASPIRANTE
═══════════════════════════════════════════════ */

.aspirante-page {
    min-height: 100vh;
    background: var(--bg-subtle);
    font-family: 'Segoe UI', sans-serif;
}

/* ── NAVBAR ASPIRANTE ─────────────────────────── */
.navbar-aspirante {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.navbar-aspirante-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    letter-spacing: -.2px;
    flex-shrink: 0;
}

.navbar-aspirante-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
    flex-shrink: 0;
}

.navbar-aspirante-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.navbar-aspirante-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.navbar-aspirante-user {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.navbar-aspirante-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
}

.navbar-aspirante-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all .18s;
    white-space: nowrap;
}

.btn-logout:hover {
    border-color: #f43f5e;
    color: #f43f5e;
    background: #fff1f2;
}

/* ── MAIN ─────────────────────────────────────── */
.aspirante-main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 28px 24px 48px;
}

/* ── HERO CARD (foto + nombre + folio) ────────── */
.aspirante-hero {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 20px;
    animation: loginFadeUp .4s ease both;
}

.aspirante-hero-bar {
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.aspirante-hero-body {
    padding: 32px 32px 28px;
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}


.aspirante-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid var(--border);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
}

.aspirante-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aspirante-hero-info {
    flex: 1;
    min-width: 0;
}

.aspirante-hero-info h2 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -.3px;
    margin-bottom: 10px;
}

.aspirante-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.aspirante-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 99px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.aspirante-badge i {
    color: var(--primary);
    font-size: 12px;
}

.folio-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: color-mix(in srgb, var(--primary) 9%, white);
    color: var(--primary);
    border: 1px solid color-mix(in srgb, var(--primary) 20%, white);
    border-radius: 99px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 700;
}

/* ── GRID 2 COLS ──────────────────────────────── */
.aspirante-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* ── CARD SECTION ─────────────────────────────── */
.aspirante-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow .2s;
    animation: loginFadeUp .4s ease both;
}

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

.aspirante-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.aspirante-card-head i {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: color-mix(in srgb, var(--primary) 10%, white);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.aspirante-card-head h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.aspirante-card-body {
    padding: 24px 26px;
}

.aspirante-card-head {
    padding: 18px 26px;
}

/* ── INFO ITEMS ───────────────────────────────── */
.asp-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.asp-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.asp-info-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 5px;
}

.asp-info-label i {
    color: var(--primary);
}

.asp-info-value {
    font-size: 13.5px;
    color: var(--text-main);
    font-weight: 500;
}

/* ── ACCIONES ─────────────────────────────────── */
.asp-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.asp-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 18px 12px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    text-decoration: none;
    color: var(--text-main);
    text-align: center;
    transition: all .2s;
    position: relative;
    overflow: hidden;
    background: var(--bg);
}

.asp-action-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform .25s;
}

.asp-action-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--text-main);
}

.asp-action-card:hover::after {
    transform: scaleX(1);
}

.asp-action-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: color-mix(in srgb, var(--primary) 10%, white);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    transition: all .2s;
}

.asp-action-card:hover .asp-action-icon {
    background: var(--primary);
    color: #fff;
}

.asp-action-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.asp-action-desc {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* ── FOOTER ───────────────────────────────────── */
.aspirante-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-light);
    padding-top: 24px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 720px) {
    .aspirante-grid {
        grid-template-columns: 1fr;
    }

    .asp-actions-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 520px) {
    .navbar-aspirante {
        padding: 0 16px;
    }

    .aspirante-main {
        padding: 16px 12px 40px;
    }

    .aspirante-hero-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .aspirante-photo {
        width: 72px;
        height: 72px;
    }

    .asp-actions-grid {
        grid-template-columns: 1fr;
    }

    .navbar-aspirante-user span {
        display: none;
    }
}

/* ═══════════════════════════════════════════════
   DOCUMENTOS ASPIRANTE
═══════════════════════════════════════════════ */

.documentos-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 32px 48px;
}

/* ── MINI PERFIL ──────────────────────────────── */
.profile-mini-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  animation: loginFadeUp .4s ease both;
}

.profile-mini-photo {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid var(--border);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-subtle);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  color: var(--text-light);
}
.profile-mini-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.profile-mini-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -.1px;
}

/* ── PROGRESS CARD ────────────────────────────── */
.docs-progress-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  animation: loginFadeUp .4s ease .05s both;
}

.docs-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.docs-progress-header h4 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
}

.docs-progress-count {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, white);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, white);
  padding: 3px 12px;
  border-radius: 99px;
}

/* ── DOCUMENTOS GRID (estado) ─────────────────── */
.documentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.documento-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all .2s;
  box-shadow: var(--shadow-sm);
}
.documento-card:hover { box-shadow: var(--shadow-md); }

.documento-card.completo {
  border-color: color-mix(in srgb, var(--accent) 30%, white);
  background: color-mix(in srgb, var(--accent) 3%, white);
}
.documento-card.pendiente {
  border-color: var(--border);
}

.documento-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.documento-icon {
  width: 38px; height: 38px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--primary) 10%, white);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.documento-card.completo .documento-icon {
  background: color-mix(in srgb, var(--accent) 12%, white);
  color: var(--accent);
}

.documento-title h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 5px;
}

/* Estado badges */
.estado-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 99px;
}
.estado-badge::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.estado-PENDIENTE { background: #fff7ed; color: #b45309; }
.estado-VERIFICADO { background: color-mix(in srgb,var(--accent) 12%,white); color: color-mix(in srgb,var(--accent) 80%,black); }
.estado-RECHAZADO { background: #fff1f2; color: #be123c; }
.estado-NO_SUBIDO  { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border); }

.documento-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.doc-info-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.doc-info-row .doc-info-label {
  color: var(--text-light);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  min-width: 60px;
}
.doc-info-row .doc-info-value {
  color: var(--text-main);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  color: var(--text-light);
}
.doc-empty i { font-size: 26px; opacity: .4; }
.doc-empty p { font-size: 12.5px; }

.comentario-rechazo {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 12px;
  color: #be123c;
  font-weight: 500;
}

/* Botones de acción documento */
.btn-doc-danger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid #fecdd3;
  background: #fff1f2;
  color: #be123c;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
}
.btn-doc-danger:hover {
  background: #f43f5e;
  border-color: #f43f5e;
  color: #fff;
}

.btn-doc-success {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb,var(--accent) 25%,white);
  background: color-mix(in srgb, var(--accent) 8%, white);
  color: color-mix(in srgb, var(--accent) 80%, black);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  opacity: .85;
}

/* ── UPLOAD SECTION ───────────────────────────── */
.upload-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  animation: loginFadeUp .4s ease .1s both;
}

.upload-section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 26px;
  border-bottom: 1px solid var(--border);
}
.upload-section-head .us-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 10%, white);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.upload-section-head h3 {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.upload-section-head p {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* Filas de upload */
.documento-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 26px;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.documento-upload-row:last-of-type { border-bottom: none; }
.documento-upload-row:hover { background: var(--bg-subtle); }

.doc-upload-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--primary) 10%, white);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.doc-upload-info { flex: 1; min-width: 0; }
.doc-upload-info h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}
.doc-upload-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.doc-upload-input { flex-shrink: 0; }

.btn-file-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-md);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-file-label:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 5%, white);
}
.btn-file-label.has-file {
  border-color: var(--accent);
  color: color-mix(in srgb, var(--accent) 80%, black);
  background: color-mix(in srgb, var(--accent) 8%, white);
}

.doc-file-name {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-upload-estado { flex-shrink: 0; }

.estado-subido {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: color-mix(in srgb, var(--accent) 80%, black);
  background: color-mix(in srgb, var(--accent) 10%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, white);
  padding: 4px 10px;
  border-radius: 99px;
}

.estado-pendiente {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 99px;
}

/* Upload actions */
.upload-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  flex-wrap: wrap;
}

/* ── FLASH MESSAGES ───────────────────────────── */
.docs-flash {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 16px;
  border: 1px solid transparent;
  animation: loginFadeUp .3s ease both;
}
.docs-flash.success {
  background: color-mix(in srgb, var(--accent) 10%, white);
  color: color-mix(in srgb, var(--accent) 80%, black);
  border-color: color-mix(in srgb, var(--accent) 25%, white);
}
.docs-flash.error {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

/* ── RESPONSIVE ───────────────────────────────── */
@media (max-width: 860px) {
  .documentos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .documentos-main { padding: 16px 12px 40px; }
  .documentos-grid { grid-template-columns: 1fr; }
  .documento-upload-row {
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 16px;
  }
  .doc-upload-estado { order: -1; margin-left: auto; }
  .upload-actions { flex-direction: column; }
  .upload-actions .btn-ghost,
  .upload-actions .btn-primary { width: 100%; justify-content: center; }
  .upload-section-head { padding: 16px 16px; }
  .upload-actions { padding: 14px 16px; }
}
/* ═══════════════════════════════════════════════
   PREVIEW PANEL DOCUMENTOS
═══════════════════════════════════════════════ */

/* Layout con panel lateral */
.documentos-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

/* Panel preview lateral */
.preview-panel {
  position: sticky;
  top: 80px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all .3s ease;
  animation: loginFadeUp .35s ease both;
}

.preview-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}
.preview-panel-head h4 {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}
.preview-panel-head h4 i { color: var(--primary); }

.preview-panel-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 14px;
  padding: 4px;
  border-radius: 6px;
  transition: all .15s;
  display: flex;
  align-items: center;
}
.preview-panel-close:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.preview-panel-body { padding: 18px; }

/* Empty state */
.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 32px 16px;
  text-align: center;
  color: var(--text-light);
}
.preview-empty i { font-size: 36px; opacity: .35; }
.preview-empty p { font-size: 13px; line-height: 1.5; }

/* Preview contenido */
.preview-content { display: none; }
.preview-content.active { display: block; }

.preview-doc-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
  word-break: break-all;
}
.preview-doc-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.preview-doc-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Preview imagen */
.preview-img-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}
.preview-img-wrap img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}

/* Preview PDF icon */
.preview-pdf-wrap {
  border-radius: var(--radius-sm);
  border: 1px solid #fecdd3;
  background: #fff1f2;
  padding: 32px 16px;
  text-align: center;
  margin-bottom: 14px;
}
.preview-pdf-wrap i {
  font-size: 48px;
  color: #f43f5e;
  margin-bottom: 8px;
  display: block;
}
.preview-pdf-wrap p {
  font-size: 12.5px;
  color: #be123c;
  font-weight: 600;
}

.preview-tipo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: color-mix(in srgb, var(--primary) 9%, white);
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, white);
  margin-bottom: 14px;
}

.preview-clear-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
  margin-top: 4px;
}
.preview-clear-btn:hover {
  border-color: #f43f5e;
  color: #f43f5e;
  background: #fff1f2;
}

/* ── UPLOAD PROGRESS ──────────────────────────── */
.upload-progress-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  align-items: center;
  justify-content: center;
}
.upload-progress-overlay.active {
  display: flex;
}

.upload-progress-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: 0 16px 48px rgba(0,0,0,.18);
  width: 100%;
  max-width: 380px;
  text-align: center;
  animation: loginFadeUp .35s ease both;
}

.upload-progress-card i {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}

.upload-progress-card h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
  letter-spacing: -.2px;
}

.upload-progress-card p {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.upload-progress-bar-wrap {
  background: var(--border);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 10px;
}

.upload-progress-bar-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width .4s ease;
}

.upload-progress-pct {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -.5px;
}

.upload-files-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.upload-file-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 7px;
  background: var(--bg-subtle);
}
.upload-file-item i { color: var(--primary); flex-shrink: 0; }
.upload-file-item.done { color: var(--text-main); }
.upload-file-item.done i { color: var(--accent); }

/* ── RESPONSIVE LAYOUT ────────────────────────── */
@media (max-width: 1024px) {
  .documentos-layout {
    grid-template-columns: 1fr;
  }
  .preview-panel {
    position: static;
    order: -1;
  }
}


/* ═══════════════════════════════════════════════
   LAYOUT SERVICIOS ESCOLARES
═══════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════
   FUNCIONALIDADES ADICIONALES DEL LAYOUT
═══════════════════════════════════════════════ */

/* ─── AJUSTES PARA EL TOAST ───────────────────── */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--secondary);
    color: #fff;
    padding: 12px 18px;
    border-radius: var(--radius);
    font-size: 13.5px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    transform: translateY(80px);
    opacity: 0;
    transition: all .35s cubic-bezier(.34, 1.56, .64, 1);
    z-index: 200;
    pointer-events: none;
    max-width: calc(100vw - 48px);
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* ─── BOTÓN SALIR (oculto por defecto) ────────── */
#btn-salir {
    display: none;
}

@media (min-width: 769px) {
    #btn-salir {
        display: inline-flex;
    }
}

/* ─── SIDEBAR SCROLL MEJORADO ─────────────────── */
.sidebar {
    scrollbar-width: thin;
}

/* ─── TRANSICIONES SUAVES PARA SIDEBAR ────────── */
.sidebar {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── BADGE EN SIDEBAR (s-badge ya existe, pero aseguramos) ─── */
.s-badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}

/* ─── AVATAR CON IMAGEN ───────────────────────── */
.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ─── DROPDOWN MEJORAS ────────────────────────── */
.dropdown-menu {
    z-index: 150;
}

/* ─── RESPONSIVE: OCULTAR BOTÓN SALIR EN MÓVIL ── */
@media (max-width: 768px) {
    #btn-salir {
        display: none;
    }

    .topbar-right .btn-primary {
        display: none;
    }
}

/* ─── ANIMACIÓN DE CARGA PARA PÁGINAS ─────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main>* {
    animation: fadeInUp 0.4s ease both;
}

.main>*:nth-child(1) {
    animation-delay: 0.05s;
}

.main>*:nth-child(2) {
    animation-delay: 0.10s;
}

.main>*:nth-child(3) {
    animation-delay: 0.15s;
}

.main>*:nth-child(4) {
    animation-delay: 0.20s;
}

/* ─── MEJORAS EN EL BREADCRUMB ────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 10px;
    color: var(--text-light);
}

/* ─── ESTADOS DE CARGA ────────────────────────── */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.btn-primary:disabled,
.btn-ghost:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ─── TOOLTIPS ────────────────────────────────── */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: var(--secondary);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s;
    z-index: 100;
}

[data-tooltip]:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

/* ─── MEJORAS EN TABLAS RESPONSIVE ────────────── */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ─── FOCUS VISIBLE PARA ACCESIBILIDAD ────────── */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ─── TRANSICIONES PARA HOVER EN CARDS ────────── */
.card,
.setup-card,
.menu-card {
    will-change: transform, box-shadow;
}

/* ─── SCROLLBEHAVIOR SUAVE ────────────────────── */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── SELECTOR DE ARCHIVO MEJORADO ────────────── */
input[type="file"] {
    font-size: 13px;
}

input[type="file"]::file-selector-button {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-subtle);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    margin-right: 10px;
}

input[type="file"]::file-selector-button:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: color-mix(in srgb, var(--primary) 5%, white);
}

/* ─── CHECKBOX Y RADIO MEJORADOS ──────────────── */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ─── SELECT PERSONALIZADO (alternativa) ──────── */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
}

/* ─── MODAL/DRAWER PARA MÓVIL ─────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg);
    border-radius: var(--radius-lg);
    max-width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

/* ─── UTILIDADES ADICIONALES ──────────────────── */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.d-flex {
    display: flex;
}

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

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.mt-1 {
    margin-top: 4px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mb-1 {
    margin-bottom: 4px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

/* ═══════════════════════════════════════════════
   ESTILOS ESPECÍFICOS PARA DASHBOARD SERVICIOS ESCOLARES
═══════════════════════════════════════════════ */

/* ─── STATS CARDS ─────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-md);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-icon.blue {
    background: color-mix(in srgb, var(--primary) 10%, white);
    color: var(--primary);
}

.stat-icon.green {
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: var(--accent);
}

.stat-icon.orange {
    background: #fff7ed;
    color: #f59e0b;
}

.stat-icon.purple {
    background: #f5f3ff;
    color: #7c3aed;
}

/* ─── SECTIONS ───────────────────────────────── */
.section {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-sm);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main);
}

.section-header i {
    color: var(--primary);
    margin-right: 8px;
}

/* ─── MENU GRID (accesos rápidos) ─────────────── */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.menu-card {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.menu-card:hover {
    border-color: var(--primary);
    transform: translateX(4px);
    background: var(--bg);
    box-shadow: var(--shadow-sm);
}

.menu-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--primary) 10%, white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 18px;
    flex-shrink: 0;
}

.menu-card-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 2px;
}

.menu-card-content p {
    font-size: 11px;
    color: var(--text-muted);
}

.admin-badge {
    background: var(--primary);
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    color: white;
    display: inline-block;
    margin-top: 4px;
}

/* ─── TABLAS ──────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    font-weight: 600;
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-subtle);
}

.data-table td {
    font-size: 13px;
    color: var(--text-main);
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

/* ─── STATUS BADGES ───────────────────────────── */
.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status.active {
    background: color-mix(in srgb, var(--accent) 10%, white);
    color: color-mix(in srgb, var(--accent) 80%, black);
}

.status.pending {
    background: #fff7ed;
    color: #b45309;
}

/* ─── BREADCRUMB ──────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 10px;
}

/* ─── RESPONSIVE ───────────────────────────────── */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .section {
        padding: 16px;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-header-actions .btn-primary,
    .page-header-actions .btn-ghost {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ─── UTILIDADES ───────────────────────────────── */
.text-muted {
    color: var(--text-muted);
}

.progress-fill.accent {
    background: var(--accent);
}

/*/* ═══════════════════════════════════════════════
   seleccionar periodo

   /* Grupo de buscador y selector */
.search-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Selector de período */
.period-selector-wrap {
    position: relative;
}

.period-selector-wrap i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1;
}

.period-selector {
    padding: 8px 12px 8px 36px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    font-size: 0.875rem;
    background: #f8fafc;
    color: #334155;
    cursor: pointer;
    transition: 0.2s;
    font-family: 'Inter', sans-serif;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 32px;
}

.period-selector:hover {
    border-color: var(--primary);
    background: white;
}

.period-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

/* ===== ESTILOS MEJORADOS PARA CONTACTO ===== */
.footer-contact-section {
    width: 100%;
    margin: 16px 0;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-contact-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-contact-title i {
    color: var(--accent);
    font-size: 16px;
}

.footer-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.footer-contact-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(4px);
}

.footer-contact-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-contact-icon i {
    font-size: 16px;
    color: var(--accent);
}

.footer-contact-text {
    flex: 1;
}

.footer-contact-text strong {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.footer-contact-text span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* Redes sociales */
.footer-social {
    display: flex;
    gap: 12px;
    margin: 16px 0;
    padding: 12px 0;
    width: 100%;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-social-link {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.footer-social-link:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-3px);
}

/* Responsive contacto */
@media (max-width: 768px) {
    .footer-contact-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-contact-item {
        padding: 10px 12px;
    }
    
    .footer-social {
        gap: 8px;
    }
    
    .footer-social-link {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .footer-contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-contact-text strong {
        font-size: 11px;
    }
    
    .footer-contact-text span {
        font-size: 12px;
    }
}

/* ===== MEJORA DEL DROPDOWN ===== */
.dropdown-menu-portal {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 200;
}

.dropdown-menu-portal.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-toggle-portal .fa-chevron-down {
    transition: transform 0.2s ease;
}

.dropdown-toggle-portal[aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
}