/* ─── UNISA Simulador de Internado — v2.2.0 ─────────────────────────────────
   Estilos del shortcode [simulador_internado]
   Estética: casual game (King / Supercell / Zynga)
   ─────────────────────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

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

/* ════════════════════════════════════════════════════════
   ROOT — base
   ════════════════════════════════════════════════════════ */
#unisa-root {
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    width: 100%;
}

/* ════════════════════════════════════════════════════════
   PORTADA — cover screen con imagen de fondo
   ════════════════════════════════════════════════════════ */
.unisa-root-portada {
    display: flex;
    align-items: stretch;
    justify-content: center;
    min-height: 100vh;
    background: #1a3a2a;
}

#unisa-cover {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background-image: url('../portada.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

#unisa-cover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10,30,20,0.15) 0%,
        rgba(10,30,20,0.40) 40%,
        rgba(10,30,20,0.85) 70%,
        rgba(5,20,12,0.97)  100%
    );
    pointer-events: none;
}

#unisa-cover-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 480px;
    padding: 0 28px 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}

/* Logo pill */
.unisa-cover-logo-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.2);
    border-radius: 50px;
    padding: 6px 16px 6px 8px;
    backdrop-filter: blur(6px);
}
.unisa-cover-logo-mark {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e7d52, #1a5c38);
    border: 2px solid #f5c842;
    display: flex; align-items: center; justify-content: center;
    color: #f5c842;
    font-family: 'Fredoka One', cursive;
    font-size: 17px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.unisa-cover-logo-name { font-size: 13px; font-weight: 900; color: #fff; letter-spacing: 0.06em; line-height: 1.1; }
.unisa-cover-logo-sub  { font-size: 10px; color: rgba(255,255,255,0.6); font-weight: 400; }

/* Título principal */
.unisa-cover-titulo {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(32px, 8vw, 52px);
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 2px 6px rgba(0,0,0,0.4);
    letter-spacing: 0.01em;
}
.unisa-cover-titulo-em {
    color: #f5c842;
    text-shadow: 0 0 30px rgba(245,200,66,0.5), 0 4px 12px rgba(0,0,0,0.4);
}

.unisa-cover-desc {
    font-size: 15px;
    color: rgba(255,255,255,0.75);
    font-weight: 400;
    max-width: 320px;
    line-height: 1.5;
}

/* Botón play estilo casual */
.unisa-cover-btn-wrap { width: 100%; display: flex; justify-content: center; margin-top: 6px; }
.unisa-cover-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 20px;
    letter-spacing: 0.03em;
    color: #1a3a2a;
    background: linear-gradient(180deg, #f5e060 0%, #f0b800 50%, #d49500 100%);
    border: none;
    border-radius: 50px;
    padding: 16px 44px;
    cursor: pointer;
    box-shadow:
        0 6px 0px #9a6800,
        0 8px 20px rgba(0,0,0,0.4),
        inset 0 2px 0 rgba(255,255,255,0.4);
    transition: transform 0.08s, box-shadow 0.08s;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    min-width: 240px;
    justify-content: center;
}
.unisa-cover-btn:hover {
    background: linear-gradient(180deg, #ffe870 0%, #f5c200 50%, #e0a000 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 0px #9a6800, 0 12px 28px rgba(0,0,0,0.45), inset 0 2px 0 rgba(255,255,255,0.4);
}
.unisa-cover-btn:active {
    transform: translateY(4px);
    box-shadow: 0 2px 0px #9a6800, 0 4px 10px rgba(0,0,0,0.3), inset 0 2px 0 rgba(255,255,255,0.2);
}
.unisa-cover-btn-icon { font-size: 16px; }

.unisa-cover-version { font-size: 11px; color: rgba(255,255,255,0.3); margin-top: 8px; }

/* ════════════════════════════════════════════════════════
   LOGIN — tarjeta de acceso
   ════════════════════════════════════════════════════════ */
.unisa-root-login {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(ellipse at 60% 20%, #1e5c3a 0%, #0e2e1c 60%, #071a0e 100%);
    padding: 24px 16px;
}

#unisa-login-wrap {
    width: 100%;
    max-width: 420px;
}

#unisa-login-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow:
        0 0 0 4px rgba(245,200,66,0.25),
        0 24px 60px rgba(0,0,0,0.5);
}

.unisa-login-header {
    background: linear-gradient(135deg, #1a3a2a 0%, #2a5c40 100%);
    padding: 28px 28px 22px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.unisa-login-logo-mark {
    width: 54px; height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e7d52, #1a5c38);
    border: 3px solid #f5c842;
    display: flex; align-items: center; justify-content: center;
    color: #f5c842;
    font-family: 'Fredoka One', cursive;
    font-size: 26px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3), 0 0 20px rgba(245,200,66,0.2);
}
.unisa-login-title {
    font-family: 'Fredoka One', cursive;
    font-size: 26px;
    color: #fff;
    letter-spacing: 0.02em;
}
.unisa-login-sub {
    font-size: 12.5px;
    color: rgba(255,255,255,0.6);
    font-weight: 400;
    line-height: 1.4;
}

/* Cuerpo del card */
#unisa-login-card > *:not(.unisa-login-header):not(.unisa-login-alert) {
    padding-left: 24px;
    padding-right: 24px;
}
#unisa-login-card > *:last-child { padding-bottom: 24px; }

.unisa-login-alert {
    padding: 11px 24px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}
.unisa-login-alert-error   { background: #fff0f0; color: #c0392b; border-left: 4px solid #e74c3c; }
.unisa-login-alert-success { background: #f0faf4; color: #1e7a45; border-left: 4px solid #27ae60; }

.unisa-login-group { margin-top: 18px; }
.unisa-login-label {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}
.unisa-login-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #222;
    background: #f8f8f8;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.unisa-login-input:focus {
    border-color: #2e7d52;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(46,125,82,0.12);
}
.unisa-login-input-code {
    letter-spacing: 0.3em;
    text-transform: uppercase;
    font-size: 22px;
    text-align: center;
    font-family: 'Fredoka One', cursive;
}

/* Botón principal login */
.unisa-login-btn-primary {
    display: block;
    width: 100%;
    margin-top: 22px;
    padding: 15px 20px;
    font-family: 'Fredoka One', cursive;
    font-size: 18px;
    letter-spacing: 0.03em;
    color: #1a3a2a;
    background: linear-gradient(180deg, #f5e060 0%, #f0b800 50%, #d49500 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 5px 0px #9a6800, 0 8px 20px rgba(0,0,0,0.2);
    transition: transform 0.08s, box-shadow 0.08s;
}
.unisa-login-btn-primary:hover  { transform: translateY(-2px); box-shadow: 0 7px 0px #9a6800, 0 10px 24px rgba(0,0,0,0.25); }
.unisa-login-btn-primary:active { transform: translateY(3px); box-shadow: 0 2px 0px #9a6800; }
.unisa-login-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Divisor */
.unisa-login-divider {
    margin-top: 18px;
    text-align: center;
    position: relative;
    font-size: 11px;
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.unisa-login-divider::before,
.unisa-login-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: #e8e8e8;
}
.unisa-login-divider::before { left: 0; }
.unisa-login-divider::after  { right: 0; }

.unisa-login-footer {
    margin-top: 14px;
    display: flex;
    gap: 10px;
}
.unisa-login-btn-secondary {
    flex: 1;
    padding: 11px 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #2e7d52, #1a5c38);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 3px 0px #0e3a20;
    transition: transform 0.08s, box-shadow 0.08s;
}
.unisa-login-btn-secondary:hover  { transform: translateY(-1px); }
.unisa-login-btn-secondary:active { transform: translateY(2px); box-shadow: 0 1px 0px #0e3a20; }
.unisa-login-btn-secondary:disabled { opacity: 0.6; cursor: not-allowed; }

.unisa-login-btn-ghost {
    padding: 11px 14px;
    font-family: 'Nunito', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #888;
    background: #f5f5f5;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.unisa-login-btn-ghost:hover { background: #eee; color: #555; }

/* Spinner */
.unisa-spinner {
    display: inline-block;
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: unisa-spin 0.7s linear infinite;
    vertical-align: middle;
}
@keyframes unisa-spin { to { transform: rotate(360deg); } }

/* Fade in */
.unisa-fade-in { animation: unisa-fadein 0.3s ease; }
@keyframes unisa-fadein { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ════════════════════════════════════════════════════════
   APP PRINCIPAL — wrapper + topbar + layout
   ════════════════════════════════════════════════════════ */
#unisa-root {
    font-family: 'Nunito', sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 24px 12px;
    min-height: 600px;
    background: #f5f2ee;
}

/* Wrapper topbar + app */
#unisa-wrapper {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
}

/* ── Barra superior ── */
#unisa-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a3a2a 0%, #2a5c40 100%);
    color: #e8f5ed;
    padding: 0 18px;
    height: 42px;
    border-radius: 16px 16px 0 0;
    font-size: 11.5px;
    gap: 12px;
    flex-shrink: 0;
    border-bottom: 2px solid rgba(245,200,66,0.25);
}
.unisa-topbar-left  { display: flex; align-items: center; gap: 6px; min-width: 210px; color: #a8d8b5; }
.unisa-topbar-icon  { font-size: 13px; }
.unisa-topbar-center {
    display: flex; align-items: center; gap: 8px;
    flex: 1; justify-content: center; white-space: nowrap;
}
.unisa-topbar-turno-label { color: #7ab890; font-size: 11px; }
.unisa-topbar-turno-val   { font-size: 13px; font-weight: 800; color: #fff; font-family: 'Fredoka One', cursive; }
.unisa-topbar-sep         { color: #4a7a5a; }
.unisa-topbar-right { display: flex; align-items: center; gap: 10px; min-width: 210px; justify-content: flex-end; }
.unisa-topbar-email { color: #a8d8b5; font-size: 11px; }
.unisa-topbar-countdown {
    font-size: 12px; font-weight: 800; color: #a8d8b5;
    font-variant-numeric: tabular-nums;
    background: rgba(255,255,255,0.1);
    padding: 2px 8px; border-radius: 6px;
    font-family: 'Fredoka One', cursive;
}

/* ── App shell ── */
#unisa-app {
    display: flex;
    width: 100%;
    min-height: 700px;
    background: #f5f2ee;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
    border: 2px solid #e0d8cf;
    border-top: none;
    box-shadow: 0 8px 40px rgba(0,0,0,0.1);
}

/* ════════════════════════════════════════════════════════
   SIDEBAR
   ════════════════════════════════════════════════════════ */
#unisa-sidebar {
    width: 210px;
    background: #fff;
    border-right: 2px solid #ede7df;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.unisa-logo-wrap  { padding: 18px 16px 14px; border-bottom: 1.5px solid #f0ebe4; }
.unisa-logo-row   { display: flex; align-items: center; gap: 10px; }
.unisa-logo-mark {
    width: 36px; height: 36px; border-radius: 10px;
    background: linear-gradient(135deg, #2e7d52, #1a5c38);
    border: 2px solid #f5c842;
    display: flex; align-items: center; justify-content: center;
    color: #f5c842; font-family: 'Fredoka One', cursive; font-size: 18px;
    flex-shrink: 0;
}
.unisa-logo-name { font-size: 12px; font-weight: 900; color: #1a3a2a; letter-spacing: 0.08em; font-family: 'Fredoka One', cursive; }
.unisa-logo-sub  { font-size: 10px; color: #bbb; font-weight: 400; }

.unisa-profile-wrap {
    padding: 12px 16px; border-bottom: 1.5px solid #f0ebe4;
    display: flex; align-items: center; gap: 10px;
}
.unisa-profile-av {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, #2e7d52, #1a5c38);
    border: 2px solid #f5c842;
    color: #f5c842; display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; flex-shrink: 0;
}
.unisa-profile-name  { font-size: 12px; font-weight: 800; color: #111; }
.unisa-profile-turno { font-size: 10.5px; color: #aaa; }

#unisa-nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.unisa-nav-btn {
    display: flex; align-items: center; gap: 10px;
    width: 100%; padding: 9px 12px;
    border: none; background: none; border-radius: 12px;
    font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 700;
    color: #666; cursor: pointer; text-align: left; position: relative;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
}
.unisa-nav-btn:hover  { background: #f5f2ee; color: #1a3a2a; }
.unisa-nav-btn.active { background: linear-gradient(135deg, #e8f5ed, #d0edd8); color: #1a3a2a; }
.unisa-nav-icon { font-size: 16px; width: 22px; text-align: center; }
.unisa-nav-badge {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: #f0b800; color: #1a3a2a;
    font-size: 10px; font-weight: 900; border-radius: 50px;
    padding: 1px 6px; font-family: 'Fredoka One', cursive;
}

.unisa-logout-wrap { padding: 10px 10px 6px; border-top: 1.5px solid #f0ebe4; }
.unisa-logout-btn {
    width: 100%; padding: 9px 12px;
    border-radius: 10px; border: 2px solid #fde0de;
    background: #fff8f8; color: #c0392b;
    font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 800;
    cursor: pointer; text-align: left;
    transition: background 0.15s;
}
.unisa-logout-btn:hover { background: #fde8e8; }

.unisa-sidebar-footer { padding: 10px 16px; font-size: 10px; color: #ccc; text-align: center; }

/* ════════════════════════════════════════════════════════
   COLUMNA CENTRAL
   ════════════════════════════════════════════════════════ */
#unisa-main {
    flex: 1; min-width: 0; padding: 24px 20px; overflow-y: auto;
}
.unisa-page-header { margin-bottom: 18px; }
.unisa-page-title  { font-family: 'Fredoka One', cursive; font-size: 26px; color: #1a3a2a; font-weight: 400; }
.unisa-page-meta   { font-size: 13px; color: #888; margin-top: 4px; }
.unisa-page-meta .sep { margin: 0 6px; color: #ccc; }

/* Stats */
.unisa-stats-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px;
}
.unisa-stat-card {
    background: #fff; border: 2px solid #e8e0d5; border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.unisa-stat-label { font-size: 11px; font-weight: 800; color: #aaa; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.unisa-stat-val   { font-family: 'Fredoka One', cursive; font-size: 30px; font-weight: 400; line-height: 1; margin-bottom: 8px; }

/* Tabs */
.unisa-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.unisa-tab-btn {
    padding: 8px 16px; border-radius: 50px;
    border: 2px solid #e0d8cf; background: #fff;
    font-family: 'Nunito', sans-serif; font-size: 13px; font-weight: 800;
    color: #888; cursor: pointer; transition: all 0.15s;
}
.unisa-tab-btn:hover  { border-color: #2e7d52; color: #2e7d52; }
.unisa-tab-btn.active { background: #1a3a2a; border-color: #1a3a2a; color: #f5c842; }

/* Buscador */
.unisa-search-wrap  { position: relative; margin-bottom: 16px; }
.unisa-search-icon  { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 16px; pointer-events: none; }
.unisa-search-input {
    width: 100%; padding: 11px 16px 11px 42px;
    border: 2px solid #e0d8cf; border-radius: 50px; background: #fff;
    font-family: 'Nunito', sans-serif; font-size: 14px; font-weight: 600; color: #333;
    outline: none; transition: border-color 0.15s;
}
.unisa-search-input:focus { border-color: #2e7d52; }

/* Separador de estado */
.unisa-estado-sep   { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; }
.unisa-estado-line  { flex: 1; height: 1px; background: #e8e0d5; }
.unisa-estado-label { font-size: 11px; font-weight: 900; color: #aaa; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; }

/* Tarjeta de sede */
.unisa-sede-card {
    display: flex; align-items: center; gap: 12px;
    background: #fff; border: 2px solid #e8e0d5; border-radius: 16px;
    padding: 12px 14px; margin-bottom: 8px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.unisa-sede-card:hover { border-color: #2e7d52; box-shadow: 0 4px 16px rgba(46,125,82,0.1); }
.unisa-sede-card.llena { background: #fafafa; opacity: 0.7; }

.unisa-sede-avatar {
    border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 900; flex-shrink: 0;
    font-family: 'Fredoka One', cursive; letter-spacing: 0.02em;
}

.unisa-sede-info { flex: 1; min-width: 0; }
.unisa-sede-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.unisa-sede-nombre    { font-size: 13px; font-weight: 800; color: #111; }
.unisa-sede-ubicacion { font-size: 11.5px; color: #aaa; margin-bottom: 6px; }

.unisa-sede-nums { display: flex; gap: 16px; margin-bottom: 6px; }
.unisa-num-label { font-size: 10px; color: #bbb; text-transform: uppercase; font-weight: 700; }
.unisa-num-val   { font-family: 'Fredoka One', cursive; font-size: 17px; font-weight: 400; line-height: 1.1; }
.unisa-num-pct   { font-size: 10.5px; color: #999; margin-top: 3px; }

.unisa-sede-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

/* Barra de progreso */
.unisa-barra-wrap { height: 5px; border-radius: 10px; background: #f0ebe4; overflow: hidden; }
.unisa-barra-fill { height: 100%; border-radius: 10px; transition: width 0.4s; }

/* Badges */
.unisa-badge { display: inline-block; padding: 2px 8px; border-radius: 50px; font-size: 10px; font-weight: 800; font-family: 'Nunito', sans-serif; }
.unisa-badge-llena { background: #fde8e8; color: #c0392b; }
.unisa-badge-mip   { background: #e8f5ed; color: #1e7a45; }

/* Botones de sede */
.unisa-btn-agregar {
    padding: 6px 14px; border-radius: 50px;
    border: 2px solid #1a3a2a; background: #1a3a2a; color: #f5c842;
    font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 800;
    cursor: pointer; white-space: nowrap; transition: background 0.15s;
    box-shadow: 0 3px 0 #0e2016;
}
.unisa-btn-agregar:hover    { background: #224d38; }
.unisa-btn-agregar:active   { transform: translateY(2px); box-shadow: none; }
.unisa-btn-agregar:disabled { background: #f0f0f0; color: #bbb; border-color: #ddd; cursor: not-allowed; box-shadow: none; }

.unisa-btn-quitar {
    padding: 6px 14px; border-radius: 50px;
    border: 2px solid #e0c0c0; background: #fff8f8; color: #c0392b;
    font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 800;
    cursor: pointer; transition: background 0.15s;
}
.unisa-btn-quitar:hover { background: #fde8e8; }

/* Ranking */
.unisa-ranking-card {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 16px; background: #fff;
    border: 2px solid #e8e0d5; border-radius: 16px; margin-bottom: 8px;
}
.unisa-ranking-pos   { font-size: 20px; min-width: 28px; text-align: center; }
.unisa-ranking-info  { flex: 1; }
.unisa-ranking-nombre { font-weight: 800; font-size: 13px; color: #111; }
.unisa-ranking-estado { font-size: 11px; color: #aaa; margin-top: 1px; margin-bottom: 6px; }
.unisa-ranking-nums  { text-align: right; flex-shrink: 0; }
.unisa-ranking-ocu   { font-family: 'Fredoka One', cursive; font-size: 22px; color: #2e7d52; line-height: 1; }
.unisa-ranking-total { font-size: 11px; color: #bbb; }

/* Recursos */
.unisa-recurso-card {
    display: flex; align-items: center; gap: 14px;
    padding: 13px 16px; background: #fff;
    border: 2px solid #e8e0d5; border-radius: 16px; margin-bottom: 8px;
}
.unisa-recurso-icon   { font-size: 28px; flex-shrink: 0; }
.unisa-recurso-info   { flex: 1; }
.unisa-recurso-nombre { font-weight: 800; font-size: 13px; color: #111; }
.unisa-recurso-meta   { font-size: 11px; color: #aaa; margin-top: 3px; }
.unisa-btn-descargar {
    padding: 8px 14px; border-radius: 12px;
    border: 2px solid #1a3a2a; background: #1a3a2a; color: #f5c842;
    font-family: 'Nunito', sans-serif; font-size: 12px; font-weight: 800;
    cursor: pointer; white-space: nowrap; transition: background 0.15s; flex-shrink: 0;
    box-shadow: 0 3px 0 #0e2016;
}
.unisa-btn-descargar:hover { background: #224d38; }

/* Perfil */
.unisa-perfil-header {
    display: flex; align-items: center; gap: 16px;
    padding: 20px; background: #fff;
    border: 2px solid #e8e0d5; border-radius: 18px; margin-bottom: 18px; max-width: 480px;
}
.unisa-perfil-av {
    width: 58px; height: 58px; border-radius: 50%;
    background: linear-gradient(135deg, #2e7d52, #1a5c38);
    border: 3px solid #f5c842;
    color: #f5c842; display: flex; align-items: center; justify-content: center;
    font-family: 'Fredoka One', cursive; font-size: 24px; flex-shrink: 0;
}
.unisa-perfil-nombre { font-family: 'Fredoka One', cursive; font-size: 18px; color: #111; }
.unisa-perfil-email  { font-size: 12px; color: #888; margin-top: 2px; }
.unisa-perfil-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: #fff;
    border: 2px solid #eee; border-radius: 12px; margin-bottom: 7px; max-width: 480px;
}
.unisa-perfil-key { font-size: 13px; color: #888; font-weight: 600; }
.unisa-perfil-val { font-size: 13px; font-weight: 800; color: #111; }

/* ════════════════════════════════════════════════════════
   PANEL DERECHO — preferencias
   ════════════════════════════════════════════════════════ */
#unisa-panel {
    width: 255px; background: #fff;
    border-left: 2px solid #ede7df;
    padding: 20px 14px; overflow-y: auto; flex-shrink: 0;
}
.unisa-panel-title {
    font-family: 'Fredoka One', cursive; font-size: 14px; color: #1a3a2a;
    letter-spacing: 0.03em; margin-bottom: 2px;
}
.unisa-panel-sub { font-size: 10.5px; color: #ccc; margin-bottom: 14px; }

.unisa-pref-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px; background: #fff;
    border: 2px solid #e8e0d5; border-radius: 12px; margin-bottom: 6px;
    cursor: grab; transition: all 0.2s; user-select: none;
}
.unisa-pref-item.llena      { background: #f5f5f5; border-color: #e0e0e0; opacity: 0.6; }
.unisa-pref-item.drag-over  { border-color: #2e7d52; background: #f0faf5; }
.unisa-pref-pos  { font-family: 'Fredoka One', cursive; font-size: 14px; color: #2e7d52; min-width: 18px; }
.unisa-pref-item.llena .unisa-pref-pos { color: #ccc; }
.unisa-pref-info { flex: 1; min-width: 0; }
.unisa-pref-nombre {
    font-size: 12px; font-weight: 800; color: #111;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.unisa-pref-item.llena .unisa-pref-nombre { color: #aaa; }
.unisa-pref-disp { font-size: 11px; color: #2e7d52; font-weight: 700; margin-top: 3px; }
.unisa-pref-del {
    background: none; border: none; cursor: pointer;
    color: #ddd; font-size: 15px; padding: 4px; flex-shrink: 0; line-height: 1;
    transition: color 0.15s;
}
.unisa-pref-del:hover { color: #c0392b; }

/* Vistas genéricas */
.unisa-empty    { color: #ccc; font-size: 12px; text-align: center; padding: 24px 0; }
.unisa-vista-desc { color: #888; font-size: 13px; margin: 0 0 18px; font-weight: 600; }

/* ════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════ */
/* Portada vertical en móvil */
@media (max-width: 540px) {
    #unisa-cover { background-position: center center; min-height: 100dvh; }
    #unisa-cover-content { padding: 0 20px 60px; }
    .unisa-cover-titulo { font-size: 38px; }
    .unisa-cover-btn { font-size: 18px; padding: 15px 32px; min-width: 200px; }
}

/* App en tablet/móvil */
@media (max-width: 780px) {
    #unisa-sidebar { width: 54px; }
    .unisa-logo-name, .unisa-logo-sub, .unisa-profile-name,
    .unisa-profile-turno, .unisa-nav-btn span:not(.unisa-nav-icon),
    .unisa-nav-badge, .unisa-sidebar-footer,
    .unisa-logout-btn span:not(:first-child) { display: none; }
    .unisa-nav-btn  { justify-content: center; padding: 10px; }
    .unisa-profile-wrap { justify-content: center; padding: 12px 8px; }
    .unisa-logo-wrap    { justify-content: center; padding: 14px 8px; }
    .unisa-logout-btn   { text-align: center; }
    #unisa-panel { width: 200px; }
    .unisa-stats-grid { grid-template-columns: 1fr; }
    #unisa-topbar { height: auto; padding: 6px 12px; flex-wrap: wrap; border-radius: 12px 12px 0 0; }
    .unisa-topbar-left, .unisa-topbar-right { min-width: unset; }
    .unisa-topbar-center { font-size: 10px; gap: 5px; }
}
@media (max-width: 580px) {
    #unisa-panel { display: none; }
    .unisa-root-login { padding: 16px 12px; }
    #unisa-login-card { border-radius: 20px; }
}
