/* ============================================================
   MAIN ESTUDIANTES — Estilos modernos
   Fuentes heredadas del master (Outfit + Plus Jakarta Sans)
   DEGT - UNAH | v2.0
   Extraído de: Estudiantes/MainEstudiantes.aspx
   ============================================================ */

/* ── Contenedor general ───────────────────────────────────── */
.main-estudiantes {
    font-family: var(--font-body);
    background: var(--gray-50);
    min-height: 100vh;
    padding: 24px;
    margin: -1.5rem;
}

/* ══════════════════════════════════════════════════════════
   HERO SECTION
══════════════════════════════════════════════════════════ */
.hero-section {
    background: var(--unah-blue-dark);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 32px;
    align-items: center;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    right: -60px; top: -60px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: rgba(255,255,255,.04);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    right: 80px; bottom: -80px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(245,166,35,.06);
    pointer-events: none;
}

/* ── Carnet (columna izquierda) ───────────────────────────── */
.hero-carnet {
    position: relative;
    flex-shrink: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Tarjeta amarilla con imagen oficial de fondo */
.carnet-card {
    width: 280px;
    height: 170px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,.35);
    position: relative;
    background: #FFC107;
}

.carnet-card::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -80%;
    width: 45%;
    height: 220%;
    background: linear-gradient(
        to right,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.30) 50%,
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-18deg);
    z-index: 10;
    pointer-events: none;
    animation: carnet-shine 4s ease-in-out infinite;
}

@keyframes carnet-shine {
    0%   { left: -80%; }
    100% { left: 130%; }
}

.carnet-bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: fill;
    z-index: 0;
}

.carnet-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    padding: 12px 14px;
}

/* Foto del estudiante (esquina superior derecha) */
.carnet-photo-wrap {
    position: absolute;
    top: 10px; right: 12px;
    width: 68px; height: 84px;
    background: white;
    padding: 2px;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

.carnet-photo-wrap img,
.carnet-photo-wrap .carnet-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

/* Datos del carnet */
.carnet-datos {
    position: absolute;
    bottom: 10px;
    left: 14px;
    right: 94px;
}

.carnet-dato { margin-bottom: 4px; }

.carnet-dato-label {
    font-size: 7px;
    font-weight: 700;
    color: rgba(0,40,100,.55);
    text-transform: uppercase;
    letter-spacing: .5px;
    line-height: 1;
}

.carnet-dato-value {
    font-family: var(--font-display);
    font-weight: 700;
    color: #1a1200;
    line-height: 1.1;
}

.carnet-dato-value.cuenta  { font-size: 14px; letter-spacing: .4px; }
.carnet-dato-value.nombre  { font-size: 11px; text-transform: uppercase; }
.carnet-dato-value.identidad { font-size: 10px; }

/* ── Info derecha ─────────────────────────────────────────── */
.hero-info {
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1;
    min-width: 0;
}

.hero-greeting {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,.5);
    text-transform: uppercase;
    letter-spacing: .7px;
}

.hero-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -.3px;
    line-height: 1.15;
    margin: 0;
}

/* Tags de info */
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: var(--radius-pill);
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    transition: background var(--transition);
}

.hero-tag:hover {
    background: rgba(255,255,255,.18);
    color: #fff;
    text-decoration: none;
}

.hero-tag svg {
    flex-shrink: 0;
    opacity: .7;
}

.hero-tag.hero-tag--link {
    background: rgba(245,166,35,.15);
    border-color: rgba(245,166,35,.35);
    color: #F5A623;
}

.hero-tag.hero-tag--link:hover {
    background: rgba(245,166,35,.25);
    color: #F5A623;
}

/* Métricas */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-box {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    text-align: center;
}

.stat-val {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--unah-gold);
    line-height: 1;
    display: block;
}

.stat-lbl {
    font-size: 9px;
    font-weight: 500;
    color: rgba(255,255,255,.5);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: .4px;
    display: block;
}

