: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;}
