/* ============================================================
   auth.css
   Shared styles for /auth/signup.php and /auth/login.php
   ============================================================ */

.auth-main {
    min-height: calc(100vh - var(--header-height) - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-10) var(--space-6);
    background: linear-gradient(135deg, #f0f4ff 0%, #faf0ff 100%);
}

.auth-card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border-light);
    padding: 48px 40px;
    width: 100%;
    max-width: 440px;
    text-align: center;
    animation: authSlideUp 0.4s ease both;
}

@keyframes authSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

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

.auth-icon {
    font-size: 3rem;
    margin-bottom: var(--space-4);
    display: block;
}

.auth-title {
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: var(--weight-extrabold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.auth-subtitle {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

/* Alert */
.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    margin-bottom: var(--space-5);
    text-align: left;
}

.auth-alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.auth-alert--success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* Form */
.auth-form {
    text-align: left;
    margin-bottom: var(--space-5);
}

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.input-wrapper {
    position: relative;
}

.form-input {
    width: 100%;
    height: 48px;
    padding: 0 var(--space-10) 0 var(--space-4);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-family: var(--font-sans);
    color: var(--color-text-primary);
    background: var(--color-surface);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    outline: none;
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}

.form-hint {
    display: block;
    margin-top: var(--space-1);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--color-text-muted);
    padding: 4px;
    line-height: 1;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--color-primary);
}

.auth-submit-btn {
    width: 100%;
    height: 50px;
    font-size: var(--text-base);
    margin-top: var(--space-2);
}

/* Benefits list */
.auth-benefits {
    list-style: none;
    text-align: left;
    margin: var(--space-5) 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.auth-benefits li {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.auth-switch {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-5);
}

.auth-switch a {
    color: var(--color-primary);
    font-weight: var(--weight-semibold);
    text-decoration: underline;
}

.auth-switch a:hover {
    color: var(--color-primary-dark);
}

/* Responsive */
@media (max-width: 480px) {
    .auth-card {
        padding: 36px 20px;
    }
}