:root {
  --blue: #283e83;
  --green: #009848;
  --orange: #ef7020;
  --ink: #1a2546;
  --muted: #7c8496;
  color: var(--ink);
  background: #fff;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}

/* Hiro aparece cuando finishIntro() termina o se pulsa «Saltar animación». */
body:not(.intro-done) .btn-asistente,
body:not(.intro-done) #hiroBurbuja {
  visibility: hidden !important;
  pointer-events: none !important;
}

.intro{position:fixed;inset:0;z-index:100;background:#fff;display:grid;place-items:center;overflow:hidden;animation:intro-exit 5s linear both}
.intro[hidden]{display:none}
.intro__logo{position:relative;width:min(82vw,980px);aspect-ratio:1182/473;animation:logo-zoom 5s cubic-bezier(.65,0,.25,1) both;will-change:transform,opacity}
.intro__letters,.intro__line{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
/* Recorta solo las dos franjas para armarlas por separado sin modificar el archivo original. */
.intro__letters{clip-path:polygon(0 0,74% 0,83.08% 63.85%,100% 63.85%,100% 100%,0 100%);animation:letters-reveal 5s ease both}
.intro__line{transform-box:fill-box;transform-origin:center;will-change:transform,opacity}
.intro__line--green{clip-path:polygon(76.1% 14.4%,78.6% 14.4%,86.3% 63.85%,83.9% 63.85%);animation:green-arrive 5s cubic-bezier(.4,0,.2,1) both}
.intro__line--orange{clip-path:polygon(79% 14.4%,81.5% 14.4%,89.3% 63.85%,86.7% 63.85%);animation:orange-arrive 5s cubic-bezier(.4,0,.2,1) both}
@keyframes green-arrive{
  0%,7%{opacity:0;transform:translate(-850px,450px) rotate(-100deg) scaleY(.45)}
  17%{opacity:1;transform:translate(-740px,-90px) rotate(-82deg) scaleY(1.25)}
  30%{transform:translate(-530px,60px) rotate(30deg) scaleY(.9)}
  43%{transform:translate(-160px,-40px) rotate(-18deg)}
  54%,100%{opacity:1;transform:translate(0,0) rotate(0deg) scaleY(1)}
}
@keyframes orange-arrive{
  0%,11%{opacity:0;transform:translate(360px,-470px) rotate(110deg) scaleY(.45)}
  21%{opacity:1;transform:translate(-270px,110px) rotate(78deg) scaleY(1.2)}
  34%{transform:translate(-650px,-70px) rotate(-35deg) scaleY(.9)}
  46%{transform:translate(-80px,35px) rotate(15deg)}
  57%,100%{opacity:1;transform:translate(0,0) rotate(0deg) scaleY(1)}
}
@keyframes letters-reveal{
  0%,49%{opacity:0;transform:translateY(14px) scale(.95);filter:blur(12px)}
  66%,100%{opacity:1;transform:translateY(0) scale(1);filter:blur(0)}
}
@keyframes logo-zoom{
  0%,72%{transform:scale(1);opacity:1}
  79%{transform:scale(.96);opacity:1}
  96%,100%{transform:scale(5.5);opacity:0}
}
@keyframes intro-exit{0%,86%{opacity:1}99%{opacity:0}100%{opacity:0;visibility:hidden}}

.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  opacity: 0;
  transition: opacity .65s ease;
}
body.intro-done .login { opacity: 1; transform: translateY(0); }

.brand-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 0;
  padding: clamp(24px, 5dvh, 48px) 10%;
  overflow: hidden;
  background: var(--blue);
  color: #fff;
}
.brand-panel::after {
  position: absolute;
  right: -260px;
  bottom: -300px;
  width: 420px;
  height: 700px;
  border: 1px solid #ffffff13;
  box-shadow: 0 0 0 65px #ffffff05, 0 0 0 130px #ffffff04;
  content: "";
  pointer-events: none;
  transform: rotate(-23deg);
}
.brand-panel__top, .brand-panel__footer {
  color: #ffffffa6;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
}
.brand-panel__top { display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 7px; height: 7px; border-radius: 50%; background: #3acd88; }
.eyebrow { font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.brand-panel__message { position: relative; z-index: 1; margin: clamp(24px, 7dvh, 80px) 0; }
.brand-panel__message .eyebrow { color: #aebee9; }
h1 { margin: 23px 0; font-size: clamp(30px, 3.6vw, 54px); font-weight: 600; line-height: 1.15; letter-spacing: -.045em; }
.brand-panel__message p { color: #c0cae4; font-size: 14px; line-height: 1.8; }
.brand-panel__accent { display: flex; gap: 8px; margin-top: 42px; }
.brand-panel__accent i { display: block; width: 7px; height: 42px; background: var(--green); transform: skew(21deg); }
.brand-panel__accent i + i { background: var(--orange); }

.aula-button { width: min(100%, 360px); --bs-btn-color: #482200; --bs-btn-border-color: #FA8D28; --bs-btn-bg: #FA8D28; --bs-btn-hover-color: #482200; --bs-btn-hover-bg: #ffa34e; --bs-btn-hover-border-color: #FA8D28; display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 44px; padding: 12px 20px; border: 1px solid var(--bs-btn-border-color); border-radius: 7px; background: var(--bs-btn-bg); color: var(--bs-btn-color); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .2s, border-color .2s, box-shadow .2s; }
.aula-button:hover { background: var(--bs-btn-hover-bg); border-color: var(--bs-btn-hover-border-color); color: var(--bs-btn-hover-color); box-shadow: 0 0 0 3px #FA8D2840; }
.intro__skip { position: absolute; right: max(24px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); min-height: 44px; padding: 10px 18px; border: 1px solid #dce1ed; border-radius: 24px; background: #fff; color: var(--blue); font-size: 12px; }
.intro__skip:hover { background: #f2f5fb; border-color: var(--blue); }

.access-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: clamp(12px, 3dvh, 28px) 32px;
  gap: 14px;
}
.access-card { display: flex; flex-direction: column; align-items: flex-start; width: min(100%, 360px); margin-inline: auto; text-align: left; }
.access-card > form { width: 100%; text-align: left; }
.access-card > h2, .access-card__eyebrow, .access-card__description { width: 100%; text-align: left; }
.login-logo { display: block; width: 200px; max-width: 100%; height: auto; margin: 0 0 14px -22px; }
.access-card__eyebrow { display: block; margin-bottom: 8px; color: var(--green); }
h2 { margin: 0 0 6px; font-size: 30px; font-weight: 600; letter-spacing: -.04em; }
.access-card__description { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
label { display: block; margin: 14px 0 6px; font-size: 12px; font-weight: 600; }
input { display: block; width: 100%; min-height: 44px; padding: 11px 14px; border: 1px solid #e0e4ec; border-radius: 7px; background: #fbfcfe; color: var(--ink); font-size: 13px; text-align: left; }
input::placeholder { color: #a2a8b6; }
input:disabled, button:disabled { cursor: not-allowed; opacity: .58; }
.access-card input:not([type="checkbox"]):focus { outline: none; border-color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.password-field { position: relative; width: 100%; }
.password-field input { padding-right: 48px; }
.password-toggle { position: absolute; top: 1px; right: 1px; bottom: 1px; display: grid; place-items: center; width: 42px; padding: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.password-toggle:hover:not(:disabled) { background: #283e8308; color: var(--blue); }
.password-toggle__slash { display: none; }
.password-toggle[aria-pressed="true"] .password-toggle__slash { display: block; }
.remember-me { display: flex; align-items: center; gap: 8px; width: fit-content; min-height: 32px; margin: 8px 0 0; color: var(--muted); font-weight: 400; cursor: pointer; }
.remember-me input { flex: none; width: 16px; height: 16px; min-height: 0; margin: 0; padding: 0; accent-color: var(--blue); cursor: pointer; }
.submit { position: relative; display: flex; align-items: center; justify-content: flex-start; width: 100%; min-height: 44px; margin-top: 18px; padding: 12px 40px 12px 18px; border: 0; border-radius: 7px; background: var(--blue); color: #fff; font-size: 13px; font-weight: 600; transition: background .2s; }
.submit span { position: absolute; right: 18px; }
.submit:hover:not(:disabled) { background: #1d306b; }
.access-options { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; }
.new-entry { display: grid; place-items: center; width: 100%; min-height: 44px; padding: 12px 18px; border: 1px solid var(--green); border-radius: 7px; background: #fff; color: var(--green); font-size: 12px; font-weight: 700; letter-spacing: .035em; text-align: center; text-decoration: none; transition: background .2s; }
.new-entry:hover { background: #f0faf5; }
.recover-password { align-self: center; min-height: 44px; padding: 13px 14px 10px; border: 0; background: none; color: var(--blue); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.recover-password:hover { color: var(--green); }
.form-alert { display: flex; align-items: flex-start; gap: 9px; width: 100%; margin: 6px 0 0; padding: 10px 12px; border: 1px solid #f1c6c9; border-radius: 7px; background: #fff5f5; color: #a5252d; font-size: 12px; line-height: 1.45; }
.form-alert svg { flex: none; margin-top: 1px; }
.platform-note { width: 100%; margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.install-button { width: 100%; min-height: 40px; margin-top: 8px; padding: 9px 14px; border: 1px solid var(--blue); border-radius: 7px; background: #fff; color: var(--blue); font-size: 12px; font-weight: 600; }
.install-button:hover { background: #f3f5fb; }
.install-button[hidden] { display: none; }
.access-footer { margin: 0; color: #a2a8b6; font-size: 10px; letter-spacing: .04em; text-align: center; }
.no-script { position: fixed; right: 0; bottom: 0; left: 0; z-index: 110; margin: 0; padding: 12px; background: #fff; font-size: 12px; text-align: center; }
.ios-install-banner { position: fixed; right: 0; bottom: 0; left: 0; z-index: 120; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: #e9f2ff; color: #1b3a7a; box-shadow: 0 -6px 16px rgba(0, 0, 0, .08); font-size: 13px; }
.ios-install-banner__content { display: flex; align-items: flex-start; gap: 12px; max-width: 720px; margin: 0 auto; }
.ios-install-banner__icon { font-size: 20px; line-height: 1; }
.ios-install-banner__text { flex: 1; }
.ios-install-banner ol { margin: 6px 0 0 18px; padding: 0; }
.ios-install-banner button { padding: 8px 12px; border: 0; border-radius: 8px; background: #1b3a7a; color: #fff; }

@media (max-height: 740px) {
  .login-logo { width: 160px; margin-bottom: 8px; margin-left: -17px; }
  .access-card__eyebrow { margin-bottom: 6px; }
  h2 { font-size: 26px; }
  .access-card__description { margin-bottom: 6px; }
  label { margin-top: 10px; }
  .submit { margin-top: 12px; }
  .access-panel { gap: 8px; }
  .brand-panel__accent { margin-top: 24px; }
}
@media (max-width: 1024px) {
  .login { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
    .access-panel { padding: clamp(12px, 3dvh, 24px) 24px; }
  .access-card { align-items: center; text-align: center; }
  .access-card > form, .access-card > h2, .access-card__eyebrow, .access-card__description { text-align: center; }
  .login-logo { margin-right: auto; margin-left: auto; }
  .remember-me { margin-inline: auto; }
  input { font-size: 16px; text-align: left; }
  .submit { justify-content: center; padding-inline: 40px; }
}
@media (max-width: 700px) {
  .intro__logo { width: 98vw; }
  .ios-install-banner__content { flex-wrap: wrap; }
  .ios-install-banner button { margin-left: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .intro { display: none; animation: none; }
  .login { opacity: 1; transform: none; transition: none; }
}
