/* ============================================
   GENZFLOW — AUTH PAGES
   Login / Register centered card layout
   Uses existing design-system tokens only
   ============================================ */

/* ---- Full-viewport centered wrapper ---- */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 48px);
    padding: var(--space-3);
}

/* ---- Auth card ---- */
.auth-card {
    width: 100%;
    max-width: 400px;
    padding: var(--space-4);
    text-align: center;
}

.auth-logo {
    font-size: var(--font-size-h2);
    font-weight: var(--font-weight-bold);
    color: var(--primary-accent);
    margin-bottom: var(--space-1);
    letter-spacing: -0.02em;
}

.auth-title {
    font-size: var(--font-size-h1);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    line-height: var(--line-height-tight);
}

.auth-subtitle {
    font-size: var(--font-size-body);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: var(--line-height-normal);
}

/* ---- Form layout ---- */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    text-align: left;
}

.auth-form .form-label {
    display: block;
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-semibold);
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-form .form-group {
    margin-bottom: 0;
}

.auth-submit {
    margin-top: var(--space-1);
    width: 100%;
    padding: 12px var(--space-2);
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
    position: relative;
}

/* ---- Error message ---- */
.auth-error {
    display: none;
    padding: var(--space-1) var(--space-2);
    background-color: var(--error-soft);
    color: var(--error);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    text-align: center;
    line-height: var(--line-height-normal);
}

.auth-error.visible {
    display: block;
}

/* ---- Loading button state ---- */
.auth-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.auth-submit.loading .btn-text {
    visibility: hidden;
}

.auth-submit .btn-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-on-accent);
    border-radius: 50%;
    animation: auth-spin 0.6s linear infinite;
}

.auth-submit.loading .btn-spinner {
    display: block;
}

@keyframes auth-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ---- Footer link ---- */
.auth-footer {
    margin-top: var(--space-3);
    font-size: var(--font-size-caption);
    color: var(--text-secondary);
}

.auth-footer-link {
    color: var(--primary-accent);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: opacity var(--transition-fast);
}

.auth-footer-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ---- Success message ---- */
.auth-success {
    display: none;
    padding: var(--space-1) var(--space-2);
    background-color: var(--success-soft);
    color: var(--success);
    font-size: var(--font-size-caption);
    font-weight: var(--font-weight-medium);
    border-radius: var(--radius-sm);
    text-align: center;
    line-height: var(--line-height-normal);
}

.auth-success.visible {
    display: block;
}