/* assets/css/login.css — SIGUE · acceso, diseño «Aula Clara».
 * Pantalla partida: a la izquierda la bienvenida en azul, a la derecha el
 * formulario. En celular la bienvenida pasa a ser una franja arriba.
 * Solo la usa login.php. Ninguna regla depende de que Font Awesome cargue. */
@import url('fuentes.css');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand:   #1976d2;
  --deep:    color-mix(in srgb, var(--brand) 72%, #06203d);
  --ink:     #18293f;
  --ink-2:   #55667c;
  --ink-3:   #8796aa;
  --line:    color-mix(in oklch, var(--brand) 16%, #dde3ea);
  --bg:      oklch(from var(--brand) .88 calc(c * .8) h);
  --ease:    cubic-bezier(.2,.8,.2,1);
}

body { font-family: 'DM Sans', system-ui, sans-serif; min-height: 100vh; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }

.login-bg { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }

/* ── Bienvenida (azul) ── */
.login-hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: clamp(28px, 5vw, 64px); color: #fff;
  background: linear-gradient(155deg, color-mix(in srgb, var(--brand) 88%, #fff) 0%, var(--brand) 38%, var(--deep) 100%);
}
.login-hero > * { position: relative; z-index: 1; }
.login-hero > .shape { position: absolute; z-index: 0; }
.shape { border-radius: 50%; pointer-events: none; }
.shape-1 { width: 420px; height: 420px; top: -140px; right: -120px; background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.28), rgba(255,255,255,0) 70%); animation: float 9s ease-in-out infinite; }
.shape-2 { width: 300px; height: 300px; bottom: -90px; left: -80px; background: rgba(255,255,255,.09); animation: float 11s ease-in-out -3s infinite; }
.shape-3 { width: 120px; height: 120px; top: 46%; right: 14%; border: 2px solid rgba(255,255,255,.22); animation: float 7s ease-in-out -1s infinite; }
@keyframes float { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-18px) } }

