/* Mi Cursada FADU · Vanilla CSS local, sin framework ni fuentes remotas.
   Estilos mobile first
   Base = celular. Los @media(min-width) agregan ajustes para tablet (600px) y escritorio (900px). */

:root{
  --blue:#27498C;--blue-text:#27498C;--blue-strong:#323159;--blue-tint:#D5F2E5;
  --accent:#416EF2;--teal:#0BBFBF;--mint:#D5F2E5;
  --ink:#323159;--muted:#5e5d7b;
  --bg:#f5faf8;--surface:#fff;--line:#d5f2e5;--line-strong:#0BBFBF;
  --head:#323159;--head-ink:#fff;--sidebar:#27498C;
  --green:#0BBFBF;--pink:#416EF2;--focus:#416EF2;
  --done-surface:#D5F2E5;--done-ink:#323159;--done-line:#0BBFBF;
  --space-1:.25rem;--space-2:.5rem;--space-3:.75rem;--space-4:1rem;--space-5:1.5rem;--space-6:2rem;
  --radius-sm:.75rem;--radius:1rem;--radius-lg:1.375rem;--pad:1.125rem;--nav-h:4rem;--topbar-h:3.25rem;
  --font-xs:.75rem;--font-sm:.875rem;--font-md:1rem;--font-lg:1.25rem;--font-xl:1.5rem;
  --target-size:44px;
  --shadow:0 1px 2px #1d22501a,0 6px 18px #1d22500d;
  color-scheme:light;
}
body.dark-theme{
  --blue:#27498C;--blue-text:#B2C1FF;--blue-strong:#27498C;--blue-tint:#323159;
  --ink:#ecedfb;--muted:#c0bfd6;
  --bg:#10131d;--surface:#22283d;--line:#414967;--line-strong:#7895ef;
  --head:#323159;--sidebar:#27498C;
  --focus:#0BBFBF;
  --done-surface:#27498C;--done-ink:#fff;--done-line:#0BBFBF;
  --shadow:0 1px 2px #0006;
  color-scheme:dark;
}

