:root {
    --auth-ink: #102033;
    --auth-muted: #5e6d80;
    --auth-soft: rgba(255, 255, 255, 0.52);
    --auth-line: rgba(16, 32, 51, 0.12);
    --auth-line-strong: rgba(16, 32, 51, 0.2);
    --auth-brand: #0f172a;
    --auth-accent: #ef7b35;
    --auth-success: #0f766e;
    --auth-danger: #b42318;
    --auth-radius-lg: 24px;
    --auth-radius-md: 18px;
    --auth-radius-sm: 14px;
    --auth-shadow: 0 20px 55px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body.auth-flow-body {
    margin: 0;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    color: var(--auth-ink);
    font-family: 'Manrope', sans-serif;
    background: linear-gradient(135deg, #edf3fb 0%, #e8eef8 45%, #f1f5fb 100%);
}

body.auth-flow-body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.72;
    background-image:
        linear-gradient(rgba(214, 224, 238, 0.9) 1px, transparent 1px),
        linear-gradient(90deg, rgba(214, 224, 238, 0.9) 1px, transparent 1px);
    background-size: 40px 40px;
}

.auth-flow-body a {
    color: inherit;
}

.auth-flow-header-link:visited {
    color: var(--auth-muted);
}

.auth-flow-body button,
.auth-flow-body input,
.auth-flow-body textarea,
.auth-flow-body select {
    font: inherit;
}

.auth-flow-shell {
    min-height: 100vh;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    padding: 28px 28px 20px;
}

.auth-flow-header,
.auth-flow-main,
.auth-flow-footer {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.auth-flow-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.auth-flow-logo {
    display: inline-flex;
    align-items: center;
}

.auth-flow-logo img {
    display: block;
    width: 150px;
    height: auto;
}

.auth-flow-header-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-muted);
    font-size: 0.95rem;
    text-decoration: none;
}

.auth-header-spacer {
    width: 1px;
    height: 1px;
}

.auth-flow-main {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 24px 0 18px;
}

.auth-stage {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 460px);
    gap: clamp(40px, 7vw, 96px);
    align-items: center;
}

.auth-stage-story {
    display: grid;
    gap: 26px;
    max-width: 620px;
}

.auth-centered-body .auth-flow-main {
    justify-content: center;
    padding: 18px 0 20px;
}

.auth-centered-body .auth-stage {
    grid-template-columns: minmax(0, 560px);
    justify-content: center;
    gap: 0;
}

.auth-centered-body .auth-stage-story {
    display: none;
}

.auth-centered-body .auth-stage-panel {
    max-width: 560px;
    margin: 0 auto;
}

.auth-centered-body .auth-stage-panel-inner {
    gap: 16px;
}

.auth-copy-compact {
    gap: 8px;
}

.auth-centered-body .auth-copy h1,
.auth-centered-body .onboarding-hero h1 {
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: 0;
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
}

.auth-onboarding-body .auth-flow-main {
    padding: 14px 0 12px;
}

.auth-onboarding-body .auth-stage {
    grid-template-columns: minmax(0, 0.94fr) minmax(340px, 430px);
    gap: clamp(22px, 4vw, 48px);
}

.auth-onboarding-body .auth-stage-story {
    max-width: 500px;
    gap: 14px;
}

.auth-story-eyebrow,
.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.54);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.28);
    color: rgba(16, 32, 51, 0.78);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-story-copy,
.auth-copy {
    display: grid;
    gap: 12px;
}

