/* Only login.html and register.html load this stylesheet. */
html body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body .page-bg {
  min-height: calc(100vh - 78px);
  padding-bottom: 0;
  background: radial-gradient(ellipse at 50% 16%, rgba(37, 99, 235, .14), transparent 55%), var(--kyro-bg);
}
body .page-bg::before { display: none; }
body .content-wrap { width: 100%; padding: 80px 24px 96px; animation: none; }
body .flash-stack { width: min(100%, 620px); margin: 0 auto 28px; }
body .flash-alert { border-radius: 16px; padding: 18px 22px; box-shadow: none; overflow-wrap: anywhere; }
body :is(a, button, select, input):focus-visible { outline: 3px solid var(--kyro-cyan); outline-offset: 4px; }

.auth-shell { position: relative; isolation: isolate; width: 100%; display: flex; justify-content: center; }
.auth-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 65px;
  /* Reserve horizontal space for the rotated ellipse's 350px height. */
  width: min(1040px, calc(100% - 96px));
  height: 350px;
  border: 1px solid rgba(96, 165, 250, .09);
  border-radius: 50%;
  transform: rotate(-12deg);
  pointer-events: none;
}
.auth-panel {
  width: 100%;
  max-width: 560px;
  padding: 48px;
  border: 1px solid var(--kyro-border);
  border-radius: 28px;
  background: rgba(11, 18, 32, .97);
  box-shadow: 0 24px 64px rgba(2, 6, 23, .24);
  min-width: 0;
}
.auth-shell--register .auth-panel { max-width: 620px; }
.auth-eyebrow { margin: 0 0 18px; text-align: center; color: var(--kyro-cyan); font-size: .78rem; font-weight: 700; letter-spacing: .22em; }
.auth-title { margin: 0 0 40px; color: var(--kyro-text); text-align: center; font-size: clamp(2.5rem, 4vw, 3.4rem); font-weight: 750; letter-spacing: -.045em; line-height: 1.12; overflow-wrap: anywhere; }
.auth-panel .field-group { margin: 0 0 24px; }
.auth-panel .field-label { margin-bottom: 9px; color: #e2e8f0; font-size: .96rem; font-weight: 600; }
.auth-panel .field-input {
  min-height: 54px;
  padding: 14px 16px;
  border: 1px solid rgba(148, 163, 184, .3);
  border-radius: 14px;
  background: #070e1b;
  color: var(--kyro-text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.auth-panel .field-input::placeholder { color: var(--kyro-muted-2); opacity: 1; }
.auth-panel .field-input:hover { border-color: rgba(96, 165, 250, .55); }
.auth-panel .field-input:focus { border-color: var(--kyro-blue-light); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.auth-panel .primary-action {
  min-height: 54px;
  margin-top: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--kyro-blue), #1d4ed8);
  font: inherit;
  font-weight: 650;
  line-height: 1.4;
  transition: background .2s ease, transform .2s ease;
}
.auth-panel .primary-action:hover { background: #1d4ed8; transform: translateY(-1px); box-shadow: none; }
.auth-panel a { color: #93c5fd; text-decoration: underline; text-underline-offset: 4px; }
.auth-panel a:hover { color: var(--kyro-cyan); }
.auth-recovery { margin: 16px 0 0; text-align: center; }
.auth-recovery a, .auth-switch a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-switch { margin: 24px 0 0; padding-top: 24px; border-top: 1px solid var(--kyro-border); text-align: center; color: var(--kyro-muted); line-height: 1.6; }
.auth-switch a { margin-left: 5px; }
.auth-plan { margin-bottom: 32px; padding: 22px 24px; border: 1px solid rgba(96, 165, 250, .2); border-radius: 18px; background: rgba(37, 99, 235, .07); line-height: 1.6; }
.auth-plan span, .auth-plan strong { display: block; }
.auth-plan-title { color: #dbeafe; font-size: 1.05rem; margin-bottom: 10px; }
.auth-plan-details { color: var(--kyro-text); margin-bottom: 8px; }
.auth-plan-note { color: var(--kyro-muted); font-size: .92rem; }
.auth-founder-note { color: #fcd34d; font-size: .92rem; margin-bottom: 8px; }
.auth-consent { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; min-height: 44px; color: var(--kyro-muted); font-size: .95rem; line-height: 1.6; cursor: pointer; }
.auth-consent input { flex: 0 0 auto; width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--kyro-blue); cursor: pointer; }
.auth-consent span { min-width: 0; }
.auth-captcha { margin: 24px 0; }
.auth-data-note { margin: 24px 0 0; color: var(--kyro-muted); font-size: .88rem; line-height: 1.65; }

@media (max-width: 768px) {
  body .content-wrap { padding: 56px 24px 72px; }
  .auth-panel { padding: 40px; }
  .auth-shell::before { display: none; }
}
@media (max-width: 480px) {
  body .content-wrap { padding: 32px 16px 48px; }
  .auth-panel { padding: 32px 22px; border-radius: 24px; }
  .auth-title { font-size: 2.5rem; margin-bottom: 32px; }
  .auth-eyebrow { margin-bottom: 14px; }
  .auth-plan { padding: 18px; margin-bottom: 28px; }
  body .flash-alert { padding: 16px 18px; }
}
/* Leave the provider's native 304px CAPTCHA at its original size. */
@media (max-width: 389px) {
  body .content-wrap { padding-left: 8px; padding-right: 8px; }
  .auth-panel { padding-left: 14px; padding-right: 14px; }
}
@media (max-width: 349px) {
  body .content-wrap { padding-left: 0; padding-right: 0; }
  .auth-panel { padding-left: 7px; padding-right: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
