.auth-page [hidden] { display: none !important; }
.auth-header, .auth-layout, .auth-footer { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 26px; border-bottom: 1px solid var(--border); }
.auth-header img { width: 160px; height: 52px; object-fit: contain; }
.back-link { font-size: 13px; color: var(--text-soft); }
.back-link span { padding-inline-start: 10px; color: var(--blue-bright); }
.auth-layout { display: grid; grid-template-columns: .95fr 1.05fr; align-items: start; gap: 64px; padding-block: 76px 88px; }
.auth-intro { position: sticky; top: 40px; padding-block-start: 36px; }
.auth-page .eyebrow { display: block; color: var(--blue-bright); font-size: 11px; letter-spacing: .13em; margin-block-end: 16px; }
.auth-intro h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.6; letter-spacing: -.04em; margin-block-end: 24px; }
.auth-intro > p { color: var(--text-soft); max-width: 420px; line-height: 2.15; }
.intro-note { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); margin-block: 36px 18px; padding-block-start: 22px; font-size: 13px; }
.status-dot { display: inline-block; width: 7px; height: 7px; background: var(--blue-bright); border-radius: 50%; box-shadow: 0 0 14px #169cff55; flex-shrink: 0; }
.auth-page .muted, .auth-page .field-help { color: var(--text-soft); }
.auth-page .small { font-size: 12px; }
.auth-workspace { min-width: 0; display: grid; gap: 24px; }
.auth-card { padding: 32px; border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg, #0d1c30, #071322); box-shadow: var(--shadow-soft); min-width: 0; }
.auth-card h2 { font-size: 22px; margin-block-end: 14px; }
.auth-page .message { border-inline-start: 2px solid var(--blue); padding: 8px 12px; font-size: 13px; line-height: 1.9; color: var(--text-soft); margin-block: 16px; overflow-wrap: anywhere; }
.auth-page .message[data-kind="error"] { border-color: #ff9393; color: #ffc8c8; }
.mode-switch { display: flex; gap: 4px; padding: 4px; background: var(--bg); border-radius: 10px; margin-block: 24px; border: 1px solid var(--border); }
.mode-switch button { flex: 1; border-radius: 7px; font-size: 13px; padding: 9px 12px; background: transparent; color: var(--text-soft); }
.mode-switch button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.auth-page fieldset { border: none; min-width: 0; }
.auth-page legend { color: var(--blue-bright); font-size: 13px; padding-block: 16px; }
.auth-page label { display: block; font-size: 13px; margin-block: 14px 8px; }
.auth-page input:not([type="checkbox"]), .auth-page textarea { width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 9px; padding: 12px 14px; outline: none; }
.auth-page textarea { resize: vertical; min-height: 90px; }
.auth-page #otp { text-align: center; letter-spacing: .35em; font-size: 24px; }
.auth-page :focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 4px; }
.auth-page input:focus, .auth-page textarea:focus { border-color: var(--blue); }
.auth-page .field-help { font-size: 12px; line-height: 1.95; margin-block: 10px 18px; }
.auth-page button { cursor: pointer; transition: background .15s; }
.auth-page button:disabled { opacity: .5; cursor: not-allowed; }
.primary-button, .secondary-button { width: 100%; border-radius: 9px; padding: 12px 16px; font-size: 13px; }
.primary-button { background: var(--blue); color: #02101e; font-weight: 700; }
.primary-button:hover:enabled { background: var(--blue-bright); }
.secondary-button { border: 1px solid var(--border-blue); background: #169cff0b; color: var(--text); }
.secondary-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px; margin-block-start: 20px; }
.secondary-actions button, #refresh-directory { color: var(--blue-bright); font-size: 12px; background: transparent; padding: 4px; }
.email-display { display: block; font-size: 13px; text-align: start; overflow-wrap: anywhere; }
.account-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block: 24px 12px; }
.account-summary .email-display { width: 100%; }
.session-note { font-size: 11px; color: var(--text-muted); padding-block-start: 22px; margin-block-start: 24px; border-top: 1px solid var(--border); }
.auth-page .check-label { display: flex; align-items: flex-start; gap: 10px; color: var(--text-soft); font-size: 12px; }
.auth-page input[type="checkbox"] { accent-color: var(--blue); margin-block-start: 7px; }
#private-form { margin-block-start: 24px; border-top: 1px solid var(--border); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-heading h2 { font-size: 18px; }
.directory-list { list-style: none; }
.directory-list li { padding-block: 18px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.directory-list h3 { font-size: 15px; }
.directory-list p { color: var(--text-soft); font-size: 12px; margin-block: 8px 12px; white-space: pre-wrap; }
.directory-list button { width: auto; padding: 7px 18px; }
.auth-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-block: 22px; color: var(--text-muted); border-top: 1px solid var(--border); font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 820px) {
  .auth-layout { grid-template-columns: 1fr; gap: 28px; padding-block: 28px 48px; }
  .auth-intro { position: static; padding: 0; }
  .auth-intro h1 { font-size: 34px; margin-block-end: 16px; }
  .auth-intro h1 br { display: none; }
  .intro-note { margin-block-start: 20px; }
  .auth-intro > p { max-width: none; }
}
@media (max-width: 440px) {
  .auth-header, .auth-layout, .auth-footer { width: calc(100% - 32px); }
  .auth-header { gap: 12px; padding-block: 18px; }
  .auth-header img { width: 120px; height: 40px; }
  .back-link { font-size: 11px; }
  .auth-card { padding: 22px 18px; }
  .auth-intro h1 { font-size: 29px; }
}
@media (prefers-reduced-motion: reduce) { .auth-page *, .auth-page { scroll-behavior: auto; transition: none; } }
