.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--fx-bg);
    font-family: var(--fx-font-body);
}

/* ── Left panel: brand side ── */
.auth-brand {
    background: var(--fx-brand);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px;
}

/* Geometric background pattern */
.auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(
            circle at 20% 20%,
            rgba(255, 255, 255, 0.07) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 80%,
            rgba(255, 255, 255, 0.05) 0%,
            transparent 50%
        );
}
.auth-brand-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* Large decorative letter */
.auth-brand-letter {
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    font-family: var(--fx-font-display);
    font-size: 480px;
    line-height: 1;
    color: rgba(255, 255, 255, 0.04);
    user-select: none;
    pointer-events: none;
    letter-spacing: -20px;
}

.auth-brand-top {
    position: relative;
    z-index: 1;
}
.auth-brand-bottom {
    position: relative;
    z-index: 1;
}
.auth-brand-middle {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 0;
}

/* Logo in brand panel */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}
.auth-logo-mark {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.auth-logo-mark svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}
.auth-logo-name {
    font-family: var(--fx-font-display);
    font-size: 26px;
    letter-spacing: 2.5px;
    color: #fff;
    line-height: 1;
}
.auth-logo-sub {
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 2px;
}

/* Hero text */
.auth-headline {
    font-family: var(--fx-font-display);
    font-size: 52px;
    letter-spacing: 2px;
    color: #fff;
    line-height: 1.05;
    margin-bottom: 16px;
}
.auth-headline span {
    color: rgba(255, 255, 255, 0.4);
}
.auth-subheadline {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
    max-width: 340px;
}

/* Feature pills */
.auth-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 40px;
}
.auth-feature {
    display: flex;
    align-items: center;
    gap: 12px;
}
.auth-feature-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.auth-feature-icon svg {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.8);
}
.auth-feature-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

/* Bottom stat row */
.auth-stats {
    display: flex;
    gap: 32px;
}
.auth-stat {
}
.auth-stat-val {
    font-family: var(--fx-font-mono);
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}
.auth-stat-lbl {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.7px;
    margin-top: 3px;
}

/* ── Right panel: form side ── */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: var(--fx-surface);
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-form-header {
    margin-bottom: 32px;
}
.auth-form-title {
    font-family: var(--fx-font-display);
    font-size: 32px;
    letter-spacing: 1.5px;
    color: var(--fx-text-primary);
    margin-bottom: 6px;
}
.auth-form-subtitle {
    font-size: 14px;
    color: var(--fx-text-muted);
}

/* Form fields */
.auth-field {
    margin-bottom: 18px;
}
.auth-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--fx-text-muted);
    margin-bottom: 6px;
}
.auth-input-wrap {
    position: relative;
}
.auth-input-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--fx-text-faint);
    pointer-events: none;
}
.auth-input {
    width: 100%;
    height: 44px;
    background: var(--fx-surface-2);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-sm);
    padding: 0 44px 0 42px;
    font-family: var(--fx-font-body);
    font-size: 14px;
    color: var(--fx-text-body);
    outline: none;
    transition: var(--fx-transition);
}
.auth-input:focus {
    border-color: var(--fx-brand);
    background: var(--fx-surface);
    box-shadow: 0 0 0 3px var(--fx-brand-soft);
}
.auth-input::placeholder {
    color: var(--fx-text-faint);
}
.auth-input-toggle {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--fx-text-faint);
    padding: 0;
    display: flex;
}
.auth-input-toggle:hover {
    color: var(--fx-text-muted);
}
.auth-input-toggle svg {
    width: 16px;
    height: 16px;
}

/* Row: remember + forgot */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.auth-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
}
.auth-remember input {
    width: 15px;
    height: 15px;
    accent-color: var(--fx-brand);
    cursor: pointer;
}
.auth-remember-label {
    font-size: 13px;
    color: var(--fx-text-body);
}
.auth-forgot {
    font-size: 13px;
    color: var(--fx-brand);
    font-weight: 500;
    text-decoration: none;
}
.auth-forgot:hover {
    text-decoration: underline;
}

/* Submit button */
.auth-submit {
    width: 100%;
    height: 46px;
    background: var(--fx-brand);
    color: #fff;
    border: none;
    border-radius: var(--fx-radius-sm);
    font-family: var(--fx-font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--fx-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
}
.auth-submit:hover {
    background: var(--fx-brand-light);
    box-shadow: var(--fx-shadow-brand);
    transform: translateY(-1px);
}
.auth-submit:active {
    transform: translateY(0);
}
.auth-submit svg {
    width: 16px;
    height: 16px;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--fx-border);
}
.auth-divider span {
    font-size: 12px;
    color: var(--fx-text-faint);
    white-space: nowrap;
}

/* SSO / alternate login */
.auth-sso {
    width: 100%;
    height: 44px;
    background: var(--fx-surface-2);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius-sm);
    font-family: var(--fx-font-body);
    font-size: 13px;
    font-weight: 500;
    color: var(--fx-text-body);
    cursor: pointer;
    transition: var(--fx-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}
.auth-sso:hover {
    background: var(--fx-surface-3);
    border-color: var(--fx-border-strong);
}
.auth-sso svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Bottom link */
.auth-bottom {
    margin-top: 28px;
    text-align: center;
    font-size: 13px;
    color: var(--fx-text-muted);
}
.auth-bottom a {
    color: var(--fx-brand);
    font-weight: 500;
}
.auth-bottom a:hover {
    text-decoration: underline;
}

/* Error state */
.auth-error {
    background: var(--fx-danger-soft);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-radius: var(--fx-radius-sm);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--fx-danger-text);
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    animation: fxFadeUp 0.2s ease;
}
.auth-error.fx-show {
    display: flex;
}
.auth-error svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Loading spinner */
.auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fxSpin 0.7s linear infinite;
    display: none;
}
.auth-submit.fx-loading .auth-btn-text {
    display: none;
}
.auth-submit.fx-loading .auth-spinner {
    display: block;
}
.auth-submit.fx-loading svg.auth-btn-icon {
    display: none;
}

/* Responsive */
@media (max-width: 900px) {
    .auth-page {
        grid-template-columns: 1fr;
    }
    .auth-brand {
        display: none;
    }
    .auth-form-side {
        padding: 40px 24px;
    }
}