/* ---------- Base ---------- */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;-webkit-font-smoothing:antialiased}
button,input,select{font:inherit;color:inherit}
button,a,label{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
button{cursor:pointer}
button:disabled{cursor:not-allowed}
/* 16px evita el zoom automático de iOS al enfocar un campo */
input,select{font-size:1rem}
h1{font-size:clamp(1.5rem,6.6vw,2rem);line-height:1.15;letter-spacing:-.02em;margin:0.375rem 0 0.375rem}
h2{font-size:var(--font-lg);line-height:1.25;margin:0}
p{margin:0.25rem 0 0.75rem}
:focus-visible{outline:3px solid var(--focus);outline-offset:2px;box-shadow:0 0 0 2px var(--surface)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.hidden{display:none!important}
.app-status{position:fixed;z-index:60;right:12px;bottom:calc(var(--nav-h) + 10px + env(safe-area-inset-bottom));left:12px;max-width:560px;margin:0 auto;padding:0.625rem 0.625rem 0.625rem 0.875rem;border:1px solid var(--line);border-left:4px solid #c83342;border-radius:var(--radius-sm);background:var(--surface);color:var(--ink);box-shadow:var(--shadow);font-size:var(--font-sm);font-weight:600;display:flex;align-items:flex-start;justify-content:space-between;gap:.625rem}
.app-status>span{align-self:center}
.app-status>button{display:grid;width:2rem;height:2rem;flex:0 0 2rem;place-items:center;padding:0;border:0;border-radius:50%;background:var(--blue-tint);color:var(--ink);font-size:1.375rem;line-height:1;cursor:pointer}
.app-status[hidden]{display:none}
@media(min-width:900px){.app-status{bottom:20px;left:calc(248px + 24px)}}

/* ---------- Estructura ---------- */
.app-shell{min-height:100dvh;overflow-x:clip}
main{display:block;min-width:0;max-width:640px;margin:0 auto;padding:0.75rem var(--pad) calc(2rem + env(safe-area-inset-bottom))}

.topbar{position:sticky;top:0;z-index:20;height:var(--topbar-h);display:flex;align-items:center;gap:0.375rem;padding:0 0.5rem;background:var(--bg);font-weight:700;font-size:0.9375rem}
.topbar-brand{display:flex;align-items:center;gap:0.4375rem;flex:none;color:var(--ink);line-height:1}
.topbar-logo-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;background:var(--blue);color:#fff;font-size:0.9375rem;font-weight:900;letter-spacing:-.08em}
.topbar-logo-name{font-size:0.8125rem;font-weight:900;letter-spacing:-.02em}
.topbar-logo-name small{font-size:0.625rem;letter-spacing:.11em}
body:has(main.welcome) .topbar-brand{display:none}
body:has(main.dashboard) .topbar-brand{color:var(--head-ink)}
body:has(main.dashboard) .topbar-logo-mark{background:var(--head-ink);color:var(--head)}
.topbar .back{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:12px;background:none;color:inherit;font-size:1.875rem;line-height:1;padding:0 0 0.25rem}
.topbar [hidden], [hidden]{display:none!important}
.topbar-settings{display:grid;place-items:center;flex:none;width:44px;height:44px;margin-left:auto;border:0;border-radius:12px;background:transparent;color:inherit;font-size:1.375rem}
.topbar .back:active{background:#0000000d}
body:has(main.dashboard) .topbar{background:var(--head);color:var(--head-ink)}
body:has(main.dashboard) .topbar .back:active{background:#ffffff26}

#app.screen-enter{animation:screen-enter .2s ease-out}
@keyframes screen-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- Botones y tarjetas ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:0.5rem;min-height:50px;padding:0.75rem 1.125rem;border:2px solid var(--blue);border-radius:var(--radius-sm);background:var(--surface);color:var(--blue-text);font-weight:700;text-align:center;text-decoration:none;transition:transform .12s ease,background-color .15s ease,opacity .15s ease}
.btn.primary{background:var(--blue);color:#fff}
.btn:active:not(:disabled){transform:scale(.98)}
.btn:disabled{opacity:.45}
.btn.small{min-height:var(--target-size);padding:0.5rem 1.125rem;font-size:var(--font-sm)}
.continue{width:100%;margin-top:0.75rem}
.centered{display:flex;width:100%;margin:1.375rem 0 0}
@media(hover:hover){.btn.primary:hover:not(:disabled){background:var(--blue-strong);border-color:var(--blue-strong)}}

.card{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:var(--radius);padding:var(--space-4);box-shadow:var(--shadow)}
.card b{display:block;font-size:0.9375rem;margin-bottom:0.25rem}
.card p{margin:0;color:var(--muted)}
.cards{display:grid;gap:0.625rem;margin:1rem 0 0.5rem}
.intro-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:0.5rem}
.intro-cards .card{display:grid;justify-items:center;gap:0.5rem;padding:0.875rem 0.5rem;text-align:center}
.intro-cards .card b{margin:0;font-size:0.8125rem}
.intro-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--blue-tint);color:var(--blue-text)}
.intro-icon svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* Casillas personalizadas (checkbox y radio) */
.curriculum input,.check-row input,.course-status-controls input,.record-status input{appearance:none;-webkit-appearance:none;flex:none;display:inline-grid;place-items:center;width:24px;height:24px;margin:0;border:2px solid var(--line-strong);border-radius:7px;background:var(--surface);vertical-align:middle;cursor:pointer;transition:background-color .12s ease,border-color .12s ease}
.check-row input[type=radio]{border-radius:50%}
.curriculum input:checked,.check-row input:checked,.course-status-controls input:checked,.record-status input:checked{background:var(--blue);border-color:var(--blue)}
.curriculum input:checked::after,.check-row input:checked::after,.course-status-controls input:checked::after,.record-status input:checked::after{content:'';width:6px;height:11px;margin-top:-2px;border:solid #fff;border-width:0 2.5px 2.5px 0;transform:rotate(45deg)}

/* ---------- Bienvenida ---------- */
main.welcome{max-width:none;min-height:calc(100dvh - var(--topbar-h));display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:1.5rem 1.5rem calc(2.5rem + env(safe-area-inset-bottom));background:radial-gradient(ellipse at 0% 15%,#D5F2E5 0,transparent 45%),radial-gradient(ellipse at 100% 90%,#D5F2E5 0,transparent 45%),linear-gradient(150deg,#f5faf8,#fff 60%,#D5F2E5)}
.welcome-logo{display:flex;align-items:center;gap:0.75rem;margin:0 auto 1.5rem;color:var(--blue-text);font-size:1.4375rem;font-weight:900;line-height:1;text-align:left}
.welcome-logo-mark{display:grid;place-items:center;width:58px;height:58px;border-radius:17px;background:var(--blue);color:#fff;font-size:1.625rem;letter-spacing:-.08em}
.welcome-logo small{font-size:0.9375rem;letter-spacing:.12em}
.welcome h1{margin:0 0 0.875rem;font-size:1.75rem}
.welcome p{max-width:300px;margin:0.5rem auto 2.75rem;color:var(--muted)}
.actions{display:grid;gap:0.625rem;width:min(100%,360px)}
body.dark-theme main.welcome{background:radial-gradient(ellipse at 0% 15%,#27498C 0,transparent 45%),radial-gradient(ellipse at 100% 90%,#323159 0,transparent 45%),linear-gradient(150deg,#10131d,#1a1f30 60%,#323159)}

/* ---------- Registro ---------- */
.progress{display:flex;gap:0.375rem;margin:0.25rem 0 1.125rem}
.progress i{height:6px;flex:1;border-radius:6px;background:var(--line)}
.progress i.active{background:var(--blue)}
.field{display:grid;gap:0.375rem;margin:1rem 0;font-size:0.875rem;font-weight:600}
.field input,.field select{width:100%;height:50px;border:1.5px solid var(--line-strong);border-radius:12px;padding:0 0.875rem;background:var(--surface);color:var(--ink);font-size:1rem;font-weight:400}
.field input:focus,.field select:focus{border-color:var(--blue);outline:none;box-shadow:0 0 0 3px #416EF233}
.field input:focus-visible,.field select:focus-visible{outline:3px solid var(--focus);outline-offset:2px;box-shadow:0 0 0 2px var(--surface)}
.hint{font-size:0.8125rem;font-weight:400;color:var(--muted)}
.choice{width:100%;justify-content:flex-start;text-align:left;border:1.5px solid var(--line);color:var(--ink)}
.choice.selected{border:2px solid var(--blue);background:var(--blue-tint);color:var(--blue-text)}
.progress-hint{font-size:0.8125rem;color:var(--muted)}

.table-wrap{margin:0.5rem calc(-1 * var(--pad)) 0;padding:0 var(--pad);overflow-x:auto;overscroll-behavior-inline:contain;max-height:none}
.curriculum{width:100%;border-collapse:collapse;table-layout:fixed;font-size:0.875rem}
.curriculum th{position:sticky;top:var(--topbar-h);z-index:2;background:var(--bg);padding:0.625rem 0.125rem;font-size:0.6875rem;line-height:1.15;font-weight:700;text-align:center;color:var(--muted);text-transform:uppercase;letter-spacing:.02em}
.curriculum th:first-child{width:44%;text-align:left;padding-left:0}
.curriculum td{padding:0.625rem 0.125rem;border-bottom:1px solid var(--line);text-align:center;line-height:1.25}
.curriculum td:first-child{text-align:left;padding-left:0;overflow-wrap:anywhere}
.course-level{display:block;margin-top:0.1875rem;color:var(--muted);font-size:0.75rem}
.onboarding-hint{margin:0.5rem 0 1rem;color:var(--muted);font-size:0.875rem}
.progress-course-select input{width:24px;height:24px;accent-color:var(--blue)}
.progress-course-list{display:grid;gap:0.5rem}
.progress-course-row{display:grid;grid-template-columns:40px minmax(0,1fr) minmax(118px,auto);align-items:center;gap:0.625rem;min-height:68px;padding:0.625rem;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);box-shadow:var(--shadow)}
.progress-course-select{display:grid;place-items:center;min-height:44px;cursor:pointer}
.progress-course-name{display:grid;gap:0.1875rem;min-width:0}
.progress-course-name b{font-size:0.875rem;line-height:1.25;overflow-wrap:anywhere}
.progress-course-name small{color:var(--muted);font-size:0.75rem}
.progress-feedback{min-height:24px;margin:0.5rem 0;color:var(--blue-text);font-size:0.875rem;font-weight:700}
body.dark-theme .progress-course-row{background:#22283d;border-color:#414967}
.progress-screen-head h1{margin-bottom:0.125rem}
.progress-screen-head .onboarding-career{margin:0;color:var(--muted);font-weight:700}
.progress-screen-head .onboarding-hint{margin:0.5rem 0 0.875rem}
.progress-overview{margin:0 0 0.875rem;padding:0.875rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.progress-overview-numbers{display:flex;align-items:center;gap:0.75rem}
.progress-overview-numbers>strong:first-child{font-size:1.875rem;line-height:1;font-variant-numeric:tabular-nums;color:var(--blue-text)}
.progress-overview-numbers>strong:first-child span{font-size:1rem;color:var(--muted)}
.progress-overview-numbers>div{display:grid;gap:0.125rem;min-width:0}
.progress-overview-numbers>div b{font-size:0.875rem}
.progress-overview-numbers>div small{font-size:0.75rem;color:var(--muted)}
.progress-overview-numbers>.progress-overview-percent{margin-left:auto;color:var(--blue-text);font-size:1.375rem;font-variant-numeric:tabular-nums}
.progress-overview-track{height:8px;margin-top:0.75rem;overflow:hidden;border-radius:99px;background:var(--line)}
.progress-overview-track span{display:block;height:100%;border-radius:inherit;background:var(--teal);transition:width .2s ease}
.progress-filter-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.4375rem;margin:0 0 0.625rem}
.progress-filter{display:flex;align-items:center;justify-content:center;gap:0.375rem;min-width:0;min-height:44px;padding:0.5rem 0.375rem;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);font-size:0.8125rem;font-weight:700}
.progress-filter b{display:grid;place-items:center;min-width:22px;height:22px;padding:0 0.3125rem;border-radius:50px;background:var(--bg);color:var(--muted);font-size:0.6875rem}
.progress-filter.active{border-color:var(--blue);background:var(--blue);color:#fff}
.progress-filter.active b{background:#ffffff30;color:#fff}
body.dark-theme .progress-filter.active{background:#27498C;border-color:#27498C;color:#fff}
.progress-search{display:grid;gap:0.3125rem;margin:0 0 0.625rem;font-size:0.75rem;font-weight:700}
.progress-search input{width:100%;min-height:44px;padding:0.5rem 0.75rem;border:1px solid var(--line-strong);border-radius:11px;background:var(--surface);color:var(--ink)}
.progress-search input::placeholder{color:var(--muted);opacity:1}
.progress-bulk-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0.5rem;margin:0 0 0.625rem;padding:0.625rem;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface)}
.progress-bulk-panel[hidden]{display:none}
.progress-bulk-panel>label{display:flex;align-items:center;gap:0.5rem;min-height:44px;font-size:0.75rem;font-weight:700}
.progress-bulk-panel input{width:20px;height:20px;accent-color:var(--blue)}
.progress-bulk-panel .btn{min-height:44px;padding:0.5rem 0.625rem;font-size:0.75rem;white-space:nowrap}
.progress-course-row{grid-template-columns:34px minmax(0,1fr) minmax(118px,auto);gap:0.5rem;padding:0.625rem}
.progress-course-name{grid-template-columns:minmax(0,1fr);gap:0.25rem}
.progress-course-name b{font-size:0.875rem}
.progress-course-row.is-approved{border-color:#0BBFBF;background:#D5F2E5}
body.dark-theme .progress-course-row.is-approved{background:#27498C;border-color:#0BBFBF;color:#fff}
.progress-empty{display:grid;justify-items:center;gap:0.375rem;padding:1.5rem 1rem;text-align:center}
.progress-empty>span{font-size:1.75rem}
.progress-empty b{font-size:0.9375rem}
.progress-empty p{margin:0;color:var(--muted);font-size:0.8125rem}
.progress-continue-bar{position:fixed;z-index:35;right:0;bottom:0;left:0;display:grid;justify-items:center;gap:0;padding:0.5rem var(--pad) calc(0.5rem + env(safe-area-inset-bottom));border-top:1px solid var(--line);background:var(--surface);box-shadow:0 -6px 22px #1d225014}
.progress-continue-bar .progress-feedback:empty{display:none}
.progress-continue-bar .progress-feedback{width:min(100%,640px);min-height:0;margin:0;padding:0 0 0.25rem}
.progress-continue-bar .continue{width:min(100%,640px);min-height:48px;margin:0}
main:has(.progress-continue-bar){padding-bottom:calc(5.25rem + env(safe-area-inset-bottom))}
.app-shell.with-sidebar .progress-continue-bar{bottom:calc(var(--nav-h) + env(safe-area-inset-bottom))}
@media(min-width:900px){
  .app-shell.with-sidebar .progress-continue-bar{left:248px;bottom:0}
  .app-shell.with-sidebar main#app:has(.progress-continue-bar){padding-bottom:6.25rem}
}
@media(min-width:600px){.progress-bulk-panel{grid-template-columns:minmax(0,1fr) auto}.progress-bulk-panel .btn{width:auto}.progress-course-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ---------- Pantallas con encabezado de color ---------- */
main.dashboard{max-width:none;min-height:calc(100dvh - var(--topbar-h));padding:0 var(--pad) 2rem;background:var(--bg)}
.matter-head,.agenda-head,.history-head,.calendar-hero{margin:0 calc(-1 * var(--pad)) 1.125rem;padding:0.875rem var(--pad) 1.375rem;background:var(--head);color:var(--head-ink);border-radius:0 0 26px 26px}
.matter-head h1,.agenda-head h1,.history-head h1{margin:0 0 0.25rem}
.matter-head p,.agenda-head p,.history-head p{margin:0;opacity:.9}
.history-head .career-greeting{font-size:clamp(0.9375rem,4vw,1.125rem);font-weight:700;line-height:1.35}
.career-program{display:block;margin-top:0.3125rem;font-size:0.75rem;font-weight:600;opacity:.78}

/* ---------- Materias ---------- */
.matter-head>p{font-size:0.875rem}
.matter-search{display:grid;gap:0.375rem;margin:0.875rem 0 0.75rem;font-size:0.875rem;font-weight:600}
.matter-search input{width:100%;height:48px;border:0;border-radius:12px;padding:0 0.875rem;background:var(--surface);color:var(--ink)}
.pills{display:flex;gap:0.5rem;overflow-x:auto;margin:0 calc(-1 * var(--pad));padding:0.125rem var(--pad) 0.25rem;scrollbar-width:none;scroll-snap-type:x proximity;scroll-padding-inline:var(--pad)}
.pills::-webkit-scrollbar{display:none}
.pill{flex:none;min-height:var(--target-size);padding:0.5rem 0.875rem;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:var(--font-sm);font-weight:600;white-space:nowrap;scroll-snap-align:start}
.pill.active{background:var(--blue);border-color:var(--blue);color:#fff}
.matter-head .pill{background:#ffffff1f;border-color:#ffffff47;color:#fff}
.matter-head .pill.active{background:#fff;border-color:#fff;color:var(--blue)}
.matter-head .plan-total{margin:0.625rem 0 0;font-size:0.8125rem;font-weight:700}
.matter-filter-group{display:grid;gap:0.3125rem;margin-top:0.5rem}
.matter-filter-group>span{font-size:0.75rem;font-weight:700}
.matter-filters{display:flex;gap:0.5rem;margin:0}
.matter-filters .pill{flex:1}
.year-filter{margin-top:0.5rem}
.year-filter summary{width:max-content;max-width:100%;min-height:var(--target-size);display:flex;align-items:center;padding:0 0.75rem;border:1px solid #ffffff47;border-radius:12px;background:#ffffff1a;color:#fff;font-size:0.8125rem;font-weight:700;cursor:pointer}
.year-filter .pills{margin-top:0.5rem}
.year-filter .pill{background:#ffffff1f;border-color:#ffffff47;color:#fff}
.year-filter .pill.active{background:#fff;border-color:#fff;color:var(--blue)}

.matter-cards{display:grid;gap:0.625rem}
.matter-card{position:relative;display:grid;gap:0.5rem;padding:0.875rem;content-visibility:auto;contain-intrinsic-size:auto 200px}
.matter-card.is-completed{background:var(--done-surface);border-color:var(--done-line);color:var(--done-ink)}
.matter-card.is-completed .course-open{color:var(--done-ink)}
.matter-card.is-completed .course-open span{color:inherit;opacity:.78}
.matter-card.is-completed .course-open strong{color:var(--blue-text)}
.matter-card.is-completed .grade-control{border-color:var(--done-line)}
.course-open{display:grid;gap:0.5rem;width:100%;padding:0 2.625rem 0 0;border:0;background:none;color:var(--ink);text-align:left}
.course-open b{margin:0;font-size:1.125rem;line-height:1.25}
.matter-card-title{display:flex;align-items:flex-start;justify-content:space-between;gap:0.5rem}
.matter-card-title>span{flex:none;padding-top:0.125rem;color:var(--blue-text);font-size:0.9375rem;line-height:1}
.course-open .matter-meta{display:flex;flex-wrap:wrap;gap:0.375rem}
.matter-meta span{width:max-content;max-width:100%;padding:0.1875rem 0.5rem;border-radius:999px;background:var(--blue-tint);color:var(--blue-text);font-size:0.75rem;font-weight:700;line-height:1.35}
body.dark-theme .matter-meta span{background:#323159;color:#ecedfb}
.status-badge{width:max-content;max-width:100%;padding:0.1875rem 0.5625rem;border-radius:999px;background:#fff2d6;color:#815500;font-size:0.75rem!important;font-weight:700}
.status-badge.is-done{background:#0BBFBF;color:#323159}
body.dark-theme .status-badge{background:#3a3120;color:#ffe099}
body.dark-theme .status-badge.is-done{background:var(--teal);color:#323159}
.course-year{display:inline-block!important;width:max-content;max-width:100%;padding:0.1875rem 0.5625rem;border-radius:999px;background:var(--blue-tint);color:var(--blue-text)!important;font-size:0.75rem!important;font-weight:700}
.course-hours,.course-note{font-size:0.75rem!important;color:var(--muted)}
.favorite-toggle{position:absolute;top:10px;right:10px;width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:50%;background:none;color:var(--muted);font-size:1.375rem;line-height:1}
.favorite-toggle svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.favorite-toggle:active{background:var(--blue-tint)}
.favorite-toggle.is-favorite,.favorite-remove{color:var(--pink)}
.favorite-toggle.is-favorite svg{fill:currentColor}
.grade-control{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding-top:0.625rem;border-top:1px solid var(--line);font-size:0.8125rem;font-weight:600}
.grade-control>span{display:grid;gap:0.125rem;min-width:0}
.grade-control>span small{color:var(--muted);font-size:0.6875rem;font-weight:500;line-height:1.25}
.matter-card.is-completed .grade-control>span small{color:var(--done-ink);opacity:.8}
.grade-control input{width:78px;flex:none;height:var(--target-size);border:1.5px solid var(--line-strong);border-radius:10px;padding:0 0.375rem;background:var(--surface);color:var(--ink);font-size:0.875rem;font-weight:700;text-align:center}
.grade-control input:disabled{border-color:var(--line);background:var(--bg);color:var(--muted)}
.grade-control span{min-width:0}
.empty-search{padding:1.5rem 0;text-align:center;color:var(--muted)}
.empty-state{display:grid;justify-items:center;gap:0.5rem;padding:1.5rem 1rem;text-align:center}
.empty-state>b{margin:0;font-size:1rem}
.empty-state p{margin:0;color:var(--muted);font-size:0.875rem}
.empty-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:16px;background:var(--blue-tint);color:var(--blue-text)}
.empty-icon svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.empty-state .btn{margin-top:0.5rem}

/* Detalle de materia */
.detail-page .matter-head h1{font-size:clamp(1.375rem,6vw,1.875rem)}
.matter-detail-cards{display:grid;gap:0.75rem}
.matter-detail-cards .card p{line-height:1.55;margin-top:0.25rem}
.course-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0.625rem;padding:0.75rem}
.course-fact{display:grid;align-content:start;gap:0.25rem;min-width:0;padding:0.75rem;border:1px solid var(--line);border-radius:12px;background:var(--bg)}
.course-fact b{margin:0;color:var(--muted);font-size:0.6875rem;letter-spacing:.03em;text-transform:uppercase}
.course-fact>span{font-size:1.0625rem;font-weight:800;line-height:1.3}
.course-fact small{color:var(--muted);font-size:0.625rem;line-height:1.25}
.course-extra summary,.record-note summary{min-height:var(--target-size);display:flex;align-items:center;cursor:pointer;font-weight:700}
.course-extra p,.record-note>span{display:block;margin:0;padding:0 0 0.75rem;color:var(--muted);font-size:0.875rem}
.subject-actions{display:grid;gap:0.375rem}
.subject-actions>*{width:100%;min-height:44px}
.subject-actions .btn{min-height:44px;padding:0.5rem 0.75rem;font-size:0.875rem}
.subject-actions .course-favorite{min-height:44px;padding:0.5rem 0.75rem;text-align:center;font-size:0.875rem}
.subject-actions .course-page-link{min-height:44px;padding:0.5rem 0.75rem;font-size:0.875rem}
.course-page-link{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;min-height:44px;padding:0.625rem 0.75rem;border-radius:12px;background:var(--blue);color:#fff;font-weight:700;text-decoration:none}
.course-page-link span{font-size:1.125rem}
.course-favorite{min-height:54px;padding:0.75rem 1rem;border:1.5px solid var(--line);border-radius:14px;background:var(--surface);color:var(--blue-text);font-weight:700;text-align:left}
.course-favorite.is-favorite{border-color:#f3a6c1;background:#fff0f5;color:#bf285d}
body.dark-theme .course-favorite.is-favorite{background:#3a1f2c;border-color:#7a3553;color:#ff8db3}
.course-status-controls{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:0.75rem;margin:0.75rem 0;font-weight:700}
.course-status-controls select{width:100%;min-height:44px;padding:0.375rem 0.625rem;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);font-size:0.875rem}

/* Cátedras */
.chair-cards{display:grid;gap:0.75rem}
.chair-search-label{display:block;margin:1rem 0 0.375rem;font-size:0.8125rem;font-weight:700}
.chair-search{width:100%;min-height:48px;margin:0 0 0.875rem;padding:0.625rem 0.75rem;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit}
.chair-search:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.chair-picker{display:grid;gap:0.625rem;max-width:560px;margin:0 auto}
.chair-picker>label{font-weight:700}
.chair-picker select{width:100%;min-height:50px;padding:0.625rem 0.75rem;border:1.5px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink)}
.chair-picker .btn{width:100%}
.chair-focus{margin:0;color:var(--muted);font-size:0.8125rem}
.chair-card{width:100%;min-height:96px;display:flex;align-items:center;justify-content:space-between;gap:0.75rem;text-align:left}
.chair-copy{display:grid;gap:0.25rem;min-width:0}
.chair-copy b{margin:0}
.chair-copy span{font-size:0.8125rem;color:var(--muted)}
.chair-copy span,.chair-copy b{overflow-wrap:anywhere}
.chair-list-option[hidden]{display:none}
.chair-copy strong{font-size:0.8125rem;color:var(--blue-text)}
.chair-list-option{width:100%;color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.chair-list-option[aria-pressed=true]{border-color:var(--blue);outline:2px solid var(--blue);outline-offset:1px}
.chair-list-option:hover{border-color:var(--blue)}
.chair-mark{width:60px;height:60px;flex:none;display:grid;place-items:center;border-radius:12px;background:var(--accent);color:#fff;font-size:1.75rem;font-weight:900;box-shadow:6px 6px 0 var(--blue)}
.chair-mark.yellow{background:#e7dc00;color:#006b85}
.chair-mark.green{background:#8ed800;color:#101010;font-size:2.25rem}
.chair-mark.white{background:#fff;color:#5b5471;font-family:Georgia,serif;font-style:italic;border:1px solid var(--line)}
.chair-mark.black{background:#050505;color:#ffe84d;font-size:1.125rem;text-shadow:2px 1px #e22}
.chair-mark.pink{background:#ed2382;color:#ffc5dd;font-size:2.625rem;text-shadow:3px 3px #bb1467}
main.chair-detail-page{padding-top:1.125rem}
.chair-title{display:flex;justify-content:space-between;align-items:center;gap:0.75rem;margin-bottom:1.375rem}
.chair-title h1{margin:0}
.chair-title .chair-mark{width:76px;height:76px;font-size:2.75rem;margin-right:0.5rem}
.teacher-card,.schedule-card{margin-bottom:0.75rem}
.schedule-card{padding:0.875rem 1rem;border-radius:var(--radius);background:var(--blue-tint);color:var(--blue-text);font-weight:700}
.chair-detail-page h2{margin:1.5rem 0 0.75rem}
.stats-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.5rem}
.stats-grid .card{min-width:0;padding:0.75rem 0.625rem}
.stats-grid b{font-size:2.125rem;line-height:1.05;margin:0}
.stats-grid span{display:block;font-size:0.75rem;line-height:1.25;color:var(--muted)}

/* Pantallas de confirmación */
main.matter-success,main.agenda-success{max-width:none;min-height:calc(100dvh - var(--topbar-h));display:flex;align-items:center;justify-content:center;padding:1.5rem var(--pad) 2.5rem;text-align:center}
.matter-success-content,.success-content{width:100%;max-width:420px}
.matter-success-content>.chair-mark{width:112px;height:112px;margin:0 auto 2.5rem;font-size:4rem;box-shadow:14px 14px 0 var(--blue)}
.matter-success h1,.success-content h1{margin:0 0 1.125rem}
.matter-success p{margin:0 0 2rem;font-size:1.125rem;font-weight:700;line-height:1.35;color:var(--muted)}
.success-actions{display:grid;gap:0.625rem}

/* ---------- Agenda ---------- */
.agenda-events,.day-events{display:grid;gap:0.625rem}
.event-card,.planned-course{width:100%;display:grid;gap:0.25rem;text-align:left}
.event-card b,.planned-course b{margin:0}
.event-card span,.planned-course span{font-size:0.8125rem;color:var(--muted)}
.empty-event{text-align:center;padding:1.625rem 1.125rem}
.planned-teaser{margin-bottom:0.875rem}
.planned-teaser p{margin:0.25rem 0 0.75rem}

.light-label{color:var(--ink)}
.event-types,.reminder-options{min-width:0;margin:1.125rem 0 0;padding:0.25rem 1rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.event-types legend{float:left;width:100%;padding:0.75rem 0 0.25rem;font-size:0.875rem;font-weight:600}
.check-row{clear:both;display:flex;align-items:center;gap:0.75rem;min-height:52px;border-top:1px solid var(--line);cursor:pointer}
.event-types legend+.check-row,.reminder-options .check-row:first-child{border-top:0}
.event-datetime{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:0 0.75rem}
.event-datetime .field{min-width:0;margin:0.75rem 0}
.event-datetime input{min-width:0}

.calendar-hero{padding-top:0.375rem;padding-bottom:1.125rem}
.month-switch{display:flex;align-items:center;justify-content:space-between;margin-bottom:0.75rem}
.month-switch button{width:44px;height:44px;border:0;border-radius:12px;background:#ffffff1f;color:#fff;font-size:1.25rem;font-weight:700}
.month-switch span{font-size:1.125rem;font-weight:800;letter-spacing:.08em}
.calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);column-gap:0;row-gap:0.25rem;text-align:center}
.weekdays{margin-bottom:0.25rem;font-size:0.75rem;opacity:.75}
.calendar-legend{display:flex;justify-content:center;gap:1.125rem;margin:-8px 0 1rem;color:var(--muted);font-size:0.8125rem}
.calendar-legend span{display:inline-flex;align-items:center;gap:0.375rem}
.calendar-legend i{width:9px;height:9px;border-radius:50%}
.legend-class{background:var(--green)}
.legend-event{background:var(--blue)}
.cal-day,.cal-empty{height:var(--target-size)}
.cal-day{position:relative;padding:0;border:0;border-radius:12px;background:none;color:#fff;font-size:0.9375rem}
.cal-day:active{background:#ffffff26}
.cal-day.chosen{background:#fff;color:var(--blue);font-weight:800}
.cal-day.has-event{font-weight:800}
.cal-day.has-event::after{content:'';position:absolute;left:50%;bottom:5px;width:5px;height:5px;margin-left:-2.5px;border-radius:50%;background:currentColor}
.cal-day.has-class:not(.has-event)::after{background:#5ff0bd}
.cal-day.has-class.has-event::before{content:'';position:absolute;left:calc(50% - 6px);bottom:5px;width:5px;height:5px;border-radius:50%;background:#5ff0bd}
.cal-day.chosen.has-class:not(.has-event)::after,.cal-day.chosen.has-class.has-event::before{background:var(--green)}
.semester-plan{display:grid;gap:0.625rem;margin-bottom:1rem}
.semester-plan h2{font-size:1rem}
.no-day-event{padding:1.25rem 0;text-align:center;color:var(--muted)}
.detail-card{margin-bottom:0.75rem}
.detail-card p{margin-top:0.375rem}
.event-actions{display:grid;gap:0.625rem}
.event-actions .continue{margin-top:0}
.event-actions-hint{margin:-4px 0 0.25rem;font-size:0.8125rem;color:var(--muted);text-align:center}
.event-actions-row{display:grid;grid-template-columns:1fr 1fr;gap:0.625rem}
.btn.danger{border-color:#e5484d;color:#d1343a}
.btn.danger.confirm{background:#e5484d;color:#fff}
body.dark-theme .btn.danger{border-color:#ff6b70;color:#ff8a8e}
body.dark-theme .btn.danger.confirm{background:#d1343a;color:#fff}

/* Favoritos */
.favorite-plan-list{display:grid;gap:0.75rem}
.favorite-plan-card{display:grid;gap:0.875rem;padding:1rem}
.favorite-plan-title{display:flex;align-items:flex-start;justify-content:space-between;gap:0.625rem}
.favorite-open{display:grid;gap:0.25rem;flex:1;padding:0;border:0;background:none;color:var(--ink);text-align:left}
.favorite-open b{margin:0;font-size:1rem}
.favorite-open span{font-size:0.8125rem;color:var(--muted)}
.favorite-remove{flex:none;width:44px;height:44px;display:grid;place-items:center;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--pink)}
.favorite-remove svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.favorite-plan-fields,.plan-time-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr));gap:0.625rem}
.favorite-plan-fields label,.plan-time-fields label{display:grid;gap:0.375rem;min-width:0;font-size:0.875rem;font-weight:600}
.favorite-plan-fields select,.favorite-plan-fields input,.plan-time-fields input{width:100%;min-width:0;height:46px;border:1.5px solid var(--line-strong);border-radius:12px;padding:0 0.625rem;background:var(--surface);color:var(--ink)}
.plan-days{min-width:0;margin:0;padding:0;border:0}
.plan-days legend{margin-bottom:0.5rem;font-size:0.8125rem;font-weight:600}
.plan-days>div{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:0.375rem}
.plan-days label{position:relative;display:grid;place-items:center;height:var(--target-size);border:1.5px solid var(--line);border-radius:12px;background:var(--surface);font-size:0.8125rem;font-weight:700;cursor:pointer}
.plan-days input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.plan-days label:has(input:checked){background:var(--blue);border-color:var(--blue);color:#fff}
.plan-days label:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:2px;box-shadow:0 0 0 2px var(--surface)}

/* ---------- Navegación: barra inferior en celular ---------- */
.app-shell.with-sidebar main#app{padding-bottom:calc(var(--nav-h) + 1.75rem + env(safe-area-inset-bottom))}
.app-shell.with-sidebar main.matter-success,.app-shell.with-sidebar main.agenda-success{min-height:calc(100dvh - var(--topbar-h) - var(--nav-h))}
.app-sidebar{position:fixed;z-index:40;left:0;right:0;bottom:0;display:flex;padding:0.25rem 0.25rem env(safe-area-inset-bottom);background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -6px 20px #1d22500f}
.sidebar-brand,.sidebar-logout{display:none!important}
.sidebar-links{flex:1;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.app-sidebar button{height:var(--nav-h);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.1875rem;padding:0;border:0;background:none;color:var(--muted);font-size:0.6875rem;font-weight:600}
.app-sidebar button span{display:block;text-transform:lowercase}
.app-sidebar button span::first-letter{text-transform:uppercase}
.app-sidebar svg{width:22px;height:22px;padding:0.25rem 1rem;box-sizing:content-box;border-radius:99px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:background-color .15s ease}
.app-sidebar button.active{color:var(--blue-text);font-weight:800}
.app-sidebar button.active svg{background:var(--blue-tint)}

/* ---------- Tablet ---------- */
@media(min-width:600px){
  :root{--pad:28px}
  main.dashboard{padding-left:var(--pad);padding-right:var(--pad)}
  .matter-cards,.favorite-plan-list,.agenda-events{grid-template-columns:repeat(2,minmax(0,1fr))}
  .success-actions{display:flex;justify-content:center}
  .success-actions .btn{min-width:170px}
  .centered{width:auto;min-width:220px;margin-left:auto;margin-right:auto}
}

/* ---------- Escritorio: menú lateral ---------- */
@media(min-width:900px){
  :root{--pad:clamp(32px,4vw,56px)}
  .app-shell.with-sidebar{padding-left:15.5rem}
  .app-shell.with-sidebar main#app{padding-bottom:3.5rem}
  .app-shell.with-sidebar main.matter-success,.app-shell.with-sidebar main.agenda-success{min-height:calc(100dvh - var(--topbar-h))}
  .app-sidebar{top:0;right:auto;width:248px;flex-direction:column;gap:1.25rem;padding:1.375rem 1rem 1rem;background:var(--sidebar);border:0;box-shadow:4px 0 20px #24336326;color:#fff}
  .sidebar-brand,.sidebar-logout{display:flex!important}
  .sidebar-brand{align-items:center;gap:0.75rem;padding:0 0.5rem 1.125rem;border-bottom:1px solid #ffffff40;font-size:1.125rem;line-height:1.08}
  .sidebar-logo-mark{display:grid;place-items:center;flex:none;width:50px;height:50px;border-radius:14px;background:#fff;color:var(--blue);font-size:1.375rem;font-weight:900;box-shadow:5px 5px 0 #ffffff55}
  .sidebar-links{display:flex;flex-direction:column;gap:0.375rem}
  .app-sidebar button{height:auto;min-height:48px;flex-direction:row;justify-content:flex-start;gap:0.75rem;padding:0.625rem 0.75rem;border-radius:12px;color:#fff;font-size:0.875rem;text-align:left}
  .app-sidebar svg{padding:0;width:22px;height:22px}
  .app-sidebar button.active{color:#fff;background:#ffffff2b}
  .app-sidebar button.active svg{background:none}
  .app-sidebar .sidebar-logout{margin-top:auto;border-top:1px solid #ffffff40;border-radius:0;padding-top:1rem}
  @media(hover:hover){.app-sidebar button:hover:not(.active){background:#ffffff18}}
  .matter-cards{grid-template-columns:repeat(auto-fill,minmax(300px,1fr))}
  .matter-head,.agenda-head,.history-head,.calendar-hero{border-radius:0 0 32px 32px}
  .matter-detail-cards,.course-status-controls,.event-types,.reminder-options,.event-datetime,.semester-plan,.day-events,.detail-card,.event-actions{max-width:760px}
  .calendar-hero>*{max-width:560px}
}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
}

body.dark-theme .btn.primary,
body.dark-theme .course-page-link,
body.dark-theme .agenda-sections button.active,
body.dark-theme .pill.active,
body.dark-theme .schedule-dialog-days input:checked+span{background:#27498C;border-color:#27498C;color:#fff}
body.dark-theme .matter-head .pill.active,
body.dark-theme .year-filter .pill.active{color:#27498C}
body.dark-theme .appearance-options label:has(input:checked),
body.dark-theme .turn-options input:checked+span{background:#27498C;border-color:#27498C;color:#fff}

.plan-conflict{margin:0;font-size:0.8125rem;color:var(--muted)}.plan-conflict.has-conflict{padding:0.5625rem 0.6875rem;border-radius:10px;background:#e5484d18;color:#b4232a;font-weight:700}body.dark-theme .plan-conflict.has-conflict{color:#ff989c}
@media(min-width:900px){main:not(.welcome){max-width:none;padding-left:clamp(2.625rem,5vw,5.5rem);padding-right:clamp(2.625rem,5vw,5.5rem)}body{font-size:1rem}.app-sidebar{overflow-y:auto}}

body.dark-theme .matter-head .pill.active,
body.dark-theme .year-filter .pill.active{background:#fff;border-color:#fff;color:#27498C}

.course-detail-dialog{width:min(720px,calc(100vw - 24px));max-height:min(90dvh,880px);margin:auto;padding:0;overflow:auto;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--bg);color:var(--ink);box-shadow:0 28px 90px #101a3970}
.course-detail-dialog::backdrop{background:#101629a8;backdrop-filter:blur(4px)}
.course-dialog-content{padding:0 1rem 1.25rem}
.course-detail-dialog .matter-head{margin:0 -16px 1rem;padding:1.125rem 1rem;border-radius:0 0 20px 20px}
.course-dialog-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:0.75rem}
.course-dialog-heading h1{font-size:1.375rem}
.course-dialog-heading .subject-title{font-size:1.125rem;font-weight:800;line-height:1.3}
.course-detail-close{flex:none;width:var(--target-size);height:var(--target-size);border:1px solid #ffffff55;border-radius:50%;background:#ffffff1a;color:#fff;font-size:1.625rem;line-height:1;cursor:pointer}
.course-detail-dialog .matter-detail-cards{padding-bottom:0.25rem}
.weekly-course-actions{display:flex;align-items:center;gap:0.25rem}
.weekly-course-edit,.weekly-course-remove{min-width:44px;min-height:44px;padding:0.375rem 0.5rem;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--blue-text);font-size:0.75rem;font-weight:700}
.weekly-course-remove{color:#a52b35}
body.dark-theme .weekly-course-remove{color:#ff989c}
.planned-course .weekly-course-remove{margin-top:0.375rem;justify-self:start}
.progress-course-select input:disabled{opacity:.45;cursor:not-allowed}
@media(min-width:600px){.course-dialog-content{padding:0 1.375rem 1.5rem}.course-detail-dialog .matter-head{margin-right:-22px;margin-left:-22px;padding-right:1.375rem;padding-left:1.375rem}}

.progress-course-list{display:grid;gap:0.875rem}
.progress-year-group{display:grid;gap:0.5rem;min-width:0}
.progress-year-head{display:flex;align-items:center;justify-content:space-between;gap:0.5rem;padding:0 0.125rem}
.progress-year-head>div{display:grid;gap:0.0625rem}
.progress-year-head>div>b{font-size:0.9375rem}
.progress-year-head>div>small{color:var(--muted);font-size:0.6875rem}
.progress-year-action{min-height:44px;padding:0.375rem 0.6875rem;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--blue-text);font-size:0.75rem;font-weight:800}
.progress-year-courses{display:grid;gap:0.4375rem}
.progress-course-row{display:grid;grid-template-columns:minmax(0,1fr);gap:0.5rem;min-width:0;padding:0.625rem}
.progress-course-row-main{display:grid;grid-template-columns:30px minmax(0,1fr);align-items:center;gap:0.5rem}
.progress-course-name{display:block}
.progress-course-name b{display:block;font-size:0.875rem;line-height:1.3}
.progress-course-select{min-height:44px}
.progress-course-select input{width:22px;height:22px}
.progress-course-grade input{width:100%;min-width:0;height:42px;min-height:42px;padding:0.375rem 0.5rem;border:1px solid var(--line-strong);border-radius:9px;background:var(--surface);color:var(--ink);font-size:0.8125rem;font-weight:600}
.progress-course-grade input{text-align:center;font-weight:800}
.progress-course-row.is-approved{background:var(--done-surface);border-color:var(--done-line);color:var(--done-ink)}
.progress-course-row.is-approved .progress-course-grade input{border-color:var(--done-line)}
body.dark-theme .progress-course-row.is-approved{background:#27498C;border-color:#0BBFBF;color:#fff}
body.dark-theme .progress-course-row.is-approved .progress-course-grade input{background:#22283d;color:#fff}
.progress-feedback:empty{display:none}

/* Tu avance: jerarquía por carrera, nivel y materias */
.progress-level-steps{display:grid;grid-template-columns:repeat(var(--progress-level-count,4),minmax(0,1fr));position:relative;gap:0;margin:0.625rem 0 1.5rem;padding:0 0.25rem}
.progress-level-steps::before{content:"";position:absolute;top:16px;left:10%;right:10%;height:3px;background:var(--line);z-index:0}
.progress-level-step{position:relative;z-index:1;display:grid;justify-items:center;align-content:start;gap:0.4375rem;min-width:0;color:var(--muted);text-align:center;font-size:0.75rem;font-weight:700;line-height:1.2}
.progress-level-step b{display:grid;place-items:center;width:34px;height:34px;border:2px solid #aebbd1;border-radius:50%;background:var(--bg);color:var(--muted);font-size:0.9375rem}
.progress-level-step.is-done b,.progress-level-step.is-current b{border-color:var(--blue);background:var(--blue);color:#fff}
.progress-level-step.is-current b{outline:3px solid #dce6f8;outline-offset:2px}
.progress-level-step.is-current{color:var(--blue-text)}
.progress-screen-head{margin-bottom:0.875rem}
.progress-screen-head h1{margin:0;font-size:clamp(2rem,8vw,2.75rem);line-height:1.04;letter-spacing:-.035em}
.progress-screen-head .onboarding-career{margin-top:0.3125rem;font-size:clamp(1.125rem,5vw,1.5rem);line-height:1.2}
.progress-overview{padding:1.125rem 1rem;border-radius:26px}
.progress-overview-numbers>strong:first-child{font-size:clamp(2.875rem,13vw,4rem)}
.progress-overview-numbers>strong:first-child span{font-size:clamp(1.125rem,5vw,1.5625rem)}
.progress-overview-numbers>div b{font-size:1rem}
.progress-overview-numbers>div small{font-size:0.875rem}
.progress-overview-numbers>.progress-overview-percent{font-size:0.875rem;text-align:right}
.progress-overview-percent strong{display:block;font-size:clamp(1.875rem,8vw,2.5rem);line-height:1.05}
.progress-overview-track{height:12px;margin-top:1rem}
.progress-level-card{margin:1.125rem 0 0;padding:1rem 0.875rem;border:1px solid var(--line);border-radius:26px;background:var(--surface);box-shadow:var(--shadow)}
.progress-level-head{display:flex;align-items:flex-start;justify-content:space-between;gap:0.625rem;margin:0 0 0.875rem}
.progress-level-head>div{display:flex;align-items:flex-start;gap:0.6875rem;min-width:0}
.progress-section-index{display:grid;place-items:center;flex:none;width:38px;height:38px;border-radius:50%;background:var(--blue);color:#fff;font-size:1.125rem;font-weight:800}
.progress-level-head h2{margin:0;font-size:clamp(1.1875rem,5vw,1.5rem);line-height:1.18}
.progress-level-head p{margin:0.3125rem 0 0;color:var(--muted);font-size:0.875rem;line-height:1.35}
.progress-level-count{flex:none;padding:0.5rem 0.6875rem;border:1px solid var(--line);border-radius:999px;background:var(--bg);color:var(--blue-text);font-size:0.75rem;font-weight:800;white-space:nowrap}
.progress-cbc-note{margin:0 0 0.75rem;padding:0.625rem 0.75rem;border-radius:13px;background:var(--blue-tint);font-size:0.8125rem;line-height:1.4}
.progress-level-card .progress-filter-tabs{margin:0 0 0.75rem}
.progress-level-card .progress-filter{min-height:50px;border-radius:24px;font-size:0.8125rem}
.progress-level-card .progress-search{margin-bottom:0.625rem}
.progress-level-card .progress-bulk-panel{margin-bottom:0.75rem;padding:0.625rem 0.75rem;border-radius:17px;background:transparent}
.progress-level-card .progress-bulk-panel>label{font-size:0.875rem}
.progress-course-list{gap:0.5rem}
.progress-year-courses{gap:0;border-radius:20px}
.progress-course-row{min-height:76px;padding:0.75rem;border-radius:20px;box-shadow:none}
.progress-course-row-main{grid-template-columns:38px minmax(0,1fr);gap:0.625rem}
.progress-course-select input{width:23px;height:23px}
.progress-course-name b{font-size:0.9375rem}
.progress-continue-bar{padding:0.625rem var(--pad) calc(0.625rem + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--surface) 94%,transparent)}
.progress-continue-bar .progress-step-actions{display:grid;grid-template-columns:1fr 1fr;gap:0.625rem;width:min(100%,760px)}
.progress-continue-bar .progress-step-actions .btn{width:100%;min-height:54px;margin:0;border-radius:28px;font-size:0.9375rem}
.progress-continue-bar .progress-step-back{border:1.5px solid var(--blue);background:var(--surface);color:var(--blue-text)}
.progress-level-card{padding:0.8125rem 0.625rem}
.progress-overview{padding:0.9375rem 0.75rem}
.progress-level-head{gap:0.375rem}
.progress-level-count{padding:0.4375rem 0.5rem;font-size:0.6875rem}
.progress-continue-bar .progress-step-actions .btn{font-size:0.8125rem}
@media(min-width:600px){.progress-level-steps{max-width:820px;margin-right:auto;margin-left:auto}.progress-level-card{padding:1.25rem}.progress-course-list{grid-template-columns:1fr}}
.event-card{position:relative;overflow:hidden;padding:0.875rem 0.875rem 0.875rem 1.0625rem;border-left:4px solid var(--line-strong)}
.event-card-priority{width:max-content;padding:0.1875rem 0.5rem;border-radius:999px;background:var(--blue-tint);color:var(--blue-strong);font-size:0.6875rem;font-weight:800;line-height:1.3}
.event-card-exam{border-left-color:#d58b00;background:#fff8e8}
.event-card-exam .event-card-priority{background:#f4cd74;color:#402900}
body.dark-theme .event-card-exam{border-left-color:#ffd166;background:#302a22}
body.dark-theme .event-card-exam .event-card-priority{background:#ffd166;color:#30220a}

/* Carrera: resumen; Materias: gestión y avance por tipo */
.career-overview{display:block;margin-bottom:0.75rem;padding:1rem}
.career-overview .progress-wheel{width:100%;margin:0}
.career-overview .progress-wheel b{font-size:clamp(1.625rem,8vw,2.25rem)}
.career-progress-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:1.125rem}
.career-overview .progress-wheel{width:clamp(132px,36vw,166px);justify-self:center}
.career-average{display:grid;gap:0.125rem}
.career-average>span{color:var(--muted);font-size:0.875rem;font-weight:700}
.career-average>strong{color:var(--blue-text);font-size:clamp(2.125rem,10vw,3rem);line-height:1;font-variant-numeric:tabular-nums}
.career-average>strong small{font-size:0.9375rem}
.career-average-hint{max-width:180px;color:var(--muted);font-size:0.75rem;line-height:1.35}
.career-course-progress{display:grid;gap:0.75rem;margin-bottom:0.875rem;padding:1rem}
.career-progress-counts{display:flex;justify-content:space-between;gap:0.5rem;font-size:clamp(0.75rem,3.5vw,0.9375rem);color:var(--muted)}
.career-progress-counts span{overflow-wrap:anywhere}
.career-progress-counts strong{color:var(--ink);font-size:clamp(1.0625rem,5vw,1.375rem);font-variant-numeric:tabular-nums}
.career-total-track{display:flex;width:100%;height:14px;overflow:hidden;border-radius:99px;background:var(--line)}
.career-total-track span{height:100%;border-radius:99px 0 0 99px;background:var(--teal);transition:width .25s ease}
.career-enroll{width:100%;min-height:50px}
.category-progress-list{display:grid;gap:0.625rem;margin:0 0 1rem}
.category-progress{display:grid;gap:0.5rem;padding:0.75rem 0.875rem;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);color:var(--ink)}
.category-progress>div:first-child{display:flex;justify-content:space-between;align-items:baseline;gap:0.5rem;font-size:0.8125rem}
.category-progress strong{flex:none;font-variant-numeric:tabular-nums}
.category-progress-track{height:10px;overflow:hidden;border-radius:99px;background:var(--line)}
.category-progress-track span{display:block;width:var(--bar-value);height:100%;border-radius:inherit;background:var(--bar-color);transition:width .25s ease}
.category-progress-1{--bar-color:var(--accent)}
.category-progress-2{--bar-color:var(--teal)}
.category-progress-3{--bar-color:var(--blue)}
.matter-secondary-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0.625rem;margin-top:0.75rem}
.matter-secondary-filters label{display:grid;gap:0.3125rem;min-width:0;font-size:0.75rem;font-weight:700}
.matter-secondary-filters select{width:100%;min-width:0;min-height:44px;padding:0.5rem;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit}

/* Horarios por turno y cursada semanal */
.turn-options{margin:0;padding:0;border:0}
.turn-options legend{margin-bottom:0.5rem;font-weight:800}
.turn-options>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.5rem}
.turn-options label{position:relative;display:grid;min-width:0;min-height:var(--target-size);cursor:pointer}
.turn-options input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0}
.turn-options label>span{display:grid;align-content:center;justify-items:center;gap:0.125rem;min-height:var(--target-size);padding:0.375rem 0.1875rem;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);text-align:center}
.turn-options label b{font-size:0.75rem}
.turn-options label small{font-size:0.6875rem;color:var(--muted)}
.turn-options input:checked+span{border-color:var(--blue);background:var(--blue-tint);color:var(--blue-text)}
.turn-options input:focus-visible+span{outline:3px solid var(--focus);outline-offset:2px}
.semester-settings>summary{min-height:var(--target-size);display:flex;align-items:center;font-weight:700;cursor:pointer}
.semester-settings[open]>summary{margin-bottom:0.75rem}
.weekly-add{width:100%;margin:0 0 1rem}
.weekly-schedule{display:grid;gap:0.875rem}
.weekly-schedule>h2{font-size:1.125rem}
.weekly-day{display:grid;gap:0.5rem}
.weekly-day-heading{display:flex;align-items:baseline;gap:0.625rem}
.weekly-day-heading h2{font-size:1rem}
.weekly-day-heading span{color:var(--muted);font-size:0.8125rem}
.weekly-day-courses{display:grid;gap:0.5rem}
.weekly-course-card{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;border-left:5px solid var(--course-accent,var(--accent));padding:0.75rem}
.weekly-course-card>div{display:grid;gap:0.1875rem;min-width:0}
.weekly-course-card b{margin:0;font-size:0.9375rem}
.weekly-course-card span{font-size:0.8125rem;font-weight:700}
.weekly-course-card small{color:var(--muted);font-size:0.75rem}
.weekly-course-edit{flex:none;min-width:64px;min-height:44px;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--blue-text);font-size:0.8125rem;font-weight:700}
.course-color-0{--course-accent:var(--accent)}
.course-color-1{--course-accent:var(--blue)}
.course-color-2{--course-accent:var(--teal)}
.course-color-3{--course-accent:var(--ink)}
.course-color-4{--course-accent:var(--accent)}
.course-color-5{--course-accent:var(--teal)}

/* Carga de notas y envío de reportes */
.grade-dialog{width:min(400px,calc(100vw - 32px));margin:auto;padding:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);box-shadow:0 20px 70px #101a3970}
.grade-dialog::backdrop{background:#101629a8}
.grade-dialog form{padding:1.375rem}
.grade-dialog h2{margin-bottom:0.25rem}
.grade-dialog form>p{color:var(--muted)}
.grade-dialog .field{margin:0.75rem 0}
.grade-dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:0.5rem}
.grade-dialog-actions .btn{min-height:var(--target-size);padding-inline:0.5rem}
.report-honeypot{position:absolute!important;left:-10000px!important;width:1px;height:1px;overflow:hidden}
.report-spinner{width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:report-spin .7s linear infinite}
@keyframes report-spin{to{transform:rotate(360deg)}}
.report-back{width:100%;margin-top:0.5rem}
@media(min-width:600px){.category-progress-list{grid-template-columns:repeat(3,minmax(0,1fr))}.career-overview,.career-course-progress,.career-enroll{max-width:760px;margin-right:auto;margin-left:auto}.career-overview,.career-course-progress{padding:1.25rem}.career-progress-top{grid-template-columns:minmax(0,1fr) minmax(0,1fr);max-width:560px;margin:0 auto}.career-overview .progress-wheel{width:160px}.career-average>strong{font-size:3rem}.weekly-day-courses{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Jerarquía del recorrido: materia → cátedra → agenda */
.selection-step-label{display:block;margin:0 0 0.4375rem;color:var(--blue-text);font-size:0.6875rem;font-weight:850;letter-spacing:.09em;line-height:1.3}
.matter-head .selection-step-label{color:inherit;opacity:.72}
.matter-head .selection-step-help{max-width:48ch;margin-top:0.5rem;font-size:0.8125rem;font-weight:500;line-height:1.45;opacity:.82}
.selection-page-head{padding-bottom:1.125rem}
.selection-page-head .selection-context{margin-top:0.3125rem;font-size:1rem;font-weight:800;line-height:1.35;opacity:1}
.chair-field-label{color:var(--muted);font-size:0.625rem!important;font-weight:800;letter-spacing:.08em}
.chair-copy .chair-subject-name{font-size:1rem;line-height:1.3}
.chair-copy .chair-offer-schedule{font-size:0.8125rem;line-height:1.45}
.chair-list-option{border:1px solid var(--line);box-shadow:var(--shadow);transition:border-color .15s ease,transform .15s ease}
.chair-list-option:hover{border-color:var(--blue);transform:translateY(-1px)}
.chair-list-option[aria-pressed="true"]{border:2px solid var(--blue);background:var(--blue-tint)}
.selected-course-summary{display:grid;gap:0;overflow:hidden;padding:0.25rem 0.875rem}
.selection-summary-field{display:grid;gap:0.25rem;padding:0.75rem 0;border-bottom:1px solid var(--line)}
.selection-summary-field:last-child{border-bottom:0}
.selection-summary-field small{color:var(--muted);font-size:0.625rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}
.selection-summary-field b{overflow-wrap:anywhere;font-size:0.9375rem;line-height:1.35}
.course-dialog-heading h1{margin:0;font-size:clamp(1.3125rem,6vw,1.75rem);line-height:1.18;overflow-wrap:anywhere}
.course-dialog-heading .course-dialog-context{margin:0.4375rem 0 0;color:var(--muted);font-size:0.8125rem;font-weight:600}
.schedule-dialog-head .selection-step-label{margin-bottom:0.375rem;color:var(--blue-text)}
.schedule-dialog-head .schedule-selection-summary{display:grid;gap:0.1875rem;margin-top:0.5rem;color:var(--muted);font-size:0.8125rem;line-height:1.35}
.schedule-dialog-head .schedule-selection-summary span{margin-top:0;font-size:0.8125rem}
.schedule-selection-summary b{color:var(--ink);font-size:0.9375rem}
.schedule-dialog-hint{margin:-4px 0 0;padding:0.625rem 0.75rem;border:1px solid var(--line);border-radius:12px;background:var(--blue-tint);color:var(--blue-text);font-size:0.8125rem;line-height:1.45}
.matter-success-content .selection-step-label{color:var(--blue-text)}
.choice-group-card{overflow:hidden;padding:0;border:1px solid var(--line-strong)}
.choice-group-card>summary{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0.3125rem 0.75rem;padding:0.875rem 3rem 0.875rem 0.875rem;cursor:pointer;list-style:none;position:relative}
.choice-group-card>summary::-webkit-details-marker{display:none}
.choice-group-card>summary::after{content:'⌄';position:absolute;right:16px;top:50%;transform:translateY(-50%);color:var(--blue-text);font-size:1.375rem;font-weight:700}
.choice-group-card[open]>summary::after{content:'⌃'}
.choice-group-card>summary>.selection-step-label,.choice-group-card>summary>b,.choice-group-card>summary>.choice-group-prompt{grid-column:1}
.choice-group-card>summary>.selection-step-label{margin:0;font-size:0.625rem}
.choice-group-card>summary>b{font-size:1rem;line-height:1.3;overflow-wrap:anywhere}
.choice-group-prompt{color:var(--muted);font-size:0.75rem;line-height:1.4}
.choice-group-count{grid-column:2;grid-row:1/4;align-self:center;max-width:112px;padding:0.375rem 0.5625rem;border-radius:999px;background:var(--blue-tint);color:var(--blue-text);font-size:0.6875rem;font-weight:800;line-height:1.25;text-align:center}
.choice-group-options{display:grid;gap:1rem;padding:0.75rem;border-top:1px solid var(--line);background:var(--bg)}
.choice-category-group{display:grid;gap:0.5rem}
.choice-category-group h3{display:flex;align-items:center;gap:0.4375rem;margin:0;padding:0 0.125rem;color:var(--muted);font-size:0.75rem;font-weight:800}
.choice-category-group h3 span{display:grid;place-items:center;min-width:20px;height:20px;padding:0 0.3125rem;border-radius:999px;background:var(--surface);color:var(--blue-text);font-size:0.625rem}
.choice-subject-list{display:grid;gap:0.5rem}
.choice-subject-card{position:relative;min-width:0;overflow:hidden;padding:0.75rem;border:1px solid var(--line);box-shadow:none}
.choice-subject-card .course-open{min-width:0;padding-right:2.125rem}
.choice-subject-card .matter-card-title b{font-size:0.875rem;line-height:1.35}
.choice-subject-meta{display:block;margin-top:0.3125rem;color:var(--muted);font-size:0.6875rem;line-height:1.35}
.choice-group-empty{margin:0;padding:0.5rem;color:var(--muted);font-size:0.8125rem}
.choice-slot-context{margin:0.25rem 0 0;color:var(--blue-text);font-size:0.75rem;font-weight:700}
@media(min-width:600px){.selected-course-summary{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:1.375rem;padding:0.5rem 1.125rem}.selection-summary-field:nth-last-child(2){border-bottom:0}}
@media(min-width:900px){.weekly-add{width:auto;min-width:200px;align-self:flex-end}.weekly-schedule{max-width:1000px;width:100%;margin:0 auto}.category-progress-list{max-width:1000px;margin-inline:auto}.matter-secondary-filters{max-width:560px}}
@media(prefers-reduced-motion:reduce){.category-progress-track span,.report-spinner{animation:none;transition:none}}
/* Ajustes y reportes */
.settings-page .settings-head,.settings-page>.settings-card,.settings-page>.settings-logout,.report-form{width:min(100%,560px);margin-inline:auto}
.settings-page .settings-head{margin-bottom:1rem}
.settings-page .settings-head h1{margin-top:0}
.settings-card{margin-bottom:0.75rem;padding:1rem}
.appearance-setting{margin:0;padding:0;border:0}
.appearance-setting legend{margin-bottom:0.625rem;font-size:1rem;font-weight:800}
.appearance-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.5rem}
.appearance-options label{position:relative;display:grid;place-items:center;min-height:var(--target-size);padding:0.5rem 0.25rem;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);font-size:0.875rem;font-weight:700;cursor:pointer}
.appearance-options input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0}
.appearance-options label:has(input:checked){border-color:var(--blue);background:var(--blue-tint);color:var(--blue-text)}
.appearance-options label:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:2px;box-shadow:0 0 0 2px var(--surface)}
.settings-action{width:100%;min-height:var(--target-size);display:flex;align-items:center;gap:0.75rem;padding:0.5rem 0.25rem;border:0;background:transparent;color:var(--ink);font-weight:700;text-align:left}
.settings-action span:first-child{font-size:1.375rem}
.settings-action:not(.danger) span:last-child{margin-left:auto;font-size:1.25rem;color:var(--muted)}
.settings-action.danger{justify-content:flex-start;color:#b4232a}
body.dark-theme .settings-action.danger{color:#ff989c}
.settings-logout{margin-top:1.5rem}
.logout-dialog{width:min(400px,calc(100vw - 32px));margin:auto;padding:0;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--ink);box-shadow:0 20px 70px #101a3970}
.logout-dialog::backdrop{background:#101629a8}
.logout-dialog-content{padding:1.375rem}
.logout-dialog-content h2{margin-bottom:1.125rem}
.logout-dialog-actions{display:grid;grid-template-columns:1fr 1fr;gap:0.625rem}
.logout-dialog-actions .btn{min-height:var(--target-size)}
.report-form{display:grid;gap:0.25rem}
.report-form .field{margin:0.5rem 0}
.report-form textarea{width:100%;min-height:72px;resize:vertical;padding:0.625rem 0.75rem;border:1.5px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit}
.report-form input[type=file]{width:100%;min-height:var(--target-size);padding:0.5rem;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink);font:inherit}
.report-note{margin:0.25rem 0 0.5rem;color:var(--muted);font-size:0.8125rem}
.report-status{margin:0.25rem 0;padding:0.75rem;border-radius:12px;background:var(--blue-tint);color:var(--ink);font-weight:700}
.report-status[hidden]{display:none}
@media(min-width:900px){.settings-page>.settings-logout{margin-top:1.75rem}}

.progress-wheel{width:clamp(132px,18vw,190px);aspect-ratio:1;border-radius:50%;margin:1.125rem auto;display:grid;place-content:center;text-align:center;background:conic-gradient(var(--accent) var(--progress),var(--blue-tint) 0);position:relative}.progress-wheel:before{content:'';position:absolute;inset:12px;border-radius:50%;background:var(--surface)}.progress-wheel b,.progress-wheel span{position:relative;z-index:1}.progress-wheel b{font-size:2rem;color:var(--blue-text);line-height:1}.progress-wheel span{font-size:0.75rem;color:var(--muted);margin-top:0.25rem}
@media(min-width:900px){.app-sidebar{max-height:100dvh;overflow-y:auto;overscroll-behavior:contain}.sidebar-links{flex-shrink:0}}

/* Interacción de puntero consistente en controles y tarjetas */
button,.card,a{transition:transform .18s ease,box-shadow .18s ease,filter .18s ease,border-color .18s ease,background-color .18s ease}
@media(hover:hover) and (pointer:fine){button:not(:disabled):hover,[role="button"]:hover,a[href]:hover{transform:translateY(-2px);filter:brightness(1.02);box-shadow:0 6px 16px #1d22501c}.card:hover{transform:translateY(-2px);box-shadow:0 8px 20px #1d225018;border-color:var(--line-strong)}button:active:not(:disabled){transform:translateY(0)}.matter-card:has(.course-open:hover),.favorite-plan-card:hover,.event-card:hover,.planned-course:hover{transform:translateY(-2px);box-shadow:0 8px 20px #1d225018;border-color:var(--line-strong)}.app-sidebar button:hover:not(.active){background:#ffffff26}}
@media(prefers-reduced-motion:reduce){button,.card,a{transition:none!important}button:not(:disabled):hover,[role="button"]:hover,a[href]:hover,.card:hover,.matter-card:has(.course-open:hover),.favorite-plan-card:hover,.event-card:hover,.planned-course:hover{transform:none;filter:none}}

/* Agenda de cursadas: períodos, días y horarios */
.semester-settings{padding:1rem}
.agenda-events-section h2{margin:0 0 0.75rem;font-size:1.125rem}
.semester-settings>p{margin:0.75rem 0 0;color:var(--muted);font-size:0.8125rem}
.semester-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:0.75rem}
.semester-fields label{display:grid;gap:0.375rem;color:var(--muted);font-size:0.8125rem;font-weight:700}
.semester-fields input,.semester-fields select{width:100%;min-height:44px;padding:0.5rem 0.625rem;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit}
.agenda-events-section{display:grid;gap:0.75rem;margin-top:1.25rem}
.agenda-events-section>.empty-event{margin:0}
@media(min-width:900px){.semester-settings,.agenda-events-section{width:min(100%,1000px);margin-left:auto;margin-right:auto}.agenda-head{width:100%}}.chair-card{display:grid;gap:0.75rem;padding:0.875rem}
.chair-choice{width:100%;display:flex;align-items:center;justify-content:space-between;gap:0.75rem;padding:0;border:0;background:transparent;color:var(--ink);text-align:left}
.chair-add{width:100%;min-height:var(--target-size)}
@media(min-width:600px){.chair-card{grid-template-columns:minmax(0,1fr) auto;align-items:center}.chair-add{width:auto;min-width:160px}}
/* Agenda separada en vistas con una jerarquía clara */
.agenda-sections{display:flex;gap:0.5rem;width:min(100%,1000px);margin:0 auto 1rem;padding:0.3125rem;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);box-shadow:var(--shadow)}
.agenda-sections button{flex:1;min-width:0;min-height:var(--target-size);padding:0.5rem 0.75rem;border:0;border-radius:10px;background:transparent;color:var(--muted);font:inherit;font-size:var(--font-sm);font-weight:700;white-space:nowrap;transition:background .2s,color .2s,transform .2s}
.agenda-sections button:hover{transform:translateY(-1px)}
.agenda-sections button.active{background:var(--blue);color:#fff}
body.dark-theme .agenda-sections button.active{color:#fff}
.section-help,.date-note{margin:0 0 0.75rem;color:var(--muted);font-size:0.8125rem}
.agenda-events-section{width:min(100%,1000px);margin:0 auto;gap:0.875rem}
.agenda-events-page .agenda-head,.semester-page .agenda-head,.calendar-page .agenda-head{margin-bottom:0.875rem}
.agenda-sections{gap:0.25rem}
.agenda-sections button{padding-inline:0.3125rem;font-size:0.75rem}
.agenda-sections button.active{box-shadow:0 2px 8px #27498c30}
@media(prefers-reduced-motion:reduce){.agenda-sections button{transition:none}}
/* Ventana para agregar una cursada directamente al calendario */
.course-schedule-dialog{width:min(560px,calc(100vw - 24px));max-height:min(90dvh,820px);margin:auto;padding:0;overflow:auto;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);color:var(--ink);box-shadow:0 28px 90px #101a3970}
.course-schedule-dialog::backdrop{background:#101629a8;backdrop-filter:blur(5px)}
.course-schedule-dialog form{display:grid;gap:1.125rem;padding:clamp(1.25rem,5vw,1.875rem)}
.schedule-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem}
.schedule-dialog-head p{margin:0 0 0.3125rem;color:var(--blue-text);font-size:0.8125rem;font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.schedule-dialog-head h2{margin:0;font-size:clamp(1.25rem,5vw,1.625rem);line-height:1.15}
.schedule-dialog-head span{display:block;margin-top:0.375rem;color:var(--muted);font-size:0.875rem}
.schedule-dialog-close{flex:none;width:var(--target-size);height:var(--target-size);border:1px solid var(--line);border-radius:50%;background:var(--bg);color:var(--ink);font-size:1.5rem;line-height:1;cursor:pointer}
.schedule-dialog-days{min-width:0;margin:0;padding:0;border:0}
.schedule-dialog-days legend{margin-bottom:0.625rem;font-weight:800}
.schedule-dialog-days>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0.5rem}
.schedule-dialog-days label{cursor:pointer}
.schedule-dialog-days input{position:absolute;opacity:0}
.schedule-dialog-days span{display:grid;place-items:center;min-height:var(--target-size);padding:0.375rem;border:1px solid var(--line);border-radius:12px;background:var(--bg);font-size:0.8125rem;font-weight:700}
.schedule-dialog-days input:checked+span{border-color:var(--blue);background:var(--blue);color:white}
.schedule-dialog-days input:focus-visible+span{outline:3px solid var(--focus);outline-offset:2px;box-shadow:0 0 0 2px var(--surface)}
.schedule-dialog-fields{display:grid;grid-template-columns:minmax(0,1fr);gap:0.75rem}
.schedule-dialog-fields label{display:grid;gap:0.375rem;color:var(--muted);font-size:0.875rem;font-weight:700}
.schedule-dialog-fields input{width:100%;min-width:0;min-height:44px;padding:0.5rem 0.625rem;border:1px solid var(--line-strong);border-radius:10px;background:var(--surface);color:var(--ink);font:inherit}
.schedule-dialog-error{margin:-8px 0 0;color:#c83342;font-size:0.8125rem;font-weight:700}
.schedule-dialog-error[hidden]{display:none}
.schedule-dialog-submit{width:100%;min-height:50px;margin-top:0.125rem}
body.dark-theme .schedule-dialog-error{color:#ff989c}
.schedule-dialog-days>div{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(min-width:420px){.schedule-dialog-days>div{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(min-width:480px){.schedule-dialog-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
body.dark-theme .course-schedule-dialog{border-color:#353a4d}

/* Materias: controles y tarjetas optimizados para celular */
.matter-page,.matter-page *{min-width:0}
.matter-head{margin-bottom:0.625rem;padding-top:0.75rem;padding-bottom:0.875rem}
.matter-controls{display:grid;gap:0.625rem;margin:0 0 0.625rem;padding:0.75rem}
.matter-controls .matter-filter-group{gap:0.375rem;margin:0}
.matter-controls .matter-filter-group>span{font-size:0.75rem;color:var(--muted)}
.matter-controls .matter-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.375rem}
.matter-controls .matter-filters .pill{min-width:0;min-height:44px;padding:0.4375rem 0.25rem;overflow-wrap:anywhere;font-size:0.75rem;line-height:1.15;white-space:nowrap}
.matter-controls .year-filter{margin:0}
.matter-controls .year-filter summary{min-height:40px;padding:0 0.625rem;border-color:var(--line);background:var(--bg);color:var(--ink);font-size:0.8125rem}
.matter-controls .year-filter .pills{display:flex;flex-wrap:wrap;gap:0.375rem}
.matter-controls .year-filter .pill{min-height:40px;padding:0.375rem 0.625rem;background:var(--surface);color:var(--ink)}
.matter-controls .year-filter .pill.active{background:var(--blue);color:#fff}
.matter-controls .matter-secondary-filters{gap:0.5rem;margin:0}
.matter-controls .matter-secondary-filters label{font-size:0.6875rem;color:var(--muted)}
.matter-controls .matter-secondary-filters select{min-height:42px;padding:0.375rem 0.5rem;font-size:0.875rem}
.matter-search{display:block;margin:0.625rem 0 0.125rem}
.matter-search input{height:46px;min-height:46px;border:1px solid var(--line-strong);font-size:1rem}
.matter-list-count{margin:0 0 0.5rem;color:var(--muted);font-size:0.75rem;font-weight:700}
.matter-cards{grid-template-columns:minmax(0,1fr);gap:0.625rem;min-width:0}
.matter-card{width:100%;min-width:0;overflow:hidden;padding:0.75rem}
.course-open{min-width:0;padding-right:2.25rem}
.matter-card-title{min-width:0}
.course-open b{min-width:0;overflow-wrap:anywhere;font-size:1rem;line-height:1.3}
.matter-card-title>span{flex:none}
.matter-meta{min-width:0}
.matter-meta span{overflow-wrap:anywhere}
.grade-control{min-width:0}
.grade-control>span{overflow-wrap:anywhere}
.career-category-progress{margin:0 0 0.75rem;padding:0.875rem}
.career-category-progress h2{font-size:1rem}
.career-category-progress .category-progress-list{grid-template-columns:minmax(0,1fr);gap:0.375rem;margin:0.625rem 0 0}
.career-category-progress .category-progress{gap:0.375rem;padding:0.5625rem 0.625rem;box-shadow:none}
.career-category-progress .category-progress>div:first-child{font-size:0.75rem}
.career-category-progress .category-progress strong{font-size:0.75rem;white-space:nowrap}
@media(min-width:600px){.matter-cards{grid-template-columns:minmax(0,1fr)}}
@media(min-width:900px){.matter-cards{grid-template-columns:repeat(auto-fill,minmax(min(100%,320px),1fr))}}

@font-face{
  font-family:Inter;
  src:url("../fonts/Inter-Latin-Variable.woff2") format("woff2");
  font-style:normal;
  font-weight:100 900;
  font-display:swap;
}

/* Referencias visuales: base clara, tarjetas limpias y jerarquía mobile-first */
:root{
  --blue:#27498c;--blue-text:#27498c;--blue-strong:#323159;--blue-tint:#e4f4f1;
  --accent:#416ef2;--teal:#0bbfbf;--mint:#d5f2e5;
  --ink:#323159;--muted:#5e6a80;
  --bg:#f1f7f6;--surface:#fff;--line:#dce9e6;--line-strong:#b9d8d2;
  --head:#f1f7f6;--head-ink:#20294a;--sidebar:#21458b;
  --green:#0bbfbf;--pink:#416ef2;--focus:#416ef2;
  --done-surface:#e5f6f2;--done-ink:#323159;--done-line:#0bbfbf;
  --radius-sm:.875rem;--radius:1.375rem;--radius-lg:1.75rem;--pad:1rem;--nav-h:4.75rem;--topbar-h:4.25rem;
  --shadow:0 2px 4px #20345408,0 12px 30px #2034540d;
}
body.dark-theme{
  --blue:#27498c;--blue-text:#b7c8ff;--blue-strong:#416ef2;--blue-tint:#273148;
  --accent:#7297ff;--teal:#26d0cd;--mint:#233b3d;
  --ink:#edf2ff;--muted:#c0cbe0;
  --bg:#111723;--surface:#1d2736;--line:#364558;--line-strong:#6685a7;
  --head:#111723;--head-ink:#edf2ff;--sidebar:#18243a;
  --focus:#48d8d2;--done-surface:#193b3c;--done-ink:#f2fffc;--done-line:#26d0cd;
  --shadow:0 2px 5px #0003,0 12px 30px #0002;
}
body{font-family:Inter,"Segoe UI",Arial,sans-serif;line-height:1.45}
body,button,input,select,textarea{font-family:Inter,"Segoe UI",Arial,sans-serif}
h1{font-size:clamp(1.75rem,7vw,2.25rem);font-weight:750;letter-spacing:-.04em}
h2{font-size:1.3125rem;font-weight:700;letter-spacing:-.025em}
main{min-width:0;max-width:680px;padding:1.125rem var(--pad) calc(var(--nav-h) + 2rem + env(safe-area-inset-bottom))}
.topbar{height:var(--topbar-h);gap:0.625rem;padding-inline:1rem;background:var(--bg);color:var(--ink)}
.topbar-brand{gap:0.75rem;color:var(--ink)!important}
.topbar-logo-mark{width:48px;height:48px;border-radius:16px;background:var(--blue)!important;color:#fff!important;font-size:1.3125rem}
.topbar-logo-name{font-size:1.25rem;font-weight:700;letter-spacing:-.035em;white-space:nowrap}
.topbar-logo-name small{font-size:inherit;font-weight:500;letter-spacing:0;color:var(--muted)}
.topbar .back{flex:none;color:var(--ink);font-size:2rem}
.topbar-settings{color:var(--muted);font-size:1.5625rem}
.topbar-settings svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.topbar{gap:.375rem;padding-inline:1rem}
.topbar-brand{gap:clamp(.375rem,2vw,.75rem)}
.topbar-logo-mark{width:clamp(2.125rem,12vw,3rem);height:clamp(2.125rem,12vw,3rem);border-radius:clamp(.625rem,4vw,1rem)}
.topbar-logo-name{font-size:clamp(.8rem,4vw,1.25rem)}
body:has(main.dashboard) .topbar{background:var(--bg);color:var(--ink)}
body:has(main.dashboard) .topbar-logo-mark{background:var(--blue)!important;color:#fff!important}
main.dashboard{width:100%;max-width:760px;min-height:calc(100dvh - var(--topbar-h));margin-inline:auto;padding:0 var(--pad) calc(var(--nav-h) + 1.75rem + env(safe-area-inset-bottom));background:var(--bg)}
.matter-head,.agenda-head,.history-head,.calendar-hero{
  margin:0 0 1.125rem;padding:0.875rem 0 0.5rem;border-radius:0;background:transparent;color:var(--ink)
}
.matter-head h1,.agenda-head h1,.history-head h1{margin:0 0 0.125rem;color:var(--ink)}
.matter-head p,.agenda-head p,.history-head p{margin:0;color:var(--muted);opacity:1}
.history-head .career-program{margin:0;color:var(--muted);font-size:1.0625rem;font-weight:500;opacity:1}
.history-head .career-greeting{display:block;margin-top:0.125rem;color:var(--muted);font-size:0.8125rem;font-weight:500;line-height:1.3}
.card,.matter-controls,.settings-card,.semester-settings,.favorite-plan-card,.event-card,.weekly-course-card{
  border-color:var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow);color:var(--ink)
}
.btn{min-height:52px;border:1px solid var(--line);border-radius:16px;font-weight:700;letter-spacing:-.015em}
.btn.primary{border-color:var(--blue);background:var(--blue);color:#fff}
.field input,.field select,.report-form textarea,.report-form input[type=file],.semester-fields input,.semester-fields select,.favorite-plan-fields select,.favorite-plan-fields input,.plan-time-fields input{
  border:1px solid var(--line-strong);border-radius:14px;background:var(--surface);color:var(--ink)
}
input::placeholder,textarea::placeholder{color:var(--muted);opacity:.85}

/* Mi carrera: avance principal, promedio separado y estadísticas */
.history-head{padding-top:1rem;margin-bottom:1rem}
.career-course-progress{
  display:grid;grid-template-columns:minmax(0,1fr);align-items:center;gap:0.875rem;margin:0 0 0.75rem;padding:1.125rem 1rem;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow)
}
.career-progress-total{display:flex;align-items:baseline;gap:0.625rem;flex-wrap:wrap}
.career-progress-total>strong{color:var(--blue-text);font-size:clamp(3rem,13vw,4.25rem);font-weight:750;letter-spacing:-.065em;line-height:.95;white-space:nowrap;font-variant-numeric:tabular-nums}
.career-progress-total>strong span{font-size:.44em;letter-spacing:-.04em}
.career-progress-total>span{display:grid;gap:0.125rem;color:var(--ink);font-size:0.875rem;font-weight:700;letter-spacing:0}
.career-progress-total>span small{color:var(--muted);font-size:0.75rem;font-weight:500;white-space:nowrap}
.career-completion{display:grid;gap:0;text-align:right}
.career-completion>span{color:var(--muted);font-size:0.6875rem;font-weight:700;line-height:1.2}
.career-completion>strong{color:var(--blue-text);font-size:clamp(1.6875rem,8vw,2.25rem);font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.career-progress-total>.career-completion{margin-left:auto}
.career-total-track{grid-column:1/-1;height:14px;background:var(--mint)}
.career-total-track span{border-radius:99px;background:var(--teal)}
.career-progress-counts{grid-column:1/-1;align-items:center;color:var(--muted);font-size:0.875rem}
.career-enroll{display:flex;width:100%;min-height:58px;margin:0 0 1.25rem;border-radius:18px;font-size:1.0625rem}
.career-enroll-icon{font-size:1.5rem}
.career-category-progress{margin:0 0 1rem;padding:0;border:0;background:transparent;box-shadow:none}
.career-category-progress h2{margin-bottom:0.625rem;font-size:1.3125rem}
.career-category-progress .category-progress-list{gap:0;margin:0;padding:0.25rem 1.125rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}
.career-category-progress .category-progress{gap:0.5rem;padding:0.6875rem 0;border:0;border-bottom:1px solid var(--line);border-radius:0;background:transparent;box-shadow:none}
.career-category-progress .category-progress:last-child{border-bottom:0}
.career-category-progress .category-progress>div:first-child{font-size:1rem}
.career-category-progress .category-progress strong{color:var(--blue-text);font-size:0.9375rem}
.career-category-progress .category-progress strong small{margin-left:0.25rem;color:var(--muted);font-size:0.75rem;font-weight:600}
.career-category-progress .category-progress-track{height:9px;border-radius:99px;background:var(--mint)}
.career-category-progress .category-progress-track span{border-radius:99px;background:var(--blue)}
.career-average-card{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;min-height:76px;margin:0 0 1rem;padding:0.875rem 1.125rem;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--blue-tint);color:var(--ink);box-shadow:var(--shadow)}
.career-average-card>div{display:grid;gap:0;min-width:0}
.career-average-card>div>span{color:var(--blue-text);font-size:0.875rem;font-weight:800}
.career-average-card>div>strong{color:var(--blue-text);font-size:clamp(1.5rem,7vw,2rem);font-weight:850;line-height:1.15}
.career-grade-link{flex:none;min-height:44px;padding:0.375rem 0.75rem;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--blue-text);font-size:0.875rem;font-weight:800}
.career-category-progress .category-progress-2 .category-progress-track span{background:var(--teal)}
.career-category-progress .category-progress-3 .category-progress-track span{background:var(--accent)}

/* Materias: búsqueda, filtros rápidos y lista despejada */
.matter-head{margin-bottom:0.75rem}
.matter-head>p{font-size:1rem}
.matter-search-row{display:grid;grid-template-columns:minmax(0,1fr) 54px;align-items:start;gap:0.625rem;margin-bottom:0.75rem}
.matter-search{display:block;min-width:0;margin:0}
.matter-search input{height:54px;min-height:54px;padding-inline:1rem;border:1px solid var(--line-strong);border-radius:18px;background:var(--surface);font-size:1.0625rem}
.matter-filter-disclosure{position:relative}
.matter-filter-disclosure>summary{display:grid;place-items:center;width:54px;height:54px;border:1px solid var(--line-strong);border-radius:18px;background:var(--surface);color:var(--blue-text);cursor:pointer;list-style:none}
.matter-filter-disclosure>summary::-webkit-details-marker{display:none}
.matter-filter-disclosure>summary svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.matter-filter-disclosure[open]{grid-column:1/-1}
.matter-filter-disclosure[open]>summary{margin-left:auto}
.matter-controls{display:grid;gap:0.875rem;margin:0.5rem 0 0;padding:1rem;border-radius:20px}
.matter-controls .year-filter{margin:0}
.matter-controls .year-filter summary{min-height:44px;border-color:var(--line);border-radius:12px;background:var(--bg);color:var(--ink);font-size:0.875rem}
.matter-controls .year-filter .pill,.matter-controls .year-filter .pill.active{background:var(--surface);color:var(--ink)}
.matter-controls .year-filter .pill.active{border-color:var(--blue);background:var(--blue);color:#fff}
.matter-controls .matter-secondary-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0.625rem}
.matter-controls .matter-secondary-filters label{color:var(--muted);font-size:0.75rem}
.matter-controls .matter-secondary-filters select{min-height:44px;border-color:var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink)}
.matter-status-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0.5rem;margin:0 0 1.125rem}
.matter-status-filters .pill{display:flex;align-items:center;justify-content:center;gap:0.3125rem;min-width:0;min-height:48px;padding:0.4375rem 0.5rem;border:1px solid var(--line-strong);border-radius:16px;background:var(--surface);color:var(--ink);font-size:0.8125rem;font-weight:650;white-space:nowrap}
.matter-status-filters .pill b{font-size:0.8125rem;font-weight:700}
.matter-status-filters .pill.active{border-color:var(--blue);background:var(--blue);color:#fff}
.matter-filter-disclosure[open]{grid-column:1/-1}
.matter-filter-disclosure[open]>summary{margin-left:auto}
.matter-filter-disclosure[open]>.matter-controls{width:100%}
.matter-page>.plan-total{margin:-4px 0 0.75rem;color:var(--muted);font-size:0.8125rem;font-weight:700}
.matter-page>.plan-total[hidden]{display:none}
.matter-list-count{height:0;margin:0;overflow:hidden}
.matter-cards{grid-template-columns:minmax(0,1fr);gap:0.75rem}
.matter-card{gap:0.25rem;padding:1.125rem;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:var(--shadow)}
.matter-card.is-completed{border-color:var(--done-line);background:var(--done-surface);color:var(--done-ink)}
.course-open{gap:0.3125rem;padding-right:3rem}
.course-open b{font-size:1.125rem;font-weight:650;line-height:1.3}
.matter-meta span{padding:0;background:transparent;color:var(--muted);font-size:0.875rem;font-weight:500}
.matter-meta .matter-approved-label{padding:0.1875rem 0.5625rem;border-radius:99px;background:var(--done-surface);color:var(--done-ink);font-size:0.75rem;font-weight:700}
.matter-card .status-badge{margin-top:0.3125rem}
.favorite-toggle{top:14px;right:14px;color:var(--blue-text)}
.grade-control{margin-top:0.5rem;padding-top:0.625rem;border-color:var(--line)}
.grade-control input{border-color:var(--line-strong);border-radius:12px}

/* Tu avance y materias aprobadas */
.progress-screen-head{margin:0.25rem 0 0.75rem}
.progress-screen-head h1{font-size:2rem}
.progress-screen-head .onboarding-career{color:var(--muted);font-size:1.0625rem}
.progress-screen-head .onboarding-hint{margin:0.375rem 0 0;color:var(--muted);font-size:0.8125rem}
.progress-overview{margin:0 0 0.875rem;padding:0.875rem;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);box-shadow:var(--shadow)}
.progress-overview-numbers{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:0.5rem}
.progress-overview-numbers>strong:first-child{color:var(--blue-text);font-size:clamp(2.625rem,13vw,3.25rem);letter-spacing:-.06em;line-height:1}
.progress-overview-numbers>strong:first-child span{font-size:1rem}
.progress-overview-numbers>div{min-width:0}
.progress-overview-numbers>div>b{color:var(--muted);font-size:0.875rem}
.progress-overview-numbers>div>small{font-size:0.75rem}
.progress-overview-numbers>.progress-overview-percent{display:grid;gap:0;max-width:76px;margin-left:0;text-align:right}
.progress-overview-numbers>.progress-overview-percent>span{color:var(--muted);font-size:0.625rem;font-weight:750;line-height:1.2}
.progress-overview-numbers>.progress-overview-percent>strong{color:var(--blue-text);font-size:clamp(1.5rem,7vw,1.875rem);font-weight:850;line-height:1.15;font-variant-numeric:tabular-nums}
.progress-overview-track{height:10px;margin-top:0.625rem;border-radius:99px;background:var(--mint)}
.progress-overview-track span{border-radius:99px;background:var(--teal)}
.progress-filter-tabs{gap:0.375rem;margin-bottom:0.625rem}
.progress-filter{min-height:44px;padding:0.375rem 0.25rem;gap:0.25rem;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink);font-size:0.75rem;white-space:nowrap}
.progress-filter b{min-width:20px;height:20px;padding:0 0.25rem;font-size:0.625rem}
.progress-filter.active{border-color:var(--blue);background:var(--blue);color:#fff}
.progress-search input{height:52px;border:1px solid var(--line-strong);border-radius:16px;background:var(--surface);color:var(--ink)}
.progress-bulk-panel{grid-template-columns:minmax(0,1fr) auto;margin-bottom:0.625rem;padding:0.5rem 0.625rem;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.progress-bulk-panel>label{min-width:0;font-size:0.75rem}
.progress-bulk-panel .btn{width:auto;min-height:44px;padding:0.4375rem 0.625rem;font-size:0.75rem}
.progress-course-list{gap:0.75rem}
.progress-year-group{gap:0.625rem}
.progress-year-head{min-height:44px}
.progress-year-head>div>b{font-size:1.0625rem}
.progress-year-head>div>small{font-size:0.875rem}
.progress-year-action{border-color:var(--line-strong);border-radius:14px;background:var(--surface);color:var(--blue-text);font-size:0.8125rem}
.progress-course-row{min-height:84px;border-color:var(--line);border-radius:22px;background:var(--surface);box-shadow:var(--shadow)}
.progress-course-row.is-approved{border-color:var(--done-line);background:var(--done-surface);color:var(--done-ink)}
.progress-course-select input{width:26px;height:26px;border-radius:50%;accent-color:var(--blue)}
.progress-course-name b{font-size:1rem;font-weight:650}
.progress-course-grade input{height:44px;border-color:var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink)}
.progress-feedback{color:var(--blue-text)}
.progress-level-steps{max-width:640px;margin:0.375rem auto 1rem}
.progress-level-steps i{height:7px;min-width:8px}
.progress-level-head{display:flex;align-items:center;justify-content:space-between;gap:0.75rem;margin:0.25rem 0 0.625rem}
.progress-level-head h2{margin:0;color:var(--ink);font-size:1.3125rem;line-height:1.2}
.progress-level-head p{margin:0.25rem 0 0;color:var(--muted);font-size:0.8125rem}
.progress-step-actions{display:flex;gap:0.5rem;width:min(100%,640px)}
.progress-step-actions .btn{flex:1;min-width:0;min-height:48px;margin:0;padding:0.5rem 0.75rem}
.progress-step-actions .progress-step-back{border:1px solid var(--line-strong);background:var(--surface);color:var(--ink)}
.progress-continue-bar .continue{width:auto}

/* Tu avance: una selección despliega la nota y limpia el estado de cada fila. */
.progress-course-row{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:0.75rem}
.progress-course-row-main{grid-template-columns:2.25rem minmax(0,1fr);align-items:center;gap:0.625rem;min-width:0}
.progress-course-name{min-width:0}
.progress-course-grade{width:5rem;margin:0}
.progress-course-grade input{width:100%;min-height:44px;padding:0.375rem 0.5rem;border:1px solid var(--line-strong);border-radius:12px;background:var(--surface);color:var(--ink);font-size:0.875rem;font-weight:800;text-align:center}
.progress-course-row.is-approved .progress-course-grade input{border-color:var(--done-line)}
body.dark-theme .progress-course-row.is-approved .progress-course-grade input{background:#22283d;color:#fff}
.progress-continue-bar .progress-step-actions{width:min(100%,760px);margin-inline:auto}
.progress-continue-bar .progress-step-actions:has(#previousLevel[hidden]){grid-template-columns:minmax(0,1fr)}
.progress-continue-bar .continue{width:100%}


/* Componentes compartidos en Agenda, Ajustes y formularios */
.agenda-sections{border-color:var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow)}
.agenda-sections button{min-height:46px;border-radius:14px;font-size:0.875rem}
.agenda-sections button.active{background:var(--blue);color:#fff}
.weekly-course-card,.event-card,.day-event,.semester-settings,.detail-card,.schedule-card,.teacher-card,.settings-card,.favorite-plan-card{border:1px solid var(--line);border-radius:20px;background:var(--surface);box-shadow:var(--shadow);color:var(--ink)}
.weekly-course-card{border-left:5px solid var(--course-accent,var(--accent))}
.event-card-exam{border-left-color:#b87500;background:#fff8e8}
.event-card-priority{border-radius:99px}
.settings-action{min-height:52px;border-radius:14px}
.calendar-hero{border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface);color:var(--ink);box-shadow:var(--shadow)}
.month-switch button{background:var(--blue);color:#fff}
.month-switch span{color:var(--ink)}
.weekdays{color:var(--muted);opacity:1}
.cal-day{color:var(--ink)}
.cal-day:active{background:var(--blue-tint)}
.cal-day.chosen{background:var(--blue);color:#fff}
.cal-day.has-event:not(.chosen)::after{background:var(--accent)}
.cal-day.chosen.has-event::after{background:#fff}
.cal-day.chosen.has-class:not(.has-event)::after,.cal-day.chosen.has-class.has-event::before{background:#9df2d5}
.settings-action.danger{color:#b4232a}
.appearance-options label,.turn-options label>span,.schedule-dialog-days span{border-color:var(--line-strong);border-radius:14px;background:var(--surface);color:var(--ink)}
dialog{border-radius:24px;background:var(--surface);color:var(--ink)}
.course-detail-dialog,.course-schedule-dialog,.grade-dialog,.logout-dialog{border-color:var(--line);background:var(--surface);color:var(--ink)}
.course-detail-dialog .matter-head{background:var(--bg);color:var(--ink)}
.course-detail-close{border-color:var(--line);background:var(--surface);color:var(--ink)}
.app-sidebar{border-color:var(--line);background:var(--surface);box-shadow:0 -4px 22px #2034540a}
.app-sidebar button{font-size:0.75rem;font-weight:600}
.app-sidebar button.active{color:var(--blue-text)}
.app-sidebar button.active svg{background:var(--mint)}

body.dark-theme .matter-meta span{color:var(--muted)}
body.dark-theme .matter-card.is-completed{background:var(--done-surface);border-color:var(--done-line);color:var(--done-ink)}
body.dark-theme .matter-card.is-completed .course-open,body.dark-theme .matter-card.is-completed .grade-control{color:var(--done-ink)}
body.dark-theme .matter-card.is-completed .status-badge.is-done{background:var(--teal);color:#10232b}
body.dark-theme .career-total-track,body.dark-theme .category-progress-track,body.dark-theme .progress-overview-track{background:var(--mint)}

/* Mi carrera: panel visual de avance */
main.dashboard.history-page{max-width:none;overflow:hidden;background:radial-gradient(ellipse at 100% 12%,#dce8ff 0,transparent 32%),radial-gradient(ellipse at 0% 55%,#e3edff 0,transparent 36%),var(--bg)}
.history-page .career-hero{position:relative;margin:0 calc(-1 * var(--pad)) 1rem;padding:0 var(--pad) 0.5rem;overflow:hidden}
.history-page .career-hero::before,.history-page .career-hero::after{content:"";position:absolute;z-index:0;pointer-events:none;border-radius:50%;background:#dce8ff66}
.history-page .career-hero::before{width:390px;height:390px;right:-210px;top:-100px}
.history-page .career-hero::after{width:360px;height:360px;left:-230px;bottom:-240px}
.history-page .history-head{position:relative;z-index:1;margin:0;padding:1.25rem 0 0;background:none;color:var(--ink)}
.history-page .history-head h1{margin:0;font-size:clamp(2.5rem,11vw,3.625rem);line-height:1.03;letter-spacing:-.045em}
.history-page .career-program{margin-top:0.4375rem;color:var(--blue-text);font-size:clamp(1.1875rem,5vw,1.5625rem);font-weight:800;opacity:1}
.history-page .career-greeting{display:block;margin-top:0.625rem;color:var(--muted);font-size:1rem;line-height:1.3}
.career-hero-progress{position:relative;z-index:1;display:grid;justify-items:center;padding:0.375rem 0 0}
.history-page .career-hero .progress-wheel{width:clamp(220px,67vw,310px);margin:0 auto 0.5rem;border:10px solid #ffffffb8;background:conic-gradient(var(--teal) var(--progress),#dce4f3 0);box-shadow:0 10px 25px #263d7320}
.history-page .career-hero .progress-wheel::before{inset:9px;background:var(--bg)}
.history-page .career-hero .progress-wheel b{font-size:clamp(3rem,15vw,4.75rem);letter-spacing:-.05em}
.history-page .career-hero .progress-wheel span{font-size:1rem;font-weight:700}
.career-pending-pill{display:flex;align-items:center;gap:0.625rem;margin:0 0 0.75rem;padding:0.5625rem 1.125rem;border:1px solid #98e1d6;border-radius:99px;background:#ddf5ed;color:#176b70;font-size:0.9375rem;font-weight:800}
.career-pending-pill span{display:grid;place-items:center;width:27px;height:27px;border-radius:50%;background:var(--teal);color:#fff;font-size:1.1875rem}
.history-page .career-course-progress{position:relative;z-index:1;grid-template-columns:1fr;margin-bottom:0.75rem;padding:1rem 1.125rem;border:0;border-radius:26px}
.history-page .career-progress-total{display:grid;grid-template-columns:minmax(0,1.1fr) 1px minmax(0,.9fr);align-items:center;gap:clamp(.5rem,2vw,1rem)}
.career-approved-summary{display:grid;grid-template-columns:clamp(2rem,10vw,4rem) minmax(0,1fr);align-items:center;gap:clamp(.375rem,2vw,.75rem);min-width:0}
.career-stat-icon{display:grid;place-items:center;color:var(--blue-text)}
.career-stat-icon svg{width:clamp(2rem,9vw,3.5rem);height:clamp(2rem,9vw,3.5rem);fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.career-approved-copy{display:grid;gap:.125rem;min-width:0}
.career-approved-copy>b{margin:0;color:var(--ink);font-size:clamp(.875rem,3.5vw,1.25rem);line-height:1.2}
.career-approved-copy>strong{display:flex;align-items:baseline;gap:.1875rem;min-width:0;color:var(--blue-text);font-size:clamp(2.125rem,10vw,3.75rem);font-weight:800;letter-spacing:-.055em;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.career-approved-copy .career-total-divider{color:var(--muted);font-size:.62em;font-weight:700;letter-spacing:-.025em}
.career-approved-copy>small{color:var(--muted);font-size:clamp(.75rem,3vw,1rem);line-height:1.25;overflow-wrap:anywhere}
.career-summary-divider{display:block;align-self:stretch;min-height:4.5rem;background:var(--line-strong)}
.history-page .career-progress-total>.career-completion{display:grid;grid-template-columns:clamp(2rem,9vw,3.5rem) minmax(0,1fr);align-items:center;gap:clamp(.375rem,2vw,.75rem);min-width:0;margin:0;text-align:left}
.career-completion-icon svg{display:block;width:clamp(2rem,9vw,3.5rem);height:clamp(2rem,9vw,3.5rem);fill:none;stroke:var(--blue-text);stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.career-completion-copy{display:grid;gap:.25rem;min-width:0;text-align:left}
.career-completion-copy>span{color:var(--ink);font-size:clamp(.8125rem,3.4vw,1.2rem);font-weight:750;line-height:1.2;overflow-wrap:anywhere}
.career-completion-copy>strong{color:var(--blue-text);font-size:clamp(2.25rem,10vw,3.75rem);font-weight:850;line-height:1;font-variant-numeric:tabular-nums}
.career-approved-card{margin:0 0 0.75rem;padding:1rem 1.125rem;border:0;border-radius:26px}
.career-approved-card h2,.career-category-progress h2{display:flex;align-items:center;gap:0.625rem;margin:0 0 0.75rem;font-size:1.25rem;line-height:1.2}
.career-approved-card h2 span,.career-category-progress h2 span{color:var(--blue-text);font-size:1.625rem}
.career-approved-card h2 span svg{display:block;width:1.5rem;height:1.5rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.career-approved-card .career-total-track{height:14px;border-radius:99px;background:#e6ebf5}
.career-approved-card .career-total-track span{border-radius:99px;background:var(--blue)}
.history-page .career-category-progress{margin:0 0 0.875rem;padding:1rem 1.125rem;border:0;border-radius:26px;background:var(--surface);box-shadow:var(--shadow)}
.history-page .career-category-progress h2{margin-bottom:0.5rem}
.history-page .career-category-progress .category-progress-list{padding:0;border:0;border-radius:0;background:none;box-shadow:none}
.history-page .career-category-progress .category-progress{position:relative;padding:0.625rem 0 0.6875rem 1.8125rem;border:0}
.history-page .career-category-progress .category-progress::before{content:"";position:absolute;left:0;top:17px;width:17px;height:17px;border-radius:50%;background:var(--bar-color)}
.history-page .career-category-progress .category-progress>div:first-child{font-size:0.9375rem}
.history-page .career-category-progress .category-progress strong{font-size:0.875rem}
.history-page .career-category-progress .category-progress strong small{font-size:0.8125rem}
.history-page .career-category-progress .category-progress-track{height:10px;background:#e6ebf5}
.history-page .career-category-progress .category-progress-track span{background:var(--bar-color)}
.history-page .career-category-progress .category-progress-1{--bar-color:#244d9f}
.history-page .career-category-progress .category-progress-2{--bar-color:#53c9ca}
.history-page .career-category-progress .category-progress-3{--bar-color:#9c65e8}
.history-page .career-enroll{display:grid;grid-template-columns:64px minmax(0,1fr) 54px;align-items:center;gap:0.75rem;min-height:88px;margin:0 0 0.875rem;padding:0.75rem 1rem;border:0;border-radius:26px;background:#dce5ff;color:#203f80;text-align:left}
.career-enroll-icon{display:grid;place-items:center;min-height:54px;border-right:1px solid #9eb4e4;font-size:2.25rem}
.career-enroll-icon svg{width:2.5rem;height:2.5rem;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.career-enroll .career-enroll-copy{font-size:inherit}
.career-enroll-copy{display:grid;gap:0.25rem}
.career-enroll-copy b{font-size:1.0625rem}
.career-enroll-copy small{font-size:0.8125rem;font-weight:500;line-height:1.3}
.career-enroll-arrow{display:grid;place-items:center;width:50px;height:50px;border-radius:50%;background:#fff;color:var(--blue);font-size:2.125rem;line-height:1}
.history-page .career-average-card{margin:0 0 0.875rem}
body.dark-theme .history-page .career-hero::before,body.dark-theme .history-page .career-hero::after{background:#27498c45}
body.dark-theme .career-pending-pill{border-color:#0d7777;background:#153c42;color:#bcefeb}
body.dark-theme .career-approved-card .career-total-track,body.dark-theme .history-page .career-category-progress .category-progress-track{background:#414967}
body.dark-theme .history-page .career-enroll{background:#202d50;color:#dce5ff}
body.dark-theme .career-enroll-arrow{background:#323159;color:#fff}
@media(min-width:600px){main.dashboard.history-page{max-width:900px}.history-page .career-hero{padding-bottom:0.625rem}.history-page .career-course-progress,.career-approved-card,.history-page .career-category-progress,.history-page .career-enroll,.history-page .career-average-card{max-width:820px;width:100%;margin-right:auto;margin-left:auto}.history-page .career-hero .progress-wheel{width:300px}.history-page .career-hero{margin-bottom:1.125rem}}

/* Materias: iconos semánticos y lectura rápida en todas las carreras */
.matter-page .matter-head{margin-bottom:0.8125rem;padding:0.5rem 0 0.25rem}
.matter-page .matter-head .selection-step-label{display:inline-flex;margin-bottom:0.5rem;padding:0.25rem 0.5625rem;border-radius:99px;background:var(--blue-tint);color:var(--blue-text);font-size:0.625rem;font-weight:850;letter-spacing:.045em;opacity:1}
.matter-page .matter-head h1{font-size:clamp(1.6875rem,7vw,2.125rem);line-height:1.08;letter-spacing:-.035em}
.matter-page .matter-head>p:not(.selection-step-help){margin-top:0.25rem;color:var(--blue-text);font-size:0.9375rem;font-weight:750}
.matter-page .matter-head .selection-step-help{max-width:44ch;margin-top:0.1875rem;color:var(--muted);font-size:0.75rem;line-height:1.35}
.matter-page .matter-search-row{margin-bottom:0.625rem}
.matter-page .matter-search input{height:48px;min-height:48px;border-radius:16px;font-size:0.875rem}
.matter-page .matter-filter-disclosure>summary{width:48px;height:48px;border-radius:16px}
.matter-page .matter-status-filters{gap:0.375rem;margin-bottom:0.75rem}
.matter-page .matter-status-filters .pill{min-height:44px;padding:0.375rem 0.25rem;border-color:var(--line);border-radius:14px;font-size:0.75rem}
.matter-page .matter-status-filters .pill.active{border-color:var(--blue);background:var(--blue)}
.matter-page .matter-cards{gap:0.5rem}
.matter-page .matter-card{padding:0.625rem 0.75rem;border-radius:16px}
.matter-card-main{display:grid;grid-template-columns:36px minmax(0,1fr);align-items:center;gap:0.5625rem;min-width:0}
.subject-icon{display:grid;place-items:center;width:34px;height:34px;border:1px solid #c8d7f3;border-radius:10px;background:#f4f7fd;color:#345b9e}
.subject-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.subject-icon-palette{background:#f5f0ff;border-color:#ddd0fa;color:#7650ad}
.subject-icon-camera{background:#fff1eb;border-color:#f1d1bf;color:#aa6537}
.subject-icon-sound{background:#eaf8f7;border-color:#c1e8e5;color:#208d91}
.subject-icon-leaf{background:#edf7ed;border-color:#cde7cf;color:#4c8a56}
.subject-icon-calculator{background:#eef2fb;border-color:#d3dcef;color:#4c6597}
.subject-icon-cube{background:#f1f2f8;border-color:#d9ddec;color:#5d668a}
.subject-icon-network{background:#f3effb;border-color:#ddd4f0;color:#795ca2}
.subject-icon-ruler{background:#fff6e8;border-color:#f2dfb9;color:#986d2c}
body.dark-theme .subject-icon{background:#27324b;border-color:#48577b;color:#bed0ff}
body.dark-theme .subject-icon-palette,body.dark-theme .subject-icon-network{background:#322b48;color:#d3baff}
body.dark-theme .subject-icon-camera,body.dark-theme .subject-icon-ruler{background:#44382d;color:#ffd39c}
body.dark-theme .subject-icon-sound,body.dark-theme .subject-icon-leaf{background:#1e3d3d;color:#9be5dc}
.matter-page .course-open{min-width:0;padding:0.125rem 2.375rem 0.125rem 0;gap:0.25rem}
.matter-page .course-open b{font-size:0.8125rem;font-weight:700;line-height:1.25}
.matter-page .matter-card-title>span{font-size:0.75rem}
.matter-page .matter-meta span{font-size:0.625rem;line-height:1.2}
.matter-page .favorite-toggle{top:6px;right:6px;width:44px;height:44px}
.matter-page .favorite-toggle svg{width:18px;height:18px}
.matter-page .choice-group-card{border-radius:17px}
.matter-page .choice-group-card>summary{grid-template-columns:38px minmax(0,1fr) auto;align-items:center;gap:0.3125rem 0.5625rem;padding:0.75rem 2.375rem 0.75rem 0.6875rem}
.matter-page .choice-group-card>summary>.subject-icon{grid-column:1;grid-row:1/4}
.matter-page .choice-group-summary{display:grid;grid-column:2;gap:0.125rem;min-width:0}
.matter-page .choice-group-summary .selection-step-label{grid-column:auto;margin:0;font-size:0.5625rem}
.matter-page .choice-group-summary>b{font-size:0.8125rem;line-height:1.25;overflow-wrap:anywhere}
.matter-page .choice-group-summary .choice-group-prompt{grid-column:auto;font-size:0.6875rem}
.matter-page .choice-group-count{grid-column:3;grid-row:1;align-self:start;padding:0.1875rem 0.4375rem;border-radius:99px;background:var(--blue-tint);color:var(--blue-text);font-size:0.625rem;font-weight:800;white-space:nowrap}
.matter-page .choice-group-card>summary>.matter-meta{grid-column:2/4}
.matter-page .choice-group-options{gap:0.6875rem;padding:0.625rem}
.matter-page .choice-category-group h3{font-size:0.75rem}
.matter-page .choice-subject-list{gap:0.4375rem}
.matter-page .choice-subject-card{padding:0.5625rem;border-radius:14px}
.matter-page .choice-subject-card .matter-card-main{grid-template-columns:31px minmax(0,1fr);gap:0.4375rem}
.matter-page .choice-subject-card .subject-icon{width:30px;height:30px}
.matter-page .choice-subject-card .subject-icon svg{width:19px;height:19px}
.matter-page .choice-subject-card .course-open{padding-right:1.875rem}
.matter-page .choice-subject-card .choice-subject-meta{font-size:0.625rem}
@media(min-width:600px){.matter-page .matter-head h1{font-size:2.125rem}.matter-page .matter-card{padding:0.75rem 0.875rem}.matter-page .course-open b{font-size:0.875rem}}
body.dark-theme .progress-course-row.is-approved{background:var(--done-surface);border-color:var(--done-line);color:var(--done-ink)}
body.dark-theme .event-card-exam{border-left-color:#ffd166;background:#302a22}
body.dark-theme .event-card-exam .event-card-priority{background:#ffd166;color:#30220a}
body.dark-theme .settings-action.danger{color:#ff989c}
@media(min-width:600px){
  :root{--pad:28px}
  .career-course-progress{padding:1.875rem 2.125rem 1.625rem}
  .career-category-progress .category-progress-list{padding-inline:1.5rem}
  .matter-status-filters{margin-bottom:1.25rem}
}
@media(min-width:900px){
  main.dashboard{max-width:900px}
  .app-shell.with-sidebar main#app{padding-bottom:3rem}
  .app-sidebar{background:var(--sidebar);color:#fff}
  .app-sidebar button,.app-sidebar button.active{color:#fff}
  .app-sidebar button.active{background:#ffffff24}
  .app-sidebar button.active svg{background:transparent}
}

/* Mi carrera: panel de totales con lectura diferenciada */
.history-page .career-course-progress{padding:1.125rem 1rem}
.history-page .career-progress-total{width:100%}
.career-approved-copy>strong .career-total-divider{font-size:.58em}
.career-completion-copy{justify-items:start}
.career-completion-copy>span{max-width:14ch}
body.dark-theme .career-summary-divider{background:var(--line-strong)}

/* Detalle de materia: datos en tarjetas claras y textos que pueden reacomodarse */
.course-detail-dialog .matter-head{padding:1.25rem 1rem 1rem}
.course-dialog-heading>div{min-width:0}
.course-detail-dialog #courseDialogTitle{max-width:100%;font-size:clamp(1.75rem,7vw,3.25rem);line-height:1.05;overflow-wrap:anywhere}
.course-dialog-context{margin-top:.5rem!important;font-size:clamp(.9375rem,3.5vw,1.125rem);font-weight:650;line-height:1.35;overflow-wrap:anywhere}
.course-detail-dialog .matter-detail-cards{gap:.75rem}
.course-facts{grid-template-columns:repeat(2,minmax(0,1fr));gap:.625rem;padding:.75rem;border-radius:1.375rem}
.course-fact{gap:.375rem;min-height:6rem;padding:.875rem;border-color:var(--line);border-radius:1.125rem;background:var(--blue-tint)}
.course-fact b{font-size:.75rem;letter-spacing:.025em}
.course-fact>span{font-size:clamp(1rem,4.1vw,1.375rem);line-height:1.25;overflow-wrap:anywhere}
.course-fact small{font-size:.75rem;line-height:1.3}
.course-detail-dialog .subject-actions{gap:.5rem}
.course-detail-dialog .subject-actions>*{min-height:3.25rem;border-radius:1.125rem;font-size:1rem}
.course-detail-dialog .course-status-controls{grid-template-columns:minmax(4.5rem,auto) minmax(0,1fr);gap:.625rem}
.course-detail-dialog .course-status-controls>span{font-size:1rem}
.course-detail-dialog .course-status-controls select{min-width:0;min-height:3rem;font-size:1rem}
.course-detail-dialog .grade-control{align-items:center;gap:.75rem;padding-top:.875rem}
.course-detail-dialog .grade-control>span{font-size:1rem}
.course-detail-dialog .grade-control input{width:5.25rem;min-height:3.25rem}
.matter-page .matter-card{min-height:4.5rem;padding:.75rem .875rem;border-radius:1.125rem}
.matter-page .matter-card-main{grid-template-columns:2.75rem minmax(0,1fr);gap:.625rem}
.matter-page .subject-icon{width:2.625rem;height:2.625rem;border-radius:.875rem}
.matter-page .subject-icon svg{width:1.5rem;height:1.5rem}
.matter-page .course-open{gap:.375rem}
.matter-page .course-open b{font-size:.875rem;line-height:1.3;overflow-wrap:anywhere}
.matter-page .matter-meta{gap:.25rem .5rem}
.matter-page .matter-meta span{font-size:.6875rem}
@media(min-width:600px){
  .history-page .career-course-progress{padding:1.5rem 1.75rem}
  .course-detail-dialog .matter-head{padding:1.5rem 1.75rem 1.25rem}
  .course-dialog-content{padding:0 1.75rem 1.5rem}
  .course-detail-dialog .matter-head{margin-right:-1.75rem;margin-left:-1.75rem}
  .course-facts{gap:.75rem;padding:1rem}
  .course-fact{min-height:7rem;padding:1rem}
}

/* Cátedras: selección clara, mobile-first y acción persistente */
main.dashboard.chair-list-page {
  max-width: 48rem;
  min-height: calc(100dvh - var(--topbar-h));
  padding: 1.25rem 1rem calc(7.25rem + env(safe-area-inset-bottom));
}
.chair-selection-head { margin: 0 0 1.5rem; }
.selection-step-label {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  margin-bottom: 1.25rem;
  padding: .35rem .875rem;
  border-radius: 999px;
  background: var(--mint, #e2f5f1);
  color: var(--blue-text, #244b91);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .055em;
}
.chair-selection-head h1 {
  margin: 0;
  color: #30294f;
  font-size: clamp(2.25rem, 9vw, 3.75rem);
  font-weight: 850;
  letter-spacing: -.045em;
  line-height: 1.04;
  overflow-wrap: anywhere;
}
.chair-subject-title {
  margin: .5rem 0 0;
  color: var(--blue-text, #28529a);
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.chair-shared-info {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin: 1.25rem 0 0;
  color: var(--muted, #65718c);
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.35;
}
.chair-shared-info svg { width: 1.5rem; height: 1.5rem; flex: 0 0 auto; }
.chair-option-list { display: grid; gap: .875rem; margin: 0; }
.chair-option-card {
  display: flex;
  width: 100%;
  min-height: 7.5rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.25rem;
  border: 1.5px solid #cfe3e3;
  border-radius: 1.5rem;
  background: var(--surface, #fff);
  color: #30294f;
  box-shadow: 0 3px 10px #1d35590a;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.chair-option-card[aria-pressed="true"] {
  border: 2px solid #155cff;
  background: #e9f7f6;
  box-shadow: 0 0 0 2px #155cff12;
}
.chair-option-card:focus-visible { outline: 3px solid #155cff66; outline-offset: 3px; }
.chair-option-copy { display: grid; min-width: 0; gap: .25rem; }
.chair-option-copy strong { color: #30294f; font-size: clamp(1.5rem, 6vw, 2rem); font-weight: 800; line-height: 1.1; overflow-wrap: anywhere; }
.chair-option-subject { color: var(--blue-text, #28529a); font-size: .9rem; font-weight: 700; }
.chair-option-turn { display: flex; align-items: center; gap: .625rem; color: var(--muted, #65718c); font-size: clamp(1rem, 4vw, 1.25rem); line-height: 1.35; }
.chair-option-turn > span:first-child { font-size: 1.25rem; }
.chair-option-copy small { color: var(--muted, #65718c); font-size: .9rem; }
.chair-radio { display: grid; width: 2.5rem; height: 2.5rem; flex: 0 0 2.5rem; place-items: center; border: 2px solid #778099; border-radius: 50%; }
.chair-radio > span { width: 1.25rem; height: 1.25rem; border-radius: 50%; background: transparent; }
.chair-option-card[aria-pressed="true"] .chair-radio { border-color: #155cff; }
.chair-option-card[aria-pressed="true"] .chair-radio > span { background: #155cff; }
.chair-continue-bar {
  position: fixed;
  z-index: 20;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: center;
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #eef7f6e8, #eef7f6 35%);
}
.chair-continue-bar .btn { width: min(100%, 46rem); min-height: 4.5rem; border-radius: 1.5rem; font-size: clamp(1.25rem, 5vw, 1.75rem); font-weight: 800; }
.chair-continue-bar .btn span { margin-left: .5rem; font-size: 1.35em; font-weight: 500; }
.chair-continue-bar .btn:disabled { opacity: .55; cursor: not-allowed; }
.chair-search-label { display: block; margin: 0 0 .375rem; color: var(--muted, #65718c); font-size: .875rem; font-weight: 650; }
@media (min-width: 600px) {
  main.dashboard.chair-list-page { padding: 2rem 1.5rem calc(7.5rem + env(safe-area-inset-bottom)); }
  .chair-selection-head { margin-bottom: 2rem; }
  .chair-option-list { gap: 1rem; }
  .chair-option-card { padding: 1.25rem 1.5rem; }
}

/* Mi carrera: el gráfico acompaña al total y el porcentaje vive en el círculo. */
.history-page .career-progress-total {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: .875rem;
  width: 100%;
}
.history-page .career-summary-divider,
.history-page .career-completion { display: none; }
.history-page .career-course-progress .career-total-track {
  grid-column: 1;
  height: .875rem;
  border-radius: 999px;
  background: #e6ebf5;
}
.history-page .career-course-progress .career-total-track span { background: var(--blue); }
.matter-page .matter-meta .matter-grade-missing {
  padding: .1875rem .5rem;
  border-radius: 999px;
  background: #fff0c2;
  color: #754800;
  font-size: .6875rem;
  font-weight: 750;
}
.grade-reminder {
  display: inline-flex;
  width: fit-content;
  margin-top: .25rem;
  padding: .1875rem .5rem;
  border-radius: 999px;
  background: #fff0c2;
  color: #754800;
  font-size: .75rem;
  font-weight: 750;
  line-height: 1.25;
}
body.dark-theme .matter-page .matter-meta .matter-grade-missing,
body.dark-theme .grade-reminder { background: #5c4820; color: #ffe8a1; }
@media (min-width: 600px) {
  .history-page .career-course-progress .career-total-track { height: 1rem; }
}

/* Mi carrera: centrar el resumen de aprobadas en una superficie diferenciada. */
.history-page .career-approved-summary {
  display: flex;
  width: 100%;
  min-height: 8rem;
  align-items: center;
  justify-content: center;
  gap: clamp(.75rem, 4vw, 1.5rem);
  padding: 1rem;
  border: 1px solid #d3e8e5;
  border-radius: 1.5rem;
  background: #edf7f5;
  text-align: center;
}
.history-page .career-approved-copy {
  justify-items: center;
  text-align: center;
}
.history-page .career-approved-copy > strong { justify-content: center; }
body.dark-theme .history-page .career-approved-summary {
  border-color: #374d58;
  background: #253642;
}

/* Explicit grade confirmation controls */
.grade-control-entry,.progress-grade-entry{display:flex;align-items:center;justify-content:flex-end;gap:.5rem;min-width:0}
.grade-control-entry .grade-confirm,.progress-grade-confirm{min-height:2.75rem;padding:.5rem .75rem;border-radius:.875rem;font-size:.8125rem;line-height:1.1;white-space:nowrap}
.grade-confirm:disabled,.progress-grade-confirm:disabled{cursor:default;opacity:.72}
.progress-grade-entry{flex-wrap:wrap}
@media(max-width:420px){.course-detail-dialog .grade-control{align-items:flex-start;flex-direction:column}.course-detail-dialog .grade-control-entry{width:100%;justify-content:flex-start}.progress-grade-entry{justify-content:flex-start}}

/* Agenda: exámenes visibles desde cualquier fecha y cursadas completas */
.calendar-upcoming-exams{display:grid;gap:.625rem;margin:1rem 0}
.calendar-upcoming-exams h2{margin:0;font-size:1.125rem}
.calendar-legend .legend-exam{background:#d58b00}
.cal-day.has-exam:not(.chosen)::after{background:#d58b00}
.cal-day.chosen.has-exam::after{background:#ffd166}
.weekly-schedule>h2{margin-bottom:.75rem}
/* Selector de cátedra compacto, dentro de un diálogo modal */
.chair-selection-dialog{position:fixed;inset:50% auto auto 50%;width:min(42rem,calc(100vw - 2rem));max-width:none;max-height:min(88dvh,52rem);margin:0;padding:0;transform:translate(-50%,-50%);overflow:hidden;border:1px solid var(--line);border-radius:1.5rem;background:var(--surface);color:var(--ink);box-shadow:0 1.5rem 5rem #11182755}
.chair-selection-dialog::backdrop{background:#17203399;backdrop-filter:blur(4px)}
.chair-selection-dialog-content{position:relative;display:flex;max-height:min(88dvh,52rem);flex-direction:column;overflow:auto;padding:1.25rem}
.chair-selection-dialog .chair-selection-head{position:relative;margin:0 0 .875rem;padding-right:2.75rem}
.chair-selection-dialog .selection-step-label{min-height:1.75rem;margin-bottom:.625rem;padding:.25rem .625rem;font-size:.6875rem}
.chair-selection-dialog .chair-selection-head h1{font-size:clamp(1.5rem,5vw,2rem);line-height:1.12}
.chair-selection-dialog .chair-subject-title{margin-top:.25rem;font-size:1.125rem}
.chair-selection-dialog .chair-shared-info{gap:.5rem;margin-top:.625rem;font-size:.875rem}
.chair-selection-dialog .chair-shared-info svg{width:1.125rem;height:1.125rem}
.chair-dialog-close{position:absolute;top:0;right:0;display:grid;width:2.5rem;height:2.5rem;place-items:center;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--ink);font-size:1.5rem;line-height:1}
.chair-selection-dialog .chair-search-label{margin:.25rem 0 .375rem;font-size:.75rem}
.chair-selection-dialog .chair-search{min-height:2.75rem;margin-bottom:.75rem;font-size:.875rem}
.chair-selection-dialog .chair-option-list{gap:.5rem;overflow:auto}
.chair-selection-dialog .chair-option-card{min-height:4.5rem;padding:.625rem .75rem;border-radius:1rem}
.chair-selection-dialog .chair-option-copy{gap:.125rem}
.chair-selection-dialog .chair-option-copy strong{font-size:1rem;line-height:1.25}
.chair-selection-dialog .chair-option-subject,.chair-selection-dialog .chair-option-copy small{font-size:.75rem}
.chair-selection-dialog .chair-option-turn{gap:.375rem;font-size:.8125rem}
.chair-selection-dialog .chair-option-turn>span:first-child{font-size:1rem}
.chair-selection-dialog .chair-radio{width:1.5rem;height:1.5rem;flex-basis:1.5rem}
.chair-selection-dialog .chair-radio>span{width:.75rem;height:.75rem}
.chair-selection-dialog .chair-continue-bar{position:sticky;z-index:1;bottom:0;margin:.75rem -1.25rem -1.25rem;padding:.625rem 1.25rem calc(.625rem + env(safe-area-inset-bottom));background:linear-gradient(180deg,#ffffffd9,var(--surface) 35%)}
.chair-selection-dialog .chair-continue-bar .btn{width:100%;min-height:3.25rem;border-radius:1rem;font-size:1rem}
@media(min-width:600px){.chair-selection-dialog-content{padding:1.5rem}.chair-selection-dialog .chair-continue-bar{margin-right:-1.5rem;margin-left:-1.5rem;padding-right:1.5rem;padding-left:1.5rem}.chair-selection-dialog .chair-selection-head{margin-bottom:1rem}}
.chair-selection-dialog .chair-option-list{overflow:visible}

/* Configuration control: consistent hit area, contrast, and centered icon */
.topbar-settings{width:2.75rem;height:2.75rem;padding:0;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--blue-text);transition:background-color .15s ease,border-color .15s ease,transform .15s ease}
.topbar-settings svg{display:block;width:1.5rem;height:1.5rem;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.topbar-settings:hover{border-color:var(--line-strong);background:var(--blue-tint)}
.topbar-settings:active{transform:scale(.96)}
.topbar-settings:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
/* Dark mode: maintain readable headings and remove the light footer seam. */
body.dark-theme .chair-selection-dialog .chair-selection-head h1,
body.dark-theme .chair-selection-dialog .chair-option-card,
body.dark-theme .chair-selection-dialog .chair-option-copy strong{color:var(--ink)}
body.dark-theme .chair-selection-dialog .chair-continue-bar{background:linear-gradient(180deg,transparent,var(--surface) 35%)}
body.dark-theme .chair-selection-dialog .chair-option-card{border-color:var(--line-strong);background:var(--surface)}
body.dark-theme .chair-selection-dialog .chair-option-card[aria-pressed="true"]{border-color:var(--accent);background:var(--blue-tint)}
body.dark-theme .chair-selection-dialog .chair-option-card[aria-pressed="true"] .chair-radio{border-color:var(--accent)}
body.dark-theme .chair-selection-dialog .chair-option-card[aria-pressed="true"] .chair-radio>span{background:var(--accent)}
body.dark-theme .chair-selection-dialog .chair-dialog-close{border-color:var(--line);background:var(--surface);color:var(--ink)}
