:root{
  --brand:#01a89f;
  --brand2:#1186b2;
  --accent:#f9ad3e;
  --muted:#737475;
  --border: rgba(115,116,117,.18);
  --bg:#f5f7fb;

  /* Admin palette (alineado a tu referencia) */
  --teal1:#01a89f;
  --teal2:#1186b2;
  --navy:#384284;
  --blue:#187fb4;
  --orange:#f9ad3e;

  --shadow: 0 14px 40px rgba(9, 20, 60, .08);
}
*{box-sizing:border-box}
body{margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: var(--bg); color:#111}
a{color:inherit; text-decoration:none}
.container{max-width:1200px; margin:0 auto; padding:16px}
.nav{display:flex; justify-content:space-between; align-items:center; gap:10px; padding:14px 16px; background:#fff; border-bottom:1px solid var(--border)}
.brand{display:flex; gap:10px; align-items:center; font-weight:900}
.brand-badge{width:36px;height:36px;border-radius:12px;background:var(--brand); display:inline-block}
.btn{display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:12px; border:1px solid transparent; background:var(--brand); color:#fff; font-weight:800; cursor:pointer}
.btn.secondary{background:#fff; color:#111; border-color: var(--border)}
.btn.orange{background:var(--accent)}
.btn.danger{background:#dc2626}
.badge{display:inline-flex; padding:6px 10px; border-radius:999px; background: rgba(34,158,155,.10); border:1px solid rgba(34,158,155,.28); color:#0a3f3e; font-weight:800; font-size:12px}
.card{background:#fff; border:1px solid var(--border); border-radius:18px; padding:16px; box-shadow:0 8px 24px rgba(0,0,0,.04)}
.grid{display:grid; gap:12px; grid-template-columns: repeat(3, minmax(0,1fr))}
@media (max-width:900px){.grid{grid-template-columns:1fr}}
.input, select, textarea{width:100%; padding:10px 12px; border-radius:12px; border:1px solid var(--border); outline:none}
label{display:block; font-weight:800; margin-bottom:6px}
.small{color:var(--muted); font-size:13px}
.table{width:100%; border-collapse:collapse}
.table th,.table td{padding:10px; border-bottom:1px solid var(--border); text-align:left; vertical-align:top}
.alert{border-radius:14px; padding:12px; border:1px solid var(--border); background:rgba(115,116,117,.05)}
.alert.ok{border-color: rgba(34,158,155,.35); background: rgba(34,158,155,.08)}
.alert.warn{border-color: rgba(238,144,33,.35); background: rgba(238,144,33,.08)}
.footer{padding:24px; color:var(--muted); text-align:center}
hr{border:none;border-top:1px solid var(--border); margin:12px 0}
.kpi{font-weight:900; font-size:28px; margin-top:6px}
.qbox{border:1px solid var(--border); border-radius:16px; padding:14px}
.qbox img{max-width:100%; height:auto; border-radius:12px; border:1px solid rgba(115,116,117,.18);}
.option{display:flex; gap:10px; align-items:flex-start; padding:10px; border:1px solid var(--border); border-radius:14px; margin-top:10px}
.option input{margin-top:4px}

/* =========================
   Admin shell (nuevo)
   ========================= */
.admin-shell{display:flex; gap:18px; padding:18px; min-height:100vh}
.admin-sidebar{
  width:250px;
  border-radius:24px;
  padding:18px 14px;
  background:linear-gradient(180deg,var(--teal1),var(--teal2));
  color:#fff;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
}
.admin-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 10px;
  margin:0 2px 10px;
  background:#DFECEC;
  border:1px solid rgba(9,20,60,.10);
  border-radius:18px;
  color:#1c2340;
}
.admin-logo{width:56px; height:56px; border-radius:0; background:transparent; border:none; display:block; overflow:visible}
.admin-logo-img{width:56px; height:56px; object-fit:contain; padding:0; display:block}
.admin-brand{position:relative}
.admin-brand .admin-logo{position:relative; z-index:2; pointer-events:auto}
.admin-brand .admin-logo-img{pointer-events:auto}

.admin-brand-title{font-weight:900; line-height:1.05}
.admin-brand-sub{font-size:12px; opacity:.82; margin-top:2px}

.admin-nav{margin-top:6px; display:flex; flex-direction:column; gap:4px}
.admin-nav-section{font-size:12px; font-weight:800; opacity:.8; margin:14px 10px 6px}
.admin-nav-item{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:14px; color:rgba(255,255,255,.92); font-weight:800}
.admin-nav-item:hover{background:rgba(255,255,255,.12)}
.admin-nav-item.active{background:rgba(255,255,255,.18); box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)}
.admin-nav-ico{width:22px; height:22px; display:grid; place-items:center; border-radius:10px; background:rgba(255,255,255,.16); font-size:13px}

.admin-sidebar-footer{margin-top:auto; padding:12px 10px 6px; display:flex; flex-direction:column; gap:12px}
.mode-toggle{display:flex; align-items:center; justify-content:space-between; gap:10px; font-weight:800}
.switch{position:relative; display:inline-block; width:46px; height:26px}
.switch input{opacity:0; width:0; height:0}
.slider{position:absolute; cursor:pointer; inset:0; background:rgba(255,255,255,.22); border:1px solid rgba(255,255,255,.25); border-radius:999px; transition:.2s}
.slider:before{position:absolute; content:""; height:20px; width:20px; left:3px; top:2px; background:#fff; border-radius:50%; transition:.2s}
.switch input:checked + .slider{background:rgba(1,168,159,.65)}
.switch input:checked + .slider:before{transform:translateX(20px)}

.admin-main{flex:1; min-width:0}
.admin-surface{background:#fff; border:1px solid rgba(9,20,60,.08); border-radius:24px; box-shadow:var(--shadow); padding:18px; min-height:calc(100vh - 36px)}
.admin-topbar{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding-bottom:14px; border-bottom:1px solid rgba(9,20,60,.08); margin-bottom:16px}
.crumb{font-weight:900; color:#1c2340}
.topbar-right{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.profile-chip{display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid rgba(9,20,60,.10); border-radius:16px; background:rgba(245,247,251,.7)}
.avatar{width:34px; height:34px; border-radius:14px; background:linear-gradient(180deg,var(--teal1),var(--teal2)); background-size:cover; background-position:center; background-repeat:no-repeat}
.profile-name{font-weight:900; line-height:1}
.profile-email{font-size:12px; color:var(--muted); line-height:1.1}
.admin-content{padding:0}

@media (max-width:980px){
  .admin-shell{flex-direction:column}
  .admin-sidebar{width:100%; height:auto; position:relative}
  .admin-surface{min-height:auto}
}

/* =========================
   Dashboard (/admin)
   ========================= */
.dashboard{display:flex; flex-direction:column; gap:16px}
.dash-top{display:grid; grid-template-columns:1.3fr 1fr 1fr 1fr auto; gap:12px; align-items:stretch}
@media (max-width:1100px){.dash-top{grid-template-columns:1fr}}

.dash-profile{display:flex; align-items:center; gap:14px; padding:14px 16px}
.dash-avatar{width:54px; height:54px; border-radius:18px; background:rgba(1,168,159,.14); border:1px solid rgba(1,168,159,.28); display:grid; place-items:center; font-weight:900; color:#046b70}
.dash-welcome{font-weight:900; margin-bottom:2px}
.dash-date{font-size:12px; color:var(--muted)}

.kpi-tile{border-radius:18px; padding:14px 16px; color:#fff; font-weight:900; display:flex; flex-direction:column; justify-content:center}
.kpi-tile .kpi-label{font-size:12px; opacity:.92; font-weight:800}
.kpi-tile .kpi-value{font-size:28px; margin-top:4px}
.kpi-orange{background:linear-gradient(180deg,#f9ad3e,#f39b1f)}
.kpi-navy{background:linear-gradient(180deg,#384284,#2b3268)}
.kpi-blue{background:linear-gradient(180deg,#187fb4,#136b98)}

.dash-action{align-self:stretch; display:flex}
.dash-action .btn{width:100%; justify-content:center; border-radius:18px}

.dash-grid{display:grid; grid-template-columns:2fr 1fr; gap:12px}
@media (max-width:1100px){.dash-grid{grid-template-columns:1fr}}

.card-head{display:flex; justify-content:space-between; gap:10px; align-items:flex-start; margin-bottom:10px}
.card-title{font-weight:900; margin:0}
.card-sub{font-size:12px; color:var(--muted); margin-top:2px}
.card-tools{display:flex; gap:8px; align-items:center}

.pill{display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; border:1px solid rgba(9,20,60,.10); background:rgba(245,247,251,.7); font-weight:800; font-size:12px; color:#1c2340}
.pill input{border:0; outline:0; background:transparent; width:160px; font-weight:700}

.dash-bottom{display:grid; grid-template-columns:1.2fr 1.2fr 1fr; gap:12px}
@media (max-width:1100px){.dash-bottom{grid-template-columns:1fr}}

.rings{display:flex; gap:14px; flex-wrap:wrap}
.ring{
  width:110px;
  height:110px;
  border-radius:50%;
  background:conic-gradient(var(--ring-color) 0 calc(var(--p) * 1%), rgba(9,20,60,.10) calc(var(--p) * 1%) 100%);
  display:grid;
  place-items:center;
  position:relative;
}
.ring::after{content:""; width:84px; height:84px; border-radius:50%; background:#fff; box-shadow:inset 0 0 0 1px rgba(9,20,60,.06)}
.ring .ring-center{position:absolute; text-align:center}
.ring .ring-center .pct{font-weight:900; font-size:20px}
.ring .ring-center .lbl{font-size:12px; color:var(--muted); font-weight:800; margin-top:2px}

.metric-row{display:flex; justify-content:space-between; align-items:baseline; gap:10px; padding:10px 0; border-bottom:1px solid rgba(9,20,60,.08)}
.metric-row:last-child{border-bottom:0}
.metric-row .m-label{font-weight:800; color:#1c2340}
.metric-row .m-val{font-weight:900}

.trend-number{font-weight:900; font-size:26px}

/* Modo oscuro (opcional, minimalista) */
body.theme-dark{background:#0b1220; color:#f3f6ff}
body.theme-dark .nav{background:#0f1a2e; border-bottom-color:rgba(255,255,255,.10)}
body.theme-dark .admin-surface{background:#0f1a2e; border-color:rgba(255,255,255,.10)}
body.theme-dark .card{background:#0f1a2e; border-color:rgba(255,255,255,.10)}
body.theme-dark .profile-chip, body.theme-dark .pill{background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.10)}
body.theme-dark .small, body.theme-dark .profile-email, body.theme-dark .card-sub{color:rgba(243,246,255,.72)}

/* =========================
   Exámenes: calificación 1–10 + comodines
   ========================= */
.ring.sm{width:68px; height:68px}
.ring.sm::after{width:52px; height:52px}
.ring.sm .ring-center .pct{font-size:16px}
.ring.sm .ring-center .lbl{font-size:11px}

.wc-bar{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.wc-chip{display:inline-flex; gap:8px; align-items:center; padding:8px 12px; border-radius:999px; border:1px solid rgba(9,20,60,.10); background:rgba(245,247,251,.7); font-weight:900; font-size:12px; color:#1c2340}
.wc-chip .mut{font-weight:800; color:rgba(28,35,64,.72)}
.wc-chip .dot{width:8px; height:8px; border-radius:50%; background:rgba(9,20,60,.25)}
.wc-chip.ok .dot{background:rgba(16,185,129,.85)}
.wc-chip.warn .dot{background:rgba(238,144,33,.95)}
.wc-chip.off .dot{background:rgba(148,163,184,.85)}

.exam-paused-overlay{position:fixed; inset:0; background:rgba(10,16,32,.60); display:none; align-items:center; justify-content:center; z-index:9999; padding:18px}
.exam-paused-card{background:#fff; border-radius:24px; padding:18px 18px 16px 18px; box-shadow:var(--shadow); max-width:520px; width:100%}
.exam-paused-card h3{margin:0 0 6px 0}
.exam-paused-card .small{margin-top:0}

/* =========================
   Admin shell (nuevo)
   ========================= */
.admin-shell{display:flex; gap:18px; padding:18px; min-height:100vh}
.admin-sidebar{width:250px; border-radius:24px; padding:18px 14px; background:linear-gradient(180deg,var(--teal1),var(--teal2)); color:#fff; box-shadow:var(--shadow); display:flex; flex-direction:column}
.admin-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 10px;
  margin:0 2px 10px;
  background:#DFECEC;
  border:1px solid rgba(9,20,60,.10);
  border-radius:18px;
  color:#1c2340;
}
.admin-logo{width:56px; height:56px; border-radius:0; background:transparent; border:none; display:block; overflow:visible}
.admin-brand-title{font-weight:900; line-height:1.05}
.admin-brand-sub{font-size:12px; opacity:.82; margin-top:2px}

.admin-nav{margin-top:6px; display:flex; flex-direction:column; gap:4px}
.admin-nav-section{font-size:12px; font-weight:800; opacity:.8; margin:14px 10px 6px}
.admin-nav-item{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:14px; color:rgba(255,255,255,.92); font-weight:800}
.admin-nav-item:hover{background:rgba(255,255,255,.12)}
.admin-nav-item.active{background:rgba(255,255,255,.18); box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)}
.admin-nav-ico{width:22px; height:22px; display:grid; place-items:center; border-radius:10px; background:rgba(255,255,255,.16); font-size:12px}

.admin-sidebar-footer{margin-top:auto; padding:12px 10px 6px; display:flex; flex-direction:column; gap:12px}
.mode-toggle{display:flex; align-items:center; justify-content:space-between; gap:10px; font-weight:800}
.switch{position:relative; display:inline-block; width:46px; height:26px}
.switch input{opacity:0; width:0; height:0}
.slider{position:absolute; cursor:pointer; inset:0; background:rgba(255,255,255,.22); border:1px solid rgba(255,255,255,.25); border-radius:999px; transition:.2s}
.slider:before{position:absolute; content:""; height:20px; width:20px; left:3px; top:2px; background:#fff; border-radius:50%; transition:.2s}
.switch input:checked + .slider{background:rgba(1,168,159,.65)}
.switch input:checked + .slider:before{transform:translateX(20px)}

.admin-main{flex:1; min-width:0}
.admin-surface{background:#fff; border:1px solid rgba(9,20,60,.08); border-radius:24px; box-shadow:var(--shadow); padding:18px; min-height:calc(100vh - 36px)}
.admin-topbar{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding-bottom:14px; border-bottom:1px solid rgba(9,20,60,.08); margin-bottom:16px}
.crumb{font-weight:900; color:#1c2340}
.topbar-right{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.profile-chip{display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid rgba(9,20,60,.10); border-radius:16px; background:rgba(245,247,251,.7)}
.avatar{width:34px; height:34px; border-radius:14px; background:linear-gradient(180deg,var(--teal1),var(--teal2)); background-size:cover; background-position:center; background-repeat:no-repeat}
.profile-name{font-weight:900; line-height:1}
.profile-email{font-size:12px; color:var(--muted); line-height:1.1}
.admin-content{padding:0}

@media (max-width:980px){
  .admin-shell{flex-direction:column}
  .admin-sidebar{width:100%; position:relative}
  .admin-surface{min-height:auto}
}

/* =========================
   Dashboard (nuevo)
   ========================= */
.dashboard{display:flex; flex-direction:column; gap:16px}
.dash-top{display:grid; grid-template-columns:1.3fr 1fr 1fr 1fr auto; gap:12px; align-items:stretch}
.dash-action{display:flex}
.dash-action .btn{width:100%; justify-content:center; border-radius:18px}
.dash-profile{display:flex; align-items:center; gap:14px; padding:14px 16px}
.dash-avatar{width:54px; height:54px; border-radius:18px; background:rgba(1,168,159,.12); border:1px solid rgba(1,168,159,.26); display:grid; place-items:center; font-weight:900; color:#046b70}
.dash-welcome{font-weight:900; margin-bottom:2px}
.dash-date{font-size:12px; color:var(--muted)}
.kpi-tile{border-radius:18px; padding:14px 16px; color:#fff; font-weight:900; display:flex; flex-direction:column; justify-content:center}
.kpi-tile .kpi-label{font-size:12px; opacity:.9; font-weight:800}
.kpi-tile .kpi-value{font-size:28px; margin-top:4px}
.kpi-orange{background:linear-gradient(180deg,var(--orange),#f39b1f)}
.kpi-navy{background:linear-gradient(180deg,var(--navy),#2b3268)}
.kpi-blue{background:linear-gradient(180deg,var(--blue),#136b98)}

.dash-grid{display:grid; grid-template-columns:2fr 1fr; gap:12px}
.dash-bottom{display:grid; grid-template-columns:1.2fr 1.2fr 1fr; gap:12px}

.card-head{display:flex; justify-content:space-between; gap:10px; align-items:flex-start; margin-bottom:10px}
.card-title{font-weight:900; margin:0}
.card-sub{font-size:12px; color:var(--muted); margin-top:2px}
.pill{display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; border:1px solid rgba(9,20,60,.10); background:rgba(245,247,251,.7); font-weight:800; font-size:12px; color:#1c2340}
.pill input{border:0; outline:0; background:transparent; width:160px; font-weight:700}

.rings{display:flex; gap:14px; flex-wrap:wrap}
.ring{width:110px; height:110px; border-radius:50%;
  background:conic-gradient(var(--ring-color) 0 calc(var(--p) * 1%), rgba(9,20,60,.10) calc(var(--p) * 1%) 100%);
  display:grid; place-items:center; position:relative}
.ring::after{content:""; width:84px; height:84px; border-radius:50%; background:#fff; box-shadow:inset 0 0 0 1px rgba(9,20,60,.06)}
.ring .ring-center{position:absolute; text-align:center}
.ring .ring-center .pct{font-weight:900; font-size:20px}
.ring .ring-center .lbl{font-size:12px; color:var(--muted); font-weight:800; margin-top:2px}

.metric-row{display:flex; justify-content:space-between; align-items:baseline; gap:10px; padding:10px 0; border-bottom:1px solid rgba(9,20,60,.08)}
.metric-row:last-child{border-bottom:0}
.metric-row .m-label{font-weight:800; color:#1c2340}
.metric-row .m-val{font-weight:900}
.trend-number{font-weight:900; font-size:26px}

@media (max-width:1100px){
  .dash-top{grid-template-columns:1fr}
  .dash-grid{grid-template-columns:1fr}
  .dash-bottom{grid-template-columns:1fr}
  .pill input{width:100px}
}

/* Dark mode (opcional) */
body.theme-dark{--bg:#0b1220; color:#f3f6ff}
body.theme-dark .admin-surface{background:#0f1a2e; border-color:rgba(255,255,255,.10)}
body.theme-dark .card{background:#0f1a2e; border-color:rgba(255,255,255,.10)}
body.theme-dark .profile-chip, body.theme-dark .pill{background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.10); color:#f3f6ff}
body.theme-dark .small, body.theme-dark .card-sub, body.theme-dark .profile-email{color:rgba(243,246,255,.72)}

/* =========================
   Marketing (Landing / Auth)
   Mantiene la paleta existente (brand + accent)
   ========================= */

.toast-stack{position:fixed; top:16px; left:50%; transform:translateX(-50%); z-index:9999; display:flex; flex-direction:column; gap:10px; width:min(760px, calc(100% - 24px));}
.toast{padding:12px 14px; border-radius:16px; font-weight:800; box-shadow:var(--shadow);}
.toast-ok{background:rgba(1,168,159,.12); border:1px solid rgba(1,168,159,.28);}
.toast-warn{background:rgba(249,173,62,.14); border:1px solid rgba(249,173,62,.32);}

.landing-page{background:linear-gradient(180deg,#fff 0,#fff 55%, var(--bg) 100%); min-height:100vh;}
.landing-bg{position:relative;}
.landing-wave{position:absolute; top:0; left:0; width:100%; height:220px; z-index:0;}
.landing-blob{position:absolute; right:-160px; top:120px; width:520px; height:520px; border-radius:50%; background:rgba(249,173,62,.34); filter:saturate(1.05); z-index:0;}

.landing-wrap{max-width:1180px; margin:0 auto; padding:0 26px; position:relative; z-index:1;}

.landing-header{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:18px 0 10px;}
.landing-logo{display:flex; align-items:center; gap:10px; font-weight:900; color:#0f1a2e;}
.landing-logo-badge{width:44px; height:44px; border-radius:16px; background:rgba(255,255,255,.65); border:1px solid rgba(255,255,255,.55); box-shadow:0 10px 26px rgba(9,20,60,.08); display:grid; place-items:center;}
.landing-logo-dot{width:14px; height:14px; border-radius:6px; background:linear-gradient(180deg,var(--teal1),var(--teal2));}
.landing-nav{display:flex; align-items:center; gap:18px; flex-wrap:wrap;}
.landing-link{font-weight:800; color:rgba(15,26,46,.78); padding:8px 10px; border-radius:12px;}
.landing-link:hover{background:rgba(15,26,46,.06)}

.btn.landing-cta{border-radius:999px; padding:10px 16px; background:linear-gradient(180deg,var(--teal1),var(--teal2));}
.btn.landing-ghost{border-radius:999px; padding:10px 16px; background:rgba(255,255,255,.78); border:1px solid rgba(9,20,60,.12); color:#0f1a2e;}

.landing-hero{padding:34px 0 56px;}
.hero-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:28px; align-items:center;}
.hero-kicker{display:inline-flex; gap:8px; align-items:center; padding:8px 12px; border-radius:999px; background:rgba(1,168,159,.10); border:1px solid rgba(1,168,159,.24); color:#0a3f3e; font-weight:900; font-size:12px;}
.hero-title{margin:14px 0 10px; font-size:clamp(34px,4.2vw,54px); line-height:1.05; color:#0f1a2e;}
.hero-lead{margin:0; color:rgba(15,26,46,.72); font-size:16px; max-width:60ch;}
.hero-actions{display:flex; gap:12px; flex-wrap:wrap; margin-top:18px;}
.hero-actions .btn{box-shadow:0 12px 28px rgba(9,20,60,.10)}

.hero-media-card{border-radius:24px; overflow:hidden; border:1px solid rgba(9,20,60,.10); background:#fff; box-shadow:var(--shadow);}
.hero-media-top{padding:12px 14px; display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid rgba(9,20,60,.08);}
.hero-media-title{font-weight:900; color:#0f1a2e;}
.hero-media-chip{display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px; background:rgba(245,247,251,.9); border:1px solid rgba(9,20,60,.10); font-weight:800; font-size:12px;}
.hero-media{position:relative; padding-top:56%; background:linear-gradient(135deg, rgba(24,127,180,.10), rgba(1,168,159,.10));}
.hero-media iframe,.hero-media video{position:absolute; inset:0; width:100%; height:100%; border:0; object-fit:cover;}
.hero-media-bottom{padding:14px; display:grid; gap:8px;}
.hero-bullets{display:grid; gap:8px;}
.hero-bullet{display:flex; gap:10px; align-items:flex-start; font-weight:800; color:rgba(15,26,46,.78)}
.hero-bullet i{display:inline-grid; place-items:center; width:26px; height:26px; border-radius:10px; background:rgba(1,168,159,.12); border:1px solid rgba(1,168,159,.22); font-style:normal;}

.landing-section{padding:52px 0;}
.landing-section.alt{background:#fff;}
.section-title{font-size:28px; margin:0 0 10px 0; color:#0f1a2e;}
.section-sub{margin:0 0 18px 0; color:rgba(15,26,46,.68); max-width:70ch;}

.feature-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px;}
.feature{border-radius:22px; border:1px solid rgba(9,20,60,.10); background:#fff; box-shadow:0 12px 28px rgba(9,20,60,.06); padding:16px;}
.feature-ico{width:46px; height:46px; border-radius:18px; background:rgba(1,168,159,.12); border:1px solid rgba(1,168,159,.22); display:grid; place-items:center; font-size:20px;}
.feature h3{margin:12px 0 6px 0;}
.feature p{margin:0; color:rgba(15,26,46,.70)}

.contact-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:12px;}

.landing-footer{background:#0f1a2e; color:#e5e7eb; padding:20px 0;}

/* Auth (Login / Register) */
.auth-screen{min-height:100vh; display:grid; place-items:center; padding:28px; background:
  radial-gradient(circle at 20% 15%, rgba(1,168,159,.22), transparent 55%),
  radial-gradient(circle at 80% 65%, rgba(249,173,62,.20), transparent 55%),
  linear-gradient(180deg,#eaf4ff,#f8fbff);
}
.auth-stage{width:min(980px, 100%); border-radius:28px; border:1px solid rgba(9,20,60,.10); background:rgba(255,255,255,.55); box-shadow:var(--shadow); padding:20px; display:grid; grid-template-columns:1fr 1fr; gap:18px; position:relative; overflow:hidden;}
.auth-close{position:absolute; top:14px; right:14px; width:40px; height:40px; border-radius:14px; background:rgba(255,255,255,.92); border:1px solid rgba(9,20,60,.12); box-shadow:0 10px 22px rgba(9,20,60,.10); display:grid; place-items:center; font-weight:900; color:#0f1a2e;}
.auth-illus{border-radius:24px; background:linear-gradient(135deg, rgba(24,127,180,.20), rgba(1,168,159,.16)); border:1px solid rgba(9,20,60,.08); box-shadow:0 14px 30px rgba(9,20,60,.08); display:flex; flex-direction:column; justify-content:center; align-items:center; gap:12px; padding:18px; position:relative; overflow:hidden;}
.auth-illus-circle{position:absolute; width:340px; height:340px; border-radius:50%; background:rgba(255,255,255,.55); top:20px; left:50%; transform:translateX(-50%);}
.auth-illus-svg{position:relative; z-index:1; max-width:340px; width:100%; height:auto;}
.auth-illus-caption{position:relative; z-index:1; text-align:center; max-width:40ch;}
.auth-illus-title{font-weight:900; color:#0f1a2e;}
.auth-illus-sub{font-size:13px; color:rgba(15,26,46,.72); margin-top:6px;}

.auth-card{align-self:center; border-radius:24px; background:#fff; border:1px solid rgba(9,20,60,.10); box-shadow:0 18px 42px rgba(9,20,60,.10); padding:18px;}
.auth-title{margin:0; font-size:26px; color:#0f1a2e;}
.auth-sub{margin:6px 0 0 0; color:rgba(15,26,46,.70)}
.auth-form{margin-top:14px;}
.auth-field{margin-top:10px;}
.auth-actions{margin-top:14px; display:flex; gap:10px; flex-wrap:wrap;}
.auth-btn{border-radius:14px;}
.auth-foot{margin-top:14px; display:flex; gap:10px; flex-wrap:wrap; align-items:center; color:rgba(15,26,46,.65); font-size:13px;}
.auth-link{color:rgba(15,26,46,.78); font-weight:800;}
.auth-dot{opacity:.55}
.auth-split{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px;}
.auth-recaptcha{margin-top:12px;}

@media (max-width: 980px){
  .hero-grid{grid-template-columns:1fr;}
  .feature-grid{grid-template-columns:1fr;}
  .contact-grid{grid-template-columns:1fr;}
  .landing-blob{right:-220px; top:180px; width:520px; height:520px;}
  .auth-stage{grid-template-columns:1fr;}
  .auth-illus-circle{width:300px; height:300px;}
}

/* Legal pages */
.legal-page{
  min-height:100vh;
  padding:42px 18px;
  background:
    radial-gradient(900px 520px at 18% 8%, rgba(1,168,159,.18), transparent 60%),
    radial-gradient(800px 520px at 86% 18%, rgba(249,173,62,.16), transparent 55%),
    var(--bg);
}
.legal-wrap{max-width:920px; margin:0 auto;}
.legal-back{display:inline-flex; font-weight:900; color:var(--brand2); margin-bottom:14px;}
.legal-back:hover{text-decoration:underline; text-underline-offset:4px;}
.legal-title{margin:0 0 6px 0; letter-spacing:-.3px;}
.legal-upd{margin:0 0 18px 0; color:var(--muted);}
.legal-card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:18px;
  padding:18px;
  box-shadow: var(--shadow);
}
.legal-card h2{margin:16px 0 8px; font-size:16px;}
.legal-card p,.legal-card li{color:#1f2937; line-height:1.65;}
.legal-card ul{margin:8px 0 0 18px;}
.legal-links{margin-top:16px; display:flex; gap:14px; flex-wrap:wrap;}
.legal-links a{font-weight:900; color:var(--brand2);}
.legal-links a:hover{text-decoration:underline; text-underline-offset:4px;}

/* =========================
   Collapsible menus (Admin + Estudiante)
   ========================= */
.sidebar-overlay{display:none}

.sidebar-toggle{
  margin-left:auto;
  width:34px;
  height:34px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.16);
  color:#fff;
  display:grid;
  place-items:center;
  cursor:pointer;
  font-weight:900;
}
.sidebar-toggle:hover{background:rgba(255,255,255,.22)}

.admin-brand .sidebar-toggle{
  border:1px solid rgba(9,20,60,.18);
  background:rgba(255,255,255,.72);
  color:#1c2340;
}
.admin-brand .sidebar-toggle:hover{background:#fff}

.sidebar-burger{
  display:none;
  width:42px;
  height:42px;
  border-radius:14px;
  border:1px solid rgba(9,20,60,.10);
  background:#fff;
  cursor:pointer;
  font-weight:900;
}

/* Student shell (mismo patrón visual que Admin) */
.student-shell{display:flex; gap:18px; padding:18px; min-height:100vh}
.student-sidebar{
  width:250px;
  border-radius:24px;
  padding:18px 14px;
  background:linear-gradient(180deg,var(--teal1),var(--teal2));
  color:#fff;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
}
.student-brand{display:flex; align-items:center; gap:12px; padding:8px 8px 14px 8px}
.student-logo{width:44px; height:44px; border-radius:14px; background:rgba(255,255,255,.22); border:1px solid rgba(255,255,255,.28)}
.student-brand-title{font-weight:900; line-height:1.05}
.student-brand-sub{font-size:12px; opacity:.82; margin-top:2px}

.student-nav{margin-top:6px; display:flex; flex-direction:column; gap:4px}
.student-nav-item{display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:14px; color:rgba(255,255,255,.92); font-weight:800}
.student-nav-item:hover{background:rgba(255,255,255,.12)}
.student-nav-item.active{background:rgba(255,255,255,.18); box-shadow:inset 0 0 0 1px rgba(255,255,255,.22)}
.student-nav-ico{width:22px; height:22px; display:grid; place-items:center; border-radius:10px; background:rgba(255,255,255,.16); font-size:13px}

.student-sidebar-footer{margin-top:auto; padding:12px 10px 6px; display:flex; flex-direction:column; gap:12px}
.student-main{flex:1; min-width:0}
.student-surface{background:#fff; border:1px solid rgba(9,20,60,.08); border-radius:24px; box-shadow:var(--shadow); padding:18px; min-height:calc(100vh - 36px)}
.student-topbar{display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; padding-bottom:14px; border-bottom:1px solid rgba(9,20,60,.08); margin-bottom:16px}
.student-content{padding:0}

/* Collapsed state: icon-only */
.admin-shell.sidebar-collapsed .admin-sidebar,
.student-shell.sidebar-collapsed .student-sidebar{width:84px; padding:18px 10px}

.admin-shell.sidebar-collapsed .admin-brand-title,
.admin-shell.sidebar-collapsed .admin-brand-sub,
.student-shell.sidebar-collapsed .student-brand-title,
.student-shell.sidebar-collapsed .student-brand-sub{display:none}

/* Mantener visibles las flechas de expandir/contraer en modo colapsado */
.admin-shell.sidebar-collapsed .admin-nav-section{
  display:flex;
  justify-content:center;
  padding:8px 6px;
  margin:12px 4px 6px;
}
.admin-shell.sidebar-collapsed .admin-nav-section span:first-child{display:none}
.admin-shell.sidebar-collapsed .admin-nav-chevron{opacity:1; font-size:14px}

.admin-shell.sidebar-collapsed .admin-nav-item,
.student-shell.sidebar-collapsed .student-nav-item{justify-content:center; padding:10px; gap:0}

.admin-shell.sidebar-collapsed .admin-nav-item .nav-label,
.student-shell.sidebar-collapsed .student-nav-item .nav-label{display:none}

.admin-shell.sidebar-collapsed .admin-nav-ico,
.student-shell.sidebar-collapsed .student-nav-ico{width:28px; height:28px; font-size:14px}

.admin-shell.sidebar-collapsed .admin-sidebar-footer .btn-label,
.student-shell.sidebar-collapsed .student-sidebar-footer .btn-label{display:none}

.admin-shell.sidebar-collapsed .admin-sidebar-footer .sidebar-footer-btn,
.student-shell.sidebar-collapsed .student-sidebar-footer .sidebar-footer-btn{justify-content:center; padding:10px; gap:0}

.admin-shell.sidebar-collapsed .admin-sidebar-footer .sidebar-footer-btn::before,
.student-shell.sidebar-collapsed .student-sidebar-footer .sidebar-footer-btn::before{content:attr(data-ico); font-size:14px}

.admin-shell.sidebar-collapsed .mode-toggle span{display:none}


/* Tooltip in collapsed mode (desktop) */
.admin-shell.sidebar-collapsed .admin-sidebar,
.student-shell.sidebar-collapsed .student-sidebar{overflow:visible}
.admin-shell.sidebar-collapsed .admin-nav,
.student-shell.sidebar-collapsed .student-nav{overflow:visible}

.admin-shell.sidebar-collapsed .admin-nav-item,
.student-shell.sidebar-collapsed .student-nav-item,
.admin-shell.sidebar-collapsed .admin-sidebar-footer .sidebar-footer-btn,
.student-shell.sidebar-collapsed .student-sidebar-footer .sidebar-footer-btn{position:relative}

.admin-shell.sidebar-collapsed .admin-nav-item:hover::after,
.student-shell.sidebar-collapsed .student-nav-item:hover::after,
.admin-shell.sidebar-collapsed .admin-sidebar-footer .sidebar-footer-btn:hover::after,
.student-shell.sidebar-collapsed .student-sidebar-footer .sidebar-footer-btn:hover::after{
  content: attr(data-tip);
  position:absolute;
  left:100%;
  top:50%;
  transform:translateY(-50%);
  margin-left:10px;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(15,26,46,.95);
  color:#fff;
  font-weight:800;
  font-size:12px;
  border:1px solid rgba(255,255,255,.18);
  white-space:nowrap;
  box-shadow:0 12px 30px rgba(9,20,60,.22);
  z-index:1000;
  pointer-events:none;
}

/* Mobile: off-canvas sidebar */
@media (max-width:980px){
  .admin-shell,.student-shell{padding:12px; gap:0; display:block}
  .admin-main,.student-main{min-width:0}
  .admin-surface,.student-surface{min-height:auto}

  .admin-sidebar,.student-sidebar{
    position:fixed;
    z-index:60;
    left:12px;
    top:12px;
    bottom:12px;
    width:260px;
    max-width:calc(100vw - 24px);
    transform:translateX(-120%);
    transition:transform .2s ease;
  }
  .admin-shell.sidebar-open .admin-sidebar,
  .student-shell.sidebar-open .student-sidebar{transform:translateX(0)}

  .sidebar-overlay{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(9,20,60,.35);
    opacity:0;
    pointer-events:none;
    transition:opacity .2s ease;
  }
  .admin-shell.sidebar-open .sidebar-overlay,
  .student-shell.sidebar-open .sidebar-overlay{opacity:1; pointer-events:auto}

  .sidebar-burger{display:inline-flex; align-items:center; justify-content:center}
}


/* Lock page scroll when sidebar is open on mobile */
@media (max-width:980px){
  .sidebar-open-lock{overflow:hidden}
}

/* -------------------- Rich Answer Editor -------------------- */
.rich-wrap{ margin-top:10px; }
.rich-toolbar{
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
  padding:10px; border:1px solid rgba(115,116,117,.18);
  border-radius:14px; background:rgba(255,255,255,.9);
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}
.theme-dark .rich-toolbar{
  background:rgba(17,24,39,.55);
  border-color:rgba(255,255,255,.12);
}
.rich-toolbar .btn{ padding:8px 12px; border-radius:12px; }
.rich-editor{
  margin-top:10px;
  border:1px solid rgba(115,116,117,.18);
  border-radius:14px;
  background:#fff;
  padding:12px 12px;
  min-height:120px;
  outline:none;
}
.theme-dark .rich-editor{ background:rgba(17,24,39,.35); color:#e5e7eb; border-color:rgba(255,255,255,.12); }
.rich-editor img{ max-width:100%; height:auto; border-radius:12px; border:1px solid rgba(115,116,117,.18); }
.rich-editor .math{ display:inline-block; }
.rich-editor-error{ box-shadow: 0 0 0 3px rgba(238,144,33,.25); border-color: rgba(238,144,33,.55) !important; }

/* Rich render containers (grading/result) */
.rich-view img{ max-width:260px; height:auto; display:block; margin:6px 0; border-radius:12px; border:1px solid rgba(115,116,117,.18); }
.rich-view table{ max-width:100%; overflow:auto; display:block; }


/* =========================
   Modales + Calculadora
   ========================= */
.btn.btn-sm, .btn-sm{padding:8px 10px; border-radius:12px; font-size:13px; line-height:1}
.korum-modal{position:fixed; inset:0; display:none; z-index:9999}
.korum-modal.is-open{display:flex; align-items:center; justify-content:center}
.korum-modal-backdrop{position:absolute; inset:0; background:rgba(15,26,46,.55)}
.korum-modal-panel{position:relative; width:min(920px, calc(100vw - 28px)); max-height:calc(100vh - 28px); overflow:auto; background:#fff; border:1px solid rgba(9,20,60,.10); border-radius:20px; box-shadow:0 24px 70px rgba(0,0,0,.25)}
.korum-modal-head{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:14px 16px; border-bottom:1px solid rgba(9,20,60,.08)}
.korum-modal-body{padding:14px 16px}
.korum-modal-actions{display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin-top:14px}
html.korum-modal-lock, html.korum-modal-lock body{overflow:hidden}

.korum-calc{width:min(720px, calc(100vw - 28px))}
.korum-calc-top{display:flex; flex-direction:column; gap:10px}
.korum-calc-row{display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap}
.korum-calc-pad{margin-top:12px; display:flex; flex-direction:column; gap:8px}
.korum-calc-pad-row{display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:8px}
@media (max-width:520px){.korum-calc-pad-row{grid-template-columns: repeat(3, minmax(0,1fr));}}

/* Calculadora por tema (Álgebra / Trigonometría / Cálculo) */
.kc-tabs{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.kc-tab{border:1px solid rgba(9,20,60,.10); background:rgba(245,247,251,.7); color:#1c2340; font-weight:900; padding:8px 12px; border-radius:999px; cursor:pointer}
.kc-tab.is-active{background:rgba(1,168,159,.14); border-color:rgba(1,168,159,.35); color:#046b70}
.kc-templates{margin-top:12px; padding:12px; border:1px solid rgba(9,20,60,.08); border-radius:16px; background:rgba(245,247,251,.7)}
.kc-chip{display:inline-flex; align-items:center; padding:8px 10px; border-radius:999px; border:1px solid rgba(9,20,60,.10); background:#fff; font-weight:800; cursor:pointer; margin:4px 6px 0 0}
.kc-chip:hover{box-shadow:0 8px 18px rgba(0,0,0,.06)}

/* Calculadora por tema (Álgebra / Trigonometría / Cálculo) */
.kc-tabs{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.kc-tab{border:1px solid rgba(9,20,60,.10); background:rgba(245,247,251,.7); color:#1c2340; font-weight:900; padding:8px 12px; border-radius:999px; cursor:pointer}
.kc-tab.is-active{background:rgba(1,168,159,.14); border-color:rgba(1,168,159,.35); color:#046b70}
.kc-templates{margin-top:12px; padding:12px; border:1px solid rgba(9,20,60,.08); border-radius:16px; background:rgba(245,247,251,.7)}
.kc-chip{display:inline-flex; align-items:center; padding:8px 10px; border-radius:999px; border:1px solid rgba(9,20,60,.10); background:#fff; font-weight:800; cursor:pointer; margin:4px 6px 0 0}
.kc-chip:hover{box-shadow:0 8px 18px rgba(0,0,0,.06)}

/* =========================
   Switch visible en superficies claras (tablas/admin)
   ========================= */
.admin-surface .switch .slider{
  background: rgba(9,20,60,.10);
  border:1px solid rgba(9,20,60,.18);
}
.admin-surface .switch .slider:before{
  background:#fff;
  box-shadow: 0 2px 8px rgba(9,20,60,.25);
}
.admin-surface .switch input:checked + .slider{
  background: rgba(1,168,159,.75);
  border-color: rgba(1,168,159,.75);
}



/* =========================
   Tabla de resultados (Diagnóstico / Nivel)
   ========================= */
.result-ladder{display:grid; gap:10px; margin-top:10px}
.result-level{
  position:relative;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(9,20,60,.10);
  background:#fff;
  overflow:hidden;
}
.result-level:before{
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(90deg, var(--lvl-color, #22c55e) 0 10px, transparent 10px);
  opacity:.22;
  pointer-events:none;
}
.result-level .hdr{display:flex; align-items:flex-start; justify-content:space-between; gap:10px; flex-wrap:wrap; position:relative}
.result-level .range{display:inline-flex; align-items:center; gap:8px; font-weight:950}
.result-level .range .chip{
  display:inline-flex; align-items:center; justify-content:center;
  padding:4px 10px; border-radius:999px;
  background: rgba(9,20,60,.06);
  border:1px solid rgba(9,20,60,.10);
  font-size:12px;
}
.result-level .range .dot{
  width:10px; height:10px; border-radius:999px;
  background: var(--lvl-color, #22c55e);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.result-level .ttl{font-weight:950; margin:2px 0 0 0; line-height:1.2}
.result-level .desc{margin-top:6px; font-size:13px; opacity:.92; line-height:1.35; position:relative}
.result-level .act{margin-top:8px; font-size:12.5px; opacity:.9; line-height:1.35; position:relative}
.result-level .act b{font-weight:950}
.result-level.is-current{
  border-color: rgba(1,168,159,.55);
  box-shadow: 0 14px 34px rgba(1,168,159,.16);
}
.result-level.is-current:after{
  content:'Nivel actual';
  position:absolute; top:10px; right:10px;
  padding:4px 10px; border-radius:999px;
  background: rgba(1,168,159,.12);
  border:1px solid rgba(1,168,159,.35);
  color:#046b70;
  font-weight:950; font-size:12px;
}
.result-summary{display:flex; gap:10px; flex-wrap:wrap; align-items:center; justify-content:space-between}
.result-summary .k{display:flex; gap:10px; flex-wrap:wrap; align-items:baseline}
.result-summary .k .num{font-size:22px; font-weight:950}
.result-summary .k .lbl{font-size:12px; opacity:.78}

/* =========================
   Gráfica de barras (Tabla de resultados)
   ========================= */
.result-bars-wrap{margin-top:12px; overflow-x:auto; padding-bottom:6px}
.result-bars{display:flex; align-items:flex-end; gap:18px; min-height:240px; padding:10px 6px 0 6px; border-radius:16px; background:rgba(9,20,60,.02); border:1px dashed rgba(9,20,60,.12)}
.result-viz{display:flex; gap:14px; flex-wrap:wrap; align-items:stretch}
.result-viz .result-bars-wrap{flex: 1 1 520px}
.result-actions{flex: 1 1 360px; min-width:320px; border-radius:16px; background:rgba(9,20,60,.02); border:1px solid rgba(9,20,60,.10); padding:12px}
.ra-head{font-weight:950; font-size:13px; margin-bottom:10px; color:rgba(3,29,60,.92)}
.ra-item{display:flex; gap:10px; align-items:flex-start; padding:10px; border-radius:14px; border:1px solid rgba(9,20,60,.10); background:#fff; box-shadow:0 10px 20px rgba(0,0,0,.04); margin-bottom:10px}
.ra-item:last-child{margin-bottom:0}
.ra-chip{flex:0 0 auto; padding:6px 10px; border-radius:10px; font-weight:950; font-size:12px; line-height:1; background:var(--c,#22c55e); color:#fff; box-shadow:0 10px 18px rgba(0,0,0,.08)}
.ra-text{flex:1 1 auto; text-align:left}
.ra-title{font-weight:950; font-size:12.5px; line-height:1.2}
.ra-body{margin-top:4px; font-size:12px; opacity:.88; line-height:1.35}
.ra-item.is-current{border-color:rgba(1,168,159,.45); box-shadow:0 14px 28px rgba(1,168,159,.10)}
.ra-item.is-current .ra-chip{outline:2px solid rgba(1,168,159,.45)}

.rb-item{position:relative; width:96px; flex:0 0 auto; text-align:center}
.rb-item .rb-bar{position:relative; height:var(--h,120px); background:var(--c,#22c55e); border-radius:12px 12px 6px 6px; box-shadow:0 18px 26px rgba(0,0,0,.12);}
/* Cara derecha (3D) */
.rb-item .rb-bar:before{content:""; position:absolute; top:6px; right:-14px; width:14px; height:calc(100% - 6px); background:var(--c,#22c55e); filter:brightness(.72); transform:skewY(-28deg); transform-origin:bottom right; border-radius:0 10px 6px 0}
/* Cara superior (3D) */
.rb-item .rb-bar:after{content:""; position:absolute; top:-10px; left:8px; right:-6px; height:10px; background:var(--c,#22c55e); filter:brightness(1.12); transform:skewX(-58deg); transform-origin:left bottom; border-radius:10px 10px 0 0}
/* rb-label removido: solo mostramos porcentajes */
.rb-item .rb-range{margin-top:8px; font-size:12px; font-weight:950; opacity:.9}
.rb-item:not(.is-current){opacity:.88}
.rb-item.is-current .rb-bar{outline:3px solid rgba(1,168,159,.55); box-shadow:0 22px 44px rgba(1,168,159,.18)}
.rb-item.is-current:after{content:"Nivel actual"; position:absolute; top:-8px; left:50%; transform:translateX(-50%); padding:4px 10px; border-radius:999px; background:rgba(1,168,159,.12); border:1px solid rgba(1,168,159,.35); color:#046b70; font-weight:950; font-size:11px; white-space:nowrap; box-shadow:0 10px 24px rgba(1,168,159,.10)}
/* Detalles colapsables */
.result-details{margin-top:10px}
.result-details > summary{cursor:pointer; font-weight:950; padding:10px 12px; border-radius:12px; background:rgba(9,20,60,.04); border:1px solid rgba(9,20,60,.10)}
.result-details[open] > summary{border-color:rgba(1,168,159,.35); background:rgba(1,168,159,.06)}
.result-details .result-ladder{margin-top:10px}

/* =========================
   Admin: secciones colapsables del menú lateral
   ========================= */
.admin-nav-group{display:flex; flex-direction:column}

/* .admin-nav-section ahora es un <button> */
.admin-nav-section{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:transparent;
  border:0;
  padding:8px 10px;
  margin:14px 6px 6px;
  color:rgba(255,255,255,.92);
  text-align:left;
  cursor:pointer;
  border-radius:14px;
  letter-spacing:.02em;
}
.admin-nav-section:hover{background:rgba(255,255,255,.10)}
.admin-nav-section:focus{outline:2px solid rgba(255,255,255,.35); outline-offset:2px}

.admin-nav-chevron{display:inline-block; font-size:12px; opacity:.92; transition:transform .18s ease}

.admin-nav-group-items{
  display:flex;
  flex-direction:column;
  gap:4px;
  overflow:hidden;
  max-height:2200px;
  opacity:1;
  transform:translateY(0);
  transition:max-height .22s ease, opacity .18s ease, transform .22s ease;
}

.admin-nav-group.is-collapsed .admin-nav-group-items{
  max-height:0;
  opacity:0;
  transform:translateY(-6px);
}
.admin-nav-group.is-collapsed .admin-nav-chevron{transform:rotate(-90deg)}

/* En modo icon-only, mostramos todo (evita que se queden ocultos sin header) */
.admin-shell.sidebar-collapsed .admin-nav-group-items{
  max-height:none !important;
  opacity:1 !important;
  transform:none !important;
}

/* Responsive: logo sin badge */
@media (max-width:520px){
  .admin-logo{width:48px; height:48px}
  .admin-logo-img{width:48px; height:48px}
}


/* =========================
   FIX: Logo centrado + expandir al tocar (modo colapsado)
   ========================= */
.admin-shell.sidebar-collapsed .admin-brand,
.student-shell.sidebar-collapsed .student-brand{
  justify-content:center !important;
  gap:0 !important;
}

.admin-shell.sidebar-collapsed .admin-brand > div:nth-child(2),
.student-shell.sidebar-collapsed .student-brand > div:nth-child(2){
  display:none !important; /* Oculta el bloque de texto vacío y permite centrar el logo */
}

.admin-shell.sidebar-collapsed .admin-brand .sidebar-toggle,
.student-shell.sidebar-collapsed .student-brand .sidebar-toggle{
  display:none !important; /* El logo se vuelve el trigger de expandir */
}

/* Student logo alineado a Aprendo+ (sin badge) */
.student-logo{
  width:56px;
  height:56px;
  border-radius:0;
  background:transparent;
  border:none;
  background-image:url('/assets/brand/aprendo_mark.png');
  background-repeat:no-repeat;
  background-position:center;
  background-size:contain;
}
@media (max-width:520px){
  .student-logo{width:48px; height:48px}
}

/* En modo icon-only, forzamos visibilidad de las flechas del acordeón */
.admin-shell.sidebar-collapsed .admin-nav-group{display:block !important;}
.admin-shell.sidebar-collapsed .admin-nav-section{
  display:flex !important;
  justify-content:center !important;
}
.admin-shell.sidebar-collapsed .admin-nav-section span:first-child{display:none !important;}
.admin-shell.sidebar-collapsed .admin-nav-chevron{
  display:inline-block !important;
  opacity:1 !important;
  visibility:visible !important;
}

/* =========================
   Student: Mi progreso (compacto, sin scroll)
   ========================= */
.student-progress .sp-table-wrap{overflow:visible !important}
.student-progress .table{width:100%; table-layout:fixed}
.student-progress .table th,
.student-progress .table td{padding:8px 10px; font-size:13px}
.student-progress .table td{word-break:break-word}

/* Tabla de historial: título en una línea + elipsis */
.student-progress .history-table .exam-title{display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}

/* Donut más compacto */
.student-progress .ring.sm{width:60px; height:60px}
.student-progress .ring.sm::after{width:46px; height:46px}
.student-progress .ring.sm .ring-center .pct{font-size:14px}

/* Gráfica de niveles: compacta y sin scroll */
.student-progress .result-bars-wrap{overflow:hidden; padding-bottom:0}
.student-progress .result-bars{flex-wrap:wrap; justify-content:center; gap:12px; min-height:170px}
.student-progress .rb-item{width:74px}
.student-progress .rb-item .rb-range{font-size:11px}

/* Historial sin scroll horizontal: responsive a tarjetas */
@media (max-width: 1100px){
  .student-progress .history-table{border-collapse:separate; border-spacing:0 10px}
  .student-progress .history-table thead{display:none}
  .student-progress .history-table,
  .student-progress .history-table tbody,
  .student-progress .history-table tr,
  .student-progress .history-table td{display:block; width:100%}

  .student-progress .history-table tr{
    border:1px solid rgba(9,20,60,.10);
    border-radius:16px;
    padding:12px;
    background:#fff;
    box-shadow:0 10px 22px rgba(0,0,0,.04);
  }
  .student-progress .history-table td{border:0; padding:6px 0}
  .student-progress .history-table td[data-label]::before{
    content: attr(data-label);
    display:block;
    font-size:11px;
    font-weight:900;
    opacity:.65;
    margin-bottom:2px;
    letter-spacing:.02em;
  }
  .student-progress .history-table td[data-label="Calificación"]{padding-top:10px}
  .student-progress .history-table td[data-label="Acción"]{text-align:left !important; padding-top:10px}
  .student-progress .history-table .btn{width:100%; justify-content:center}
}


/* Iconos de módulo (img dentro del slot) */
.nav-ico-img{width:18px;height:18px;display:block;object-fit:contain;}

/* Notificaciones admin */
.notify-popover{position:relative}
.notify-popover summary{list-style:none}
.notify-popover summary::-webkit-details-marker{display:none}
.notify-bell{position:relative; display:grid; place-items:center; width:46px; height:46px; border-radius:16px; border:1px solid rgba(9,20,60,.10); background:rgba(245,247,251,.75); cursor:pointer; user-select:none; transition:transform .18s ease, box-shadow .18s ease}
.notify-bell:hover{transform:translateY(-1px); box-shadow:0 10px 24px rgba(9,20,60,.10)}
.notify-bell-ico{font-size:19px; line-height:1}
.notify-badge{position:absolute; top:-5px; right:-3px; min-width:22px; height:22px; padding:0 6px; border-radius:999px; background:linear-gradient(180deg,#ffb449,#ee9021); color:#fff; font-size:12px; font-weight:900; display:grid; place-items:center; box-shadow:0 10px 22px rgba(238,144,33,.25)}
.notify-bell.has-unread{border-color:rgba(238,144,33,.36); box-shadow:0 10px 24px rgba(238,144,33,.12)}
.notify-bell.has-unread .notify-bell-ico{animation:notifyBellRing 2.2s ease-in-out infinite; transform-origin:top center}
.notify-bell.is-fresh{box-shadow:0 0 0 4px rgba(238,144,33,.12), 0 14px 30px rgba(238,144,33,.20)}
@keyframes notifyBellRing{0%,100%{transform:rotate(0deg)}8%{transform:rotate(16deg)}16%{transform:rotate(-14deg)}24%{transform:rotate(10deg)}32%{transform:rotate(-8deg)}40%{transform:rotate(4deg)}48%{transform:rotate(0deg)}}
.notify-menu{position:absolute; top:54px; right:0; width:min(420px, calc(100vw - 32px)); max-height:72vh; overflow:hidden; border-radius:20px; border:1px solid rgba(9,20,60,.10); background:#fff; box-shadow:0 24px 48px rgba(9,20,60,.16); z-index:50}
.notify-menu-head{display:flex; justify-content:space-between; align-items:flex-start; gap:12px; padding:14px 16px; border-bottom:1px solid rgba(9,20,60,.08)}
.notify-menu-title{font-size:15px; font-weight:900; color:#09143c}
.notify-list{max-height:58vh; overflow:auto; padding:8px}
.notify-empty{padding:18px 14px; color:#62708a; text-align:center}
.notify-item{display:block; padding:12px 12px 13px; border-radius:16px; color:inherit; text-decoration:none; border:1px solid transparent}
.notify-item:hover{background:rgba(1,168,159,.06); border-color:rgba(1,168,159,.16)}
.notify-item + .notify-item{margin-top:6px}
.notify-item.is-unread{background:rgba(255,180,73,.10); border-color:rgba(238,144,33,.16)}
.notify-item-top{display:flex; justify-content:space-between; gap:8px; align-items:center; margin-bottom:4px}
.notify-type{font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:#046b70}
.notify-date{font-size:11px; color:#7a869d; white-space:nowrap}
.notify-title{font-size:14px; font-weight:900; color:#09143c}
.notify-text{margin-top:4px; font-size:13px; line-height:1.45; color:#526077}
.btn-sm{padding:8px 10px; min-height:auto; font-size:12px; border-radius:12px}
body.theme-dark .notify-bell{background:rgba(255,255,255,.06); border-color:rgba(255,255,255,.10); color:#f3f6ff}
body.theme-dark .notify-menu{background:#10192f; border-color:rgba(255,255,255,.08); box-shadow:0 24px 48px rgba(0,0,0,.35)}
body.theme-dark .notify-menu-head{border-bottom-color:rgba(255,255,255,.08)}
body.theme-dark .notify-menu-title, body.theme-dark .notify-title{color:#f3f6ff}
body.theme-dark .notify-empty, body.theme-dark .notify-text, body.theme-dark .notify-date{color:#b8c3d9}
body.theme-dark .notify-item:hover{background:rgba(1,168,159,.10); border-color:rgba(1,168,159,.22)}
body.theme-dark .notify-item.is-unread{background:rgba(238,144,33,.12); border-color:rgba(238,144,33,.20)}
@media (max-width: 720px){
  .notify-menu{right:-6px; width:min(380px, calc(100vw - 20px))}
}

/* =========================
   Responsive puntual: módulo Ejercicios (admin + estudiantes)
   2026-06-16
   ========================= */
@media (max-width: 820px){
  .admin-content .exercise-hub-hero,
  .admin-content .subject-detail-hero,
  .admin-content .exercise-assign-hero,
  .admin-content .exercise-form-shell,
  .admin-content .exercise-preview-shell,
  .student-content .student-ex-panel,
  .exercise-public-shell{
    width:100% !important;
    max-width:100% !important;
    margin-left:0 !important;
    margin-right:0 !important;
  }

  .admin-content .exercise-hub-hero,
  .admin-content .subject-detail-hero,
  .admin-content .exercise-assign-hero,
  .admin-content .exercise-preview-hero,
  .exercise-public-hero{
    border-radius:22px !important;
    padding:16px !important;
  }

  .admin-content .exercise-hub-hero > div:first-child,
  .admin-content .subject-detail-hero > div:first-child,
  .admin-content .exercise-assign-hero > div:first-child,
  .admin-content .exercise-preview-hero > div:first-child,
  .exercise-public-hero > div:first-child,
  .student-ex-head{
    flex-direction:column !important;
    align-items:stretch !important;
  }

  .admin-content .exercise-hub-hero .btn,
  .admin-content .subject-detail-hero .btn,
  .admin-content .exercise-assign-hero .btn,
  .admin-content .exercise-preview-hero .btn,
  .student-ex-head .btn,
  .exercise-public-hero .btn{
    width:100% !important;
    justify-content:center !important;
  }

  .subject-card-grid,
  .subject-detail-metrics,
  .exercise-hub-metrics,
  .exercise-filter-grid,
  .exercise-form-grid,
  .exercise-form-grid-2,
  .exercise-review-grid,
  .exercise-common-grid,
  .exercise-common-grid.locked-subject,
  .bulk-exercise-grid,
  .question-exercise-grid,
  .exercise-assign-grid,
  .exercise-preview-grid,
  .exercise-public-layout,
  .exercise-public-card-body .grid,
  .admin-content form[action*="/admin/exercise-submissions/"] .grid{
    grid-template-columns:1fr !important;
  }

  .exercise-form-head,
  .bulk-exercise-head,
  .question-one-head,
  .subject-panel-head,
  .question-live-preview-head,
  .exercise-answer-draw-toolbar,
  .exercise-annotation-head,
  .exercise-public-submitbar{
    align-items:stretch !important;
  }

  .exercise-form-head .btn,
  .bulk-exercise-head .btn,
  .bulk-add-panel .btn,
  .question-exercise-top .btn,
  .question-live-preview-head .btn,
  .subject-panel-head .btn,
  .exercise-card-actions .btn,
  .note-actions .btn,
  .exercise-assignment-card .btn,
  .exercise-public-submitbar .btn,
  .exercise-answer-image-actions .btn,
  .exercise-answer-draw-toolbar .btn,
  .exercise-annotation-head .btn,
  .admin-content form[action*="/admin/exercise-submissions/"] .btn{
    width:100% !important;
    justify-content:center !important;
  }

  .exercise-form-body,
  .subject-panel-body,
  .exercise-preview-card-body,
  .exercise-public-card-body{
    padding:14px !important;
  }

  .exercise-card,
  .subject-card,
  .subject-card-inner,
  .question-one-card,
  .bulk-exercise-card,
  .exercise-assign-panel,
  .exercise-public-card,
  .exercise-preview-card,
  .student-ex-category{
    border-radius:20px !important;
  }

  .subject-card,
  .subject-card-inner,
  .exercise-card{
    min-height:0 !important;
  }

  .exercise-stats,
  .subject-stats{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }

  .exercise-assignment-card{
    grid-template-columns:1fr !important;
    align-items:stretch !important;
  }

  .exercise-link-input,
  .exercise-assignment-card input,
  .exercise-assignment-card > div,
  .question-exercise-item,
  .exercise-answer-part{
    min-width:0 !important;
    max-width:100% !important;
  }

  .exercise-public-form{
    position:static !important;
  }

  .exercise-public-support,
  .exercise-public-part-img,
  .exercise-preview-support,
  .exercise-preview-part-img,
  .question-live-part-img,
  .bulk-image-preview,
  .question-paste-preview,
  .exercise-support-thumb{
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    max-height:360px !important;
    object-fit:contain !important;
  }

  .exercise-public-instructions,
  .exercise-public-part-text,
  .exercise-preview-instructions,
  .exercise-preview-part-text,
  .question-live-instructions,
  .question-live-part-text,
  .exercise-preview-answer,
  .exercise-title-text,
  .student-ex-title-main{
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
  }
}

@media (max-width: 760px){
  .student-ex-panel{padding:14px !important;}
  .student-ex-filters{grid-template-columns:1fr !important;}
  .student-ex-filters .btn{width:100% !important; justify-content:center !important;}
  .student-ex-category summary{
    flex-wrap:wrap !important;
    align-items:flex-start !important;
    padding:13px 14px !important;
  }
  .student-ex-category summary > span:last-of-type{
    width:100% !important;
    justify-content:flex-start !important;
  }
  .student-ex-category summary:after{margin-left:auto !important;}
  .student-ex-category-body{overflow:visible !important; padding:0 10px 10px !important;}
  .student-ex-table,
  .student-ex-table tbody,
  .student-ex-table tr,
  .student-ex-table td{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
  }
  .student-ex-table{border-collapse:separate !important; border-spacing:0 !important;}
  .student-ex-table thead{display:none !important;}
  .student-ex-table tr{
    margin:10px 0 !important;
    padding:12px !important;
    border:1px solid rgba(9,20,60,.10) !important;
    border-radius:16px !important;
    background:#fff !important;
    box-shadow:0 10px 22px rgba(9,20,60,.05) !important;
  }
  .student-ex-table td{
    border:0 !important;
    padding:7px 0 !important;
  }
  .student-ex-table td::before{
    display:block !important;
    margin-bottom:3px !important;
    font-size:11px !important;
    font-weight:950 !important;
    letter-spacing:.03em !important;
    text-transform:uppercase !important;
    color:#62708a !important;
  }
  .student-ex-table td:nth-child(1)::before{content:'Ejercicio';}
  .student-ex-table td:nth-child(2)::before{content:'Configuración';}
  .student-ex-table td:nth-child(3)::before{content:'Estado';}
  .student-ex-table td:nth-child(4)::before{content:'Acción';}
  .student-ex-table td:last-child .btn{width:100% !important; justify-content:center !important;}
  body.theme-dark .student-ex-table tr{background:#10192f !important; border-color:rgba(255,255,255,.09) !important;}
  body.theme-dark .student-ex-table td::before{color:#b8c3d9 !important;}
}

@media (max-width: 620px){
  .admin-content .exercise-hub-title,
  .admin-content .subject-detail-title,
  .admin-content .exercise-preview-title,
  .exercise-public-title{
    font-size:clamp(22px,9vw,30px) !important;
  }

  .exercise-form-shell,
  .question-one-card,
  .bulk-exercise-card,
  .question-live-preview,
  .exercise-assign-panel,
  .student-ex-panel{
    box-shadow:0 10px 24px rgba(9,20,60,.05) !important;
  }

  .exercise-card-actions,
  .note-actions,
  .exercise-answer-image-actions,
  .exercise-assignment-card > div:last-child{
    flex-direction:column !important;
    align-items:stretch !important;
  }

  .exercise-stats,
  .subject-stats{
    grid-template-columns:1fr !important;
  }

  .subject-detail-metric,
  .exercise-hub-metric,
  .exercise-stat,
  .subject-stat{
    text-align:left !important;
  }

  .question-exercise-item,
  .exercise-answer-part,
  .exercise-public-part,
  .exercise-preview-part,
  .question-live-part{
    padding:11px !important;
    border-radius:16px !important;
  }

  .exercise-answer-canvas,
  .exercise-annotation-canvas{
    min-height:240px !important;
    height:260px !important;
  }

  .note-modal-overlay{padding:10px !important;}
  .note-modal-shell{width:100% !important; max-height:94vh !important; border-radius:20px !important;}
  .note-modal-actions{flex-direction:column !important;}
  .note-modal-actions .btn{width:100% !important; justify-content:center !important;}
}

/* ======================================================================
   PATCH UI 20260618: diseño más ordenado + menú móvil 100% responsivo
   Objetivo: mejorar lectura, respiración visual y permitir desplazamiento
   completo del menú lateral en celulares sin tocar lógica de negocio.
   ====================================================================== */
:root{
  --ui-soft:#f7fafc;
  --ui-line:rgba(9,20,60,.10);
  --ui-line-strong:rgba(9,20,60,.16);
  --ui-card-shadow:0 16px 42px rgba(9,20,60,.075);
  --ui-card-shadow-hover:0 20px 48px rgba(9,20,60,.11);
}

.admin-shell,
.student-shell{
  background:
    radial-gradient(circle at top left, rgba(1,168,159,.11), transparent 34%),
    radial-gradient(circle at bottom right, rgba(249,173,62,.14), transparent 30%),
    var(--bg);
}

.admin-sidebar,
.student-sidebar{
  position:sticky;
  top:18px;
  align-self:flex-start;
  max-height:calc(100vh - 36px);
  min-height:0;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.22);
}

.admin-brand,
.student-brand{
  flex:0 0 auto;
}

.admin-nav,
.student-nav{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:4px 4px 10px 0;
  scrollbar-width:thin;
  scrollbar-color:rgba(255,255,255,.42) transparent;
}
.admin-nav::-webkit-scrollbar,
.student-nav::-webkit-scrollbar{width:7px}
.admin-nav::-webkit-scrollbar-track,
.student-nav::-webkit-scrollbar-track{background:transparent}
.admin-nav::-webkit-scrollbar-thumb,
.student-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.34); border-radius:999px}

.admin-sidebar-footer,
.student-sidebar-footer{
  flex:0 0 auto;
  margin-top:10px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.18);
}

.admin-nav-section,
.admin-nav-item,
.student-nav-item,
.sidebar-footer-btn,
.sidebar-burger,
.sidebar-toggle,
.btn,
.input,
select,
textarea{
  transition:background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}

.admin-nav-item,
.student-nav-item{
  min-height:42px;
  letter-spacing:-.01em;
}
.admin-nav-item:hover,
.student-nav-item:hover{
  transform:translateX(2px);
}
.admin-nav-item.active,
.student-nav-item.active{
  background:rgba(255,255,255,.22);
  border:1px solid rgba(255,255,255,.22);
}

.admin-surface,
.student-surface,
.card,
.alert,
.qbox{
  border-color:var(--ui-line);
  box-shadow:var(--ui-card-shadow);
}
.card:hover{
  box-shadow:var(--ui-card-shadow-hover);
}

.admin-content .card,
.student-content .card{
  border-radius:22px;
}

.admin-topbar,
.student-topbar{
  background:linear-gradient(180deg, rgba(255,255,255,.78), rgba(255,255,255,.52));
  border:1px solid rgba(9,20,60,.07);
  border-radius:20px;
  padding:12px 14px;
}

.crumb{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:6px 10px;
  border-radius:14px;
  background:rgba(1,168,159,.07);
  color:#12304b;
}

.btn:hover{
  box-shadow:0 12px 24px rgba(9,20,60,.12);
  transform:translateY(-1px);
}
.btn:active{transform:translateY(0)}
.input:focus,
select:focus,
textarea:focus{
  border-color:rgba(1,168,159,.55);
  box-shadow:0 0 0 4px rgba(1,168,159,.12);
}

.admin-content .table,
.student-content .table{
  background:#fff;
  border:1px solid var(--ui-line);
  border-radius:18px;
  overflow:hidden;
}
.admin-content .table th,
.student-content .table th{
  background:rgba(1,168,159,.06);
  color:#12304b;
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.035em;
}
.admin-content .table td,
.student-content .table td{
  background:rgba(255,255,255,.92);
}

body.theme-dark .admin-topbar,
body.theme-dark .student-topbar{
  background:linear-gradient(180deg, rgba(15,26,46,.92), rgba(15,26,46,.70));
  border-color:rgba(255,255,255,.10);
}
body.theme-dark .crumb{background:rgba(1,168,159,.14); color:#f3f6ff}
body.theme-dark .admin-content .table,
body.theme-dark .student-content .table{background:#0f1a2e; border-color:rgba(255,255,255,.10)}
body.theme-dark .admin-content .table th,
body.theme-dark .student-content .table th{background:rgba(255,255,255,.06); color:#f3f6ff}
body.theme-dark .admin-content .table td,
body.theme-dark .student-content .table td{background:rgba(15,26,46,.92)}

@media (max-width:980px){
  .admin-shell,
  .student-shell{
    padding:10px;
    min-height:100dvh;
  }

  .admin-surface,
  .student-surface{
    width:100%;
    min-height:calc(100dvh - 20px);
    padding:14px;
    border-radius:22px;
    overflow:visible;
  }

  .admin-topbar,
  .student-topbar{
    position:sticky;
    top:8px;
    z-index:30;
    margin:0 0 14px 0;
    border-radius:18px;
    backdrop-filter:blur(14px);
    -webkit-backdrop-filter:blur(14px);
  }

  .sidebar-burger{
    flex:0 0 44px;
    width:44px;
    height:44px;
    border-radius:15px;
    background:linear-gradient(180deg,var(--teal1),var(--teal2));
    color:#fff;
    border:0;
    box-shadow:0 10px 22px rgba(1,168,159,.22);
  }

  .admin-sidebar,
  .student-sidebar,
  .admin-shell.sidebar-collapsed .admin-sidebar,
  .student-shell.sidebar-collapsed .student-sidebar{
    position:fixed !important;
    z-index:70;
    left:10px;
    top:10px;
    bottom:10px;
    width:min(340px, calc(100vw - 20px)) !important;
    max-width:calc(100vw - 20px) !important;
    max-height:calc(100dvh - 20px) !important;
    height:auto !important;
    padding:14px 12px 12px !important;
    border-radius:24px;
    display:flex;
    flex-direction:column;
    overflow:hidden !important;
    transform:translateX(calc(-100% - 20px));
    box-shadow:0 24px 70px rgba(9,20,60,.30);
  }

  .admin-shell.sidebar-open .admin-sidebar,
  .student-shell.sidebar-open .student-sidebar{
    transform:translateX(0) !important;
  }

  .admin-nav,
  .student-nav{
    flex:1 1 auto;
    min-height:0;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    max-height:none !important;
    padding:6px 3px 16px 0;
  }

  .admin-sidebar-footer,
  .student-sidebar-footer{
    flex:0 0 auto;
    margin-top:8px !important;
    padding:10px 6px 6px !important;
    background:linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.11));
    border-radius:18px;
    border:1px solid rgba(255,255,255,.16);
  }

  .admin-shell.sidebar-collapsed .admin-brand-title,
  .admin-shell.sidebar-collapsed .admin-brand-sub,
  .student-shell.sidebar-collapsed .student-brand-title,
  .student-shell.sidebar-collapsed .student-brand-sub,
  .admin-shell.sidebar-collapsed .admin-nav-item .nav-label,
  .student-shell.sidebar-collapsed .student-nav-item .nav-label,
  .admin-shell.sidebar-collapsed .admin-sidebar-footer .btn-label,
  .student-shell.sidebar-collapsed .student-sidebar-footer .btn-label,
  .admin-shell.sidebar-collapsed .mode-toggle span,
  .admin-shell.sidebar-collapsed .admin-nav-section span:first-child{
    display:inline !important;
  }

  .admin-shell.sidebar-collapsed .admin-brand,
  .student-shell.sidebar-collapsed .student-brand{
    justify-content:flex-start !important;
    gap:12px !important;
  }
  .admin-shell.sidebar-collapsed .admin-brand > div:nth-child(2),
  .student-shell.sidebar-collapsed .student-brand > div:nth-child(2){
    display:block !important;
  }
  .admin-shell.sidebar-collapsed .admin-brand .sidebar-toggle,
  .student-shell.sidebar-collapsed .student-brand .sidebar-toggle{
    display:grid !important;
  }
  .admin-shell.sidebar-collapsed .admin-nav-section{
    justify-content:space-between !important;
    padding:8px 10px !important;
    margin:12px 6px 6px !important;
  }
  .admin-shell.sidebar-collapsed .admin-nav-item,
  .student-shell.sidebar-collapsed .student-nav-item,
  .admin-shell.sidebar-collapsed .admin-sidebar-footer .sidebar-footer-btn,
  .student-shell.sidebar-collapsed .student-sidebar-footer .sidebar-footer-btn{
    justify-content:flex-start !important;
    gap:10px !important;
    padding:10px 12px !important;
  }
  .admin-shell.sidebar-collapsed .admin-nav-ico,
  .student-shell.sidebar-collapsed .student-nav-ico{
    width:22px !important;
    height:22px !important;
    font-size:13px !important;
  }
  .admin-shell.sidebar-collapsed .admin-sidebar-footer .sidebar-footer-btn::before,
  .student-shell.sidebar-collapsed .student-sidebar-footer .sidebar-footer-btn::before{
    content:none !important;
  }
  .admin-shell.sidebar-collapsed .admin-nav-item:hover::after,
  .student-shell.sidebar-collapsed .student-nav-item:hover::after,
  .admin-shell.sidebar-collapsed .admin-sidebar-footer .sidebar-footer-btn:hover::after,
  .student-shell.sidebar-collapsed .student-sidebar-footer .sidebar-footer-btn:hover::after{
    display:none !important;
  }

  .sidebar-overlay{
    z-index:65 !important;
    background:rgba(9,20,60,.48) !important;
    backdrop-filter:blur(3px);
    -webkit-backdrop-filter:blur(3px);
  }

  .profile-chip{
    padding:8px 10px;
    max-width:calc(100vw - 84px);
  }
  .profile-email{display:none}
  .profile-name{
    max-width:130px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .admin-content,
  .student-content{min-width:0}
  .admin-content .card,
  .student-content .card{padding:14px; border-radius:20px}
}

@media (max-width:640px){
  .topbar-right{gap:6px}
  .admin-topbar,
  .student-topbar{align-items:center}
  .crumb{
    flex:1 1 100%;
    order:3;
    width:100%;
    justify-content:flex-start;
  }
  .btn{min-height:42px}
  .admin-content .table,
  .student-content .table{
    font-size:13px;
  }
}

/* =========================================================
   Panel del estudiante 2026 — navegación por tarjetas
   Rediseño visual sin alterar rutas, formularios ni funciones.
   ========================================================= */
.student-app-shell{
  min-height:100vh;
  padding:clamp(14px,2vw,28px);
  background:
    radial-gradient(circle at 8% 0%, rgba(27,183,179,.12), transparent 28%),
    radial-gradient(circle at 96% 12%, rgba(255,151,31,.10), transparent 26%),
    #f4f8fc;
  color:#10203b;
}
.student-app-header{
  max-width:1240px;
  margin:0 auto;
  min-height:138px;
  padding:24px 30px;
  border-radius:30px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  color:#fff;
  background:
    radial-gradient(circle at 77% 20%, rgba(255,255,255,.10) 0 55px, transparent 56px),
    radial-gradient(circle at 88% 84%, rgba(255,255,255,.08) 0 90px, transparent 91px),
    linear-gradient(135deg,#08a69e 0%,#13a9bf 100%);
  box-shadow:0 22px 50px rgba(7,120,145,.18);
  position:relative;
  z-index:20;
}
.student-app-brand{display:flex;align-items:center;gap:18px;min-width:0}
.student-app-logo{width:66px;height:66px;object-fit:contain;filter:drop-shadow(0 8px 16px rgba(0,0,0,.13))}
.student-app-brand-title{font-size:clamp(25px,3vw,38px);font-weight:950;letter-spacing:-.04em;line-height:1}
.student-app-brand-sub{font-size:15px;margin-top:7px;opacity:.94}
.student-app-tools{display:flex;align-items:center;gap:14px}
.student-app-notify .notify-bell{
  width:48px;height:48px;border-radius:16px;display:grid;place-items:center;
  color:#fff;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.26)
}
.student-app-notify .notify-bell-ico{font-size:24px;transform:rotate(45deg)}
.student-app-notify .notify-menu{right:0;top:58px;color:#10203b}
.student-app-profile{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;padding:7px 9px;border-radius:18px;background:rgba(255,255,255,.10);border:1px solid rgba(255,255,255,.18)}
.student-app-avatar{width:50px;height:50px;border-radius:50%;display:block;background:#fff url('/assets/brand/aprendo_mark.png') center/72% no-repeat;box-shadow:0 5px 16px rgba(0,0,0,.15);background-size:cover;background-position:center}
.student-app-profile-copy{display:flex;flex-direction:column;min-width:0;padding-right:5px}
.student-app-profile-copy strong{max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px}
.student-app-profile-copy small{font-size:11px;opacity:.82;margin-top:2px}
.student-app-main{max-width:1160px;margin:-1px auto 0;padding:32px 0 12px}
.student-welcome-panel{
  padding:24px 30px;
  border-radius:24px;
  background:linear-gradient(135deg,#fff,#f6faff);
  border:1px solid rgba(28,91,147,.08);
  box-shadow:0 15px 35px rgba(34,74,115,.06);
  display:flex;align-items:center;justify-content:space-between;gap:18px;
}
.student-welcome-panel h1{margin:0;font-size:clamp(24px,3vw,34px);line-height:1.15;letter-spacing:-.035em;color:#101f38}
.student-welcome-panel p{margin:8px 0 0;color:#6d7c96;font-size:15px}
.student-back-home{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:0 16px;border-radius:13px;text-decoration:none;color:#078f96;font-weight:900;background:#eafafa;border:1px solid rgba(8,166,158,.18)}
.student-card-menu{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:20px}
.student-menu-card{
  min-height:190px;
  padding:24px 18px 20px;
  border-radius:22px;
  background:#fff;
  border:1px solid rgba(29,74,122,.09);
  box-shadow:0 14px 30px rgba(28,73,117,.08);
  display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  text-decoration:none;color:#12203a;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease;
  position:relative;overflow:hidden;
}
.student-menu-card::after{content:"";position:absolute;left:18%;right:18%;bottom:0;height:3px;border-radius:3px 3px 0 0;background:var(--menu-accent);opacity:0;transform:scaleX(.35);transition:.2s ease}
.student-menu-card:hover{transform:translateY(-5px);box-shadow:0 22px 42px rgba(27,73,118,.14);border-color:color-mix(in srgb,var(--menu-accent) 30%,transparent)}
.student-menu-card:hover::after,.student-menu-card.active::after{opacity:1;transform:scaleX(1)}
.student-menu-card.active{border-color:color-mix(in srgb,var(--menu-accent) 28%,transparent);box-shadow:0 16px 34px color-mix(in srgb,var(--menu-accent) 14%,transparent)}
.student-menu-icon{width:76px;height:76px;border-radius:24px;display:grid;place-items:center;margin-bottom:16px;font-size:35px;font-weight:900;color:var(--menu-accent);background:var(--menu-soft);line-height:1}
.student-menu-label{font-size:18px;font-weight:950;line-height:1.15}
.student-menu-subtitle{margin-top:7px;font-size:13px;color:#7a89a2;line-height:1.3}
.tone-teal{--menu-accent:#13a8ae;--menu-soft:#def7f6}.tone-orange{--menu-accent:#ff7a18;--menu-soft:#fff0e2}.tone-green{--menu-accent:#20b779;--menu-soft:#e3f8ef}.tone-purple{--menu-accent:#7048df;--menu-soft:#eee9ff}.tone-red{--menu-accent:#ef5862;--menu-soft:#ffe8ea}.tone-blue{--menu-accent:#2f75e8;--menu-soft:#e7f0ff}.tone-amber{--menu-accent:#f59b13;--menu-soft:#fff2d9}.tone-violet{--menu-accent:#7347d8;--menu-soft:#efe9ff}
.student-app-actions{
  margin-top:20px;padding:20px 24px;border-radius:22px;background:rgba(255,255,255,.70);border:1px solid rgba(28,73,117,.07);
  display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:center
}
.student-app-actions form{margin:0}
.student-action-site,.student-action-logout{width:100%;min-height:58px;border-radius:16px;display:flex;align-items:center;justify-content:center;gap:10px;font:900 16px/1 inherit;text-decoration:none;cursor:pointer}
.student-action-site{color:#078f96;background:#fff;border:2px solid #10aaa9}
.student-action-logout{color:#fff;border:0;background:linear-gradient(135deg,#ff9f1a,#ff7817);box-shadow:0 10px 20px rgba(255,124,24,.20)}
.student-security-note{grid-column:1/-1;text-align:center;color:#73809a;font-size:12px}
.student-security-note span{color:#6580b0;margin-right:6px}
.student-page-content{margin-top:18px;min-width:0}
.student-app-home .student-page-content{margin-top:14px}
.student-home-summary{display:flex;align-items:center;gap:16px;padding:18px 22px;border-radius:20px;background:#fff;border:1px solid rgba(28,73,117,.08);box-shadow:0 12px 28px rgba(28,73,117,.06)}
.student-home-summary-icon{width:48px;height:48px;flex:0 0 48px;border-radius:15px;display:grid;place-items:center;background:#def7f6;color:#079e9e;font-size:24px;font-weight:950}
.student-home-summary h2{margin:0;font-size:18px;color:#172842}.student-home-summary p{margin:5px 0 0;color:#74839a;font-size:13px;line-height:1.5}
/* Las vistas internas conservan todas sus funciones y usan una navegación más compacta. */
.student-app-inner .student-card-menu{grid-template-columns:repeat(8,minmax(112px,1fr));gap:10px;overflow-x:auto;padding:2px 2px 10px;scrollbar-width:thin}
.student-app-inner .student-menu-card{min-height:116px;padding:14px 10px;border-radius:18px}
.student-app-inner .student-menu-icon{width:46px;height:46px;border-radius:14px;font-size:22px;margin-bottom:9px}
.student-app-inner .student-menu-label{font-size:13px}.student-app-inner .student-menu-subtitle{display:none}
.student-app-inner .student-app-actions{padding:14px 18px}.student-app-inner .student-action-site,.student-app-inner .student-action-logout{min-height:46px;font-size:14px}
.student-app-inner .student-security-note{display:none}
.student-page-content > .card:first-child{margin-top:0 !important}
@media (max-width:980px){
  .student-app-shell{padding:12px}
  .student-app-header{min-height:116px;padding:20px;border-radius:24px}
  .student-app-logo{width:54px;height:54px}.student-app-brand-title{font-size:27px}.student-app-brand-sub{font-size:13px}
  .student-app-profile-copy{display:none}.student-app-avatar{width:46px;height:46px}
  .student-app-main{padding-top:20px}.student-welcome-panel{padding:20px;border-radius:20px}
  .student-card-menu{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .student-menu-card{min-height:158px;padding:18px 12px}.student-menu-icon{width:62px;height:62px;border-radius:20px;font-size:29px;margin-bottom:13px}.student-menu-label{font-size:16px}
  .student-app-inner .student-card-menu{grid-template-columns:repeat(4,minmax(118px,1fr))}
}
@media (max-width:560px){
  .student-app-shell{padding:0;background:#f4f8fc}
  .student-app-header{border-radius:0 0 26px 26px;min-height:118px;padding:18px 16px}
  .student-app-brand{gap:11px}.student-app-logo{width:45px;height:45px}.student-app-brand-title{font-size:21px}.student-app-brand-sub{font-size:11px;margin-top:4px}
  .student-app-tools{gap:8px}.student-app-notify .notify-bell{width:42px;height:42px;border-radius:14px}.student-app-avatar{width:42px;height:42px}.student-app-profile{padding:4px;border:0;background:transparent}
  .student-app-main{padding:16px 12px 18px}.student-welcome-panel{padding:17px 16px}.student-welcome-panel h1{font-size:23px}.student-welcome-panel p{font-size:13px}.student-back-home span{display:none}.student-back-home{padding:0;width:42px;justify-content:center}
  .student-card-menu{gap:10px}.student-menu-card{min-height:142px;border-radius:18px;padding:15px 8px}.student-menu-icon{width:54px;height:54px;border-radius:17px;font-size:25px;margin-bottom:10px}.student-menu-label{font-size:14px}.student-menu-subtitle{font-size:11px;margin-top:5px}
  .student-app-actions{padding:12px;gap:10px;border-radius:18px}.student-action-site,.student-action-logout{min-height:50px;font-size:14px;border-radius:14px}.student-security-note{font-size:10px}
  .student-app-inner .student-card-menu{grid-template-columns:repeat(4,102px);margin-left:-2px;margin-right:-2px}.student-app-inner .student-menu-card{min-height:105px}.student-app-inner .student-app-actions{grid-template-columns:1fr 1fr;padding:10px}
  .notify-menu{position:fixed !important;left:10px !important;right:10px !important;top:80px !important;width:auto !important;max-width:none !important}
}

/* =========================================================
   FIX 2026-07-08 — Panel estudiante / Exámenes móvil
   Evita cualquier desbordamiento horizontal del shell y
   convierte la navegación interna en una cuadrícula fluida.
   ========================================================= */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.student-app-shell,
.student-app-header,
.student-app-main,
.student-page-content,
.student-app-inner,
.student-app-inner .student-card-menu {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.student-app-shell,
.student-app-main,
.student-page-content {
  overflow-x: hidden;
}

@supports (overflow: clip) {
  html,
  body,
  .student-app-shell,
  .student-app-main,
  .student-page-content {
    overflow-x: clip;
  }
}

@media (max-width: 700px) {
  /* La navegación interna ya no utiliza un carrusel horizontal. */
  .student-app-inner .student-card-menu {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 2px 0 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow-x: hidden;
    scrollbar-width: none;
  }

  .student-app-inner .student-card-menu::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .student-app-inner .student-menu-card {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .student-app-main,
  .student-page-content,
  .student-page-content > *,
  .student-page-content form,
  .student-page-content table {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 380px) {
  .student-app-main {
    padding-left: 8px;
    padding-right: 8px;
  }

  .student-app-inner .student-card-menu {
    gap: 8px;
  }

  .student-app-inner .student-menu-card {
    padding-left: 6px;
    padding-right: 6px;
  }

  .student-app-inner .student-menu-label {
    font-size: 12px;
    overflow-wrap: anywhere;
  }
}


/* SYSTEM_VIEW_SCALE_80_20260708
   Escala visual global equivalente al zoom 80% en escritorio.
   En móviles se conserva 100% para mantener legibilidad y adaptación real. */
@media (min-width: 769px){
  html{zoom:.8;}
  @supports not (zoom: 1){
    body{transform:scale(.8);transform-origin:top left;width:125%;min-height:125vh;}
  }
}
@media (max-width: 768px){
  html{zoom:1;}
  body{transform:none!important;width:auto!important;min-height:100%!important;}
}
