/* Chatbot IA · acceso y registro, mismo estilo que el inicio (usa los tokens de home-curvas.css) */
.hidden { display: none !important; }
body.auth-page { min-height: 100vh; }
.auth { display: grid; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); min-height: 100vh; }

/* panel izquierdo: marca y un contenido que cambia según estés ingresando o registrándote */
.auth-side { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: clamp(28px, 4vw, 56px); min-height: 100vh; }
.auth-side .brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; width: fit-content; }
.auth-side .brand img:first-child { height: 38px; width: auto; } .auth-side .brand img:last-child { height: 17px; width: auto; }
.auth-side .brand img:first-child { filter: brightness(0) invert(1); }
.auth-side .foot { font-size: 14px; color: #fff; opacity: .9; text-shadow: 0 1px 12px rgba(2,48,48,.4); }
/* contraste: el patrón se apaga detrás de los textos y el fondo se oscurece un poco */
.auth-side.bg-vivid { box-shadow: inset 0 0 0 999px rgba(2,40,38,.24); }
.auth-side.bg-vivid::before { opacity: .3; -webkit-mask-image: radial-gradient(65% 45% at 100% 100%, #000 0%, rgba(0,0,0,.06) 78%); mask-image: radial-gradient(65% 45% at 100% 100%, #000 0%, rgba(0,0,0,.06) 78%); }
.side-views { display: grid; align-content: start; align-items: start; flex: 1; padding-top: clamp(12px, 9vh, 96px); }
.side-view { grid-area: 1 / 1; opacity: 0; transform: translateY(14px); visibility: hidden; pointer-events: none; transition: opacity 320ms var(--out), transform 320ms var(--out), visibility 0s linear 320ms; }
.auth-side[data-modo="login"] .v-login, .auth-side[data-modo="register"] .v-register { opacity: 1; transform: none; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.side-view h2 { color: #fff; font-size: clamp(40px, 4.6vw, 66px); line-height: 1; letter-spacing: -.05em; max-width: 11ch; text-wrap: balance; text-shadow: 0 1px 18px rgba(2,48,48,.35); }
.side-view .sub { color: #fff; font-size: 19px; max-width: 34ch; margin-top: 20px; text-shadow: 0 1px 14px rgba(2,48,48,.4); }
.hoy { margin-top: 36px; width: min(100%, 400px); padding: 18px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 40px 70px -34px rgba(2,40,40,.65); display: grid; gap: 8px; }
.hoy-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 4px; font-size: 15px; font-weight: 500; letter-spacing: -.01em; } .hoy-h span { font-size: 12px; padding: 3px 9px; border-radius: 7px; background: var(--ice-2); color: var(--t2); }
.hoy-r { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ice); }
.hoy-r time { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--t2); font-variant-numeric: tabular-nums; } .hoy-r time::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: var(--c); flex: none; }
.hoy-r b { display: block; font-size: 14.5px; font-weight: 500; } .hoy-r small { color: var(--t2); font-size: 13px; }
.hoy-f { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; } .hoy-f span { font-size: 12.5px; padding: 5px 11px; border-radius: 9px; color: #fff; background: linear-gradient(140deg, #0a8466, #0b7f96); }
.hoy-r, .hoy-f { opacity: 0; transform: translateY(8px); }
.auth-side[data-modo="login"] .hoy-r, .auth-side[data-modo="login"] .hoy-f { animation: sube 480ms var(--out) forwards; }
.hoy-r:nth-child(2) { animation-delay: 250ms !important; } .hoy-r:nth-child(3) { animation-delay: 350ms !important; } .hoy-r:nth-child(4) { animation-delay: 450ms !important; } .hoy-f { animation-delay: 580ms !important; }
.pasos-a { list-style: none; padding: 0; margin: 34px 0 0; width: min(100%, 440px); display: grid; }
.pasos-a li { position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 16px; padding-bottom: 28px; opacity: 0; transform: translateY(10px); }
.pasos-a li:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 48px; bottom: 4px; width: 2px; border-radius: 2px; background: rgba(255,255,255,.45); }
.pasos-a i { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-style: normal; font-weight: 500; font-size: 17px; color: #fff; background: rgba(255,255,255,.18); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
.pasos-a b { display: block; color: #fff; font-size: 19px; font-weight: 400; letter-spacing: -.02em; text-shadow: 0 1px 14px rgba(2,48,48,.4); } .pasos-a span { display: block; color: #fff; font-size: 15px; margin-top: 2px; text-shadow: 0 1px 12px rgba(2,48,48,.4); }
.auth-side[data-modo="register"] .pasos-a li { animation: sube 520ms var(--out) forwards; animation-delay: calc(var(--k) * 140ms + 200ms); }
.auth-side > .brand, .auth-side > .foot { animation: sube 700ms var(--out) both; }
/* panel derecho: formulario */
.auth-main { display: flex; flex-direction: column; padding: clamp(24px, 4vw, 48px) clamp(20px, 5vw, 64px); min-height: 100vh; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-top a { display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; color: var(--t2); text-decoration: none; transition: color 150ms ease; }
@media (hover: hover) { .auth-top a:hover { color: var(--ink); } }
.auth-top .i { width: 16px; height: 16px; transform: rotate(180deg); }
.auth-box { margin: auto; width: 100%; max-width: 420px; padding-block: 32px; animation: sube 700ms var(--out) 150ms both; }
.auth-box h1 { font-size: clamp(30px, 3.4vw, 40px); font-weight: 300; letter-spacing: -.045em; line-height: 1.05; }
.auth-box .lede { color: var(--t2); margin-top: 8px; font-size: 16px; }
.seg-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--ice-2); margin: 26px 0 22px; }
.seg-tabs button { min-height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--t2); font: 500 15px var(--sans); cursor: pointer; transition: background 160ms ease, color 160ms ease, transform 160ms var(--out); }
.seg-tabs button:active { transform: scale(.97); }
.seg-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(8,32,42,.14), 0 8px 18px -12px rgba(10,106,90,.5); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 50px; border-radius: 13px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 500 15.5px var(--sans); cursor: pointer; transition: border-color 160ms ease, background 160ms ease, transform 160ms var(--out); }
.btn-google:active { transform: scale(.97); }
@media (hover: hover) { .btn-google:hover { border-color: var(--ink); background: var(--ice); } }
.btn-google svg { width: 20px; height: 20px; flex: none; }
.legal { text-align: center; font-size: 12.5px; color: var(--t3); margin-top: 10px; line-height: 1.5; } .legal a { color: var(--deep); text-decoration: underline; text-underline-offset: 2px; }
.or { display: flex; align-items: center; gap: 12px; margin: 22px 0 4px; font-size: 13px; color: var(--t3); } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
form.stack, .stack { display: grid; gap: 18px; margin-top: 18px; }
.lbl { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.field.is-bad { border-color: var(--bad); background: #fff; }
.field-error { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--bad); margin-top: 6px; } .field-error svg { width: 14px; height: 14px; flex: none; }
.auth-box .btn-primary { width: 100%; }
.link-btn { display: block; margin: 4px auto 0; border: 0; background: none; font: 500 14.5px var(--sans); color: var(--deep); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 6px; }
.link-btn.mute { color: var(--t2); text-decoration: none; }
.screen { text-align: center; } .screen .ico { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 18px; } .screen .ico .i { width: 28px; height: 28px; }
.screen h2 { font-size: 30px; font-weight: 300; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 10px; } .screen p { color: var(--t2); font-size: 15.5px; } .screen p b { color: var(--ink); font-weight: 500; }
.code { text-align: center; font-size: 28px !important; letter-spacing: .45em; font-variant-numeric: tabular-nums; padding-left: calc(.45em + 14px) !important; }
.screen .stack { text-align: left; } .screen small { display: block; text-align: center; font-size: 13.5px; color: var(--t2); }
.screen small button { border: 0; background: none; font: 500 13.5px var(--sans); color: var(--deep); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.auth-foot { text-align: center; font-size: 13px; color: var(--t3); } .auth-foot a { color: var(--t2); text-decoration: none; } .auth-foot a:hover { color: var(--ink); }

/* avisos */
#toastContainer { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 10px; width: min(420px, calc(100vw - 32px)); justify-items: center; }
.t-toast { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 14px 16px; border-radius: 14px; background: #fff; color: var(--ink); box-shadow: 0 24px 50px -22px rgba(3,40,56,.5), 0 0 0 1px rgba(8,32,42,.08); animation: t-in 320ms var(--out); transition: opacity 300ms ease, transform 300ms ease; }
@keyframes t-in { from { opacity: 0; transform: translateY(12px); } }
.t-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(140deg, #19c28a, #0b8a8f); } .t-toast.err .t-ic { background: linear-gradient(140deg, #e0606c, #c43b4a); }
.t-ic svg { width: 18px; height: 18px; }
.t-toast h4 { font-size: 15px; font-weight: 500; letter-spacing: -.01em; color: var(--ink); } .t-toast p { font-size: 13.5px; color: var(--t2); margin-top: 2px; }

@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { min-height: 0; padding: 20px 20px 24px; gap: 14px; }
  .auth-side .brand img:first-child { height: 30px; } .auth-side .brand img:last-child { height: 14px; }
  .side-view h2 { font-size: 26px; max-width: 20ch; } .side-view .sub, .hoy, .pasos-a, .auth-side .foot { display: none; }
  .auth-main { min-height: 0; padding-top: 24px; } .auth-top { display: none; } .auth-box { padding-block: 8px 24px; }
}
@media (prefers-reduced-motion: reduce) { .auth-side > .brand, .auth-side > .foot, .auth-box, .t-toast, .hoy-r, .hoy-f, .pasos-a li { animation: none !important; opacity: 1; transform: none; } .side-view { transition: opacity 200ms ease; transform: none; } }

/* avisos: icono y texto centrados entre sí (también cuando el aviso tiene una sola línea) */
#toastContainer > div { align-items: center !important; }
#toastContainer h4 { line-height: 1.35; }
#toastContainer > div > div:first-child:not(:last-child) { margin-top: 0 !important; }
#toastContainer > div { display: flex !important; align-items: center !important; }
#toastContainer > div > div.flex-1 { align-self: center; padding-top: 3px; }
#toastContainer h4 { margin: 0; line-height: 1.3; }
#toastContainer h4 + p { margin-top: 3px; }

/* En celulares, los campos con letra menor a 16px hacen que el iPhone acerque la pantalla al tocarlos */
@media (max-width: 640px) { input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; } }
