/* Auth Pages Styles - Reusable for login, forgot_password, verify_2fa, update_user_password */

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

:root {
    --forest-green: #2d5016;
    --forest-green-light: #3d6b1f;
    --forest-green-dark: #1d3a0f;
    --white: #ffffff;
    --red-accent: #dc3545;
    --gray-light: #f8f9fa;
    --gray-border: #dee2e6;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --text-faint: #adb5bd;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--white);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* Geometric Background Pattern */
.geometric-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.03;
    pointer-events: none;
}

.geometric-bg svg {
    width: 100%;
    height: 100%;
}

/* Main Container */
.auth-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.5rem;
    position: relative;
    z-index: 1;
}

.auth-wrapper {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    padding: 0 1rem;
}

/* Left Side - Features */
.features-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.brand-header {
    text-align: left;
    margin-bottom: 0.5rem;
}

.brand-logo {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.brand-logo img {
    height: 60px;
    width: auto;
}

.brand-header .tagline {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
}

.sisu-quote {
    font-size: 0.75rem;
    color: var(--text-faint);
    font-style: italic;
    margin-top: 0.25rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 0.5rem;
}

.feature-card {
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--gray-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--forest-green);
    transition: height 0.3s ease;
}

.feature-card:hover {
    border-color: var(--forest-green);
    box-shadow: 0 8px 24px rgba(45, 80, 22, 0.1);
    transform: translateY(-2px);
}

.feature-card:hover::before {
    height: 100%;
}

.feature-card:nth-child(2)::before,
.feature-card:nth-child(4)::before,
.feature-card:nth-child(6)::before {
    background: var(--red-accent);
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--forest-green-light) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.15);
}

.feature-card:nth-child(2) .feature-icon,
.feature-card:nth-child(4) .feature-icon,
.feature-card:nth-child(6) .feature-icon {
    background: linear-gradient(135deg, var(--red-accent) 0%, #c82333 100%);
}

.feature-icon svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.feature-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.feature-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Right Side - Form */
.form-section {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--gray-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 1rem;
    max-width: 100%;
    margin: 0;
}

.form-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-border);
}

.form-header h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.form-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Alert Messages */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert::before {
    content: '';
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.alert-success::before {
    content: '✓';
    background: #155724;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.alert-danger::before {
    content: '!';
    background: var(--red-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.85rem;
}

.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 0.7rem 0.85rem;
    border: 2px solid var(--gray-border);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    background: var(--white);
}

.form-group input:focus {
    outline: none;
    border-color: var(--forest-green);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.1);
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--forest-green);
}

.remember-me label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}

.btn-primary {
    width: 100%;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--forest-green) 0%, var(--forest-green-light) 100%);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(45, 80, 22, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.form-footer {
    text-align: center;
    margin-top: 1rem;
}

.form-footer a {
    color: var(--forest-green);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    position: relative;
}

.form-footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red-accent);
    transition: width 0.3s ease;
}

.form-footer a:hover::after {
    width: 100%;
}

.form-footer a:hover {
    color: var(--forest-green-dark);
}

/* ReCAPTCHA Container */
.recaptcha-container {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.recaptcha-container .g-recaptcha {
    transform: scale(1);
    transform-origin: center center;
}

/* Footer */
.auth-footer {
    background: var(--white);
    border-top: 1px solid var(--gray-border);
    padding: 1rem 0.5rem 1rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    padding: 0 1rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-brand h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--forest-green);
    margin-bottom: 0.25rem;
}

.footer-brand .company-info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.footer-brand .company-info a {
    color: var(--forest-green);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-brand .company-info a:hover {
    color: var(--red-accent);
}

.footer-brand .since {
    font-size: 0.75rem;
    color: var(--text-faint);
    font-style: italic;
}

.footer-spirit {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-spirit .spirit-title {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-spirit .spirit-quote {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    line-height: 1.5;
}

.footer-spirit .daily-quote {
    font-size: 0.75rem;
    color: var(--red-accent);
    font-weight: 500;
}

.footer-mission {
    text-align: right;
}

.footer-mission .mission-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.footer-mission .mission-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-bottom {
    max-width: 100%;
    margin: 0.75rem auto 0;
    padding: 0.75rem 1rem 0;
    border-top: 1px solid var(--gray-border);
    text-align: center;
    font-size: 0.7rem;
    color: var(--text-faint);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-section {
        order: 1;
    }

    .form-section {
        order: 2;
        position: relative;
        top: 0;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-mission {
        text-align: center;
    }
}

@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .brand-header {
        text-align: center;
    }

    .brand-logo {
        justify-content: center;
    }

    .brand-logo img {
        height: 50px;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .feature-card {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .feature-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .feature-icon svg {
        width: 16px;
        height: 16px;
    }

    .feature-content {
        flex: 1;
    }

    .feature-title {
        font-size: 0.9rem;
        margin-bottom: 0.2rem;
    }

    .feature-description {
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .form-section {
        padding: 1.25rem 1rem;
    }

    .form-header h2 {
        font-size: 1.35rem;
    }

    .recaptcha-container .g-recaptcha {
        transform: scale(0.9);
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 0.75rem 0.5rem;
    }

    .brand-logo img {
        height: 45px;
    }

    .form-section {
        padding: 1rem 0.75rem;
    }

    .feature-card {
        padding: 0.85rem;
    }

    .feature-icon {
        width: 36px;
        height: 36px;
    }

    .feature-icon svg {
        width: 18px;
        height: 18px;
    }

    .footer-content {
        padding: 0 0.5rem;
    }

    .recaptcha-container .g-recaptcha {
        transform: scale(0.85);
    }
}

/* Touch-friendly for mobile */
@media (hover: none) and (pointer: coarse) {
    .form-group input,
    .btn-primary {
        min-height: 48px;
    }

    .remember-me input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }
}
