* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--background); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.6; -webkit-font-smoothing: antialiased; transition: background .25s, color .25s; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 4px; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--primary); outline-offset: 4px; }
button { border: 0; }
img, svg { display: block; }
svg.icon { width: 21px; height: 21px; flex-shrink: 0; fill: none; stroke: currentColor; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 50; background: var(--surface); padding: 12px 20px; border-radius: 12px; }
.skip-link:focus { top: 12px; }
.top-app-bar { height: 94px; max-width: 1440px; padding: 0 64px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 39px; height: 39px; }
.brand-name { font-size: 21px; font-weight: 720; letter-spacing: -.6px; }
.brand-divider { width: 1px; height: 18px; background: var(--border); margin: 0 3px; }
.brand-caption { color: var(--text-secondary); font-size: 13px; }
.top-actions { display: flex; align-items: center; gap: 20px; }
.top-status { color: var(--text-secondary); font-size: 12px; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 6px; height: 6px; background: var(--success); border-radius: 50%; box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 9%, transparent); }
.icon-button { width: 42px; height: 42px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--border); color: var(--text-secondary); transition: background .2s, transform .2s; }
.icon-button:hover { background: var(--surface-hover); transform: translateY(-1px); }
.theme-toggle .icon { width: 19px; height: 19px; }
.card { background: var(--surface); border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.field { margin: 0 0 20px; }
.field-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--text); font-size: 13px; font-weight: 560; }
.text-field { position: relative; display: flex; align-items: center; border-radius: var(--radius-control); background: var(--surface-soft); border: 1.5px solid transparent; transition: background .2s, box-shadow .2s, border-color .2s; min-height: 54px; }
.text-field:focus-within { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 9%, transparent); }
.field[data-invalid="true"] .text-field { border-color: var(--error); background: var(--error-soft); }
.field[data-invalid="true"] .text-field:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 9%, transparent); }
.text-field input { width: 100%; min-width: 0; border: none; outline: none; color: var(--text); background: transparent; padding: 15px 17px; height: 52px; font-size: 14px; border-radius: var(--radius-control); }
.text-field input:focus-visible { outline: none; }
.text-field input::placeholder { color: var(--text-muted); opacity: 1; }
.text-field input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 60px var(--surface-soft) inset; }
.text-field .field-icon { margin-left: 15px; width: 19px; height: 19px; color: var(--text-muted); }
.text-field .field-icon + input { padding-left: 11px; }
.password-toggle { border: 0; background: transparent; color: var(--text-muted); width: 48px; height: 48px; flex-shrink: 0; display: grid; place-items: center; border-radius: 13px; margin-right: 2px; }
.password-toggle:hover { color: var(--text); }
.password-toggle .icon { width: 19px; height: 19px; }
.field-error { margin: 6px 2px 0; color: var(--error); font-size: 12px; line-height: 1.45; }
.field-status { margin: 6px 2px 0; color: var(--text-secondary); font-size: 12px; line-height: 1.45; }
.field-status[data-state="available"] { color: var(--success); }
.field-status[data-state="error"] { color: var(--error); }
.field-hint { margin: 7px 2px 0; color: var(--text-muted); font-size: 11px; }
.button { min-height: 52px; padding: 13px 22px; border-radius: 17px; font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .18s, background .18s, box-shadow .18s; }
.button:active:not(:disabled) { transform: scale(.98); }
.button-primary { color: var(--on-primary); background: var(--primary); box-shadow: 0 5px 15px color-mix(in srgb, var(--primary) 15%, transparent); }
.button-primary:hover:not(:disabled) { background: var(--primary-hover); box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 23%, transparent); }
.button-secondary { color: var(--primary-text); background: var(--primary-soft); }
.button-secondary:hover:not(:disabled) { background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.button-wide { width: 100%; }
.button-text { padding: 4px 0; min-height: 28px; background: transparent; color: var(--primary-text); font-size: 13px; font-weight: 500; }
.button-text:hover { text-decoration: underline; text-underline-offset: 4px; }
.button .icon { width: 18px; height: 18px; }
.spinner { height: 18px; width: 18px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
.button[aria-busy="true"] .button-arrow { display: none; }
.switch-label { display: inline-flex; gap: 9px; align-items: center; cursor: pointer; color: var(--text-secondary); font-size: 12px; }
.switch { position: relative; display: inline-flex; width: 35px; height: 21px; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; z-index: 1; }
.switch-track { width: 100%; height: 100%; border-radius: 20px; background: color-mix(in srgb, var(--text-muted) 40%, var(--surface)); transition: background .2s; }
.switch-track::after { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: white; border-radius: 50%; box-shadow: 0 1px 3px rgb(0 0 0 / 8%); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--primary); outline-offset: 4px; }
.code-row { display: grid; grid-template-columns: 1fr 116px; gap: 10px; }
.code-row .button { padding: 10px 12px; min-height: 54px; font-size: 12px; white-space: nowrap; }
.terms-check { display: flex; gap: 9px; align-items: flex-start; font-size: 11px; color: var(--text-secondary); line-height: 1.8; margin: 4px 0 22px; }
.terms-check input { accent-color: var(--primary); width: 15px; height: 15px; margin: 2px 0 0; flex-shrink: 0; }
.password-strength { display: flex; gap: 4px; height: 3px; margin: 8px 1px 0; }
.password-strength span { border-radius: 8px; flex: 1; background: var(--border); transition: background .2s; }
.password-strength[data-score="1"] span:nth-child(-n+1) { background: var(--error); }
.password-strength[data-score="2"] span:nth-child(-n+2) { background: #e5aa3c; }
.password-strength[data-score="3"] span:nth-child(-n+3), .password-strength[data-score="4"] span { background: var(--success); }
.overlay-dialog { padding: 28px; width: min(390px, calc(100% - 40px)); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 29px; box-shadow: 0 30px 100px rgb(0 0 0 / 15%); }
.overlay-dialog::backdrop { background: rgb(15 23 40 / 27%); backdrop-filter: blur(9px); -webkit-backdrop-filter: blur(9px); }
.dialog-icon { width: 50px; height: 50px; background: var(--error-soft); color: var(--error); border-radius: 19px; display: grid; place-items: center; margin-bottom: 18px; }
.overlay-dialog[data-kind="success"] .dialog-icon { background: color-mix(in srgb, var(--success) 12%, transparent); color: var(--success); }
.overlay-dialog h2 { margin: 0 0 9px; font-size: 20px; }
.overlay-dialog p { color: var(--text-secondary); margin: 0 0 25px; font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 15px); max-width: calc(100% - 36px); padding: 12px 20px; border: 1px solid var(--border); color: var(--text); border-radius: 16px; background: var(--glass); box-shadow: var(--shadow-float); backdrop-filter: blur(20px); z-index: 100; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; font-size: 13px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.inline-notice { border-radius: 14px; background: var(--error-soft); color: var(--error); padding: 11px 14px; font-size: 12px; margin-bottom: 18px; }
@supports (corner-shape: squircle) { .card, .button, .text-field, .icon-button, .overlay-dialog, .dialog-icon { corner-shape: squircle; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
