/* GlobalTrainer — Portal del alumno
   Diseño moderno, premium, responsive y accesible. */
:root {
    --student-brand: var(--brand, #ffad0a);
    --student-brand-rgb: var(--brand-rgb, 255, 173, 10);
    --student-ink: #161923;
    --student-muted: #697083;
    --student-bg: #f3f5f9;
    --student-card: #fff;
    --student-line: #e5e8ef;
    --student-success: #059669;
    --student-warning: #d97706;
    --student-danger: #dc2626;
    --student-info: #2563eb;
    --student-sidebar: 264px;
    --student-radius: 18px;
    --student-shadow: 0 18px 50px rgba(25, 30, 48, .09);
}
[data-theme="dark"] {
    --student-ink: #f1f3f7;
    --student-muted: #a6abb8;
    --student-bg: #0e0f12;
    --student-card: #17191e;
    --student-line: #292c33;
    --student-shadow: 0 18px 50px rgba(0,0,0,.35);
}
.student-shell { min-height:100vh; color:var(--student-ink); background:var(--student-bg); }
.student-sidebar {
    position:fixed; z-index:80; inset:12px auto 12px 12px; width:var(--student-sidebar);
    display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--student-line);
    border-radius:24px; background:var(--student-card); box-shadow:var(--student-shadow);
    transition:transform .22s ease;
}
.student-brand { display:flex; align-items:center; gap:12px; min-height:74px; padding:14px 17px; border-bottom:1px solid var(--student-line); }
.student-brand img { width:44px; height:44px; object-fit:contain; }
.student-brand strong { display:block; font:800 16px/1.15 "Sora","DM Sans",sans-serif; }
.student-brand small { display:block; margin-top:3px; color:var(--student-muted); font-size:11.5px; }
.student-nav { flex:1; overflow:auto; padding:14px 10px; }
.student-nav-group { margin:4px 10px 8px; color:var(--student-muted); font-size:10px; font-weight:850; letter-spacing:.11em; text-transform:uppercase; }
.student-nav a { position:relative; display:flex; align-items:center; gap:12px; min-height:46px; margin:4px 0; padding:0 13px; border-radius:13px; color:var(--student-muted); text-decoration:none; font-size:13.5px; font-weight:700; transition:.16s ease; }
.student-nav a i { width:22px; text-align:center; font-size:17px; }
.student-nav a:hover { color:var(--student-ink); background:rgba(var(--student-brand-rgb),.08); }
.student-nav a.active { color:var(--student-ink); background:rgba(var(--student-brand-rgb),.16); box-shadow:inset 3px 0 0 var(--student-brand); }
.student-sidebar-foot { padding:10px; border-top:1px solid var(--student-line); }
.student-user-card { display:flex; align-items:center; gap:10px; padding:10px; border-radius:14px; background:rgba(var(--student-brand-rgb),.07); }
.student-avatar { width:38px; height:38px; border-radius:50%; object-fit:cover; border:2px solid rgba(var(--student-brand-rgb),.45); }
.student-user-card strong { display:block; max-width:145px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12.5px; }
.student-user-card small { color:var(--student-muted); font-size:11px; }
.student-main { min-height:100vh; margin-left:calc(var(--student-sidebar) + 24px); padding:12px 16px 96px 4px; }
.student-topbar { position:sticky; z-index:50; top:12px; min-height:62px; display:flex; align-items:center; justify-content:space-between; gap:14px; padding:9px 14px; border:1px solid var(--student-line); border-radius:18px; background:color-mix(in srgb,var(--student-card) 90%,transparent); backdrop-filter:blur(18px); box-shadow:0 8px 28px rgba(20,25,40,.07); }
.student-topbar-title strong { display:block; font-size:14px; }
.student-topbar-title span { color:var(--student-muted); font-size:11.5px; }
.student-topbar-actions { display:flex; gap:8px; }
.student-icon-btn { width:40px; height:40px; display:grid; place-items:center; border:1px solid var(--student-line); border-radius:12px; background:var(--student-card); color:var(--student-ink); cursor:pointer; }
.student-content { width:min(1320px,100%); margin:18px auto 0; }
.student-mobile-toggle { display:none; }
.student-overlay { display:none; position:fixed; z-index:70; inset:0; background:rgba(8,10,15,.55); backdrop-filter:blur(3px); }
.student-bottom-nav { display:none; }
.student-page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin:4px 0 18px; }
.student-eyebrow { color:var(--student-brand); font-size:11px; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
.student-page-head h1 { margin:3px 0 0; font:800 clamp(22px,3vw,34px)/1.08 "Sora","DM Sans",sans-serif; }
.student-page-head p { max-width:650px; margin:8px 0 0; color:var(--student-muted); }
.student-card { border:1px solid var(--student-line); border-radius:var(--student-radius); background:var(--student-card); box-shadow:0 8px 26px rgba(30,35,55,.05); }
.student-card-pad { padding:20px; }
.student-grid { display:grid; gap:16px; }
.student-grid--stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
.student-stat { position:relative; overflow:hidden; min-height:130px; padding:18px; }
.student-stat::after { content:""; position:absolute; right:-35px; bottom:-45px; width:120px; height:120px; border-radius:50%; background:rgba(var(--student-brand-rgb),.08); }
.student-stat-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; color:var(--student-brand); background:rgba(var(--student-brand-rgb),.14); font-size:18px; }
.student-stat strong { display:block; margin-top:15px; font-size:25px; line-height:1; }
.student-stat span { display:block; margin-top:6px; color:var(--student-muted); font-size:12px; }
.student-actions { display:flex; flex-wrap:wrap; gap:10px; }
.student-btn { min-height:42px; display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:0 16px; border:1px solid transparent; border-radius:12px; font-weight:800; text-decoration:none; cursor:pointer; transition:.15s ease; }
.student-btn--primary { color:#17120a; background:var(--student-brand); box-shadow:0 9px 22px rgba(var(--student-brand-rgb),.22); }
.student-btn--ghost { color:var(--student-ink); border-color:var(--student-line); background:var(--student-card); }
.student-btn--danger { color:#fff; background:var(--student-danger); }
.student-btn:disabled { opacity:.55; cursor:not-allowed; box-shadow:none; }
.student-search { position:relative; width:min(420px,100%); }
.student-search i { position:absolute; top:50%; left:14px; transform:translateY(-50%); color:var(--student-muted); }
.student-search input { width:100%; min-height:44px; padding:0 14px 0 42px; border:1px solid var(--student-line); border-radius:13px; background:var(--student-card); color:var(--student-ink); outline:none; }
.student-search input:focus { border-color:var(--student-brand); box-shadow:0 0 0 4px rgba(var(--student-brand-rgb),.12); }
.student-module-list { display:grid; gap:12px; }
.student-module { width:100%; display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; align-items:center; gap:14px; padding:16px; border:1px solid var(--student-line); border-radius:16px; background:var(--student-card); color:var(--student-ink); text-align:left; cursor:pointer; transition:.16s ease; }
.student-module:hover { transform:translateY(-2px); border-color:rgba(var(--student-brand-rgb),.6); box-shadow:0 12px 28px rgba(20,25,45,.08); }
.student-module-icon { width:48px; height:48px; display:grid; place-items:center; border-radius:15px; color:var(--student-brand); background:rgba(var(--student-brand-rgb),.13); font-size:20px; }
.student-module strong { display:block; font-size:14.5px; }
.student-module small { display:block; margin-top:4px; color:var(--student-muted); }
.student-badge { display:inline-flex; align-items:center; gap:5px; padding:4px 9px; border-radius:999px; font-size:10.5px; font-weight:850; }
.student-badge--success { color:#047857; background:#ecfdf5; }
.student-badge--warning { color:#a16207; background:#fffbeb; }
.student-badge--danger { color:#be123c; background:#fff1f2; }
.student-badge--info { color:#1d4ed8; background:#eff6ff; }
.student-tabs { display:flex; gap:6px; overflow:auto; padding:6px; border:1px solid var(--student-line); border-radius:15px; background:var(--student-card); }
.student-tab { min-height:42px; display:flex; align-items:center; gap:7px; padding:0 14px; border:0; border-radius:11px; background:transparent; color:var(--student-muted); font-weight:800; white-space:nowrap; cursor:pointer; }
.student-tab.active { color:var(--student-ink); background:rgba(var(--student-brand-rgb),.16); }
.student-resource-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.student-resource { min-height:155px; display:flex; flex-direction:column; align-items:flex-start; justify-content:space-between; gap:15px; padding:17px; border:1px solid var(--student-line); border-radius:16px; background:var(--student-card); }
.student-resource-icon { width:46px; height:46px; display:grid; place-items:center; border-radius:14px; color:var(--student-brand); background:rgba(var(--student-brand-rgb),.13); font-size:20px; }
.student-resource h3 { margin:0; font-size:14px; }
.student-resource p { margin:5px 0 0; color:var(--student-muted); font-size:12px; }
.student-resource-actions { width:100%; display:flex; flex-wrap:wrap; gap:8px; }
.student-resource-actions .student-btn { flex:1 1 132px; }
.student-empty { min-height:220px; display:grid; place-items:center; padding:35px; text-align:center; color:var(--student-muted); }
.student-empty i { display:block; margin-bottom:12px; font-size:36px; opacity:.65; }
.student-table-wrap { overflow:auto; border:1px solid var(--student-line); border-radius:16px; background:var(--student-card); }
.student-table { width:100%; min-width:760px; border-collapse:collapse; }
.student-table th { padding:13px 14px; border-bottom:1px solid var(--student-line); color:var(--student-muted); background:color-mix(in srgb,var(--student-card) 92%,#94a3b8); font-size:10px; letter-spacing:.08em; text-align:left; text-transform:uppercase; }
.student-table td { padding:14px; border-bottom:1px solid var(--student-line); font-size:12.5px; vertical-align:middle; }
.student-table tbody tr:last-child td { border-bottom:0; }
.student-table tbody tr:hover { background:rgba(var(--student-brand-rgb),.04); }
.student-mobile-cards { display:none; }
.student-form { display:grid; gap:15px; }
.student-field label { display:block; margin-bottom:7px; font-size:12px; font-weight:800; }
.student-field input,.student-field select,.student-field textarea { width:100%; min-height:44px; padding:10px 12px; border:1px solid var(--student-line); border-radius:12px; background:var(--student-card); color:var(--student-ink); outline:none; }
.student-field input:focus,.student-field select:focus,.student-field textarea:focus { border-color:var(--student-brand); box-shadow:0 0 0 4px rgba(var(--student-brand-rgb),.12); }
.student-alert { display:flex; align-items:flex-start; gap:10px; padding:13px 15px; border-radius:13px; font-size:12.5px; }
.student-alert--warning { color:#92400e; background:#fffbeb; border:1px solid #fde68a; }
.student-alert--danger { color:#9f1239; background:#fff1f2; border:1px solid #fecdd3; }
.student-alert--success { color:#065f46; background:#ecfdf5; border:1px solid #a7f3d0; }
.student-modal { position:fixed; z-index:400; inset:0; display:grid; place-items:center; padding:16px; background:rgba(8,10,16,.65); backdrop-filter:blur(5px); }
.student-modal-card { width:min(560px,100%); max-height:min(82vh,760px); overflow:auto; padding:22px; border:1px solid var(--student-line); border-radius:20px; background:var(--student-card); box-shadow:0 30px 80px rgba(0,0,0,.3); }
.student-modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:14px; margin-bottom:15px; }
.student-modal-head h2 { margin:0; font-size:18px; }
.student-video-frame { width:100%; aspect-ratio:16/9; border:0; border-radius:14px; background:#000; }
/* Actividad / timer */
.activity-shell { width:min(920px,100%); margin:0 auto; }
.activity-sticky { position:sticky; z-index:40; top:86px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; padding:12px 15px; }
.activity-timer { display:inline-flex; align-items:center; gap:9px; padding:9px 14px; border:1px solid #a7f3d0; border-radius:999px; color:#047857; background:#ecfdf5; font-weight:900; font-variant-numeric:tabular-nums; }
.activity-timer.mid { color:#a16207; border-color:#fde68a; background:#fffbeb; }
.activity-timer.low { color:#be123c; border-color:#fecdd3; background:#fff1f2; animation:studentPulse 1s infinite; }
@keyframes studentPulse { 50% { transform:scale(1.025); } }
.activity-progress { flex:1; max-width:360px; }
.activity-progress-meta { display:flex; justify-content:space-between; margin-bottom:6px; color:var(--student-muted); font-size:11px; font-weight:750; }
.activity-progress-track { height:8px; overflow:hidden; border-radius:999px; background:var(--student-line); }
.activity-progress-fill { height:100%; border-radius:inherit; background:var(--student-brand); transition:width .2s ease; }
.activity-question { padding:20px; margin-bottom:14px; }
.activity-question-head { display:flex; align-items:flex-start; gap:12px; }
.activity-question-number { flex:0 0 auto; width:34px; height:34px; display:grid; place-items:center; border-radius:11px; color:#17120a; background:var(--student-brand); font-weight:900; }
.activity-question h3 { margin:4px 0 0; font-size:15px; line-height:1.5; }
.activity-options { display:grid; gap:9px; margin-top:16px; }
.activity-option { display:grid; grid-template-columns:auto 1fr; align-items:flex-start; gap:10px; padding:12px 13px; border:1px solid var(--student-line); border-radius:13px; cursor:pointer; transition:.13s ease; }
.activity-option:hover { border-color:rgba(var(--student-brand-rgb),.65); background:rgba(var(--student-brand-rgb),.04); }
.activity-option.selected { border-color:var(--student-brand); background:rgba(var(--student-brand-rgb),.11); box-shadow:0 0 0 2px rgba(var(--student-brand-rgb),.08); }
.activity-option.is-disabled { cursor:not-allowed; opacity:.72; }
.activity-option.is-disabled:hover { border-color:var(--student-line); background:transparent; }
.activity-option.is-disabled.selected:hover { border-color:var(--student-brand); background:rgba(var(--student-brand-rgb),.11); }
.activity-option input { margin-top:3px; accent-color:var(--student-brand); }
.activity-footer { position:sticky; z-index:35; bottom:12px; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 14px; }
.activity-footer > span { color:var(--student-muted); font-size:12px; }
.activity-inline-alert { margin:0 0 14px; }
.activity-back-actions,.activity-result-actions { margin-top:16px; }
.activity-hero { margin-bottom:14px; background:linear-gradient(135deg,rgba(var(--student-brand-rgb),.14),var(--student-card)); }
.activity-hero h1 { margin:6px 0; }
.activity-hero p,.activity-result-hero p,.activity-confirm-card > p { margin:0; color:var(--student-muted); }
.activity-result-hero h1 { margin:5px 0 7px; }
.activity-confirm-card { max-width:440px; }
.activity-confirm-warning { margin-bottom:14px; }
.activity-result { margin-top:18px; }
.activity-result-hero { display:grid; grid-template-columns:auto 1fr; gap:16px; align-items:center; padding:20px; }
.activity-result-score { width:84px; height:84px; display:grid; place-items:center; border-radius:50%; color:#fff; background:linear-gradient(135deg,var(--student-success),#047857); font-size:25px; font-weight:900; }
.activity-review { display:grid; gap:10px; margin-top:14px; }
.activity-review-item { padding:14px; border:1px solid var(--student-line); border-left:4px solid var(--student-line); border-radius:13px; background:var(--student-card); }
.activity-review-item.ok { border-left-color:var(--student-success); }
.activity-review-item.bad { border-left-color:var(--student-danger); }
.activity-review-item.unanswered { border-left-color:var(--student-warning); }
.activity-review-item h4 { margin:0 0 8px; font-size:13px; }
.activity-review-item p { margin:3px 0; color:var(--student-muted); font-size:12px; }
/* receipt */
.receipt-screen { min-height:100vh; padding:24px; background:#eef1f6; }
.receipt-toolbar { width:min(920px,100%); display:flex; align-items:center; justify-content:space-between; gap:16px; margin:0 auto 18px; padding:14px 16px; border:1px solid #e3e7ef; border-radius:16px; background:#fff; box-shadow:0 12px 30px rgba(15,23,42,.08); color:#202438; }
.receipt-toolbar-actions { display:flex; gap:8px; }
.receipt-paper { position:relative; box-sizing:border-box; width:80mm; min-height:150mm; margin:0 auto; padding:6mm 5mm; overflow:hidden; background:#fff; color:#111827; font-family:Arial,Helvetica,sans-serif; font-size:10.5px; line-height:1.35; box-shadow:0 18px 48px rgba(15,23,42,.16); }
.receipt-brand,.receipt-document,.receipt-info,.receipt-detail,.receipt-totals,.receipt-payments,.receipt-note,.receipt-electronic,.receipt-footer { padding:3mm 0; border-bottom:1px dashed #687083; }
.receipt-brand { padding-top:0; text-align:center; }
.receipt-brand img { max-height:16mm; object-fit:contain; }
.receipt-brand h1 { margin:1mm 0; font-size:15px; }
.receipt-document,.receipt-electronic,.receipt-footer { text-align:center; }
.receipt-document strong { display:block; font-size:15px; }
.receipt-info-row { display:grid; grid-template-columns:25mm minmax(0,1fr); gap:2mm; margin:1.2mm 0; }
.receipt-info-row span { color:#596174; }
.receipt-info-row strong { text-align:right; overflow-wrap:anywhere; }
.receipt-detail-head,.receipt-detail-row { display:grid; grid-template-columns:minmax(0,1fr) 9mm 16mm 17mm; gap:1mm; align-items:start; }
.receipt-detail-head { padding-bottom:1.5mm; border-bottom:1px solid #d2d6df; color:#596174; font-size:8px; font-weight:900; text-transform:uppercase; }
.receipt-detail-row { padding:2mm 0; border-bottom:1px dotted #d6dae2; }
.receipt-detail-row > :not(:first-child),.receipt-detail-head > :not(:first-child) { text-align:right; }
.receipt-totals > div,.receipt-payment { display:flex; justify-content:space-between; gap:8px; margin:1mm 0; }
.receipt-total-grand { padding-top:1.5mm; border-top:1px solid #111827; font-size:13px; font-weight:900; }
.receipt-qr { width:32mm; margin:2mm auto; }
.receipt-qr svg { width:100%; height:auto; }
.receipt-footer { border-bottom:0; }
.receipt-void { position:absolute; z-index:3; top:48%; left:-8mm; width:96mm; transform:rotate(-28deg); border:2px solid rgba(190,18,60,.55); color:rgba(190,18,60,.55); font-size:25px; font-weight:900; letter-spacing:.18em; text-align:center; pointer-events:none; }
@media (max-width:1024px) {
    .student-sidebar { transform:translateX(calc(-100% - 24px)); }
    .student-shell.menu-open .student-sidebar { transform:translateX(0); }
    .student-shell.menu-open .student-overlay { display:block; }
    .student-main { margin-left:0; padding:10px 12px 96px; }
    .student-mobile-toggle { display:grid; }
    .student-grid--stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .student-resource-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .student-bottom-nav { position:fixed; z-index:65; left:10px; right:10px; bottom:10px; display:grid; grid-template-columns:repeat(5,1fr); min-height:62px; padding:6px; border:1px solid var(--student-line); border-radius:18px; background:color-mix(in srgb,var(--student-card) 94%,transparent); backdrop-filter:blur(18px); box-shadow:0 14px 40px rgba(15,20,35,.18); }
    .student-bottom-nav a { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; border-radius:12px; color:var(--student-muted); text-decoration:none; font-size:9.5px; font-weight:800; }
    .student-bottom-nav a i { font-size:17px; }
    .student-bottom-nav a.active { color:var(--student-ink); background:rgba(var(--student-brand-rgb),.15); }
}
@media (max-width:700px) {
    .student-content { margin-top:12px; }
    .student-page-head { align-items:flex-start; flex-direction:column; }
    .student-grid--stats { grid-template-columns:1fr 1fr; gap:10px; }
    .student-stat { min-height:112px; padding:14px; }
    .student-stat strong { font-size:21px; }
    .student-resource-grid { grid-template-columns:1fr; }
    .student-card-pad { padding:15px; }
    .student-table-wrap { display:none; }
    .student-mobile-cards { display:grid; gap:10px; }
    .student-mobile-card { padding:15px; border:1px solid var(--student-line); border-radius:15px; background:var(--student-card); }
    .student-mobile-card dl { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0 0; }
    .student-mobile-card dt { color:var(--student-muted); font-size:10px; }
    .student-mobile-card dd { margin:2px 0 0; font-size:12px; font-weight:750; }
    .activity-sticky { top:82px; align-items:stretch; flex-direction:column; }
    .activity-progress { max-width:none; }
    .activity-footer { bottom:80px; align-items:stretch; flex-direction:column; }
    .activity-footer .student-btn { width:100%; }
    .receipt-screen { padding:10px; }
    .receipt-toolbar { align-items:stretch; flex-direction:column; }
    .receipt-toolbar-actions { width:100%; }
    .receipt-toolbar-actions .student-btn { flex:1; }
    .receipt-paper { max-width:100%; }
}
@media print {
    @page { size:80mm auto; margin:0; }
    body * { visibility:hidden!important; }
    .receipt-paper,.receipt-paper * { visibility:visible!important; }
    .receipt-paper { position:absolute; inset:0 auto auto 0; width:80mm!important; min-height:0!important; margin:0!important; padding:4mm!important; box-shadow:none!important; }
    .screen-only { display:none!important; }
}

/* Componentes adicionales del portal del alumno */
.student-grid--three { grid-template-columns:repeat(3,minmax(0,1fr)); }
.student-list-toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.student-segmented { display:inline-flex; gap:4px; padding:4px; border:1px solid var(--student-line); border-radius:13px; background:color-mix(in srgb,var(--student-card) 92%,#94a3b8); }
.student-segmented button { min-height:36px; padding:0 13px; border:0; border-radius:10px; background:transparent; color:var(--student-muted); font-size:11.5px; font-weight:850; cursor:pointer; }
.student-segmented button.active { color:var(--student-ink); background:var(--student-card); box-shadow:0 4px 12px rgba(15,23,42,.08); }
.student-mobile-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.student-mobile-card-head strong { font-size:13.5px; }
.student-mobile-note { margin:12px 0 0; padding:10px; border-radius:11px; color:var(--student-muted); background:color-mix(in srgb,var(--student-card) 92%,#94a3b8); font-size:11.5px; }
.student-practice-timeline { display:grid; gap:12px; }
.student-practice { display:grid; grid-template-columns:78px minmax(0,1fr); overflow:hidden; border:1px solid var(--student-line); border-radius:16px; background:var(--student-card); }
.student-practice-date { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:126px; padding:12px; border-right:1px solid var(--student-line); color:var(--student-ink); background:color-mix(in srgb,var(--student-card) 91%,#94a3b8); text-decoration:none; }
.student-practice-date strong { font-size:26px; line-height:1; }
.student-practice-date span { margin-top:4px; color:var(--student-muted); font-size:10px; font-weight:900; letter-spacing:.08em; }
.student-practice-date small { margin-top:8px; font-size:11px; font-weight:850; }
.student-practice-body { min-width:0; padding:15px; }
.student-practice-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.student-practice-head h3 { margin:0; font-size:14px; }
.student-practice-head p { margin:5px 0 0; color:var(--student-muted); font-size:11.5px; }
.student-practice-meta { display:flex; flex-wrap:wrap; gap:8px 16px; margin-top:13px; color:var(--student-muted); font-size:11.5px; }
.student-practice-note { display:flex; align-items:flex-start; gap:8px; margin-top:12px; padding:9px 10px; border-radius:11px; color:var(--student-muted); background:color-mix(in srgb,var(--student-card) 92%,#94a3b8); font-size:11.5px; }
.student-account-alert { margin-bottom:16px; }
.student-money-pending { color:var(--student-danger); font-weight:900; }
.student-money-paid { color:var(--student-success); font-weight:900; }
.student-muted-text { color:var(--student-muted); }
.student-btn--small { min-height:34px; padding:0 11px; border-radius:10px; font-size:11px; }
.student-btn--block { width:100%; }
.student-module--locked { opacity:.82; }
.student-module--locked:hover { transform:none; border-color:var(--student-line); box-shadow:none; }
.student-module-copy { min-width:0; }
.student-module-arrow { color:var(--student-muted); }
.student-resource-copy { min-width:0; }
.student-modal-card--video { width:min(980px,100%); }
.receipt-paper--void { opacity:.9; }
.student-logout-state { width:min(520px,calc(100% - 28px)); margin:80px auto; padding:30px; text-align:center; }
.activity-review-number { float:left; margin-right:7px; color:var(--student-brand); }
.activity-rich { min-width:0; margin-top:2px; font-size:14px; line-height:1.55; overflow-wrap:anywhere; }
.activity-rich--result { margin-bottom:8px; font-size:13px; }
.activity-rich > :first-child { margin-top:0; }
.activity-rich > :last-child { margin-bottom:0; }
.activity-rich img { display:block; max-width:100%; height:auto; margin:10px auto; border-radius:10px; }
.activity-rich table { width:100%; display:block; overflow-x:auto; border-collapse:collapse; }
.activity-rich th,.activity-rich td { padding:7px; border:1px solid var(--student-line); }
.activity-rich a { color:var(--student-info); text-decoration:underline; }

/* En modo oscuro el chrome se vuelve neutral; la marca permanece en el logo. */
[data-theme="dark"] .student-nav a:hover,
[data-theme="dark"] .student-nav a.active,
[data-theme="dark"] .student-user-card,
[data-theme="dark"] .student-stat::after,
[data-theme="dark"] .student-stat-icon,
[data-theme="dark"] .student-module-icon,
[data-theme="dark"] .student-resource-icon,
[data-theme="dark"] .student-tab.active,
[data-theme="dark"] .student-bottom-nav a.active,
[data-theme="dark"] .activity-option.selected,
[data-theme="dark"] .activity-option:hover {
    color:var(--student-ink);
    background:#25282e;
    box-shadow:none;
}
[data-theme="dark"] .student-nav a.active { box-shadow:inset 3px 0 0 #7f848e; }
[data-theme="dark"] .student-eyebrow,
[data-theme="dark"] .student-stat-icon,
[data-theme="dark"] .student-module-icon,
[data-theme="dark"] .student-resource-icon,
[data-theme="dark"] .activity-review-number { color:#d7dae0; }
[data-theme="dark"] .student-btn--primary { color:#111318; background:#d7dae0; box-shadow:none; }
[data-theme="dark"] .activity-question-number { color:#111318; background:#d7dae0; }
[data-theme="dark"] .activity-progress-fill { background:#aeb3bc; }
[data-theme="dark"] .student-search input:focus,
[data-theme="dark"] .student-field input:focus,
[data-theme="dark"] .student-field select:focus,
[data-theme="dark"] .student-field textarea:focus { border-color:#7f848e; box-shadow:0 0 0 4px rgba(127,132,142,.15); }
[data-theme="dark"] .student-badge--success,
[data-theme="dark"] .student-badge--warning,
[data-theme="dark"] .student-badge--danger,
[data-theme="dark"] .student-badge--info { color:#e3e5e9; background:#292c33; }
[data-theme="dark"] .student-alert--success,
[data-theme="dark"] .student-alert--warning,
[data-theme="dark"] .student-alert--danger { color:#e3e5e9; border-color:#353941; background:#202329; }

@media (max-width:700px) {
    .student-grid--three { grid-template-columns:1fr 1fr; }
    .student-list-toolbar { align-items:stretch; flex-direction:column; }
    .student-segmented { width:100%; }
    .student-segmented button { flex:1; }
    .student-practice { grid-template-columns:64px minmax(0,1fr); }
    .student-practice-date { min-height:140px; }
    .student-practice-head { flex-direction:column; }
    .activity-result-hero { grid-template-columns:1fr; text-align:center; }
    .activity-result-score { margin:0 auto; }
}

@media (max-width:430px) {
    .student-grid--stats,.student-grid--three { grid-template-columns:1fr; }
    .student-mobile-card dl { grid-template-columns:1fr; }
    .student-topbar-title span { display:none; }
    .student-practice { grid-template-columns:1fr; }
    .student-practice-date { min-height:auto; flex-direction:row; gap:8px; border-right:0; border-bottom:1px solid var(--student-line); }
    .student-practice-date strong { font-size:18px; }
    .student-practice-date span,.student-practice-date small { margin:0; }
}

/* ═══════════════════════════════════════════════════════════════
   GLOBAL TRAINER — refinamiento visual premium v4
   Mejora contraste de iconos, botones, navegación y escala visual.
   ═══════════════════════════════════════════════════════════════ */
:root {
    --student-brand: #f5a623;
    --student-brand-rgb: 245, 166, 35;
    --student-brand-strong: #df8d00;
    --student-accent: #211a58;
}

.student-nav a {
    min-height: 50px;
    gap: 10px;
    padding: 0 11px;
    border-radius: 14px;
}

.student-nav a i {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #7b8395;
    background: #f3f5f8;
    font-size: 14px;
    transition: .16s ease;
}

.student-nav a:hover i,
.student-nav a.active i {
    color: #8a5200;
    border-color: rgba(var(--student-brand-rgb), .24);
    background: rgba(var(--student-brand-rgb), .16);
}

.student-nav a.active {
    background: linear-gradient(90deg, rgba(var(--student-brand-rgb), .18), rgba(var(--student-brand-rgb), .07));
    box-shadow: inset 3px 0 0 var(--student-brand-strong);
}

.student-icon-btn {
    transition: transform .15s ease, border-color .15s ease, color .15s ease, background .15s ease;
}

.student-icon-btn:hover {
    transform: translateY(-1px);
    color: #8a5200;
    border-color: rgba(var(--student-brand-rgb), .40);
    background: rgba(var(--student-brand-rgb), .10);
}

.student-btn {
    min-height: 44px;
    border-radius: 12px;
    font-size: 12px;
    letter-spacing: .01em;
}

.student-btn i {
    flex: 0 0 auto;
    font-size: 13px;
}

.student-btn--primary {
    color: #fff;
    border-color: rgba(214, 130, 0, .18);
    background: linear-gradient(135deg, #ffbc42 0%, #f4a51c 55%, #df8d00 100%);
    box-shadow: 0 10px 24px rgba(223, 141, 0, .24);
}

.student-btn--primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(223, 141, 0, .30);
}

.student-btn--ghost:hover:not(:disabled) {
    border-color: rgba(var(--student-brand-rgb), .48);
    color: #8a5200;
    background: rgba(var(--student-brand-rgb), .08);
}

.student-module-icon,
.student-resource-icon,
.student-stat-icon {
    border: 1px solid rgba(var(--student-brand-rgb), .20);
}

.student-module-icon i,
.student-resource-icon i,
.student-stat-icon i,
.student-tab i,
.student-icon-btn i {
    line-height: 1;
}

.student-tab.active {
    color: #6f4300;
    background: linear-gradient(135deg, rgba(var(--student-brand-rgb), .19), rgba(var(--student-brand-rgb), .09));
}

.student-resource {
    box-shadow: 0 6px 20px rgba(25, 30, 48, .035);
}

.student-modal {
    background: rgba(8, 10, 16, .72);
    backdrop-filter: blur(8px);
}

[data-theme="dark"] .student-nav a i {
    color: #c2c6cf;
    border-color: #32353c;
    background: #25282e;
}

[data-theme="dark"] .student-nav a:hover i,
[data-theme="dark"] .student-nav a.active i {
    color: #fff;
    border-color: #4a4e57;
    background: #30343b;
}

[data-theme="dark"] .student-btn--primary {
    color: #111318;
    border-color: #c5c9d0;
    background: #d7dae0;
    box-shadow: none;
}

/* Iconografía robusta: solo Font Awesome Solid/Brands disponibles en el template. */
.student-avatar--icon {
    display: grid;
    place-items: center;
    color: #925900;
    background: linear-gradient(145deg, #fff8e7, #fff);
    font-size: 15px;
}

.student-shell i[class*="fa-"] {
    line-height: 1;
}

/* ═══════════════════════════════════════════════════════════════
   RESULTADO DE ACTIVIDAD (evaluación / balotario) — vista premium
   Reemplaza visualmente a .activity-result-hero / .activity-review
   (esas reglas viejas quedan arriba sin usarse; puedes borrarlas
   cuando confirmes que el nuevo markup funciona).
   ═══════════════════════════════════════════════════════════════ */

.result-score-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 26px;
    margin-top: 18px;
    padding: 26px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 95% 10%, rgba(var(--student-brand-rgb), .12), transparent 40%),
        var(--student-card);
}

.result-ring-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 132px;
    height: 132px;
}

.result-ring {
    width: 132px;
    height: 132px;
    transform: rotate(-90deg);
}

.result-ring-track {
    fill: none;
    stroke: var(--student-line);
    stroke-width: 10;
}

.result-ring-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    transition: stroke-dashoffset .5s ease;
}

.result-ring-fill--success { stroke: var(--student-success); }
.result-ring-fill--warning { stroke: var(--student-warning); }
.result-ring-fill--danger  { stroke: var(--student-danger); }

.result-ring-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
}

.result-ring-value {
    font: 900 30px/1 "Sora", "DM Sans", sans-serif;
    color: var(--student-ink);
}

.result-ring-value--success { color: var(--student-success); }
.result-ring-value--warning { color: var(--student-warning); }
.result-ring-value--danger  { color: var(--student-danger); }

.result-ring-label {
    color: var(--student-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .14em;
}

.result-score-copy {
    min-width: 0;
}

.result-score-copy h1 {
    margin: 5px 0 6px;
    font-size: clamp(18px, 2.4vw, 24px);
    line-height: 1.25;
}

.result-score-copy p {
    margin: 0;
    color: var(--student-muted);
}

.result-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.result-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 850;
}

.result-chip--ok { color: #047857; background: #ecfdf5; }
.result-chip--bad { color: #be123c; background: #fff1f2; }
.result-chip--warn { color: #a16207; background: #fffbeb; }

.result-chip--grado.result-chip--success { color: #047857; background: #ecfdf5; }
.result-chip--grado.result-chip--warning { color: #a16207; background: #fffbeb; }
.result-chip--grado.result-chip--danger { color: #be123c; background: #fff1f2; }

.result-review {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.result-question-card {
    padding: 18px;
    border: 1px solid var(--student-line);
    border-left: 4px solid var(--student-line);
    border-radius: 16px;
    background: var(--student-card);
}

.result-question-card.ok { border-left-color: var(--student-success); }
.result-question-card.bad { border-left-color: var(--student-danger); }
.result-question-card.unanswered { border-left-color: var(--student-warning); }

.result-question-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: flex-start;
    gap: 12px;
}

.result-question-number {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: var(--student-ink);
    background: rgba(var(--student-brand-rgb), .14);
    font-size: 12.5px;
    font-weight: 900;
}

.result-question-badge {
    flex: 0 0 auto;
    white-space: nowrap;
}

.result-answer-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.result-answer-col {
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid var(--student-line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--student-card) 94%, #94a3b8);
}

.result-answer-col.is-correct {
    border-color: rgba(5, 150, 105, .35);
    background: #ecfdf5;
}

.result-answer-col.is-incorrect {
    border-color: rgba(220, 38, 38, .30);
    background: #fff1f2;
}

.result-answer-col.is-empty {
    border-color: rgba(217, 119, 6, .30);
    background: #fffbeb;
}

.result-answer-label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--student-muted);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.result-answer-col.is-correct .result-answer-label { color: #047857; }
.result-answer-col.is-incorrect .result-answer-label { color: #be123c; }
.result-answer-col.is-empty .result-answer-label { color: #a16207; }

.result-answer-value {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

[data-theme="dark"] .result-ring-track { stroke: var(--student-line); }

[data-theme="dark"] .result-chip--ok,
[data-theme="dark"] .result-chip--bad,
[data-theme="dark"] .result-chip--warn,
[data-theme="dark"] .result-chip--grado {
    color: #e3e5e9;
    background: #292c33;
}

[data-theme="dark"] .result-answer-col {
    background: #1c1f25;
}

[data-theme="dark"] .result-answer-col.is-correct,
[data-theme="dark"] .result-answer-col.is-incorrect,
[data-theme="dark"] .result-answer-col.is-empty {
    background: #1c1f25;
    border-color: #353941;
}

@media (max-width: 700px) {
    .result-score-hero {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        padding: 20px;
    }

    .result-chip-row {
        justify-content: center;
    }

    .result-answer-grid {
        grid-template-columns: 1fr;
    }

    .result-question-head {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .result-question-badge {
        grid-column: 1 / -1;
        justify-self: start;
        margin-top: 4px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   POPUP DE PERFIL — bottom nav móvil (aula virtual)
   El tab "Perfil" abre este panel con Mi perfil / Cambiar contraseña /
   Cambiar tema / Cerrar sesión, en vez de navegar directo.
   ═══════════════════════════════════════════════════════════════ */

.student-bottom-nav .student-bn-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    background: none;
    color: var(--student-muted);
    text-decoration: none;
    font-family: inherit;
    font-size: 9.5px;
    font-weight: 800;
    cursor: pointer;
}

.student-bottom-nav .student-bn-toggle i {
    font-size: 17px;
    line-height: 1;
}

.student-bottom-nav .student-bn-toggle.active-tab {
    color: var(--student-ink);
    background: rgba(var(--student-brand-rgb), .15);
}

.student-bn-pop {
    display: none;
    position: fixed;
    z-index: 9999;
    min-width: 208px;
    max-width: 260px;
    padding: 8px;
    border: 1px solid var(--student-line);
    border-radius: 16px;
    background: var(--student-card);
    box-shadow: 0 -10px 34px rgba(15, 20, 35, .18);
}

.student-bn-pop.open {
    display: block;
}

.student-bn-pop-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 0 12px;
    border: 0;
    border-radius: 11px;
    background: none;
    color: var(--student-ink);
    text-decoration: none;
    text-align: left;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}

.student-bn-pop-item:hover,
.student-bn-pop-item:active {
    background: rgba(var(--student-brand-rgb), .08);
}

.student-bn-pop-item i {
    width: 18px;
    text-align: center;
    color: var(--student-muted);
}

.student-bn-pop-item--danger,
.student-bn-pop-item--danger i {
    color: var(--student-danger);
}

.student-bn-pop-divider {
    height: 1px;
    margin: 6px 8px;
    background: var(--student-line);
}

[data-theme="dark"] .student-bn-pop-item--danger,
[data-theme="dark"] .student-bn-pop-item--danger i {
    color: #f87171;
}

@media (min-width: 1025px) {
    .student-bn-pop { display: none !important; }
}
