/* =========================================
   AUTHENTICATION STYLES
   ========================================= */

/* Reuse variables from style.css */
:root {
    --auth-bg: #fdfbf7;
    --auth-card-bg: #ffffff;
    --auth-input-border: #e0e0e0;
    --auth-input-focus: var(--color-green-brand);
}

body.auth-page {
    background-color: var(--auth-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Auth Layout */
.auth-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Left Column - Hero Image */
.auth-hero {
    flex: 1;
    background: url('https://images.unsplash.com/photo-1596392997787-8d05545a952d?q=80&w=2670&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
    display: none;
    /* Hidden on mobile by default */
}

.auth-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
}

/* Right Column - Auth Card */
.auth-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background-color: var(--auth-bg);
    position: relative;
}

.auth-card {
    background: var(--auth-card-bg);
    padding: 40px 50px;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 480px;
    transition: transform 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo {
    height: 60px;
    width: auto;
    margin-bottom: 20px;
}

.auth-title {
    font-size: 1.8rem;
    color: var(--color-text-main);
    font-weight: 700;
    margin-bottom: 10px;
}

.auth-subtitle {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* Tabs */
.auth-tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.3s;
    background: none;
    border: none;
    font-size: 1rem;
    font-family: var(--font-main);
}

.auth-tab.active {
    color: var(--color-green-brand);
    border-bottom: 2px solid var(--color-green-brand);
    margin-bottom: -2px;
    /* Overlap border */
}

.auth-tab:hover:not(.active) {
    color: var(--color-text-main);
    background-color: #f9f9f9;
}

/* Forms */
.auth-form {
    display: none;
    animation: fadeIn 0.4s ease;
}

.auth-form.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--color-text-main);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--auth-input-border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s box-shadow 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--auth-input-focus);
    box-shadow: 0 0 0 3px rgba(14, 77, 45, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--color-text-light);
}

.forgot-password {
    color: var(--color-green-brand);
    font-weight: 600;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;
}

.btn-auth {
    width: 100%;
    padding: 14px;
    background-color: var(--color-green-brand);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s transform 0.2s;
    font-family: var(--font-main);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-auth:hover {
    background-color: #0a3a22;
    /* Darker green */
    transform: translateY(-1px);
}

.btn-auth:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Messages */
.auth-message {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
}

.auth-message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
    display: block;
}

.auth-message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block;
}

/* Password Strength & Visuals */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 38px;
    /* Adjust based on label height */
    cursor: pointer;
    color: #888;
}

/* Terms Checkbox */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.terms-check input {
    margin-top: 3px;
}

/* Responsive */
@media (min-width: 900px) {
    .auth-hero {
        display: block;
    }
}

@media (max-width: 480px) {
    .auth-content {
        padding: 20px;
    }

    .auth-card {
        padding: 30px 20px;
        box-shadow: none;
        background: transparent;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    display: none;
}

.btn-auth.loading .spinner {
    display: block;
}

.btn-auth.loading span {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}