/* ==============================================
   auth.css - Auth pages & shared form components
   Used by public login/register/forgot-password pages
   ============================================== */

/* --- Auth Container --- */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-8) var(--space-4);
    background-color: var(--color-bg);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: var(--space-8);
    box-shadow: var(--shadow-md);
}

.auth-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-1);
}

.auth-desc {
    font-size: var(--text-md);
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.auth-link {
    text-align: center;
    font-size: var(--text-md);
    color: var(--color-text-muted);
    margin-top: var(--space-6);
}

.auth-link a {
    color: var(--color-primary);
    font-weight: var(--font-semibold);
}

.auth-link a:hover {
    text-decoration: underline;
}

.auth-benefit-banner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: linear-gradient(135deg, hsl(var(--primary-50, 255 247 237)), hsl(var(--primary-100, 254 243 199)));
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-card);
    margin-bottom: var(--space-4);
}
[data-theme="dark"] .auth-benefit-banner {
    background: rgba(var(--color-primary-rgb, 255 107 107), 0.1);
}
.auth-benefit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}
.auth-benefit-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.auth-benefit-text strong {
    font-size: var(--text-md);
    color: var(--color-primary);
}
.auth-benefit-text span {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* --- Form Components --- */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-label .required {
    color: var(--color-sale);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-text);
    background-color: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-btn);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    outline: none;
    font-family: inherit;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px hsla(var(--ring), 0.2);
}

.form-input::placeholder {
    color: hsl(var(--muted-foreground));
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

/* --- Buttons --- */
.btn-primary {
    background-color: var(--color-primary);
    color: hsl(var(--primary-foreground));
    font-weight: 600;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-full {
    width: 100%;
}

/* --- Alert --- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-btn);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.alert-error {
    background-color: var(--badge-error-bg);
    color: var(--badge-error-text);
    border: 1px solid hsl(var(--red-200));
}

.alert-success {
    background-color: var(--badge-active-bg);
    color: var(--badge-active-text);
}

/* --- Mobile --- */
@media (max-width: 768px) {
    .auth-card {
        padding: var(--space-6);
        box-shadow: none;
        border: none;
    }
    .auth-container {
        min-height: calc(100vh - 120px);
        padding: var(--space-4);
    }
    .auth-title {
        font-size: var(--text-xl);
    }
}
