﻿/* ============================================================
   Saveat — auth.css
   Auth Pages: Modern food-marketplace aesthetic
   Green + Coral + Cream palette
   ============================================================ */

/* ---------- Body & Layout ---------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(27, 67, 50, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255, 107, 53, 0.05) 0%, transparent 50%),
        var(--bg, #FDFBF7);
    font-family: 'Inter', sans-serif;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    animation: authFadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes authFadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Card ---------- */
.auth-card {
    background: var(--bg-card, #fff);
    border: 1px solid rgba(27, 67, 50, 0.08);
    border-radius: var(--radius-2xl, 1.5rem);
    padding: 2.5rem 2rem 2rem;
    box-shadow:
        0 1px 3px rgba(27, 67, 50, 0.04),
        0 8px 32px rgba(27, 67, 50, 0.06);
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #1B4332), var(--accent, #FF6B35));
    border-radius: var(--radius-2xl, 1.5rem) var(--radius-2xl, 1.5rem) 0 0;
}
.auth-card h2 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text, #1a1a1a);
}

/* ---------- Brand ---------- */
.auth-brand {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-logo {
    width: 60px; height: 60px;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, var(--primary, #1B4332), var(--primary-light, #2D6A4F));
    color: #fff;
    border-radius: var(--radius-xl, 1rem);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(27, 67, 50, 0.18);
    transition: transform 0.3s ease;
}
.auth-logo:hover {
    transform: scale(1.06) rotate(-3deg);
}
.auth-app-name {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary, #1B4332);
    margin-bottom: 0.15rem;
}
.auth-tagline {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 0;
}

/* Backward compat */
.auth-brand-icon {
    width: 60px; height: 60px;
    margin: 0 auto 0.75rem;
    background: linear-gradient(135deg, var(--primary, #1B4332), var(--primary-light, #2D6A4F));
    color: #fff;
    border-radius: var(--radius-xl, 1rem);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 16px rgba(27, 67, 50, 0.18);
}
.auth-brand h1 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 1.5rem; font-weight: 700;
    color: var(--primary, #1B4332);
}
.auth-brand p {
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
    margin-top: 0.25rem;
}

/* ---------- Form Enhancements ---------- */
.auth-form .form-group {
    margin-bottom: 1.25rem;
}
.auth-form .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary, #4b5563);
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.auth-form .form-label i {
    color: var(--primary-light, #2D6A4F);
    font-size: 0.75rem;
}
.auth-form .form-input {
    border-radius: var(--radius-lg, 0.75rem);
    border: 1.5px solid rgba(27, 67, 50, 0.12);
    padding: 0.7rem 0.9rem;
    font-size: 0.9rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: var(--bg, #FDFBF7);
}
.auth-form .form-input:focus {
    border-color: var(--primary, #1B4332);
    box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.1);
    outline: none;
}
.auth-form .form-input.is-invalid {
    border-color: var(--danger, #ef4444);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
}

.auth-form .btn-primary {
    width: 100%;
    padding: 0.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-lg, 0.75rem);
    background: linear-gradient(135deg, var(--primary, #1B4332), var(--primary-light, #2D6A4F));
    border: none;
    color: #fff;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 2px 8px rgba(27, 67, 50, 0.18);
}
.auth-form .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(27, 67, 50, 0.25);
}
.auth-form .btn-primary:active {
    transform: translateY(0);
}

/* ---------- Auth Footer ---------- */
.auth-footer {
    text-align: center;
    margin-top: 1.75rem;
    font-size: 0.85rem;
    color: var(--text-secondary, #6b7280);
}
.auth-footer p { margin-bottom: 0.35rem; }
.auth-footer a {
    color: var(--accent, #FF6B35);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}
.auth-footer a:hover {
    color: var(--accent-dark, #E5552A);
    text-decoration: underline;
}

/* ---------- Merchant Sections ---------- */
.auth-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(27, 67, 50, 0.08);
}
.auth-section:last-child { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.auth-section-title {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary, #1B4332);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.auth-section-title i { color: var(--accent, #FF6B35); }

/* ---------- Password Toggle ---------- */
.input-password-wrapper { position: relative; }
.input-password-wrapper .form-input { padding-right: 2.75rem; }
.btn-toggle-password {
    position: absolute;
    right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted, #9ca3af);
    cursor: pointer; font-size: 0.9rem;
    padding: 0.25rem;
    transition: color 0.15s ease;
}
.btn-toggle-password:hover { color: var(--primary, #1B4332); }

/* Backward compat */
.password-wrapper { position: relative; }
.password-wrapper .form-input { padding-right: 2.75rem; }
.toggle-password {
    position: absolute;
    right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none;
    color: var(--text-muted, #9ca3af);
    cursor: pointer; font-size: 0.9rem;
    padding: 0.25rem;
    transition: color 0.15s ease;
}
.toggle-password:hover { color: var(--primary, #1B4332); }

/* ---------- Alerts inside auth ---------- */
.auth-card .alert {
    border-radius: var(--radius-lg, 0.75rem);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .auth-card {
        padding: 2rem 1.25rem 1.5rem;
        border-radius: var(--radius-xl, 1rem);
    }
    .auth-app-name,
    .auth-brand h1 { font-size: 1.25rem; }
    .auth-logo,
    .auth-brand-icon { width: 52px; height: 52px; font-size: 1.25rem; }
}

/* ---------- Dark Mode Tweaks ---------- */
[data-theme="dark"] .auth-body {
    background:
        radial-gradient(ellipse 80% 60% at 20% 80%, rgba(27, 67, 50, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 80% 20%, rgba(255, 107, 53, 0.08) 0%, transparent 50%),
        var(--bg, #0C1A14);
}
[data-theme="dark"] .auth-card {
    border-color: rgba(45, 106, 79, 0.15);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .auth-form .form-input {
    background: var(--bg, #0C1A14);
    border-color: rgba(45, 106, 79, 0.2);
}
[data-theme="dark"] .auth-form .form-input:focus {
    border-color: var(--primary-light, #2D6A4F);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.15);
}