.auth-story-copy h1,
.auth-copy h1,
.onboarding-hero h1 {
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.7rem, 5vw, 4.7rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.auth-copy h1 {
    font-size: clamp(2.35rem, 4vw, 3.35rem);
}

.auth-onboarding-body .auth-story-copy h1 {
    font-size: clamp(1.72rem, 2.2vw, 2.35rem);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.auth-onboarding-body .auth-copy h1,
.auth-onboarding-body .onboarding-hero h1 {
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: 0;
}

.auth-story-copy p,
.auth-copy p,
.auth-helper-text,
.auth-footnote,
.helper-row,
.helper-row a,
.auth-legal-links a,
.auth-legal-note,
.onboarding-note {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.72;
}

.auth-onboarding-body .auth-story-copy p,
.auth-onboarding-body .auth-copy p {
    max-width: 34rem;
    font-size: 0.91rem;
    line-height: 1.54;
}

.auth-onboarding-body .auth-story-eyebrow,
.auth-onboarding-body .auth-eyebrow {
    min-height: 34px;
    padding: 0 13px;
    font-size: 0.69rem;
    letter-spacing: 0.12em;
}

.auth-story-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.auth-onboarding-body .auth-story-grid {
    gap: 12px;
}

.auth-story-card {
    min-height: 126px;
    padding: 18px 18px 16px;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: var(--auth-radius-md);
    background: rgba(255, 255, 255, 0.34);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(14px);
    display: grid;
    gap: 12px;
}

.auth-onboarding-body .auth-story-card {
    min-height: 0;
    padding: 16px;
    gap: 10px;
}

.auth-story-card strong,
.auth-story-card span {
    display: block;
}

.auth-story-card strong {
    font-size: 1rem;
}

.auth-story-card span {
    color: var(--auth-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.auth-story-list {
    display: grid;
    gap: 14px;
}

.auth-onboarding-body .auth-story-list {
    gap: 10px;
}

.auth-story-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--auth-ink);
}

.auth-story-list-item span {
    color: var(--auth-muted);
}

.auth-stage-panel {
    width: 100%;
    display: grid;
    gap: 18px;
}

.auth-stage-panel-inner {
    display: grid;
    gap: 18px;
}

.auth-onboarding-body .auth-stage-panel-inner {
    gap: 14px;
}

.flash,
.error-list {
    padding: 14px 16px;
    border-radius: var(--auth-radius-sm);
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.05);
}

.flash {
    color: var(--auth-success);
}

.error-list {
    color: var(--auth-danger);
}

.auth-form {
    display: grid;
    gap: 16px;
}

.auth-form-stack {
    display: grid;
    gap: 14px;
}

.auth-stage-panel label {
    display: block;
    margin-bottom: 8px;
    color: var(--auth-ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-form-row {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field-minimal {
    gap: 0;
}

.auth-field-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--auth-ink);
    font-size: 0.92rem;
    font-weight: 700;
}

.auth-field-label span:last-child {
    color: var(--auth-muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap .lucide-icon {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: rgba(16, 32, 51, 0.55);
    pointer-events: none;
}

.auth-input,
.auth-select {
    width: 100%;
    min-height: 58px;
    padding: 0 18px 0 48px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.72);
    color: var(--auth-ink);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-stage-panel input:not([type="checkbox"]):not(.otp-digit):not(.auth-input),
.auth-stage-panel select:not(.auth-select),
.auth-stage-panel textarea {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.72);
    color: var(--auth-ink);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.06);
    outline: none;
}

.auth-input::placeholder {
    color: rgba(94, 109, 128, 0.84);
}

.auth-input:focus,
.auth-select:focus,
.auth-stage-panel input:not([type="checkbox"]):not(.otp-digit):not(.auth-input):focus,
.auth-stage-panel select:not(.auth-select):focus,
.auth-stage-panel textarea:focus,
.auth-input-wrap.focused .auth-input {
    border-color: rgba(239, 123, 53, 0.7);
    box-shadow: 0 0 0 5px rgba(239, 123, 53, 0.12), 0 18px 34px rgba(15, 23, 42, 0.07);
    background: rgba(255, 255, 255, 0.88);
}

.auth-input[readonly],
.auth-input[disabled] {
    color: rgba(16, 32, 51, 0.58);
    background: rgba(255, 255, 255, 0.58);
}

.auth-textarea {
    min-height: 120px;
    padding: 16px 18px;
    border-radius: 22px;
    resize: vertical;
}

.auth-input-wrap.has-error .auth-input {
    border-color: rgba(180, 35, 24, 0.48);
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.08);
}

.auth-field-hint {
    color: var(--auth-muted);
    font-size: 0.86rem;
}

.auth-inline-error {
    color: var(--auth-danger);
    font-size: 0.84rem;
    min-height: 18px;
}

.auth-inline-error[hidden] {
    display: none;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 40px;
    height: 40px;
    margin: 0;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(16, 32, 51, 0.6);
    cursor: pointer;
}

.auth-password-toggle [data-eye-off] {
    display: none;
}

.auth-password-toggle[aria-pressed="true"] [data-eye] {
    display: none;
}

.auth-password-toggle[aria-pressed="true"] [data-eye-off] {
    display: inline-flex;
}

.auth-actions {
    display: grid;
    gap: 12px;
}

.auth-aux-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.auth-remember-row {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    cursor: pointer;
    color: var(--auth-ink);
    font-size: 0.98rem;
    font-weight: 700;
}

.auth-remember-row input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #0f766e;
}