/* ══════════════════════════════════════════════════════════
   ALERTAS
══════════════════════════════════════════════════════════ */
.alert-expediente-modern {
    background: linear-gradient(135deg, #005580, #006699);
    color: white;
    padding: 18px 24px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.alert-expediente-modern .alert-icon {
    width: 40px; height: 40px;
    background: rgba(255,255,255,.15);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}

.alert-expediente-modern .alert-body { flex: 1; }
.alert-expediente-modern .alert-body p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; }
.alert-expediente-modern .alert-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--unah-gold);
    color: var(--unah-gold-dark);
    font-weight: 700;
    font-size: 13px;
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: opacity var(--transition);
}
.alert-expediente-modern .alert-btn:hover { opacity: .85; text-decoration: none; color: var(--unah-gold-dark); }

.alert-induccion-modern {
    background: linear-gradient(135deg, #1565c0, #2196f3);
    color: white;
    padding: 14px 20px;
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.6;
}

.alert-induccion-modern a { color: #ffe082; font-weight: 600; }
.alert-induccion-modern a:hover { color: #fff; }


/* ══════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
══════════════════════════════════════════════════════════ */
#toast-container {
    position: fixed; top: 20px; right: 20px;
    z-index: 99999;
    display: flex; flex-direction: column; gap: 10px;
    max-width: 380px; pointer-events: none;
}

.toast-notification {
    background: white; border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.1);
    display: flex; align-items: flex-start; gap: 12px;
    pointer-events: all;
    animation: toast-in .4s cubic-bezier(.175,.885,.32,1.275) forwards;
    border-left: 4px solid #ef4444;
    min-width: 300px; position: relative; overflow: hidden;
}

.toast-notification.toast-success { border-left-color: #10b981; }
.toast-notification.toast-warning { border-left-color: #f59e0b; }
.toast-notification.toast-info    { border-left-color: #3b82f6; }
.toast-notification.toast-error   { border-left-color: #ef4444; }
.toast-notification.toast-hiding  { animation: toast-out .35s ease-in forwards; }

.toast-icon { 
    width: 36px; height: 36px; 
    border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    flex-shrink: 0; 
}

.toast-error   .toast-icon { background: #fee2e2; color: #ef4444; }
.toast-success .toast-icon { background: #d1fae5; color: #10b981; }
.toast-warning .toast-icon { background: #fef3c7; color: #f59e0b; }
.toast-info    .toast-icon { background: #dbeafe; color: #3b82f6; }

.toast-icon svg { 
    width: 20px; height: 20px; 
    stroke: currentColor; fill: none; stroke-width: 2.5; 
}

.toast-body { flex: 1; }
.toast-title   { font-size: 14px; font-weight: 700; color: #111827; margin: 0 0 3px; line-height: 1.3; }
.toast-message { font-size: 13px; color: #6b7280; margin: 0; line-height: 1.5; }

.toast-close { 
    background: none; border: none; cursor: pointer; 
    color: #9ca3af; padding: 2px; 
    display: flex; align-items: center; justify-content: center; 
    border-radius: 4px; flex-shrink: 0; 
    transition: all .2s ease; 
}

.toast-close:hover { color: #374151; background: #f3f4f6; }
.toast-close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

.toast-progress { 
    position: absolute; bottom: 0; left: 0; 
    height: 3px; background: currentColor; opacity: .3; 
    animation: toast-progress 5s linear forwards; 
}

.toast-error   .toast-progress { color: #ef4444; }
.toast-success .toast-progress { color: #10b981; }
.toast-warning .toast-progress { color: #f59e0b; }
.toast-info    .toast-progress { color: #3b82f6; }

@keyframes toast-in   { from { opacity:0; transform: translateX(100%) scale(.9); } to { opacity:1; transform:translateX(0) scale(1); } }
@keyframes toast-out  { from { opacity:1; transform:translateX(0) scale(1); max-height:200px; margin-bottom:0; } to { opacity:0; transform:translateX(60px) scale(.95); max-height:0; margin-bottom:-10px; } }
@keyframes toast-progress { from { width:100%; } to { width:0%; } }

/* ══════════════════════════════════════════════════════════
   MODALES — Diseño moderno y juvenil
══════════════════════════════════════════════════════════ */

/* Backdrop genérico para todos los ModalPopupExtender con BackgroundCssClass="modal-bg" */
.modal-bg {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9998 !important;
}

.modal-carreras-backdrop {
    position: fixed !important; 
    top: 0 !important; 
    left: 0 !important; 
    right: 0 !important; 
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.75) !important; 
    backdrop-filter: blur(8px);
    z-index: 9999 !important; 
    align-items: center !important; 
    justify-content: center !important; 
    padding: 20px !important;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-carreras-panel { 
    background: transparent !important; 
    border: none !important; 
}

.modal-carreras-container { 
    background: white; 
    border-radius: 16px; 
    width: 100%; 
    max-width: 480px; 
    max-height: 85vh; 
    display: flex; 
    flex-direction: column; 
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalSlideUp {
    from { 
        opacity: 0; 
        transform: translateY(20px) scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.modal-carreras-header { 
    padding: 20px 24px; 
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%); 
    color: white; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid #3b82f6;
}

/* Decoración de fondo */
.modal-carreras-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

.modal-carreras-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.modal-header-content { 
    display: flex; 
    gap: 16px; 
    align-items: center; 
    flex: 1;
    position: relative;
    z-index: 1;
}

.modal-icon { 
    width: 40px; 
    height: 40px; 
    background: rgba(255, 255, 255, 0.15); 
    border-radius: 10px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    flex-shrink: 0;
    backdrop-filter: blur(10px);
}

.modal-icon svg { 
    width: 22px; 
    height: 22px; 
    stroke: white; 
}

.modal-header-text { 
    flex: 1; 
}

.modal-title { 
    font-size: 18px; 
    font-weight: 700; 
    margin: 0 0 2px; 
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.modal-subtitle { 
    font-size: 13px; 
    margin: 0; 
    opacity: 0.85;
    font-weight: 400;
}

.modal-close-btn { 
    width: 32px; 
    height: 32px; 
    border-radius: 8px; 
    background: rgba(255, 255, 255, 0.1); 
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: pointer; 
    transition: all 0.2s ease; 
    text-decoration: none;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.modal-close-btn:hover { 
    background: rgba(255, 255, 255, 0.2); 
    transform: rotate(90deg);
    border-color: rgba(255, 255, 255, 0.25);
}

.modal-close-btn svg { 
    width: 16px; 
    height: 16px; 
    stroke: white; 
}

.modal-carreras-body { 
    padding: 20px 24px 24px 24px; 
    overflow-y: auto; 
    max-height: calc(85vh - 100px);
    background: #f8fafc;
}

/* Scrollbar personalizado */
.modal-carreras-body::-webkit-scrollbar {
    width: 8px;
}

.modal-carreras-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.modal-carreras-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-carreras-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.carreras-grid-view { 
    width: 100%; 
    display: grid !important; 
    grid-template-columns: 1fr; 
    gap: 8px;
}

.carreras-grid-view tbody, 
.carreras-grid-view tr { 
    display: contents; 
}

.carrera-card-wrapper { 
    display: block; 
}

.carrera-card { 
    background: white; 
    border: 1.5px solid #e2e8f0; 
    border-radius: 12px; 
    padding: 16px 20px; 
    cursor: pointer; 
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); 
    position: relative; 
    display: flex; 
    flex-direction: row; 
    gap: 14px; 
    text-decoration: none; 
    color: inherit; 
    height: 100%; 
    align-items: center;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.carrera-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #3b82f6 0%, #1e40af 100%);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.carrera-card:hover::before {
    transform: scaleY(1);
}

.carrera-card:hover { 
    border-color: #3b82f6; 
    transform: translateX(6px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    text-decoration: none;
    background: #fefefe;
}

.carrera-card-icon { 
    width: 44px; 
    height: 44px; 
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%); 
    border-radius: 12px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    transition: all 0.3s ease;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.2);
}

.carrera-card:hover .carrera-card-icon { 
    transform: scale(1.08) rotate(-8deg);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.35);
}

.carrera-card-icon svg { 
    width: 22px; 
    height: 22px; 
    stroke: white;
    stroke-width: 2.5;
}

.carrera-card-content { 
    flex: 1;
    min-width: 0;
}

.carrera-nombre { 
    font-size: 14px; 
    font-weight: 700; 
    color: #0f172a; 
    margin: 0; 
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.carrera-centro { 
    font-size: 12px; 
    color: #64748b; 
    margin: 0;
    font-weight: var(--font-semibold, 600);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.carrera-arrow { 
    width: 36px; 
    height: 36px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    opacity: 0; 
    transform: translateX(-10px); 
    transition: all 0.25s ease;
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-radius: 10px;
    flex-shrink: 0;
    border: 1px solid #bfdbfe;
}

.carrera-card:hover .carrera-arrow { 
    opacity: 1; 
    transform: translateX(0); 
}

.carrera-arrow svg { 
    width: 20px; 
    height: 20px; 
    stroke: #3b82f6;
    stroke-width: 3;
}

.empty-state { 
    text-align: center; 
    padding: 60px 20px; 
    color: #9ca3af; 
}

.empty-state svg { 
    width: 64px; 
    height: 64px; 
    margin: 0 auto 16px; 
    stroke: #d1d5db; 
}

.empty-state p { 
    font-size: var(--font-md, 16px); 
    margin: 0; 
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .hero-carnet { display: flex; justify-content: center; }
    .carnet-card { width: 100%; max-width: 320px; height: 195px; }
    .wallet-banner { max-width: 320px; }
    .hero-stats { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 768px) {
    .main-estudiantes {
        padding: 14px;
        margin: -1rem;
    }
    .hero-section { padding: 20px 16px; }
    .cards-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 10px; }
    .modal-carreras-container { 
        max-height: 95vh; 
        border-radius: 16px 16px 0 0;
        max-width: 100%;
    }
    .modal-carreras-header { 
        padding: 16px 18px; 
    }
    .modal-icon {
        width: 36px;
        height: 36px;
    }
    .modal-icon svg {
        width: 20px;
        height: 20px;
    }
    .modal-title {
        font-size: 16px;
    }
    .modal-subtitle {
        font-size: var(--font-sm, 13px);
    }
    .modal-carreras-body { 
        padding: 20px 16px 24px 16px; 
        max-height: calc(95vh - 120px); 
    }
    .carreras-grid-view { 
        grid-template-columns: 1fr; 
        gap: 10px;
    }
    .carrera-card {
        padding: 16px 18px;
    }
    .carrera-card-icon {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .hero-stats { grid-template-columns: 1fr 1fr; }
    .cards-grid { grid-template-columns: 1fr 1fr; }
    #toast-container { top:10px; right:10px; left:10px; max-width:100%; }
    .toast-notification { min-width: unset; }
    .modal-carreras-header {
        padding: 14px 16px;
    }
    .modal-header-content {
        gap: 10px;
    }
    .modal-icon {
        width: 34px;
        height: 34px;
    }
    .modal-icon svg {
        width: 18px;
        height: 18px;
    }
    .modal-title {
        font-size: 15px;
    }
    .modal-carreras-body {
        padding: 14px 12px 18px 12px;
    }
    .carrera-card {
        padding: 12px 14px;
        gap: 10px;
    }
    .carrera-card-icon {
        width: 38px;
        height: 38px;
    }
    .carrera-card-icon svg {
        width: 22px;
        height: 22px;
    }
    .carrera-nombre {
        font-size: var(--font-sm, 13px);
    }
}

/* ══════════════════════════════════════════════════════════
   MODAL CARNET EXPANDIDO
══════════════════════════════════════════════════════════ */

.carnet-expand-hint {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 2;
}

    .carnet-expand-hint svg {
        stroke: white;
    }

.carnet-card:hover .carnet-expand-hint {
    opacity: 1;
}

.carnet-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .carnet-card:hover {
        transform: scale(1.02);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    }

/* ── Backdrop ─────────────────────────────────────────────── */
.modal-carnet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .modal-carnet-backdrop.activo {
        opacity: 1;
        visibility: visible;
    }

/* ── Contenedor animado ───────────────────────────────────── */
.modal-carnet-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
    max-width: 540px;
}

.modal-carnet-backdrop.activo .modal-carnet-container {
    transform: scale(1) translateY(0);
}

/* ── Botón cerrar ─────────────────────────────────────────── */
.modal-carnet-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

    .modal-carnet-close:hover {
        background: rgba(255, 255, 255, 0.22);
        transform: rotate(90deg);
    }

    .modal-carnet-close svg {
        width: 22px;
        height: 22px;
        stroke: white;
    }

/* ── Carnet expandido — DESKTOP (≥ 601px) ─────────────────── */
.carnet-expandido {
    width: 520px;
    height: 316px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    position: relative;
    background: #FFC107;
    flex-shrink: 0;
}

.carnet-exp-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
    z-index: 0;
}

.carnet-exp-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    padding: 24px 28px;
}

.carnet-exp-photo {
    position: absolute;
    top: 20px;
    right: 24px;
    width: 126px;
    height: 156px;
    background: white;
    padding: 4px;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.carnet-exp-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.carnet-exp-datos {
    position: absolute;
    bottom: 20px;
    left: 28px;
    right: 170px;
}

.carnet-exp-dato {
    margin-bottom: 10px;
}

.carnet-exp-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: rgba(0, 40, 100, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1;
    margin-bottom: 2px;
}

.carnet-exp-value {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    color: #1a1200;
    line-height: 1.2;
}

    .carnet-exp-value.cuenta {
        font-size: 26px;
        letter-spacing: 0.5px;
    }

    .carnet-exp-value.nombre {
        font-size: 20px;
        text-transform: uppercase;
    }

    .carnet-exp-value.identidad {
        font-size: 18px;
    }

/* ── Hint footer ──────────────────────────────────────────── */
.modal-carnet-hint {
    color: rgba(255, 255, 255, 0.45);
    font-size: 13px;
    margin: 0;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════
   CARNET MÓVIL — mantiene el diseño de tarjeta física
   Redimensionado con valores reales proporcionales al
   ratio original 520×316 (≈ 1.645:1)
══════════════════════════════════════════════════════════ */
@media (max-width: 600px) {

    /* Deshabilitar expansión del carnet en móvil */
    .carnet-card {
        cursor: default !important;
    }

    .carnet-card:hover {
        transform: none !important;
        box-shadow: 0 8px 32px rgba(0,0,0,.35) !important;
    }

    .carnet-expand-hint {
        display: none !important;
    }

    .modal-carnet-backdrop {
        padding: 16px;
        align-items: center;
    }
    .modal-carnet-container {
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        gap: 12px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* El wrapper ocupa todo el ancho disponible */
    .carnet-expandido-scaler {
        width: 100%;
        flex-shrink: 0;
    }

    /*
     * El carnet ocupa el 100% del ancho disponible.
     * Alto = ancho × (316/520) = ancho × 0.6077
     * Usamos padding-top en el overlay para mantener el ratio.
     */
    .carnet-expandido {
        position: relative;
        width: 100%;
        /* Alto proporcional: 316/520 = 60.77% del ancho */
        padding-top: 60.77%;
        height: 0;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
        background: #FFC107;
    }

    /* La imagen de fondo ocupa todo el carnet */
    .carnet-exp-bg {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: fill;
        z-index: 0;
    }

    /* El overlay también es absoluto sobre el padding-top */
    .carnet-exp-overlay {
        position: absolute;
        inset: 0;
        z-index: 1;
        /* Padding proporcional: 24/316 ≈ 7.6% vertical, 28/520 ≈ 5.4% horizontal */
        padding: 7.6% 5.4%;
    }

    /* Foto: proporcional al carnet */
    .carnet-exp-photo {
        position: absolute;
        /* top: 20/316 ≈ 6.3%, right: 24/520 ≈ 4.6% */
        top: 6.3%;
        right: 4.6%;
        /* width: 126/520 ≈ 24.2%, height: 156/316 ≈ 49.4% */
        width: 24.2%;
        height: 49.4%;
        background: white;
        padding: 1%;
        border-radius: 4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    }

    .carnet-exp-photo-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 3px;
        display: block;
    }

    /* Datos: proporcionales */
    .carnet-exp-datos {
        position: absolute;
        /* bottom: 20/316 ≈ 6.3%, left: 28/520 ≈ 5.4% */
        bottom: 6.3%;
        left: 5.4%;
        /* right deja espacio para la foto: (126+24+24)/520 ≈ 33.5% */
        right: 33.5%;
    }

    .carnet-exp-dato {
        margin-bottom: 4%;
    }

    .carnet-exp-label {
        font-size: clamp(7px, 1.8vw, 10px);
        letter-spacing: 0.5px;
        color: rgba(0, 40, 100, 0.6);
        margin-bottom: 1px;
    }

    .carnet-exp-value.cuenta {
        font-size: clamp(13px, 3.8vw, 26px);
        letter-spacing: 0.3px;
    }

    .carnet-exp-value.nombre {
        font-size: clamp(10px, 2.8vw, 20px);
        line-height: 1.2;
        text-transform: uppercase;
    }

    .carnet-exp-value.identidad {
        font-size: clamp(10px, 2.6vw, 18px);
    }

    /* Botón cerrar */
    .modal-carnet-close {
        top: -46px;
        right: 0;
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .modal-carnet-hint {
        font-size: 11px;
    }
}

/* ══════════════════════════════════════════════════════════
   MODO OSCURO — MainEstudiantes
══════════════════════════════════════════════════════════ */

/* Fondo general */
[data-theme="dark"] .main-estudiantes {
    background: #0f172a;
}

/* Hero: se mantiene oscuro, solo ajuste sutil */
[data-theme="dark"] .hero-section {
    background: #001a4d;
}

/* Stat boxes */
[data-theme="dark"] .stat-box {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.08);
}

/* Toasts */
[data-theme="dark"] .toast-notification {
    background: #1e293b;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
[data-theme="dark"] .toast-title   { color: #f1f5f9; }
[data-theme="dark"] .toast-message { color: #94a3b8; }
[data-theme="dark"] .toast-close   { color: #64748b; }
[data-theme="dark"] .toast-close:hover { background: #334155; color: #e2e8f0; }
[data-theme="dark"] .toast-error   .toast-icon { background: #450a0a; }
[data-theme="dark"] .toast-success .toast-icon { background: #052e16; }
[data-theme="dark"] .toast-warning .toast-icon { background: #431407; }
[data-theme="dark"] .toast-info    .toast-icon { background: #0c1a3a; }

/* Modal de carrera */
[data-theme="dark"] .modal-carreras-container {
    background: #1e293b;
}
[data-theme="dark"] .modal-carreras-body {
    background: #0f172a;
}
[data-theme="dark"] .modal-carreras-body::-webkit-scrollbar-track { background: #1e293b; }
[data-theme="dark"] .modal-carreras-body::-webkit-scrollbar-thumb { background: #334155; }

[data-theme="dark"] .carrera-card {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}
[data-theme="dark"] .carrera-card:hover {
    background: #243044;
    border-color: #3b82f6;
}
[data-theme="dark"] .carrera-nombre { color: #f1f5f9; }
[data-theme="dark"] .carrera-centro { color: #64748b; }
[data-theme="dark"] .carrera-arrow {
    background: rgba(59,130,246,.15);
    border-color: rgba(59,130,246,.3);
}

/* Modales genéricos (AjaxToolkit) */
[data-theme="dark"] .modal-generic-panel {
    background: #1e293b !important;
    border-color: #334155 !important;
}
[data-theme="dark"] .modal-generic-header {
    background-color: #1e3a5f !important;
}
[data-theme="dark"] .modal-generic-body {
    color: #cbd5e1;
}
[data-theme="dark"] .modal-generic-footer {
    border-top-color: #334155 !important;
}
[data-theme="dark"] .modal-content {
    background: #1e293b;
}
[data-theme="dark"] .modal-body {
    color: #cbd5e1;
}
[data-theme="dark"] .modal-footer {
    border-top-color: #334155 !important;
}

/* ══════════════════════════════════════════════════════════
   CLASES DE MODALES (reemplazan inline styles)
══════════════════════════════════════════════════════════ */

/* Panel base */
/* NOTA: NO poner display:none aquí — el ModalPopupExtender de AjaxControlToolkit
   maneja la visibilidad del panel vía JS. Si se fuerza display:none en CSS,
   sobreescribe el display:block que el extender aplica al llamar .Show() */
.modal-panel {
    background-color: white;
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    position: relative;
}

/* Header oscuro neutro */
.modal-header-dark {
    background: linear-gradient(135deg, #003366, #0066cc);
    color: white;
    border-radius: 0;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header-dark h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Header azul UNAH */
.modal-header-blue {
    background: linear-gradient(135deg, #003366, #0066cc);
    color: white;
    border-radius: 0;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header-blue h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Body y footer estándar */
.modal-body-std {
    padding: 22px;
    font-size: 14px;
    color: #495057;
}
.modal-footer-std {
    padding: 14px 22px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.modal-footer-actions {
    padding: 14px 22px;
    border-top: 1px solid #e9ecef;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

/* Botón X de cierre en header */
.modal-btn-close {
    color: rgba(255,255,255,0.85);
    font-size: 1.3rem;
    line-height: 1;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
}
.modal-btn-close:hover {
    color: white;
}

/* Franja de aviso rojo al pie */
.modal-warning-strip {
    padding: 10px 22px 14px;
    background-color: #fff5f5;
    border-top: 1px solid #fed7d7;
    color: #c53030;
    font-size: 0.82rem;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

/* ── Dark mode para modales ───────────────────────────────── */
[data-theme="dark"] .modal-panel {
    background-color: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 10px 40px rgba(0,0,0,.5) !important;
}
[data-theme="dark"] .modal-body-std,
[data-theme="dark"] .modal-body-std p,
[data-theme="dark"] .modal-body-std label {
    color: #cbd5e1;
}
[data-theme="dark"] .modal-footer-std,
[data-theme="dark"] .modal-footer-actions {
    border-top-color: #334155 !important;
    background-color: #1e293b !important;
}
[data-theme="dark"] .modal-warning-strip {
    background-color: #2d1515;
    border-top-color: #7f1d1d;
    color: #fca5a5;
}
[data-theme="dark"] .form-control,
[data-theme="dark"] select.form-control,
[data-theme="dark"] .listbox-modal {
    background-color: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}
[data-theme="dark"] .modal-header-dark {
    background: linear-gradient(135deg, #0f172a, #1e3a5f) !important;
}
[data-theme="dark"] .modal-header-blue {
    background: linear-gradient(135deg, #0f172a, #1e3a5f) !important;
}

/* ── Apple Wallet banner ──────────────────────────────────── */
.wallet-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 6px 10px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.15s;
    cursor: pointer;
}

.wallet-banner:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateY(-1px);
    text-decoration: none;
}

.wallet-banner-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    background: #000;
    border-radius: 6px;
}

.wallet-banner-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0px;
}

.wallet-banner-label {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 400;
    letter-spacing: 0.01em;
}

.wallet-banner-title {
    font-size: 12px;
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.wallet-banner-arrow {
    display: flex;
    align-items: center;
    opacity: 0.5;
    flex-shrink: 0;
}

/* ── Google Wallet banner (variante verde) ───────────────── */
.wallet-banner-google {
    background: rgba(26, 115, 232, 0.75);
    border-color: rgba(255, 255, 255, 0.18);
    margin-top: 6px;
}

.wallet-banner-google:hover {
    background: rgba(26, 115, 232, 0.90);
}

.wallet-banner-google .wallet-banner-icon {
    background: #1a73e8;
}

/* ══════════════════════════════════════════════════════════
   MODAL CONFIRMACIÓN GOOGLE WALLET
══════════════════════════════════════════════════════════ */

.modal-gwallet-container {
    background: white;
    border-radius: 20px;
    padding: 32px 28px 28px;
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    box-shadow: 0 24px 60px rgba(0,0,0,.35);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-carnet-backdrop.activo .modal-gwallet-container {
    transform: scale(1) translateY(0);
}

.modal-gwallet-icon {
    width: 72px;
    height: 72px;
    background: #e8f0fe;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.modal-gwallet-title {
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.3px;
}

.modal-gwallet-msg {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0;
}

.modal-gwallet-tip {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    width: 100%;
}

.modal-gwallet-tip svg {
    color: #d97706;
    flex-shrink: 0;
    margin-top: 1px;
}

.modal-gwallet-tip span {
    font-size: 12px;
    color: #92400e;
    line-height: 1.5;
}

.modal-gwallet-playstore-link {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #1A73E8;
    font-weight: 700;
    text-decoration: underline;
    white-space: nowrap;
}

.modal-gwallet-playstore-link:hover {
    color: #1557b0;
}

.modal-gwallet-actions {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 4px;
}

.modal-gwallet-btn-cancel {
    flex: 1;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: white;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-gwallet-btn-cancel:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

.modal-gwallet-btn-confirm {
    flex: 1.5;
    padding: 11px 16px;
    border-radius: 10px;
    background: #1A73E8;
    color: white;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.modal-gwallet-btn-confirm:hover {
    background: #1557b0;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,115,232,.35);
}

@media (max-width: 480px) {
    .modal-gwallet-container {
        padding: 24px 20px 22px;
        border-radius: 16px;
    }

    .modal-gwallet-title { font-size: 18px; }
    .modal-gwallet-actions { flex-direction: column; }
    .modal-gwallet-btn-confirm,
    .modal-gwallet-btn-cancel { flex: unset; width: 100%; }
}
