:root {
    --auth-bg: #0F1011;
    --auth-card: #141517;
    --auth-text: #ffffff;
    --auth-muted: #a1a1aa;
    --auth-faint: #71717a;
    --auth-border: rgba(255, 255, 255, 0.10);
    --auth-border-strong: rgba(255, 255, 255, 0.25);
    --auth-input-bg: rgba(255, 255, 255, 0.03);
    --auth-btn-bg: #ffffff;
    --auth-btn-text: #0F1011;
    --auth-accent: #d4d4d8;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
}

.auth-page-body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    background: var(--auth-bg);
    color: var(--auth-muted);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    margin: 0;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--auth-card);
    border: 1px solid var(--auth-border);
    padding: 44px 40px 32px;
    animation: auth-rise .5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.auth-rail-wrap {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    justify-content: center;
    background: var(--auth-bg);
}

.auth-rail {
    width: 100%;
    max-width: 468px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--auth-border);
    border-right: 1px solid var(--auth-border);
}

.auth-rail-section {
    padding: 40px 44px;
    border-bottom: 1px solid var(--auth-border);
}

.auth-rail-section.no-border { border-bottom: none; }

.auth-rail-spacer {
    flex: 1;
    min-height: 80px;
}

@media (max-width: 540px) {
    .auth-rail { border-left: none; border-right: none; }
    .auth-rail-section { padding: 32px 24px; }
}

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-card { animation: none; }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--auth-input-bg);
    border: 1px solid var(--auth-border);
    color: var(--auth-text);
}

.auth-title {
    color: var(--auth-text);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.auth-sub {
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.6;
    margin-top: 6px;
}

/* OAuth buttons */
.auth-oauth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--auth-border);
    background: var(--auth-input-bg);
    color: var(--auth-text);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    user-select: none;
}

.auth-oauth-btn:hover {
    transform: translateY(-1px);
    border-color: var(--auth-border-strong);
    background: rgba(255, 255, 255, 0.06);
}

.auth-oauth-btn:active { transform: translateY(0); }

.auth-oauth-btn.is-loading { opacity: .75; pointer-events: none; }
.auth-oauth-btn.is-loading .oauth-icon { display: none; }
.auth-oauth-btn.is-loading .oauth-spinner { display: inline-block; }

.auth-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid var(--auth-border);
    border-top-color: var(--auth-text);
    border-radius: 50%;
    animation: auth-spin .7s linear infinite;
}

@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-faint);
    font-size: 11px;
    letter-spacing: .12em;
    text-transform: uppercase;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--auth-border);
}

/* Form fields */
.auth-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px 14px;
    border: 1px solid var(--auth-border);
    background: var(--auth-input-bg);
    transition: border-color .2s ease;
}

.auth-field:focus-within {
    border-color: var(--auth-border-strong);
}

.auth-field i,
.auth-field .field-glyph {
    color: var(--auth-faint);
    font-size: 15px;
}

.auth-field input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    padding: 0;
    font-size: 13.5px;
    color: var(--auth-text);
    font-family: inherit;
}

.auth-field input::placeholder { color: var(--auth-faint); }

.auth-field + .auth-field { margin-top: 12px; }

/* Standalone input/select */
.auth-input,
.auth-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--auth-border);
    background: var(--auth-input-bg);
    color: var(--auth-text);
    font-family: inherit;
    font-size: 13.5px;
    outline: none;
    transition: border-color .2s ease;
}

.auth-input:focus,
.auth-select:focus { border-color: var(--auth-border-strong); }

.auth-textarea { resize: none; line-height: 1.5; }

.auth-select option { background: var(--auth-card); color: var(--auth-text); }

.auth-label {
    display: block;
    font-size: 11px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--auth-faint);
    margin: 14px 0 6px;
}

.auth-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 420px) { .auth-grid-2 { grid-template-columns: 1fr; } }

/* Primary submit button — clip-cut corner matches the rest of the site
   (header "Launch App" / footer "Request a Demo"). */
.auth-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .15em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    transition: all .2s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-btn-primary {
    background: var(--auth-btn-bg);
    color: var(--auth-btn-text);
}

.auth-btn-primary:hover { transform: translateY(-1px); background: #e4e4e7; }

.auth-btn-ghost {
    width: auto;
    flex: 0 0 auto;
    background: transparent;
    color: var(--auth-faint);
    border: 1px solid var(--auth-border);
    clip-path: none;
}

.auth-btn-ghost:hover { color: var(--auth-text); border-color: var(--auth-border-strong); }
.auth-btn-ghost:disabled,
.auth-btn-ghost.is-disabled { opacity: .35; pointer-events: none; }

.auth-btn.is-loading { opacity: .75; pointer-events: none; }
.auth-btn .auth-spinner { border-top-color: currentColor; }
.auth-btn.is-loading .auth-spinner { display: inline-block; }

/* Button row (Previous / Next) — the ghost button
   stays a fixed compact width, the primary button fills the rest. */
.auth-actions { display: flex; gap: 10px; align-items: center; }
.auth-actions .auth-btn { width: auto; }
.auth-actions .auth-btn-primary { flex: 1 1 auto; }
.auth-actions .auth-btn-ghost { flex: 0 0 auto; padding-left: 22px; padding-right: 22px; }

.auth-link { color: var(--auth-muted); font-size: 12px; }
.auth-link:hover { color: var(--auth-text); text-decoration: underline; text-underline-offset: 4px; }

.auth-skip-row { text-align: center; margin-top: 14px; }

.auth-status {
    padding-top: 16px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    min-height: 24px;
}

.auth-status.is-error { color: #ef4444; }
.auth-status.is-success { color: #22c55e; }

/* Welcome / onboarding carousel */
.auth-slide { display: none; animation: auth-fade .35s ease both; }
.auth-slide.active { display: block; }

@keyframes auth-fade {
    from { opacity: 0; transform: translateX(10px); }
    to   { opacity: 1; transform: translateX(0); }
}

@media (prefers-reduced-motion: reduce) {
    .auth-slide { animation: none; }
}

.auth-feature-list { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; padding: 0; }
.auth-feature-list li {
    list-style: none;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
}
.auth-feature-list i { color: var(--auth-accent); margin-top: 2px; }

.auth-dots { display: flex; justify-content: center; gap: 7px; margin: 26px 0 18px; }
.auth-dot {
    width: 7px;
    height: 7px;
    background: var(--auth-border);
    transition: all .25s ease;
}
.auth-dot.active { background: var(--auth-muted); width: 20px; }
