/* Global Styles & Animations */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #0b3f64 0%, #1a5c8d 100%);
    --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --card-shadow: none;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

body.login-page {
    font-family: 'Outfit', sans-serif;
    background: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow-x: hidden;
}

body.login-page .main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Hide default themes header */
body.login-page .header,
body.login-page .separator {
    display: none;
}

/* Auth Wrapper */
.auth-wrapper {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
}

/* Card Design */
.auth-card {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 100vh;
    border-radius: 0;
    background: #ffffff;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    flex-direction: row;
    transition: transform 0.3s var(--transition);
    animation: fadeIn 0.8s ease-out forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Left Brand Panel */
.brand-panel {
    flex: 1;
    /* Take 50% width */
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    /* Left align content */
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

/* Constrain content width to match previous card design feel */
.brand-panel>* {
    width: 100%;
    max-width: 480px;
}

/* Abstract shapes background */
.brand-panel::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(60px);
}

.brand-panel::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -50px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    filter: blur(40px);
}

.brand-tag {
    font-family: 'Caveat', cursive;
    font-size: 1.8rem;
    font-weight: 600;
    opacity: 1;
    margin-bottom: 0.5rem;
    z-index: 1;
}

.brand-name {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--bs-primary-rgb);
    margin-bottom: 1rem;
    line-height: 1.1;
    z-index: 1;
}

.brand-description {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 90%;
    margin-bottom: 3rem;
    z-index: 1;
}

/* Brand Features */
.brand-features {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    z-index: 1;
    width: 100%;
}

.b-feature {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.25rem;
    border-radius: 16px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: transform 0.2s ease;
}

.b-feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.b-icon {
    background: rgba(255, 255, 255, 0.2);
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.25rem;
}

.b-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.b-text strong {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.b-text span {
    font-size: 0.85rem;
    opacity: 0.85;
    line-height: 1.5;
}

/* Right Sign In Panel */
.sign-in-panel {
    flex: 1;
    /* Take 50% width */
    padding: 4rem 5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    /* Center the content block horizontally */
    background: #ffffff;
    position: relative;
    min-height: 100vh;
}

/* Constrain content width */
.sign-in-panel>* {
    width: 100%;
    max-width: 460px;
    /* Tighter constraint for form readability */
}

.sign-in-header h2 {
    font-size: 1.875rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Google Button */
.google-btn {
    background-color: #ffffff;
    color: #3c4043;
    border: 1px solid #dadce0;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.google-btn:hover {
    background-color: #f8faff;
    border-color: #d2e3fc;
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
    transform: translateY(-2px);
    color: #1a73e8;
}

.google-btn:active {
    transform: translateY(0);
}

.google-icon {
    width: 24px;
    height: 24px;
}

/* Auth Features */
.auth-features {
    margin-top: 2.5rem;
    display: grid;
    gap: 1rem;
}

.feature-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 10px;
    transition: background 0.2s;
}

.feature-item:hover {
    background: #edf2f7;
}

.feature-icon {
    color: #0b3f64;
    margin-right: 1rem;
    font-size: 1.1rem;
    background: rgba(11, 63, 100, 0.1);
    padding: 6px;
    border-radius: 6px;
}

.feature-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Alerts */
.alert-message {
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    border: none;
}

.alert-danger {
    background-color: #fff5f5;
    color: #c53030;
    border-left: 4px solid #c53030;
}

/* Footer & Links */
.sign-in-footnote {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #edf2f7;
    font-size: 0.85rem;
}

.footnote-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.footnote-links a:hover {
    color: #0b3f64;
}

/* Responsive Design */
@media (max-width: 991px) {
    .auth-card {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }

    .brand-panel {
        display: none;
        min-height: auto;
        padding: 3rem;
    }

    .sign-in-panel {
        padding: 3rem;
        min-height: 100vh;
        width: 100%;
        align-items: center;
        /* Still center horizontally on mobile */
    }

    .sign-in-panel>* {
        max-width: 500px;
        /* Slightly wider tolerance on mobile/tablet if needed, or keep uniform */
    }
}

@media (max-width: 576px) {
    .sign-in-panel {
        padding: 2rem 1.5rem;
        justify-content: flex-start;
        padding-top: 4rem;
        align-items: stretch;
        /* On mobile, let it stretch to full width minus padding */
    }

    .sign-in-panel>* {
        max-width: 100%;
        /* Remove constraint on tiny screens so padding handles it */
    }

    .brand-name {
        font-size: 2.5rem;
    }

    .sign-in-footnote {
        margin-top: auto;
        padding-bottom: 2rem;
    }
}