.auth-forgot-link,
.auth-signup-row a {
    color: var(--auth-brand);
    font-weight: 800;
    text-decoration: none;
}

.auth-forgot-link:visited,
.auth-signup-row a:visited {
    color: var(--auth-brand);
}

.auth-signup-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--auth-muted);
    font-size: 0.95rem;
}

.auth-button,
.auth-google-btn {
    min-height: 58px;
    border-radius: 999px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    text-decoration: none;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.auth-button,
.auth-button:visited,
.auth-google-btn,
.auth-google-btn:visited {
    color: inherit;
}

.btn,
button.btn {
    min-height: 58px;
    border-radius: 999px;
    border: 1px solid rgba(16, 32, 51, 0.14);
    background: rgba(255, 255, 255, 0.56);
    color: var(--auth-ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 24px;
    font-weight: 800;
    text-decoration: none;
}

.btn.brand,
button.btn.brand {
    background: linear-gradient(135deg, #111f33 0%, #15263c 100%);
    color: #fff;
    border-color: transparent;
}

.btn.ghost,
button.btn.ghost {
    background: rgba(255, 255, 255, 0.3);
}

.auth-button:hover,
.auth-google-btn:hover {
    transform: translateY(-1px);
}

.auth-button:disabled {
    cursor: not-allowed;
    transform: none;
    opacity: 0.48;
}

.auth-button-primary {
    background: linear-gradient(135deg, #111f33 0%, #15263c 100%);
    color: #fff;
    box-shadow: 0 16px 34px rgba(17, 31, 51, 0.18);
}

.auth-button-primary:visited {
    color: #fff;
}

.auth-button-secondary {
    border-color: rgba(16, 32, 51, 0.14);
    background: rgba(255, 255, 255, 0.56);
    color: var(--auth-ink);
}

.auth-button-secondary:visited {
    color: var(--auth-ink);
}

.auth-google-btn {
    border-color: rgba(16, 32, 51, 0.12);
    background: rgba(255, 255, 255, 0.68);
    color: var(--auth-ink);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.05);
}

.auth-google-btn img {
    width: 18px;
    height: 18px;
}

.auth-social-stack {
    display: grid;
    gap: 12px;
}

.auth-social-btn {
    width: 100%;
}

.auth-instagram-btn {
    border-color: rgba(239, 123, 53, 0.18);
    background: rgba(255, 247, 237, 0.86);
    color: var(--auth-ink);
}

.auth-instagram-btn .lucide-icon {
    color: #ef7b35;
}

.auth-button-primary,
.auth-button-primary span,
.btn.brand,
.btn.brand span {
    color: #fff !important;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(94, 109, 128, 0.8);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(16, 32, 51, 0.12);
}

.helper-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-size: 0.95rem;
}

.auth-inline-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.helper-row a,
.auth-legal-links a {
    color: var(--auth-brand);
    font-weight: 800;
    text-decoration: none;
}

.helper-row a:visited,
.auth-legal-links a:visited,
.auth-flow-footer-links a:visited {
    color: var(--auth-brand);
}

.auth-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.88rem;
}

.auth-legal-note {
    font-size: 0.88rem;
}

.auth-flow-footer {
    padding-bottom: 6px;
}

.auth-flow-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    color: rgba(94, 109, 128, 0.9);
    font-size: 0.86rem;
}

.auth-flow-footer-links {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.auth-flow-footer-links a {
    text-decoration: none;
}

.otp-inputs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.otp-digit {
    width: 100%;
    min-height: 64px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.74);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
    text-align: center;
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--auth-ink);
    outline: none;
}

.otp-digit:focus {
    border-color: rgba(239, 123, 53, 0.7);
    box-shadow: 0 0 0 5px rgba(239, 123, 53, 0.12), 0 18px 34px rgba(15, 23, 42, 0.07);
}

.otp-resend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.otp-timer {
    color: var(--auth-muted);
    font-size: 0.88rem;
}

.password-strength {
    display: grid;
    gap: 10px;
}

.password-strength-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(16, 32, 51, 0.09);
    overflow: hidden;
}

.password-strength-fill {
    width: 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef7b35 0%, #f5ad42 52%, #0f766e 100%);
    transition: width 0.2s ease;
}

.password-strength-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    color: var(--auth-muted);
    font-size: 0.88rem;
}

.password-checks {
    display: grid;
    gap: 8px;
}

.password-check {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-muted);
    font-size: 0.9rem;
}

