.auth-transition { display: none; }
html[data-auth-transition] .auth-shell { display: none; }
html[data-auth-transition] .auth-transition {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}
.auth-transition-card {
  display: grid;
  justify-items: center;
  gap: 24px;
  width: min(100%, 400px);
  text-align: center;
  overflow-wrap: anywhere;
}
.auth-transition-card img { border-radius: 24px; }
.auth-transition-card h1 { font-size: clamp(1.4rem, 5vw, 1.85rem); margin: 0 0 8px; }
.auth-transition-card p { color: var(--muted); margin: 0; line-height: 1.5; }
.auth-transition-card button { min-height: 44px; max-width: 100%; }
.auth-transition-card button:disabled { opacity: .6; cursor: wait; }
#auth-transition-slow { margin-top: 18px; font-size: .9rem; }
.auth-shell .auth-retry { width: 100%; min-height: 48px; margin-bottom: 16px; border: 1px solid var(--brand-deep); }
.auth-shell .notice.error { font-size: .85rem; line-height: 1.5; }
.auth-transition-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: auth-transition-spin 1s linear infinite;
}
@keyframes auth-transition-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-transition-spinner { animation: none; } }

.auth-story {
  /* This brand panel stays dark, independently of the form's selected theme. */
  --text: #f3faf6;
  --muted: #abc0b4;
  --brand: #47d994;
  color: var(--text);
}

.auth-panel {
  align-content: center;
  gap: 16px;
}

.auth-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  width: min(450px, 100%);
  min-width: 0;
}

.auth-controls .locale-row {
  position: static;
  gap: 2px;
}

.auth-controls .locale-row a,
.auth-controls .icon-button {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
}

