/* Manti Jewel Art - Refined Luxury Auth Theme */

/* --- 1. Variables & Reset --- */
:root {
    --bg-primary: #FDFBF7;
    /* Soft Ivory/Cream */
    --bg-card: #FFFFFF;
    --text-main: #1A1A1A;
    --text-muted: #555555;
    --accent-gold: #D4AF37;
    --accent-dark: #0A0F1C;
    --border-color: #E5E5E5;
    --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.05);

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.auth-page {
    background-color: var(--bg-primary);
    /* Subtle texture or plain color */
    background-image: radial-gradient(circle at top right, rgba(212, 175, 55, 0.05), transparent 40%),
        radial-gradient(circle at bottom left, rgba(10, 15, 28, 0.03), transparent 40%);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    overflow-x: hidden;
}

/* Hide old blobs if present */
.bg-blob {
    display: none;
}

/* --- 2. Card Layout --- */
.auth-card {
    background: var(--bg-card);
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 10;
    animation: slideUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* --- 3. Header Styling --- */
.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-container img {
    /* Ensure the logo is crisp */
    height: auto;
    max-height: 80px;
    /* Limit height */
    width: auto;
    max-width: 140px;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.02);
}

.auth-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-dark);
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2.5rem;
    line-height: 1.5;
}

/* --- 4. Form Elements --- */
.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-input {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-main);
    background: #FAFAFA;
    /* Very light gray bg */
    transition: all 0.2s ease;
    outline: none;
}

.auth-input:focus {
    background: #FFFFFF;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.auth-input::placeholder {
    color: #AAA;
}

/* --- 5. Buttons & Actions --- */
.auth-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent-dark);
    color: #FFF;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.auth-btn:hover {
    background: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.2);
    color: #000;
    /* Contrast on gold */
}

.auth-btn i {
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.auth-btn:hover i {
    transform: translateX(4px);
}

/* Helper Actions */
.options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    margin-right: 0.6rem;
    accent-color: var(--accent-dark);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

#forgot-password {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

#forgot-password:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

/* --- 6. Footer --- */
.auth-footer {
    margin-top: 2.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-link {
    color: var(--accent-dark);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--accent-gold);
    text-decoration: underline;
}

/* Feedback Messages */
.error-box,
.success-msg {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    display: none;
    /* Toggled by JS */
    align-items: center;
    gap: 0.5rem;
}

.error-box {
    background-color: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
}

.success-msg {
    background-color: #D1FAE5;
    color: #059669;
    border: 1px solid #A7F3D0;
}


/* --- 7. Mobile Optimization --- */
@media (max-width: 480px) {
    body.auth-page {
        padding: 0.5rem;
        /* Maximize usable space */
        align-items: flex-start;
        /* Ensure scrolling works if card is tall */
        overflow-y: auto;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.03);
        /* Lighter shadow on mobile */
        margin-top: 1rem;
        /* Space from top */
        margin-bottom: 1rem;
    }

    .auth-title {
        font-size: 1.8rem;
    }

    .auth-subtitle {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }

    /* Input Sizing for Touch Targets */
    .auth-input {
        padding: 1rem;
        font-size: 16px;
        /* Critical for iOS zoom prevention */
    }

    .form-group {
        margin-bottom: 1.2rem;
    }

    /* Button Touch Target */
    .auth-btn {
        padding: 1rem;
        margin-top: 0.5rem;
    }

    .logo-container img {
        max-width: 120px;
    }
}