.password-check.is-met {
    color: var(--auth-ink);
}

.password-check .lucide-icon {
    color: rgba(94, 109, 128, 0.7);
}

.password-check.is-met .lucide-icon {
    color: var(--auth-success);
}

.onboarding-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.onboarding-progress-track {
    flex: 1;
    height: 7px;
    border-radius: 999px;
    background: rgba(16, 32, 51, 0.08);
    overflow: hidden;
}

.onboarding-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #111f33 0%, #ef7b35 100%);
}

.onboarding-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.onboarding-choice-card {
    width: 100%;
    padding: 18px;
    border-radius: var(--auth-radius-md);
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.05);
    text-align: left;
    display: grid;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.onboarding-choice-card:hover {
    transform: translateY(-2px);
}

.onboarding-choice-card.is-selected {
    border-color: rgba(17, 31, 51, 0.28);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.08);
}

.onboarding-choice-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.onboarding-choice-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.08);
    color: var(--auth-brand);
}

.onboarding-choice-card strong {
    display: block;
    font-size: 1rem;
}

.onboarding-choice-card p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.92rem;
    line-height: 1.6;
}

.onboarding-choice-check {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    border: 1px solid rgba(16, 32, 51, 0.16);
    background: rgba(255, 255, 255, 0.72);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
}

.onboarding-choice-card.is-selected .onboarding-choice-check {
    background: var(--auth-brand);
    border-color: transparent;
    color: #fff;
}

.onboarding-hidden-inputs {
    display: none;
}

.onboarding-connect-panel,
.onboarding-ready-panel {
    display: grid;
    gap: 20px;
}

.onboarding-connect-card,
.onboarding-ready-card {
    padding: 22px;
    border-radius: var(--auth-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.auth-onboarding-body .onboarding-connect-card,
.auth-onboarding-body .onboarding-ready-card {
    padding: 18px;
}

.onboarding-connect-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.onboarding-connect-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--auth-muted);
}

.onboarding-connect-consent {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--auth-radius-md);
    border: 1px solid rgba(16, 32, 51, 0.08);
    background: rgba(255, 255, 255, 0.58);
}

.onboarding-connect-consent input {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: var(--auth-brand);
}

.onboarding-connect-meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.onboarding-connect-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(16, 32, 51, 0.1);
    background: rgba(255, 255, 255, 0.58);
    color: var(--auth-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.onboarding-connect-status {
    min-height: 22px;
    color: var(--auth-danger);
    font-size: 0.9rem;
}

.onboarding-success-mark {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 118, 110, 0.12);
    color: var(--auth-success);
    box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.12);
}

.auth-motion-up {
    animation: authFadeUp 0.55s ease both;
}

.auth-motion-delay-1 {
    animation-delay: 0.08s;
}

.auth-motion-delay-2 {
    animation-delay: 0.16s;
}

.auth-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: authSpin 0.8s linear infinite;
}

@keyframes authFadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes authSpin {
    to {
        transform: rotate(360deg);
    }
}

.auth-centered-body .auth-flow-main {
    padding: 12px 0 16px;
}

.auth-centered-body .auth-stage-panel,
.auth-centered-body .auth-stage-panel-inner {
    max-width: 520px;
}

.auth-centered-body .auth-stage-panel-inner {
    gap: 14px;
}

.auth-copy,
.auth-copy-compact,
.auth-form,
.auth-actions {
    gap: 10px;
}

.auth-centered-body .auth-copy h1,
.auth-centered-body .onboarding-hero h1 {
    font-size: 1.8rem;
    line-height: 1.12;
}

.auth-copy p,
.auth-helper-text,
.auth-footnote,
.helper-row,
.helper-row a,
.auth-legal-links a,
.auth-legal-note,
.onboarding-note {
    line-height: 1.56;
}

