:root{
  --bg:#eef3fa;
  --bg2:#dfe7f3;
  --card:#ffffff;
  --text:#21345f;
  --muted:#6176a3;
  --input:#f9fbff;
  --input-border:#d0ddf2;
  --line:#dce6f5;
  --hero-1:#733dff;
  --hero-2:#4571ff;
  --hero-3:#60a4ff;
  --hero-4:#6cc7ff;
  --hero-shadow:0 22px 50px rgba(24,50,120,.18);
  --shadow:0 28px 72px rgba(19,40,88,.14);
  --danger:#d94c73;
  --danger-bg:#fff2f5;
  --danger-border:#f3cad7;
}
html[data-student-theme="dark"]{
  --bg:#0c1220;
  --bg2:#141d2e;
  --card:#151d2d;
  --text:#f0f5ff;
  --muted:#a8b6d0;
  --input:#0f1725;
  --input-border:#2e3a54;
  --line:#253149;
  --hero-1:#4425ae;
  --hero-2:#2d49bc;
  --hero-3:#2676c0;
  --hero-4:#2d9fc4;
  --hero-shadow:0 24px 56px rgba(0,0,0,.34);
  --shadow:0 30px 76px rgba(0,0,0,.34);
  --danger:#ff9db0;
  --danger-bg:#2b1b25;
  --danger-border:#643545;
}
*{box-sizing:border-box}
html,body{min-height:100%}
body.login-body{margin:0;font-family:"Inter",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:radial-gradient(circle at 18% 8%,rgba(255,255,255,.72),transparent 24%),linear-gradient(180deg,var(--bg) 0%,var(--bg2) 100%)}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:30px 18px}
.login-card{width:min(100%,980px);border-radius:44px;overflow:hidden;box-shadow:var(--shadow)}
.login-hero{position:relative;padding:34px 34px 30px;min-height:470px;color:#fff;background:linear-gradient(120deg,var(--hero-1) 0%,var(--hero-2) 36%,var(--hero-3) 72%,var(--hero-4) 100%);box-shadow:var(--hero-shadow)}
.login-hero:before,.login-hero:after,.login-hero .hero-copy:after{content:"";position:absolute;border-radius:50%;pointer-events:none}
.login-hero:before{right:-60px;top:-40px;width:330px;height:330px;border:30px solid rgba(255,255,255,.16)}
.login-hero:after{right:-120px;bottom:-150px;width:560px;height:560px;border:60px solid rgba(255,255,255,.12)}
.login-hero .hero-copy:after{right:70px;top:45px;width:420px;height:420px;border:42px solid rgba(255,255,255,.08)}
.brand-row{position:relative;z-index:2;display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:18px}
.brand-logo{width:140px;height:140px;object-fit:contain;filter:drop-shadow(0 10px 22px rgba(0,0,0,.22))}
.brand-divider{width:2px;height:88px;background:linear-gradient(180deg,rgba(116,236,255,.18),#59e2ff,rgba(116,236,255,.18));border-radius:999px}
.brand-copy{display:flex;flex-direction:column;align-items:flex-start;gap:7px;min-width:0}
.brand-title{font-size:1.06rem;font-weight:900;line-height:1.05;letter-spacing:-.02em}
.brand-subtitle{font-size:.68rem;font-weight:500;letter-spacing:.46em;text-transform:uppercase;color:rgba(240,247,255,.9)}
.brand-underline{width:68px;height:5px;border-radius:999px;background:#5ae5ff;box-shadow:0 0 14px rgba(90,229,255,.3);margin-top:4px}
.theme-toggle{min-width:146px;height:70px;padding:0 22px;border-radius:999px;border:1px solid rgba(255,255,255,.42);background:rgba(255,255,255,.08);backdrop-filter:blur(8px);display:flex;align-items:center;justify-content:center;gap:12px;color:#fff;cursor:pointer;box-shadow:inset 0 1px 1px rgba(255,255,255,.18)}
.theme-toggle-icon{font-size:1.9rem;line-height:1}.theme-toggle-label{font-size:1rem;font-weight:800}
.hero-copy{position:relative;z-index:2;max-width:560px;margin-top:34px}
.hero-label{margin:0 0 8px;font-size:1rem;font-weight:500;color:rgba(244,248,255,.96)}
.hero-copy h1{margin:0;font-size:5rem;line-height:.92;letter-spacing:-.06em;font-weight:900;text-shadow:0 8px 20px rgba(20,31,78,.1)}
.hero-text{margin:16px 0 0;max-width:560px;font-size:1.02rem;line-height:1.46;color:#eff6ff}
.hero-building{position:absolute;right:28px;bottom:0;width:330px;height:235px;opacity:.26;filter:drop-shadow(0 10px 22px rgba(0,0,0,.18))}
.hero-building:before,.hero-building:after{content:"";position:absolute;display:block}
.hero-building:before{right:0;bottom:0;width:250px;height:160px;background:linear-gradient(180deg,rgba(255,255,255,.4),rgba(255,255,255,.18));clip-path:polygon(0 100%,0 38%,15% 30%,15% 14%,84% 14%,84% 0,90% 0,90% 14%,100% 22%,100% 100%);border-radius:12px 12px 0 0}
.hero-building:after{right:88px;bottom:128px;width:44px;height:50px;background:linear-gradient(180deg,rgba(255,255,255,.42),rgba(255,255,255,.28));clip-path:polygon(44% 0,58% 0,58% 60%,100% 60%,100% 73%,58% 73%,58% 100%,44% 100%,44% 60%,0 60%,0 47%,44% 47%)}
.login-panel{position:relative;background:var(--card);margin-top:-14px;border-radius:36px 36px 42px 42px;padding:28px 28px 26px;border:1px solid rgba(215,228,245,.65)}
.login-alert{margin-bottom:18px;padding:14px 16px;border-radius:16px;border:1px solid var(--danger-border);background:var(--danger-bg);color:var(--danger);font-size:.96rem;font-weight:700}
.login-form{display:grid;gap:18px}
.field-group label{display:block;margin:0 0 10px;font-size:1rem;font-weight:900;color:var(--text)}
.field-shell{display:flex;align-items:center;gap:14px;min-height:74px;padding:0 18px;border-radius:18px;border:1.5px solid var(--input-border);background:linear-gradient(180deg,var(--input),rgba(255,255,255,.95))}
.field-icon{width:34px;height:34px;display:grid;place-items:center;color:#7483ab;flex:0 0 auto}
.field-icon svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.field-shell input{flex:1;min-width:0;border:0;outline:none;background:transparent;color:var(--text);font:inherit;font-size:1rem;font-weight:600}
.field-shell input::placeholder{color:#99a8c4}
.field-action{width:44px;height:44px;border:0;background:transparent;color:#7785ab;display:grid;place-items:center;cursor:pointer;padding-left:12px;border-left:1px solid var(--input-border);flex:0 0 auto}
.field-action svg{width:26px;height:26px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.field-action .eye-closed{display:none}.field-action.is-visible .eye-open{display:none}.field-action.is-visible .eye-closed{display:block}
.remember-wrap{display:flex;align-items:center;gap:14px;cursor:pointer;user-select:none;width:fit-content;margin-top:2px}.remember-wrap input{position:absolute;opacity:0;pointer-events:none}
.remember-box{width:34px;height:34px;border-radius:10px;background:linear-gradient(145deg,#1595ff,#166be3);display:grid;place-items:center;box-shadow:0 8px 18px rgba(27,123,241,.26);border:1px solid rgba(18,105,185,.18)}
.remember-box svg{width:18px;height:18px;fill:none;stroke:#fff;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round;opacity:0}
.remember-wrap input:checked + .remember-box svg{opacity:1}.remember-wrap input:not(:checked) + .remember-box{background:linear-gradient(180deg,#edf4ff,#e1ebf8);box-shadow:none}.remember-text{font-size:1rem;color:var(--muted);font-weight:500}
.submit-btn{margin-top:6px;min-height:76px;padding:0 28px;border:0;border-radius:999px;background:linear-gradient(90deg,#6f3eff 0%,#5276ff 44%,#48a4ff 78%,#42cbf8 100%);color:#fff;font:inherit;font-size:1.12rem;font-weight:900;text-transform:uppercase;letter-spacing:.08em;display:flex;align-items:center;justify-content:center;gap:22px;cursor:pointer;box-shadow:0 18px 28px rgba(80,120,255,.25)}
.submit-arrow{font-size:2rem;line-height:1;margin-top:-2px}
.activation-note{margin-top:28px;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:18px;padding:18px 22px;border-radius:22px;border:1px solid var(--input-border);background:linear-gradient(180deg,#f5f9ff,#eef5ff)}
.activation-icon{width:72px;height:72px;border-radius:50%;background:linear-gradient(180deg,#dfe8ff,#e8f6ff);display:grid;place-items:center;color:#1d61ea;box-shadow:inset 0 1px 0 rgba(255,255,255,.75)}
.activation-icon svg{width:44px;height:44px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.activation-copy{padding-left:18px;border-left:1px solid var(--input-border)}
.activation-copy strong{display:block;font-size:1rem;color:#2138a2;font-weight:900}.activation-copy p{margin:.42rem 0 0;font-size:.95rem;line-height:1.45;color:#6176a3}
.login-footer{display:grid;grid-template-columns:1fr auto 1fr;gap:18px;align-items:center;margin-top:24px;color:#7284aa}.footer-line{height:1px;background:linear-gradient(90deg,transparent,#d3def1,transparent)}
.footer-center{display:flex;flex-direction:column;align-items:center;gap:10px}.footer-center strong{font-size:.82rem;font-weight:500;color:#5d72a1}.footer-center span{font-size:.72rem;letter-spacing:.52em;text-transform:uppercase;color:#6278a6}.footer-center i{width:72px;height:4px;border-radius:999px;background:linear-gradient(90deg,#62e7ff,#47b2ff,#5d49ff)}
html[data-student-theme="dark"] body.login-body{background:radial-gradient(circle at 18% 8%,rgba(255,255,255,.04),transparent 24%),linear-gradient(180deg,var(--bg) 0%,var(--bg2) 100%)}
html[data-student-theme="dark"] .theme-toggle{background:rgba(255,255,255,.09)}
html[data-student-theme="dark"] .brand-subtitle,html[data-student-theme="dark"] .hero-label,html[data-student-theme="dark"] .hero-text{color:#edf4ff}
html[data-student-theme="dark"] .login-panel{border-color:#1f2a3c}
html[data-student-theme="dark"] .field-shell{background:linear-gradient(180deg,#111a2a,#0f1827)}
html[data-student-theme="dark"] .field-shell input::placeholder{color:#7f90b1}
html[data-student-theme="dark"] .remember-wrap input:not(:checked)+.remember-box{background:linear-gradient(180deg,#182132,#111827);border-color:#25334b}
html[data-student-theme="dark"] .activation-note{background:linear-gradient(180deg,#182334,#111d2d)}
html[data-student-theme="dark"] .activation-copy strong{color:#e5ecff}
html[data-student-theme="dark"] .activation-copy p,html[data-student-theme="dark"] .footer-center strong,html[data-student-theme="dark"] .footer-center span{color:var(--muted)}
html[data-student-theme="dark"] .footer-line{background:linear-gradient(90deg,transparent,#29344c,transparent)}
@media (max-width:900px){
  .login-card{border-radius:34px}
  .login-hero{min-height:400px;padding:28px 26px 26px}
  .brand-logo{width:118px;height:118px}
  .brand-divider{height:72px}
  .theme-toggle{min-width:126px;height:62px;padding:0 18px}
  .hero-copy h1{font-size:4rem}
  .hero-building{width:270px;height:200px}
  .login-panel{padding:24px 24px 22px}
}
@media (max-width:640px){
  body.login-body{background:linear-gradient(180deg,var(--bg) 0%,var(--bg2) 100%)}
  .login-shell{display:block;padding:12px 12px 22px}
  .login-card{width:100%;border-radius:28px}
  .login-hero{padding:18px 18px 54px;min-height:auto;border-radius:28px 28px 0 0}
  .login-hero:before{width:220px;height:220px;right:-40px;top:-20px;border-width:20px}
  .login-hero:after{width:360px;height:360px;right:-90px;bottom:-120px;border-width:40px}
  .login-hero .hero-copy:after{width:250px;height:250px;right:-10px;top:8px;border-width:26px}
  .brand-row{grid-template-columns:auto minmax(0,1fr);gap:12px 14px}
  .brand-logo{width:76px;height:76px}
  .brand-divider{height:54px}
  .brand-copy{gap:4px}
  .brand-title{font-size:.86rem}
  .brand-subtitle{font-size:.54rem;letter-spacing:.34em}
  .brand-underline{width:52px;height:4px}
  .theme-toggle{grid-column:1 / -1;justify-self:end;min-width:112px;height:48px;padding:0 16px;margin-top:4px}
  .theme-toggle-icon{font-size:1.25rem}.theme-toggle-label{font-size:.88rem}
  .hero-copy{margin-top:18px;max-width:100%}
  .hero-label{font-size:.82rem;margin-bottom:6px}
  .hero-copy h1{font-size:2.55rem}
  .hero-text{font-size:.9rem;line-height:1.42;max-width:94%;margin-top:10px}
  .hero-building{display:none}
  .login-panel{margin-top:-26px;padding:18px 16px 18px;border-radius:24px 24px 28px 28px}
  .login-alert{margin-bottom:12px;padding:11px 12px;border-radius:12px;font-size:.82rem}
  .login-form{gap:14px}
  .field-group label{font-size:.88rem;margin-bottom:8px}
  .field-shell{min-height:58px;padding:0 14px;gap:10px;border-radius:16px}
  .field-icon{width:28px;height:28px}.field-icon svg{width:22px;height:22px}.field-shell input{font-size:.94rem}.field-action{width:36px;height:36px;padding-left:8px}.field-action svg{width:21px;height:21px}
  .remember-wrap{gap:10px}.remember-box{width:28px;height:28px;border-radius:8px}.remember-box svg{width:15px;height:15px}.remember-text{font-size:.84rem}
  .submit-btn{min-height:58px;font-size:.96rem;gap:12px;letter-spacing:.05em;box-shadow:0 12px 22px rgba(80,120,255,.20)}.submit-arrow{font-size:1.55rem}
  .activation-note{margin-top:18px;grid-template-columns:52px 1fr;gap:12px;padding:14px;border-radius:18px}
  .activation-icon{width:52px;height:52px}.activation-icon svg{width:30px;height:30px}.activation-copy{padding-left:12px}.activation-copy strong{font-size:.86rem}.activation-copy p{font-size:.77rem;line-height:1.38}
  .login-footer{grid-template-columns:1fr;gap:10px;margin-top:16px}.footer-line{display:none}.footer-center{gap:6px}.footer-center strong{font-size:.72rem}.footer-center span{font-size:.58rem;letter-spacing:.36em}.footer-center i{width:44px;height:3px}
}


/* PASO 42 · AJUSTE LOGIN MÓVIL PARA ENTRAR COMPLETO EN PANTALLA */
@media (max-width: 640px){
  .login-shell{padding:8px 8px 14px;min-height:100dvh}
  .login-card{border-radius:24px}

  .login-hero{
    padding:14px 16px 76px;
    min-height:288px;
    border-radius:24px 24px 0 0;
    overflow:hidden;
  }

  .brand-row{
    position:relative;
    grid-template-columns:64px 2px minmax(0,1fr);
    gap:10px 12px;
    align-items:center;
    padding-right:118px;
  }
  .brand-logo{width:64px;height:64px}
  .brand-divider{height:46px}
  .brand-copy{gap:2px}
  .brand-title{font-size:.84rem;line-height:1.1}
  .brand-subtitle{font-size:.5rem;letter-spacing:.30em}
  .brand-underline{width:48px;height:3px;margin-top:3px}

  .theme-toggle{
    position:absolute;
    top:0;
    right:0;
    min-width:108px;
    height:42px;
    padding:0 14px;
    margin:0;
    gap:10px;
    z-index:3;
  }
  .theme-toggle-icon{font-size:1.05rem}
  .theme-toggle-label{font-size:.82rem}

  .hero-copy{margin-top:12px;max-width:100%}
  .hero-label{font-size:.78rem;margin-bottom:4px}
  .hero-copy h1{font-size:2rem;line-height:.94;margin-bottom:0}
  .hero-text{font-size:.80rem;line-height:1.34;max-width:78%;margin-top:8px}

  .login-panel{
    margin-top:-48px;
    padding:14px 14px 14px;
    border-radius:22px 22px 24px 24px;
  }
  .login-alert{margin-bottom:10px;padding:9px 10px;border-radius:10px;font-size:.78rem}
  .login-form{gap:10px}
  .field-group label{font-size:.82rem;margin-bottom:6px}
  .field-shell{min-height:48px;padding:0 12px;gap:8px;border-radius:14px}
  .field-icon{width:24px;height:24px}
  .field-icon svg{width:19px;height:19px}
  .field-shell input{font-size:.88rem}
  .field-action{width:32px;height:32px;padding-left:7px}
  .field-action svg{width:18px;height:18px}

  .remember-wrap{gap:8px}
  .remember-box{width:24px;height:24px;border-radius:7px}
  .remember-box svg{width:13px;height:13px}
  .remember-text{font-size:.78rem}

  .submit-btn{
    min-height:48px;
    font-size:.88rem;
    gap:10px;
    letter-spacing:.05em;
    margin-top:2px;
    box-shadow:0 10px 18px rgba(80,120,255,.18);
  }
  .submit-arrow{font-size:1.32rem}

  .activation-note{margin-top:12px;grid-template-columns:44px 1fr;gap:10px;padding:11px 12px;border-radius:16px}
  .activation-icon{width:44px;height:44px}
  .activation-icon svg{width:24px;height:24px}
  .activation-copy{padding-left:10px}
  .activation-copy strong{font-size:.80rem}
  .activation-copy p{font-size:.72rem;line-height:1.3}

  .login-footer{margin-top:10px;gap:6px}
  .footer-center strong{font-size:.68rem}
  .footer-center span{font-size:.54rem;letter-spacing:.28em}
  .footer-center i{width:38px;height:3px}
}

@media (max-width: 640px) and (max-height: 860px){
  .login-shell{padding:6px 6px 10px}
  .login-hero{padding:12px 14px 72px;min-height:270px}
  .brand-row{grid-template-columns:58px 2px minmax(0,1fr);padding-right:108px}
  .brand-logo{width:58px;height:58px}
  .brand-divider{height:42px}
  .brand-title{font-size:.80rem}
  .brand-subtitle{font-size:.48rem}
  .theme-toggle{min-width:100px;height:38px;padding:0 12px}
  .theme-toggle-label{font-size:.78rem}
  .hero-copy{margin-top:10px}
  .hero-copy h1{font-size:1.86rem}
  .hero-text{font-size:.76rem;line-height:1.28;max-width:76%;margin-top:6px}
  .login-panel{margin-top:-52px;padding:12px 12px 12px}
  .field-group label{font-size:.80rem;margin-bottom:5px}
  .field-shell{min-height:44px;border-radius:13px}
  .field-shell input{font-size:.85rem}
  .remember-text{font-size:.75rem}
  .submit-btn{min-height:45px;font-size:.84rem}
  .activation-note{margin-top:10px;padding:10px 11px;grid-template-columns:40px 1fr}
  .activation-icon{width:40px;height:40px}
  .activation-copy strong{font-size:.77rem}
  .activation-copy p{font-size:.68rem}
  .footer-center strong{font-size:.64rem}
  .footer-center span{font-size:.50rem}
}


/* PASO 43 · BOTÓN DE TEMA ARRIBA A LA DERECHA */
@media (max-width: 640px){
  .login-hero{position:relative}
  .brand-row{padding-right:0;grid-template-columns:64px 2px minmax(0,1fr)}
  .theme-toggle{position:absolute;top:14px;right:14px;z-index:10;min-width:104px;width:auto;height:40px;padding:0 13px;margin:0;border-radius:999px}
  .theme-toggle-icon{font-size:1rem}
  .theme-toggle-label{font-size:.78rem}
  .brand-copy{padding-right:106px}
}
@media (max-width: 640px) and (max-height: 860px){
  .theme-toggle{top:12px;right:12px;min-width:98px;height:38px;padding:0 12px}
  .theme-toggle-label{font-size:.76rem}
  .brand-copy{padding-right:100px}
}
