/* ============================
   Redesigned Authentication Styles (auth.css)
   ============================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #043668;
    --accent-color: #ffc107;
    --light-bg: #fdfdfd;
    --text-dark: #333;
    --text-muted: #6c757d;
    --transition: all 0.3s ease;
}

body.auth-page {
    font-family: 'Poppins', sans-serif;
    background-color: #fff;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Auth Container Grid */
.auth-wrapper {
    display: flex;
    min-height: calc(100vh - 120px);
    margin-top: 110px; /* Increased space for the taller 75px navbar logo */
}

.auth-left {
    background: radial-gradient(circle at center, #0a4d8d 0%, var(--primary-color) 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #fff;
    text-align: center;
}

.auth-illustration {
    max-width: 80%;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 30px rgba(255, 193, 7, 0.2));
    border-radius: 20px;
}

.auth-left h1 {
    font-weight: 700;
    margin-bottom: 15px;
}

.auth-right {
    background-color: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-container {
    width: 100%;
    max-width: 480px;
}

.auth-header {
    margin-bottom: 35px;
}

.auth-header h2 {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

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

/* User Type / Toggle Buttons */
.auth-toggle-group {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: #f1f3f5;
    padding: 6px;
    border-radius: 40px;
    width: fit-content;
    position: relative;
}

.auth-toggle-btn {
    padding: 10px 30px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
}

.auth-toggle-btn.active {
    color: #fff;
}

.auth-toggle-group::after {
    content: "";
    position: absolute;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    background: var(--primary-color);
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 1;
    box-shadow: 0 4px 12px rgba(4, 54, 104, 0.2);
}

.auth-toggle-group:has(#register-tab.active)::after {
    left: calc(50%);
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.label-required {
    color: #dc3545;
    margin-left: 3px;
}

.form-control-modern {
    width: 100%;
    padding: 12px 18px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(4, 54, 104, 0.05);
    outline: none;
}

.form-control-modern.is-invalid {
    border-color: #dc3545;
}

.form-control-modern.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.05);
}

.input-container {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
}

.input-modern-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.form-control-modern {
    width: 100%;
    padding: 12px 18px 12px 48px; /* Added left padding for icon */
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control-modern:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(4, 54, 104, 0.05);
    outline: none;
}

.form-control-modern:focus + .input-icon {
    color: var(--primary-color);
}

.form-control-modern.is-invalid {
    border-color: #dc3545 !important;
    background-image: none !important; /* Remove bootstrap default icon */
}

.form-control-modern.is-valid {
    border-color: #198754 !important;
    background-image: none !important;
}

.password-toggle {
    position: absolute;
    right: 18px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 10;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary-color);
}

/* Buttons */
.btn-auth-primary {
    width: 100%;
    padding: 14px;
    background: var(--accent-color);
    color: var(--primary-color);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 15px;
}

.btn-auth-primary:hover {
    background: #ffca2c;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.3);
}

.auth-divider {
    text-align: center;
    position: relative;
    margin: 30px 0;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
    z-index: 1;
}

.auth-divider span {
    background: var(--light-bg);
    padding: 0 15px;
    position: relative;
    z-index: 2;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.auth-footer-text {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.auth-footer-text a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out;
}

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

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .auth-wrapper {
        margin-top: 70px;
        display: block !important; /* Force block to prevent flex-basis issues */
    }
    .auth-left {
        display: none !important; 
    }
    .auth-right {
        padding: 40px 15px !important;
        width: 100% !important;
        min-height: auto !important;
    }
    .auth-form-container {
        max-width: 100% !important;
        margin: 0 auto;
    }
    .auth-header h2 {
        font-size: 1.8rem;
    }
    .auth-toggle-group {
        justify-content: center !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .auth-toggle-btn {
        padding: 8px 15px;
        font-size: 0.85rem;
    }
}