.auth-stage-panel label {
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.auth-form-row {
    gap: 12px;
}

.auth-field-label {
    gap: 8px;
}

.auth-field-label span:last-child {
    font-size: 0.76rem;
}

.auth-input,
.auth-select,
.auth-stage-panel input:not([type="checkbox"]):not(.otp-digit):not(.auth-input),
.auth-stage-panel select:not(.auth-select):not([multiple]),
.auth-stage-panel textarea,
.auth-button,
.auth-google-btn,
.btn,
button.btn {
    min-height: 52px;
}

.auth-input,
.auth-select {
    padding: 0 16px 0 44px;
    border-radius: 22px;
}

.auth-stage-panel input:not([type="checkbox"]):not(.otp-digit):not(.auth-input),
.auth-stage-panel select:not(.auth-select):not([multiple]),
.auth-stage-panel textarea {
    padding: 0 16px;
    border-radius: 22px;
}

.auth-input-wrap .lucide-icon {
    left: 14px;
}

.auth-textarea {
    min-height: 104px;
    padding: 14px 16px;
    border-radius: 18px;
}

.auth-button,
.auth-google-btn {
    gap: 8px;
    padding: 0 18px;
}

.auth-social-stack {
    gap: 8px;
}

.auth-social-btn {
    min-height: 46px;
    padding: 0 16px;
    font-size: 0.98rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.auth-google-btn img {
    width: 16px;
    height: 16px;
}

.auth-signup-row {
    margin-top: 2px;
    font-size: 0.9rem;
}

.auth-signin-helper {
    justify-content: center;
}

.auth-input-wrap-select::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 18px;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(16, 32, 51, 0.5);
    border-bottom: 2px solid rgba(16, 32, 51, 0.5);
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.auth-select {
    appearance: none;
    padding-right: 42px;
    background-image: none;
}

.auth-input-wrap.focused .auth-select,
.auth-input-wrap.has-error .auth-select {
    background-image: none;
}

.auth-onboarding-body .auth-stage-panel,
.auth-onboarding-body .auth-stage-panel-inner {
    max-width: 640px;
}

.auth-onboarding-body .auth-stage-panel-inner {
    gap: 12px;
}

.auth-onboarding-body .auth-copy,
.auth-onboarding-body .onboarding-progress,
.auth-onboarding-body .onboarding-hero,
.auth-onboarding-body form,
.auth-onboarding-body .onboarding-connect-panel,
.auth-onboarding-body .onboarding-ready-panel {
    width: 100%;
    max-width: 640px;
    margin-inline: auto;
}

.auth-onboarding-body .auth-copy,
.auth-onboarding-body .onboarding-hero {
    gap: 8px;
}

.auth-onboarding-body .auth-copy h1,
.auth-onboarding-body .onboarding-hero h1 {
    font-size: 1.72rem;
}

.onboarding-progress {
    gap: 10px;
    font-size: 0.8rem;
}

.onboarding-progress-track {
    height: 6px;
}

.onboarding-card-grid {
    gap: 10px;
}

.onboarding-choice-card {
    padding: 14px;
    gap: 10px;
}

.onboarding-choice-card-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
}

.onboarding-choice-card strong {
    font-size: 0.96rem;
}

.onboarding-choice-card p {
    font-size: 0.88rem;
    line-height: 1.46;
}

.onboarding-connect-panel,
.onboarding-ready-panel {
    gap: 14px;
}

.onboarding-connect-card,
.onboarding-ready-card {
    padding: 16px;
}

.auth-onboarding-body .onboarding-connect-card,
.auth-onboarding-body .onboarding-ready-card {
    padding: 16px;
}

.onboarding-connect-list {
    gap: 10px;
}

.onboarding-connect-consent {
    padding: 12px;
}

.onboarding-success-mark {
    width: 60px;
    height: 60px;
}

@media (max-width: 980px) {
    .auth-flow-shell {
        padding: 22px 18px 18px;
    }

    .auth-stage {
        grid-template-columns: 1fr;
        gap: 34px;
    }

    .auth-stage-story {
        max-width: 100%;
    }

    .auth-story-grid,
    .onboarding-card-grid,
    .auth-form-row {
        grid-template-columns: 1fr;
    }

    .auth-copy h1,
    .auth-story-copy h1,
    .onboarding-hero h1 {
        font-size: clamp(2.25rem, 9vw, 3.35rem);
    }
}

@media (max-width: 640px) {
    .auth-flow-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .otp-inputs {
        gap: 8px;
    }

    .otp-digit {
        min-height: 54px;
        border-radius: 16px;
        font-size: 1.15rem;
    }

    .auth-button,
    .auth-google-btn {
        width: 100%;
    }

    .auth-inline-links {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-aux-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .otp-resend-row,
    .auth-flow-footer-inner,
    .onboarding-progress {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Final compact auth and onboarding pass */
.auth-flow-shell {
    padding: 22px 24px 18px;
}

.auth-flow-main {
    padding: 14px 0 12px;
}

.auth-centered-body .auth-stage-panel,
.auth-centered-body .auth-stage-panel-inner {
    max-width: 500px;
}

.auth-centered-body .auth-stage-panel-inner {
    gap: 12px;
}

.auth-copy,
.auth-copy-compact,
.auth-form,
.auth-actions {
    gap: 8px;
}

.auth-centered-body .auth-copy h1,
.auth-centered-body .onboarding-hero h1 {
    font-size: 1.78rem;
    line-height: 1.14;
}

.auth-centered-body .auth-copy p,
.auth-centered-body .onboarding-hero p {
    font-size: 0.94rem;
    line-height: 1.52;
}

.auth-stage-panel label {
    margin-bottom: 5px;
    font-size: 0.86rem;
}

.auth-form-row {
    gap: 10px;
}

.auth-field {
    gap: 6px;
}

.auth-field-label {
    gap: 8px;
    font-size: 0.88rem;
}

.auth-field-label span:last-child {
    font-size: 0.74rem;
}

.auth-input,
.auth-select,
.auth-stage-panel input:not([type="checkbox"]):not(.otp-digit):not(.auth-input),
.auth-stage-panel select:not(.auth-select):not([multiple]),
.auth-stage-panel textarea,
.auth-button,
.auth-google-btn,
.btn,
button.btn {
    min-height: 48px;
}

.auth-input,
.auth-select,
.auth-stage-panel input:not([type="checkbox"]):not(.otp-digit):not(.auth-input),
.auth-stage-panel select:not(.auth-select):not([multiple]),
.auth-stage-panel textarea {
    padding: 0 15px;
    border-radius: 18px;
    font-size: 0.97rem;
}

.auth-input-wrap .lucide-icon {
    left: 14px;
}

.auth-input,
.auth-select {
    padding-left: 44px;
}

.auth-button,
.auth-google-btn {
    gap: 8px;
    padding: 0 16px;
    font-size: 0.94rem;
}

.auth-social-stack {
    gap: 8px;
}

.auth-social-btn {
    min-height: 44px;
    padding: 0 15px;
    font-size: 0.93rem;
    box-shadow: none;
}

.auth-google-btn {
    box-shadow: none;
}

.auth-google-btn img {
    width: 15px;
    height: 15px;
}

.auth-divider {
    margin: 2px 0;
    font-size: 0.75rem;
    letter-spacing: 0.12em;
}

.auth-signup-row {
    margin-top: 2px;
    font-size: 0.91rem;
}

.auth-signin-helper {
    justify-content: center;
}

.auth-centered-body.auth-onboarding-body .auth-flow-main {
    justify-content: center;
    padding: 10px 0 12px;
}

.auth-centered-body.auth-onboarding-body .auth-stage {
    grid-template-columns: minmax(0, 600px);
    justify-content: center;
    gap: 0;
}

.auth-centered-body.auth-onboarding-body .auth-stage-story {
    display: none;
}

.auth-centered-body.auth-onboarding-body .auth-stage-panel,
.auth-centered-body.auth-onboarding-body .auth-stage-panel-inner {
    max-width: 600px;
    margin: 0 auto;
}

.auth-centered-body.auth-onboarding-body .onboarding-progress,
.auth-centered-body.auth-onboarding-body .auth-copy,
.auth-centered-body.auth-onboarding-body form,
.auth-centered-body.auth-onboarding-body .onboarding-connect-panel,
.auth-centered-body.auth-onboarding-body .onboarding-ready-panel {
    width: 100%;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.auth-centered-body.auth-onboarding-body .onboarding-progress {
    gap: 8px;
    margin-bottom: 2px;
}

.auth-centered-body.auth-onboarding-body .onboarding-progress-track {
    height: 5px;
}

.auth-centered-body.auth-onboarding-body .auth-copy h1,
.auth-centered-body.auth-onboarding-body .onboarding-hero h1 {
    font-size: 1.92rem;
    line-height: 1.14;
}

.auth-centered-body.auth-onboarding-body .auth-copy p,
.auth-centered-body.auth-onboarding-body .onboarding-hero p {
    font-size: 0.92rem;
    line-height: 1.5;
}

.onboarding-card-grid {
    gap: 10px;
}

.onboarding-choice-card {
    padding: 12px;
    gap: 8px;
    border-radius: 18px;
}

.onboarding-choice-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.onboarding-choice-card strong {
    font-size: 0.93rem;
}

.onboarding-choice-card p {
    font-size: 0.84rem;
    line-height: 1.42;
}

.onboarding-connect-panel,
.onboarding-ready-panel {
    gap: 12px;
}

.onboarding-connect-card,
.onboarding-ready-card {
    padding: 14px;
}
