/* Acceso y alta comparten la composición de marca; el resto de la app conserva app.css. */
.auth-page { background: var(--bg); }
.auth-page .centered-shell { min-height: 100dvh; padding: 28px; }
.auth-page .brand-hero {
  max-width: 1000px; grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border); border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.auth-register .centered-shell { align-items: flex-start; }
.auth-register .brand-hero { max-width: 1220px; grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr); }
.auth-page .brand-side {
  position: relative; isolation: isolate; overflow: hidden;
  align-items: center; gap: 20px; text-align: center;
  padding: 54px 40px; color: #fff;
  background: linear-gradient(145deg, #33414e, #202b35 72%, #1c242d);
}
.auth-page .brand-side::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 72% 58% at 50% 30%, rgba(225,239,246,.17), transparent 80%);
}
.auth-page .brand-side::after {
  content: ''; position: absolute; inset: -20% -65%; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(245,250,252,.09) 50%, transparent 58%);
  transform: translateX(-75%);
}
.auth-page .brand-side > * { position: relative; }
:root[data-theme="light"] .auth-page .brand-side {
  background: linear-gradient(145deg, #d7dfe2, #b9c9d1 58%, #9baebb); color: #202b35;
}
:root[data-theme="light"] .auth-page .brand-side::before {
  background: radial-gradient(ellipse 75% 60% at 50% 30%, rgba(255,255,255,.55), transparent 78%);
}
:root[data-theme="light"] .auth-page .brand-side::after {
  background: linear-gradient(105deg, transparent 42%, rgba(255,255,255,.2) 50%, transparent 58%);
}
:root[data-theme="light"] .auth-page .brand-side .muted { color: #30404c; }
:root[data-theme="light"] .auth-page .brand-hero { box-shadow: 0 18px 48px rgba(24,35,45,.14); }
.auth-register .brand-side { justify-content: center; }
.auth-wordmark { display: block; width: min(270px, 88%); height: auto; }
.auth-login .auth-wordmark { width: min(340px, 90%); }
@media (prefers-reduced-motion: no-preference) {
  .auth-wordmark { animation: auth-logo-enter .8s .2s ease-out both; }
  .auth-page .brand-side::after { animation: auth-sheen 18s .25s infinite; }
}
.auth-page .brand-side .muted { color: rgba(255,255,255,.82); max-width: 340px; margin: 0; font-size: 1rem; line-height: 1.5; }
.auth-page .form-side { min-width: 0; padding: 42px clamp(28px, 4vw, 52px); background: var(--bg-panel); }
.auth-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; margin-bottom: 12px; }
.auth-recovery .auth-head { grid-template-columns: minmax(0, 1fr) auto auto; }
.auth-recovery .auth-head h2 { grid-column: 1 / -1; }
.auth-recovery .auth-head [data-lang-mount] { grid-column: 2; }
.auth-recovery .auth-head [data-theme-mount] { grid-column: 3; }
.auth-head h2 { margin: 0; padding: 0; border: 0; font-size: clamp(1.4rem, 2.3vw, 1.85rem); line-height: 1.15; text-transform: none; letter-spacing: 0; }
.auth-intro { margin: 0 0 24px; color: var(--text-muted); font-size: .9rem; line-height: 1.5; }
.auth-field { min-width: 0; margin-bottom: 16px; }
.auth-field label { margin: 0 0 7px; font-size: .84rem; font-weight: 600; }
.auth-field input, .auth-field select {
  min-height: 48px; padding: 11px 14px; background: var(--bg-panel-2);
  border-radius: 10px; transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.auth-field input:focus, .auth-field select:focus {
  border-color: var(--primary); background: var(--bg-panel);
  box-shadow: 0 0 0 3px var(--primary-dim);
}
.auth-password { position: relative; }
.auth-password input { padding-right: 52px; }
.auth-eye {
  position: absolute; top: 50%; right: 7px; transform: translateY(-50%);
  display: grid; place-items: center; width: 38px; height: 38px;
  padding: 0; margin: 0; background: transparent; color: var(--text-muted); border: 0;
  font-size: 1.2rem;
}
.auth-eye:hover, .auth-eye[aria-pressed="true"] { color: var(--primary); }
.auth-forgot { margin: -4px 0 20px; text-align: right; font-size: .82rem; }
.auth-submit { display: block; width: 100%; min-height: 52px; margin: 0; font-size: 1rem; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--text-faint); font-size: .8rem; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-secondary {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 50px; margin-top: 10px; padding: 10px 16px;
  border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); background: var(--bg-panel-2); text-decoration: none; font-weight: 600;
}
.auth-secondary:hover { border-color: var(--primary); color: var(--primary); }
.auth-create { border-color: var(--primary); background: transparent; color: var(--primary); }
.auth-section-title { display: flex; align-items: center; gap: 10px; margin: 22px 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.auth-section-title span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--primary-dim); color: var(--primary); font: 700 .76rem var(--font-mono); }
.auth-section-title h3 { margin: 0; font-size: 1rem; }
.auth-section-note { margin: 0 0 16px; color: var(--text-muted); font-size: .84rem; line-height: 1.5; }
.auth-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
.auth-form-grid .auth-wide, .auth-strength { grid-column: 1 / -1; }
.auth-strength { margin: -7px 0 6px; }
.auth-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.auth-meter span { height: 4px; border-radius: 4px; background: var(--border); transition: background-color .18s; }
.auth-meter[data-score="1"] span:first-child { background: var(--primary); }
.auth-meter[data-score="2"] span:nth-child(-n+2) { background: var(--warning); }
.auth-meter[data-score="3"] span:nth-child(-n+3),
.auth-meter[data-score="4"] span { background: var(--success); }
.auth-strength p { min-height: 1em; margin: 6px 0 0; color: var(--text-muted); font-size: .76rem; }
.auth-trial { margin: 10px 0 18px; padding: 14px 16px; border: 1px solid var(--primary-dim); border-radius: 10px; background: var(--primary-dim); color: var(--text); font-size: .84rem; line-height: 1.5; }
#turnstileWidget { margin: 16px 0; }
.auth-back { margin: 18px 0 0; text-align: center; color: var(--text-muted); font-size: .86rem; }
.auth-success { margin: 18px 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-panel-2); color: var(--success); line-height: 1.5; }
.auth-invalid-link { margin: 22px 0; padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-panel-2); line-height: 1.5; }
.auth-invalid-link p { margin: 0 0 14px; }
.auth-page .error:empty { display: none; }
.auth-page #rfTaxIdFormatError { margin: 5px 0 0; font-size: .76rem; }

