.auth-body { min-height: 100vh; margin: 0; background: var(--bg); }
.auth-security { width: 100%; min-width: 0; margin: 18px 0; }
.auth-security > div { min-height: 65px; }
.security-status { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 6px 0; }
.security-status:empty { display: none; }
.security-retry { border: 0; padding: 6px 0; color: var(--purple-deep); background: transparent; font-size: 12px; }
.security-retry[hidden] { display: none; }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(480px, 44vw); overflow: hidden; }
.auth-backdrop { position: relative; display: flex; flex-direction: column; min-height: 100vh; padding: 31px clamp(30px, 6vw, 88px); overflow: hidden; color: var(--ink); background: var(--bg-soft); }
.auth-backdrop::after { content: ""; position: absolute; inset: 0; opacity: .58; background-image: linear-gradient(rgba(99,91,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(99,91,255,.055) 1px, transparent 1px); background-size: 76px 76px; pointer-events: none; }
.auth-brand { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 10px; width: max-content; color: var(--ink); font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -.04em; text-decoration: none; }
.auth-brand .brand-accent { color: var(--purple); }
.auth-brand .brand-mark span { background: var(--purple); }
.auth-backdrop-copy { position: relative; z-index: 2; max-width: 590px; margin: auto 0; padding: 80px 0 120px; }
.auth-backdrop-copy h1 { max-width: 620px; margin: 24px 0 22px; color: var(--ink); font-size: clamp(48px, 6vw, 82px); line-height: .98; }
.auth-backdrop-copy h1 em { color: var(--purple); }
.auth-backdrop-copy p { max-width: 470px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.auth-proof { display: flex; align-items: center; gap: 10px; margin-top: 36px; color: #69738a; font-size: 11px; }
.proof-dot { width: 7px; height: 7px; border-radius: 50%; background: #3db783; box-shadow: 0 0 0 4px rgba(61,183,131,.13); }
.proof-divider { width: 1px; height: 15px; margin: 0 4px; background: #cbd3e6; }
.auth-orbit { position: absolute; z-index: 1; border: 1px solid rgba(99,91,255,.18); border-radius: 50%; pointer-events: none; }
.auth-orbit-one { width: min(760px, 80vw); height: 300px; right: -12%; bottom: 11%; transform: rotate(-17deg); }
.auth-orbit-two { width: min(680px, 75vw); height: 260px; right: -7%; bottom: 15%; transform: rotate(21deg); opacity: .5; }
.auth-code-card { position: absolute; z-index: 2; right: 9%; bottom: 10%; width: 250px; padding: 16px 18px 18px; border: 1px solid #313a50; border-radius: 9px; background: #20283c; box-shadow: 0 22px 60px rgba(40,49,83,.2); transform: rotate(-4deg); }
.auth-code-card > div { display: flex; align-items: center; gap: 5px; padding-bottom: 12px; border-bottom: 1px solid #354057; color: #8793ae; font: 10px var(--mono); }
.auth-code-card small { margin-left: 8px; font: inherit; }.auth-code-dot { width: 6px; height: 6px; border-radius: 50%; background: #78849c; }.auth-code-dot:first-child { background: #ff8c89; }.auth-code-card code { display: block; padding-top: 15px; color: #d6def2; font: 12px/1.85 var(--mono); }.auth-code-card code span { color: #8be4b7; }
.auth-panel { position: relative; display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 72px 62px; background: var(--card); }
.auth-close { position: absolute; top: 50px; left: -39px; display: grid; width: 78px; height: 78px; place-items: center; border-radius: 50%; color: var(--ink); background: var(--card); box-shadow: 0 10px 35px rgba(54,67,111,.12); font-size: 29px; font-weight: 300; text-decoration: none; }
.auth-panel-inner { width: min(430px, 100%); }
.auth-kicker { margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-panel h2 { margin: 0; color: var(--ink); font-size: 40px; line-height: 1; letter-spacing: -.055em; }
.auth-subtitle { margin: 12px 0 35px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.auth-field { display: block; margin-top: 19px; color: #56627b; font-size: 12px; font-weight: 700; }
.auth-field[hidden], #verify-form[hidden], #resend-code[hidden] { display: none; }
#verification-email { overflow-wrap: anywhere; }
#resend-code:disabled { color: var(--muted); cursor: default; }
#verify-submit { margin-top: 24px; }
.auth-password-hint { margin: 8px 0 0; color: #68738a; font: 11px/1.6 var(--sans); }
.auth-field input[aria-invalid="true"] { border-color: #c25753; }
.auth-field > span:first-child { display: block; margin-bottom: 9px; }
.auth-field input { width: 100%; height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: 6px; outline: 0; color: var(--ink); background: #fbfcff; font: 14px var(--sans); transition: border-color .2s, box-shadow .2s; }
.auth-field input:focus { border-color: #9b95ff; box-shadow: 0 0 0 4px rgba(99,91,255,.12); }
.auth-password { position: relative; display: block; }.auth-password input { padding-right: 48px; }.auth-password button { position: absolute; top: 50%; right: 14px; width: 25px; height: 25px; padding: 0; border: 0; color: #929bad; background: transparent; font-size: 15px; transform: translateY(-50%); cursor: pointer; }
.auth-form-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 17px 0 24px; color: #8490a5; font-size: 11px; }.auth-form-row a { color: var(--purple-deep); font-weight: 700; text-decoration: none; }
.auth-submit { width: 100%; height: 54px; border: 0; border-radius: 6px; color: #fff; background: var(--purple); box-shadow: 0 9px 20px rgba(99,91,255,.23); font: 700 14px var(--sans); cursor: pointer; transition: background .2s, transform .2s; }.auth-submit:hover { background: var(--purple-deep); transform: translateY(-1px); }.auth-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.auth-message { min-height: 18px; margin: 11px 0 0; color: #c25753; font-size: 12px; }.auth-message.is-success { color: #29946a; }
.auth-switch { display: flex; justify-content: center; gap: 5px; margin-top: 21px; color: #8993a8; font-size: 12px; }.auth-switch button { padding: 0; border: 0; color: var(--purple-deep); background: transparent; font: 700 12px var(--sans); cursor: pointer; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 28px 0 16px; color: #a0a8b8; font-size: 10px; }.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e1e6f1; }
.auth-socials { display: grid; grid-template-columns: minmax(0, 1fr); }.auth-google-wrap { width: min(380px, 100%); min-width: 0; min-height: 44px; justify-self: center; display: flex; align-items: center; justify-content: center; }.auth-google-wrap > div { flex: 0 0 auto; }.auth-socials button { width: 100%; min-height: 43px; border: 1px solid #dbe1ef; border-radius: 5px; color: #68738a; background: #fff; font: 600 11px var(--sans); cursor: pointer; }.auth-socials button:hover { border-color: #9b95ff; color: var(--purple-deep); }
.auth-socials .auth-google-fallback { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 16px; font-size: 14px; font-weight: 500; color: #3c4043; }
.auth-google-fallback img { flex: 0 0 20px; }
.auth-legal { margin: 24px 0 0; color: #a0a8b8; font-size: 10px; line-height: 1.6; text-align: center; }.auth-legal a { color: var(--purple-deep); text-decoration: none; }
.auth-remember, .auth-consent { display: flex; align-items: flex-start; gap: 8px; color: #68738a; font: 12px/20px var(--sans); }
.auth-consent { margin: 0 0 22px; }
.auth-remember input, .auth-consent input { flex: 0 0 16px; width: 16px; height: 16px; margin: 2px 0 0; padding: 0; accent-color: var(--purple); cursor: pointer; }
.auth-consent label { cursor: pointer; }
.auth-consent a { color: var(--purple-deep); font-weight: 600; text-decoration: none; }
.auth-consent a:hover { text-decoration: underline; }
.auth-consent input[aria-invalid="true"] { outline: 2px solid #c25753; outline-offset: 2px; }
body:has(.terms-dialog[open]) { overflow: hidden; }
.terms-dialog { width: min(672px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink); box-shadow: 0 24px 64px rgba(26,32,50,.22); overflow: hidden; font-family: var(--sans); }
.terms-dialog[open] { display: flex; flex-direction: column; gap: 16px; }
.terms-dialog::backdrop { background: rgba(26,32,50,.42); }
.terms-dialog-header { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.terms-dialog-header h2 { margin: 0; color: var(--ink); font: 600 20px/1.5 var(--sans); letter-spacing: 0; }
.terms-dialog-close { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #68738a; font: 300 28px/1 var(--sans); }
.terms-dialog-close:hover { background: var(--bg-soft); color: var(--purple); }
.terms-dialog-scroll { min-height: 0; max-height: 480px; padding: 16px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; border: 1px solid #d5d9e2; border-radius: 12px; }
.terms-dialog-scroll section + section { margin-top: 16px; }
.terms-dialog-scroll h2 { margin: 0 0 8px; color: var(--ink); font: 600 16px/24px var(--sans); letter-spacing: 0; }
.terms-dialog-scroll p { margin: 0 0 12px; color: #535d70; font: 14px/1.75 var(--sans); overflow-wrap: anywhere; }
.terms-dialog-scroll p:last-child { margin-bottom: 0; }
.terms-dialog-actions { flex-shrink: 0; display: flex; justify-content: flex-end; gap: 12px; padding-top: 4px; }
.terms-action { min-width: 96px; height: 44px; padding: 0 24px; border: 1px solid transparent; border-radius: 999px; font: 600 13px/20px var(--sans); }
.terms-action-secondary { border-color: #ccd3e2; background: #fff; color: var(--ink); }
.terms-action-secondary:hover { background: var(--bg); }
.terms-action-primary { background: var(--purple); color: #fff; }
.terms-action-primary:hover { background: var(--purple-deep); }
.terms-action:disabled { opacity: .5; cursor: not-allowed; }
.terms-dialog button:focus-visible, .terms-dialog-scroll:focus-visible, .auth-consent a:focus-visible { outline: 2px solid var(--purple); outline-offset: 3px; }
@media (max-width: 480px) { .terms-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 16px; }.terms-dialog-scroll { padding: 12px; }.terms-dialog-header h2 { font-size: 18px; } }
@media (max-width: 900px) { .auth-shell { display: block; }.auth-backdrop { display: none; }.auth-panel { min-height: 100vh; padding: 74px 28px 40px; background: var(--bg); }.auth-close { top: 20px; left: auto; right: 22px; width: 40px; height: 40px; box-shadow: none; background: var(--card); font-size: 25px; } }
@media (max-width: 480px) { .auth-panel { padding: 74px 20px 30px; }.auth-panel h2 { font-size: 34px; }.auth-socials { grid-template-columns: 1fr; }.auth-socials button { min-height: 46px; } }
