.auth-controls { display: inline-flex; align-items: center; gap: 9px; max-width: 310px; }
.auth-user { max-width: 165px; overflow: hidden; color: #5d7278; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.auth-button { border: 1px solid #cdbb9d; border-radius: 4px; padding: 7px 10px; background: #fffaf2; color: var(--wine); font-size: 14px; font-weight: 600; cursor: pointer; }
.auth-button:hover { background: var(--gold-pale); }
.auth-backdrop { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(39, 31, 27, .52); }
.auth-panel { position: relative; width: min(440px, 100%); padding: 34px; border: 1px solid #d9c7a9; background: var(--paper-bright); box-shadow: 0 24px 70px rgba(45, 21, 25, .25); }
/* Bloque 42: marca del logo en el diálogo de inicio de sesión. */
.auth-panel-brand { margin-bottom: 16px; }
.auth-close { position: absolute; top: 12px; right: 14px; border: 0; background: transparent; color: #8c7a68; font-size: 26px; line-height: 1; cursor: pointer; }
.auth-panel h2 { max-width: 340px; margin: 0 0 9px; color: var(--wine-dark); font-size: 30px; line-height: 1.03; }
.auth-lede { margin-bottom: 24px; color: #746b61; font-size: 14px; line-height: 1.45; }
.auth-panel form { display: grid; gap: 8px; }
.auth-panel label { margin-top: 5px; color: #786b58; font: 10px var(--mono); letter-spacing: .07em; text-transform: uppercase; }
.auth-panel input { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #d8cdbd; background: #fffdf8; color: var(--ink); font-size: 15px; }
.auth-panel form .button { margin-top: 10px; }
.auth-message { margin: 5px 0 0; padding: 9px 10px; font-size: 14px; line-height: 1.4; }
.auth-message.is-error { border: 1px solid #e2b9b3; background: var(--red-pale); color: #863d3b; }
.auth-message.is-success { border: 1px solid #b8d1bd; background: var(--green-pale); color: #35634e; }
.auth-recovery-link { margin: 13px 0 0; text-align: center; font-size: 14px; }
.auth-recovery-link a { color: var(--wine); font-weight: 700; text-underline-offset: 3px; }
.auth-note { margin: 18px 0 0; color: #5d7278; font-size: 14px; line-height: 1.4; }
@media (max-width: 760px) { .auth-controls { gap: 5px; } /* Bloque 36: el correo se recorta con puntos suspensivos en vez de ocultarse; es la única vía visible a la sesión en móvil. */ .auth-user { max-width: 32vw; } .auth-panel { padding: 29px 22px; } }

/* Portada de acceso ContaIA */
.auth-gate { position: relative; isolation: isolate; display: grid; min-height: 100svh; overflow: hidden; color: #fff; background: radial-gradient(circle at 13% 18%, rgba(43,135,148,.34), transparent 28rem), linear-gradient(120deg, #072b38, #0d4351 48%, #0a3441); }
.auth-gate-background { position: absolute; z-index: -2; inset: 0; overflow: hidden; pointer-events: none; }
.auth-gate-background::after { position: absolute; inset: 0; content: ""; opacity: .12; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E"); mix-blend-mode: soft-light; }
.auth-gate::after { position: absolute; z-index: -1; inset: 0; content: ""; pointer-events: none; background: linear-gradient(90deg, rgba(4,25,34,.42), rgba(4,25,34,.06) 52%, rgba(4,25,34,.38)); }
.auth-orb { position: absolute; width: 38rem; height: 38rem; border-radius: 50%; filter: blur(28px); opacity: .45; }
.auth-orb-coral { top: -20rem; left: -12rem; background: #cf644d; animation: auth-float-coral 18s ease-in-out infinite alternate; }
.auth-orb-gold { right: -18rem; bottom: -20rem; background: #bd8f43; opacity: .32; animation: auth-float-gold 22s ease-in-out infinite alternate; }
.auth-orb-teal { top: 35%; left: 42%; width: 24rem; height: 24rem; background: #3197a1; opacity: .18; animation: auth-float-teal 16s ease-in-out infinite alternate; }
.auth-grid { position: absolute; inset: -10%; opacity: .18; background-image: linear-gradient(rgba(159,227,224,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(159,227,224,.16) 1px, transparent 1px); background-size: 58px 58px; transform: perspective(700px) rotateX(58deg) rotateZ(-9deg) scale(1.45); transform-origin: center bottom; mask-image: linear-gradient(to bottom, transparent, #000 42%, transparent); animation: auth-grid-drift 24s linear infinite; }
.auth-data-line { position: absolute; height: 1px; width: 42rem; opacity: .35; background: linear-gradient(90deg, transparent, #a9eee2, transparent); filter: drop-shadow(0 0 8px rgba(110,231,211,.8)); }
.auth-data-line-one { top: 22%; right: -7rem; transform: rotate(-17deg); animation: auth-line-pulse 7s ease-in-out infinite; } .auth-data-line-two { top: 67%; left: -15rem; transform: rotate(18deg); animation: auth-line-pulse 9s ease-in-out -3s infinite; }
.auth-particles i { position: absolute; display: block; width: 5px; height: 5px; border-radius: 50%; background: #d3fff7; box-shadow: 0 0 12px 3px rgba(110,231,211,.55); animation: auth-particle-float 8s ease-in-out infinite; }
.auth-particles i:nth-child(1) { top: 15%; left: 8%; } .auth-particles i:nth-child(2) { top: 23%; left: 30%; animation-delay: -2s; transform: scale(.65); } .auth-particles i:nth-child(3) { top: 12%; left: 66%; animation-delay: -4s; transform: scale(.8); } .auth-particles i:nth-child(4) { top: 42%; left: 12%; animation-delay: -6s; transform: scale(.55); } .auth-particles i:nth-child(5) { top: 54%; left: 39%; animation-delay: -1s; } .auth-particles i:nth-child(6) { top: 76%; left: 18%; animation-delay: -3s; transform: scale(.7); } .auth-particles i:nth-child(7) { top: 82%; left: 74%; animation-delay: -5s; } .auth-particles i:nth-child(8) { top: 31%; left: 82%; animation-delay: -7s; transform: scale(.58); }
.auth-gate-layout { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr) minmax(22rem,31rem); align-items: center; gap: clamp(3rem,10vw,11rem); width: min(1180px, calc(100% - 4rem)); margin: 0 auto; padding: 5rem 0 6rem; }
.auth-brand-story { max-width: 38rem; } .auth-brand { display: inline-flex; align-items: center; gap: .75rem; color: #fff; font-size: 1.5rem; font-weight: 800; letter-spacing: -.06em; text-decoration: none; } .auth-brand > span:last-child > span { color: #f4c98f; }
.auth-brand-mark { display: grid; width: 2.75rem; height: 2.75rem; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: .85rem; color: #fff; font-size: 1.45rem; letter-spacing: 0; transform: rotate(-7deg); background: linear-gradient(135deg,#e07a5f,#c75f47); box-shadow: 0 0 0 7px rgba(224,122,95,.12), 0 8px 28px rgba(0,0,0,.2); }
.auth-brand-story > .eyebrow { margin-top: clamp(4rem,11vh,8rem); color: #a9eee2; } .auth-brand-story h1 { max-width: 38rem; margin: 0; color: #fff; font-size: clamp(2.8rem,5vw,5.25rem); font-weight: 700; letter-spacing: -.075em; line-height: .98; } .auth-brand-story h1 em { display: block; color: #f4c98f; font-style: normal; } .auth-brand-lede { max-width: 31rem; margin: 2rem 0 0; color: rgba(232,250,247,.75); font-size: 1.05rem; line-height: 1.7; }
.auth-tutor-badge { display: inline-flex; align-items: center; gap: .85rem; margin-top: 3rem; padding: .65rem 1rem .65rem .65rem; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(255,255,255,.08); backdrop-filter: blur(16px); } .auth-tutor-avatar { display: grid; width: 2.8rem; height: 2.8rem; place-items: center; border-radius: 50%; color: #fff; font-size: 1.1rem; font-weight: 800; background: linear-gradient(135deg,#e07a5f,#a44854); box-shadow: 0 0 0 5px rgba(224,122,95,.16); } .auth-tutor-badge strong, .auth-tutor-badge small { display: block; } .auth-tutor-badge strong { color: #fff; font-size: .92rem; } .auth-tutor-badge small { margin-top: .2rem; color: rgba(232,250,247,.68); font-size: .875rem; } .auth-tutor-badge > i { width: .5rem; height: .5rem; margin-left: .6rem; border-radius: 50%; background: #77e0a3; box-shadow: 0 0 0 5px rgba(119,224,163,.13); animation: auth-dot-pulse 2.2s ease-in-out infinite; }
.auth-gate-card { color: #18323a; padding: clamp(2rem,4vw,3rem); border: 1px solid rgba(255,255,255,.68); border-radius: 1.5rem; background: rgba(255,253,248,.96); box-shadow: 0 2rem 5rem rgba(3,21,29,.32), 0 0 0 1rem rgba(255,255,255,.03); backdrop-filter: blur(24px); animation: auth-card-enter 560ms cubic-bezier(.2,.8,.2,1) both; } .auth-gate-heading h2 { margin: 0; color: #18323a; font-size: clamp(1.8rem,3vw,2.4rem); letter-spacing: -.055em; line-height: 1.05; } .auth-gate-heading > p:last-child { margin: .9rem 0 0; color: #5d7278; font-size: .95rem; line-height: 1.55; } .auth-gate-card .eyebrow { color: #155e75; }
.auth-gate-form { display: grid; gap: .55rem; margin-top: 2rem; } .auth-gate-form > label { margin-top: .6rem; color: #18323a; font-size: .875rem; font-weight: 700; } .auth-gate-form input { width: 100%; min-height: 3.2rem; border: 1px solid #dbe6e7; border-radius: .7rem; outline: 0; padding: .8rem .95rem; color: #18323a; background: rgba(255,255,255,.82); } .auth-gate-form input:focus { border-color: #2b8794; box-shadow: 0 0 0 3px rgba(21,94,117,.55); }
.auth-password-wrap { position: relative; } .auth-password-wrap input { padding-right: 3.2rem; } .auth-password-toggle { position: absolute; top: 50%; right: .8rem; display: grid; width: 2rem; height: 2rem; place-items: center; border: 0; border-radius: .45rem; color: #5d7278; cursor: pointer; background: transparent; transform: translateY(-50%); } .auth-password-toggle:hover { color: #155e75; background: #f4f8f8; }
.auth-gate-options { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .8rem; color: #5d7278; font-size: .875rem; } .auth-gate-options a, .auth-signup a { color: #155e75; font-weight: 700; text-decoration: none; } .auth-remember { display: inline-flex; align-items: center; gap: .45rem; } .auth-remember input { width: auto; min-height: 0; accent-color: #155e75; }
.auth-gate-submit, .auth-sso-button { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 3.2rem; border-radius: .7rem; cursor: pointer; font-size: .9rem; font-weight: 700; } .auth-gate-submit { gap: 1rem; margin-top: 1.15rem; border: 0; color: #fff; background: linear-gradient(135deg,#e07a5f,#c75f47); box-shadow: 0 .7rem 1.2rem rgba(199,95,71,.22); transition: transform 160ms ease, box-shadow 160ms ease; } .auth-gate-submit:hover { box-shadow: 0 .9rem 1.5rem rgba(199,95,71,.32); transform: translateY(-2px); } .auth-gate-submit:disabled, .auth-sso-button:disabled { cursor: not-allowed; opacity: .62; }
.auth-gate-form .auth-message { margin: .8rem 0 0; padding: .65rem .7rem; border-radius: .45rem; } .auth-gate-form .auth-message.is-error { border: 1px solid #e2b9b3; background: #f9e8e4; color: #863d3b; } .auth-gate-form .auth-message.is-success { border: 1px solid #b8d1bd; background: #e3f2ed; color: #35634e; } .auth-connection-status { display: flex; align-items: center; gap: .5rem; margin: .8rem 0 0; color: #5d7278; font-size: .875rem; } .auth-connection-status i { width: .45rem; height: .45rem; border-radius: 50%; background: #d8b26e; box-shadow: 0 0 0 4px rgba(216,178,110,.15); animation: auth-connection-pulse 1.6s ease-in-out infinite; }
.auth-divider { display: flex; align-items: center; gap: .75rem; margin: 1.35rem 0; color: #5d7278; font-size: .875rem; } .auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: #dbe6e7; content: ""; } .auth-sso-button { gap: .65rem; border: 1px solid #dbe6e7; color: #18323a; background: rgba(255,255,255,.65); } .auth-sso-button > span { color: #4285f4; font-size: 1.1rem; font-weight: 800; } .auth-sso-button small { margin-left: .2rem; color: #5d7278; font-size: .65rem; font-weight: 500; }
.auth-signup { margin: 1.65rem 0 0; color: #5d7278; font-size: .875rem; text-align: center; } .auth-note { max-width: 19rem; margin: 1.4rem auto 0; color: #5d7278; font-size: .875rem; line-height: 1.5; text-align: center; } .auth-gate-footer { position: absolute; z-index: 1; right: 2rem; bottom: 1.5rem; left: 2rem; display: flex; justify-content: center; gap: .65rem; color: rgba(232,250,247,.62); font-size: .875rem; } .auth-gate-footer a { text-decoration: none; }
@keyframes auth-card-enter { from { opacity: 0; transform: translateY(1rem) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } } @keyframes auth-float-coral { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(8rem,4rem,0) scale(1.12); } } @keyframes auth-float-gold { from { transform: translate3d(0,0,0) scale(.98); } to { transform: translate3d(-7rem,-4rem,0) scale(1.1); } } @keyframes auth-float-teal { from { transform: translate3d(-2rem,1rem,0) scale(.9); } to { transform: translate3d(5rem,-4rem,0) scale(1.08); } } @keyframes auth-grid-drift { from { background-position: 0 0; } to { background-position: 0 58px; } } @keyframes auth-line-pulse { 0%,100% { opacity: .12; } 50% { opacity: .55; } } @keyframes auth-particle-float { 0%,100% { margin-top: 0; opacity: .35; } 50% { margin-top: -1.1rem; opacity: .95; } } @keyframes auth-dot-pulse { 0%,100% { box-shadow: 0 0 0 4px rgba(119,224,163,.1); } 50% { box-shadow: 0 0 0 8px rgba(119,224,163,.03); } } @keyframes auth-connection-pulse { 0%,100% { opacity: .45; } 50% { opacity: 1; } }
@media (max-width: 900px) { .auth-gate-layout { grid-template-columns: minmax(0,1fr) minmax(20rem,28rem); gap: 3rem; } .auth-brand-story h1 { font-size: clamp(2.6rem,5vw,4rem); } }
@media (max-width: 720px) { .auth-gate { overflow: auto; } .auth-gate-layout { grid-template-columns: 1fr; gap: 2.5rem; width: min(calc(100% - 2rem),34rem); padding: 2.5rem 0 5rem; } .auth-brand-story > .eyebrow { margin-top: 3.5rem; } .auth-brand-story h1 { font-size: clamp(2.6rem,12vw,4rem); } .auth-tutor-badge { margin-top: 2rem; } .auth-gate-card { padding: 1.65rem; border-radius: 1.2rem; } .auth-gate-footer { position: relative; right: auto; bottom: auto; left: auto; padding: 0 1rem 1.5rem; } }
@media (max-width: 420px) { .auth-gate-layout { width: min(calc(100% - 1.25rem),34rem); } .auth-gate-card { padding: 1.35rem; } .auth-gate-options { align-items: flex-start; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { .auth-gate *, .auth-gate *::before, .auth-gate *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; } }

.auth-form-hint { margin: -.2rem 0 .35rem; color: #5d7278; font-size: .875rem; }
.auth-captcha { display: grid; justify-items: center; gap: .35rem; margin: .45rem 0 .15rem; min-height: 82px; }
.auth-captcha small, .auth-captcha-missing { color: #5d7278; font-size: .68rem; text-align: center; }
.auth-captcha-missing { margin: .55rem 0 .2rem; }
.auth-captcha [data-captcha-widget] { width: min(303px, 100%); min-height: 78px; }
.public-recovery-form > .auth-captcha { display: grid; justify-items: center; align-items: center; gap: .35rem; margin: .85rem 0; }
.public-recovery-form .auth-captcha small, .public-recovery-form .auth-captcha-missing { color: #d9d9e8; }
.auth-register-gate .auth-sso-button { margin-top: 0; }

.auth-confirmation-icon { display: grid; width: 3.4rem; height: 3.4rem; place-items: center; margin-bottom: 1.35rem; border: 1px solid #dbe6e7; border-radius: 50%; color: #155e75; background: #eef8f7; font-size: 1.35rem; font-weight: 800; }
.auth-confirmation-icon.is-confirmed { border-color: #b8d1bd; color: #35634e; background: #e3f2ed; }
.auth-confirmation-icon.is-error { border-color: #e2b9b3; color: #863d3b; background: #f9e8e4; }
.auth-confirmation-action { margin-top: 1.4rem; text-decoration: none; }

.auth-gate-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .28; filter: saturate(.85) contrast(1.08); }
.auth-gate-background::before { position: absolute; z-index: 1; inset: 0; content: ""; background: linear-gradient(90deg, rgba(4,25,34,.82), rgba(4,25,34,.3) 52%, rgba(4,25,34,.72)), linear-gradient(0deg, rgba(4,25,34,.48), transparent 44%); pointer-events: none; }
@media (max-width: 720px) { .auth-gate-video { object-position: center; opacity: .2; } }
@media (prefers-reduced-motion: reduce) { .auth-gate-video { display: none; } }

/* Identidad ContaIA · opción E */
.auth-brand-mark { overflow: hidden; padding: .22rem; border: 1px solid rgba(255,255,255,.42); border-radius: .9rem; background: rgba(4,25,34,.34); box-shadow: 0 0 0 7px rgba(31,190,184,.10), 0 8px 28px rgba(0,0,0,.2); transform: rotate(-3deg); animation: contaia-logo-enter 700ms cubic-bezier(.2,.8,.2,1) both; }
.auth-brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; animation: contaia-logo-breathe 5s ease-in-out 800ms infinite; }
.auth-brand-mark .brand-logo { display: block; width: 100%; height: 100%; }
.auth-brand:hover .auth-brand-mark { transform: rotate(0deg) scale(1.05); transition: transform 180ms ease; }
@keyframes contaia-logo-enter { from { opacity: 0; transform: translateY(-.65rem) rotate(-10deg) scale(.8); } to { opacity: 1; transform: translateY(0) rotate(-3deg) scale(1); } }
@keyframes contaia-logo-breathe { 0%,100% { transform: scale(1); } 50% { transform: scale(1.045); } }
@media (prefers-reduced-motion: reduce) { .auth-brand-mark, .auth-brand-mark img { animation: none !important; } .auth-brand:hover .auth-brand-mark { transform: none; } }


/* Acceso ContaIA · opción bosque y lima */
.auth-gate { background: radial-gradient(circle at 13% 18%, rgba(178,217,109,.2), transparent 28rem), linear-gradient(120deg, #102f25, #1d684f 48%, #154c3b); }
.auth-orb-coral { background: #789b45; }
.auth-orb-gold { background: #b2d96d; }
.auth-orb-teal { background: #3d8b62; }
.auth-brand > span:last-child > span, .auth-brand-story h1 em { color: #c8e78b; }
.auth-brand-mark, .auth-tutor-avatar { background: linear-gradient(135deg, #1d684f, #6b963d); }
.auth-brand-mark { box-shadow: 0 0 0 7px rgba(178,217,109,.12), 0 8px 28px rgba(0,0,0,.2); }
.auth-tutor-avatar { box-shadow: 0 0 0 5px rgba(178,217,109,.16); }
.auth-gate-card { background: rgba(250,253,247,.97); }
.auth-gate-card .eyebrow, .auth-gate-options a, .auth-signup a { color: #1d684f; }
.auth-gate-form input:focus { border-color: #1d684f; box-shadow: 0 0 0 4px rgba(29,104,79,.15); }
.auth-password-toggle:hover { color: #1d684f; background: #edf5e9; }
.auth-remember input { accent-color: #1d684f; }
.auth-gate-submit { background: linear-gradient(135deg, #1d684f, #327d51); box-shadow: 0 .7rem 1.2rem rgba(29,104,79,.24); transition: transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms ease, background-color 180ms ease; }
.auth-gate-submit:hover { box-shadow: 0 .9rem 1.5rem rgba(29,104,79,.32); }
.auth-gate-submit:active:not(:disabled), .auth-sso-button:active:not(:disabled), .auth-button:active:not(:disabled) { transform: scale(.985); }
.auth-connection-status i { background: #b2d96d; box-shadow: 0 0 0 4px rgba(178,217,109,.16); }
.auth-confirmation-icon { border-color: #c8ddc6; color: #1d684f; background: #edf5e9; }

.auth-sso-button { transition: transform 180ms cubic-bezier(.2,.8,.2,1), box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease; }