@keyframes auth-enter { from { opacity: 0; transform: translateY(14px); } }
@keyframes auth-sheen {
  0% { transform: translateX(-75%); }
  10% { transform: translateX(75%); }
  100% { transform: translateX(75%); }
}
@keyframes auth-reveal { from { opacity: 0; transform: translateY(8px); } }
@keyframes auth-logo-enter { from { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .auth-page .brand-hero { animation: auth-enter .8s cubic-bezier(.16,1,.3,1) both; }
  .auth-page .brand-side .muted, .auth-page .auth-head h2 { animation: auth-reveal .7s .2s ease-out both; }
  .auth-page .auth-submit, .auth-secondary { transition: transform .2s, box-shadow .2s, border-color .2s, color .2s; }
  .auth-page .auth-submit:hover, .auth-secondary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0,0,0,.15); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page .brand-side::after { animation: none; }
  .auth-field input, .auth-field select, .auth-meter span { transition: none; }
}
@media (max-width: 760px) {
  .auth-page .centered-shell { padding: 12px; align-items: flex-start; }
  .auth-page .brand-hero { grid-template-columns: 1fr; max-width: 580px; }
  .auth-page .brand-side, .auth-register .brand-side { gap: 12px; padding: 28px 24px; }
  .auth-wordmark { width: 190px; }
  .auth-page .brand-side .muted { font-size: .84rem; }
  .auth-page .form-side { padding: 28px 24px; }
}
@media (max-width: 600px) {
  .auth-head { grid-template-columns: 1fr auto; }
  .auth-head h2 { grid-column: 1 / -1; }
  .auth-form-grid { grid-template-columns: 1fr; }
  .auth-form-grid .auth-wide, .auth-strength { grid-column: auto; }
}
@media (orientation: landscape) and (max-width: 900px) and (max-height: 600px) {
  .auth-page .centered-shell { align-items: flex-start; }
  .auth-page .brand-side { padding: 28px 24px; }
  .auth-register .brand-side { padding: 20px 16px; }
}