.auth-shell { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
:root[data-theme=light] .auth-shell { --brand-deep: #08794c; }
.auth-shell > * { min-width: 0; }
.auth-shell .auth-story {
  padding: 130px clamp(32px, 5.5vw, 88px) 50px;
  background: radial-gradient(circle at 20% 10%, rgba(71,217,148,.2), transparent 33%), linear-gradient(145deg, #07100c, #11261c);
  justify-content: center;
}
.auth-shell .auth-story .brand { top: 36px; left: clamp(32px, 5.5vw, 88px); }
.auth-story .brand img { width: 128px; }
.auth-shell .auth-story h1 {
  font-size: clamp(2.7rem, 5vw, 5.4rem);
  line-height: 1; letter-spacing: normal; margin: 18px 0 24px;
  overflow-wrap: break-word; hyphens: auto; text-wrap: balance;
}
.auth-shell .auth-story-copy { font-size: clamp(1rem, 1.3vw, 1.2rem); line-height: 1.65; max-width: 680px; margin-bottom: 38px; }
.auth-shell .auth-panel { padding: 28px clamp(24px, 4vw, 68px) 40px; gap: 22px; }
.auth-shell .auth-controls { width: min(480px, 100%); margin-bottom: 0; }
.auth-shell .auth-card { width: min(480px, 100%); padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.auth-shell .auth-card h2 { font-size: clamp(1.5rem, 2.25vw, 2rem); letter-spacing: -.035em; line-height: 1.2; }
.auth-shell .auth-card > p { font-size: .88rem; margin-bottom: 22px; }
.auth-shell .auth-card input { border-radius: 7px; min-height: 46px; background: var(--surface); margin-top: 2px; }
.auth-shell .auth-card label { font-weight: 600; }
/* Labels remain inside the field, including after typing or autofill. */
.auth-shell .auth-card .auth-input-field { display: block; position: relative; }
.auth-shell .auth-input-field input { height: 58px; margin: 0; padding: 23px 13px 8px; }
.auth-input-field > .field-label {
  position: absolute; top: 50%; left: 14px; right: 14px;
  transform: translateY(-50%); pointer-events: none;
  font-size: .83rem; line-height: 1.25; transition: top .15s, transform .15s, font-size .15s;
}
.auth-input-field input:focus + .field-label,
.auth-input-field input:not(:placeholder-shown) + .field-label {
  top: 9px; transform: none; font-size: .65rem;
}
.auth-input-help { display: block; color: var(--muted); font-size: .72rem; line-height: 1.5; margin: -6px 0 12px; }
@media (prefers-reduced-motion: reduce) { .auth-input-field > .field-label { transition: none; } }
.auth-shell .auth-card .social { background: var(--surface); color: var(--text); box-shadow: 0 2px 3px #0c251a04; min-height: 48px; font-size: .86rem; }
.auth-shell .auth-card .social:hover { background: var(--surface-2); border-color: var(--brand-deep); }
.auth-shell .auth-card .primary { display: flex; gap: 18px; align-items: center; justify-content: center; min-height: 48px; box-shadow: none; font-size: .9rem; }
.auth-shell .auth-card .legal-check { font-size: .74rem; line-height: 1.6; font-weight: 400; margin-top: 20px; }
.auth-shell .auth-card .legal-check input { min-height: 18px; accent-color: var(--brand-deep); margin-top: 3px; }
.auth-shell .legal-check a,.auth-controls .locale-row a[aria-current=page] { color: var(--brand-deep); }
.auth-shell .primary:hover { background: #35c785; color: #fff; }
.auth-shell .social-consent-help { padding: 0; margin: 10px 0 0; border: 0; background: none; font-size: .72rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.auth-shell .social-consent-help span { width: auto; height: auto; background: none; }
.auth-shell .social-consent-help p { margin: 0; }
.auth-shell .divider { margin: 20px 0; }
.auth-forgot { display: block; margin: -4px 0 0 auto; padding: 4px 0; background: none; border: 0; color: var(--brand-deep); font-size: .77rem; font-weight: 600; cursor: pointer; min-height: 30px; }
.auth-shell .auth-card > .auth-email-hint { margin: 12px 0 0; text-align: center; font-size: .72rem; line-height: 1.55; }
.auth-entry-note { width: min(480px, 100%); padding-top: 22px; border-top: 1px solid var(--line); font-size: .78rem; line-height: 1.6; color: var(--muted); }
.auth-entry-note strong { color: var(--text); }
.auth-entry-note p { margin: 5px 0 9px; }
.auth-entry-note a { color: var(--brand-deep); text-decoration: none; font-weight: 700; }
.auth-panel .mobile-logo { display: none; }
.auth-panel .toolbox-install { order: 10; }
.auth-dialog { width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: 0 30px 120px #0005; }
.auth-dialog::backdrop { background: #07170eb3; backdrop-filter: blur(5px); }
.auth-dialog-mark { display: grid; place-items: center; width: 42px; height: 42px; background: var(--surface-2); color: var(--brand-deep); border-radius: 12px; font-size: 1.25rem; }
.auth-dialog h2 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -.025em; margin: 18px 0 12px; }
.auth-dialog p { color: var(--muted); font-size: .88rem; line-height: 1.6; }
.auth-dialog .legal-check { display: flex; align-items: flex-start; gap: 12px; margin: 22px 0; line-height: 1.65; font-size: .8rem; }
.auth-dialog .legal-check input { width: 20px; height: 20px; flex: 0 0 20px; margin: 3px 0 0; accent-color: var(--brand-deep); }
.auth-dialog .primary { width: 100%; line-height: 1.4; }
.auth-dialog a { color: var(--brand-deep); }
#recovery-fields { padding: 0; margin: 0; border: 0; min-width: 0; }
.recovery-notice { color: var(--brand-deep); padding: 14px; background: var(--surface-2); border-radius: 7px; font-size: .8rem; line-height: 1.6; margin-bottom: 18px; }
@media (max-width: 960px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-shell .auth-story { display: flex; padding: 28px 24px 30px; }
  .auth-shell .auth-story .brand { position: static; margin-bottom: 24px; }
  .auth-shell .auth-story .eyebrow { font-size: .65rem; }
  .auth-shell .auth-story h1 { font-size: clamp(1.9rem, 7.5vw, 3rem); margin: 12px 0 16px; max-width: 580px; }
  .auth-shell .auth-story-copy { font-size: .87rem; max-width: 600px; margin: 0; }
  .auth-story .auth-capabilities { display: none; }
  .auth-shell .auth-panel { padding: 18px 24px 34px; gap: 20px; }
  .auth-shell .auth-controls { justify-content: space-between; }
}
.auth-access-page { max-width:780px; padding:40px 24px 64px; margin:auto; }
.auth-access-page>.locale-row { margin:28px 0; justify-content:flex-start; }
.auth-access-page>a>img { width:120px; height:auto; }
.auth-access-card { padding:32px; background:var(--panel); border:1px solid var(--line); border-radius:18px; }
.auth-access-card h1 { font-size:clamp(27px,4vw,38px); line-height:1.2; letter-spacing:-.035em; margin:14px 0 22px; }
.auth-access-card p { line-height:1.7; color:var(--muted); }
.auth-access-account { margin-top:24px; overflow-wrap:anywhere; }
.auth-access-actions { display:grid; justify-items:start; gap:16px; margin-top:28px; }
.auth-access-actions a { text-decoration:none; max-width:100%; }
@media(max-width:540px) { .auth-access-card { padding:24px 18px; } }
@media(max-width:960px) {
  html[data-auth-returning] .auth-shell .auth-story { padding: 20px 24px; }
  html[data-auth-returning] .auth-story .brand { margin: 0; }
  html[data-auth-returning] .auth-story > :not(.brand) { display: none; }
}
@media(prefers-reduced-motion:reduce) { .auth-shell .is-processing:after { animation: none; } }