.login-logo { display: flex; align-items: center; gap: 13px; }
.logo-icon { width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; border-radius: 15px; background: #fff; color: var(--brand); font-size: 21px; box-shadow: 0 8px 22px color-mix(in srgb, var(--deep) 30%, transparent); animation: pop .7s var(--ease) both; }
.logo-text h2 { font: 700 23px/1.1 'Sora', sans-serif; letter-spacing: -.02em; }
.logo-text span { font-size: 12px; color: rgba(255,255,255,.72); }
@keyframes pop { from { opacity: 0; transform: scale(.6) rotate(-12deg); } to { opacity: 1; transform: none; } }

.hero-copy h1 { font: 700 clamp(30px, 3.6vw, 46px)/1.12 'Sora', sans-serif; letter-spacing: -.03em; max-width: 14em; }
.hero-copy h1 em { font-style: normal; color: color-mix(in srgb, var(--brand) 30%, #fff); }
.hero-copy p { margin-top: 14px; max-width: 30em; font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.82); }
.hero-list { list-style: none; display: grid; gap: 12px; margin-top: 28px; }
.hero-list li { display: flex; align-items: center; gap: 13px; padding: 12px 14px; max-width: 28em; border: 1px solid rgba(255,255,255,.18); border-radius: 16px; background: rgba(255,255,255,.1); font-size: 14px; font-weight: 500; animation: rise .7s var(--ease) both; }
.hero-list li:nth-child(1) { animation-delay: .15s } .hero-list li:nth-child(2) { animation-delay: .27s } .hero-list li:nth-child(3) { animation-delay: .39s }
.hero-list i { width: 36px; height: 36px; flex-shrink: 0; display: grid; place-items: center; border-radius: 11px; background: rgba(255,255,255,.18); font-size: 15px; }
.hero-list small { display: block; font-weight: 400; font-size: 12px; color: rgba(255,255,255,.7); }
.hero-foot { font-size: 12px; color: rgba(255,255,255,.62); }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ── Formulario ── */
.login-side {
  display: grid; place-items: center; padding: 28px 22px;
  background: radial-gradient(900px 500px at 100% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%), var(--bg);
}
.login-card {
  width: 430px; max-width: 100%; padding: 40px 38px 34px;
  background: #fff; border: 1px solid var(--line); border-radius: 26px;
  box-shadow: 0 2px 4px rgba(18,48,80,.04), 0 24px 56px color-mix(in srgb, var(--brand) 16%, transparent);
  animation: cardIn .6s var(--ease) both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }

.login-wave { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 18px; background: color-mix(in srgb, var(--brand) 11%, #fff); color: var(--brand); font-size: 24px; }
.login-title { font: 700 28px/1.15 'Sora', sans-serif; letter-spacing: -.025em; }
.login-sub { margin: 6px 0 26px; color: var(--ink-2); font-size: 14.5px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; color: var(--ink); }
.input-wrap { position: relative; }
.input-wrap > i:first-child { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 14px; pointer-events: none; transition: color .2s; }
.input-wrap input {
  width: 100%; height: 50px; padding: 0 46px 0 42px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #f6f9fe; color: var(--ink); font: 500 15px 'DM Sans', sans-serif; outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input-wrap input::placeholder { color: #a5b2c4; }
.input-wrap input:hover { border-color: #b9cbe6; }
.input-wrap input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.input-wrap:focus-within > i:first-child { color: var(--brand); }
.toggle-pass { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: var(--ink-3); font-size: 15px; cursor: pointer; transition: background .2s, color .2s; }
.toggle-pass:hover { background: color-mix(in srgb, var(--brand) 10%, #fff); color: var(--brand); }

.btn-login {
  width: 100%; height: 52px; margin-top: 6px; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 15px; cursor: pointer; color: #fff; font: 700 15.5px 'DM Sans', sans-serif;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--deep)));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--brand) 38%, transparent);
  transition: transform .25s var(--ease), box-shadow .25s, filter .2s;
}
.btn-login:hover { transform: translateY(-2px); box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 46%, transparent); filter: brightness(1.05); }
.btn-login i { transition: transform .25s var(--ease); }
.btn-login:hover i { transform: translateX(3px); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .75; cursor: progress; transform: none; }
.btn-login:focus-visible, .toggle-pass:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 50%, #fff); outline-offset: 2px; }

.alert-error { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid #f5c2c2; border-radius: 13px; background: #fdeeee; color: #a82b2b; font-size: 13.5px; font-weight: 500; line-height: 1.45; animation: shake .45s; }
.alert-error i { margin-top: 2px; }
.alert-ok { border-color: #bfe6d3; background: #e6f6ee; color: #11704a; animation: none; }
@keyframes shake { 20%,60% { transform: translateX(-5px) } 40%,80% { transform: translateX(5px) } }

.login-note { margin-top: 22px; padding-top: 18px; border-top: 1px solid #edf2f9; text-align: center; font-size: 12.5px; color: var(--ink-3); }
/* El aviso es un botón (abre la ayuda de assets/js/ayuda-login.js) con aspecto de texto. */
.login-ayuda { background: none; border: 0; padding: 2px 4px; font: inherit; color: inherit; cursor: pointer; border-radius: 6px; text-decoration: underline dotted; text-underline-offset: 3px; }
.login-ayuda:hover, .login-ayuda:focus-visible { color: var(--ink-2, #334155); text-decoration-style: solid; }

/* ── Celular y tableta: la bienvenida se vuelve una franja ── */
@media (max-width: 920px) {
  .login-bg { grid-template-columns: minmax(0, 1fr); }
  .login-hero { gap: 14px; padding: 26px 22px 64px; }
  .hero-copy p, .hero-list, .hero-foot, .shape-3 { display: none; }
  .hero-copy h1 { font-size: 24px; max-width: none; }
  .login-side { grid-template-columns: minmax(0, 1fr); margin-top: -44px; padding: 0 16px 28px; align-items: start; background: var(--bg); position: relative; z-index: 2; }
  .login-card { padding: 30px 22px 26px; }
}
@media (max-height: 640px) and (min-width: 921px) { .hero-list { display: none; } }

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

/* ── Selector de perfil del portal familiar ── */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 22px; padding: 5px; border-radius: 17px; background: #eef3fb; }
.role-btn { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 8px; border: 0; border-radius: 13px; background: transparent; color: var(--ink-2); font: 600 14px 'DM Sans', sans-serif; cursor: pointer; transition: background .25s var(--ease), color .2s, box-shadow .25s, transform .2s; }
.role-btn:hover { color: var(--brand); }
.role-btn.active { background: #fff; color: var(--brand); box-shadow: 0 4px 14px color-mix(in srgb, var(--brand) 16%, transparent); }
.role-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 50%, #fff); outline-offset: 2px; }

/* Barras de desplazamiento azules (ambas apariencias); los menús laterales conservan la suya */
*:not(.au-nav):not(.sb-nav){scrollbar-width:thin;scrollbar-color:var(--brand) transparent}
