/* Login Page Styles */
.navbar-custom {
    background: #ffffff !important;
    /* White background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e9ecef;
}

.navbar-custom .navbar-brand {
    color: #212529 !important;
    /* Black text */
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-custom .navbar-brand:hover {
    color: #007bff !important;
    /* Blue on hover */
}

.navbar-custom .nav-link {
    color: #495057 !important;
    /* Dark gray text */
    transition: color 0.3s ease;
    font-weight: 500;
}

.navbar-custom .nav-link:hover {
    color: #007bff !important;
    /* Blue on hover */
}

.navbar-custom .nav-link.active {
    color: #007bff !important;
    /* Blue for active */
    font-weight: 600;
}

/* Navbar toggler for mobile */
.navbar-custom .navbar-toggler {
    border-color: #007bff;
}

.navbar-custom .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* WHITE BACKGROUND - Same as signup */
.main-content {
    min-height: calc(100vh - 200px);
    background: #ffffff;
    padding: 2rem 0;
}

.login-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

/* MOBILE-OPTIMIZED TAB STYLES */
.login-tabs {
    margin-bottom: 2rem;
}

.login-tabs .btn-group {
    display: flex;
    width: 100%;
}

.login-tab {
    flex: 1;
    border-radius: 0 !important;
    border: 2px solid #007bff;
    /* Consistent blue border */
    background: white;
    color: #007bff;
    /* Blue text */
    transition: all 0.3s ease;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.login-tab:first-child {
    border-radius: 10px 0 0 10px !important;
}

.login-tab:last-child {
    border-radius: 0 10px 10px 0 !important;
}

.login-tab.active {
    background: #007bff !important;
    /* Blue background when active */
    color: white !important;
    border-color: #007bff !important;
    z-index: 1;
    font-weight: 600;
}

.login-tab:hover:not(.active) {
    background: #f8f9fa;
    border-color: #0056b3;
    /* Darker blue on hover */
    color: #0056b3;
    transform: translateY(-1px);
}

/* CRITICAL: Hide inactive forms completely */
.login-form {
    display: none !important;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-form.active {
    display: block !important;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .login-tab {
        font-size: 0.8rem;
        padding: 0.6rem 0.3rem;
    }

    .login-tab i {
        font-size: 0.9rem;
    }

    .login-container {
        margin: 1rem;
        padding: 1.5rem !important;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .main-content {
        padding: 1rem 0;
    }
}

/* Form Styles */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s;
    background: #ffffff;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, .25);
    background: #ffffff;
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 2px solid #e9ecef;
    border-right: none;
    background: #f8f9fa;
    color: #495057;
}

.input-group .form-control {
    border-radius: 0 10px 10px 0;
    border-left: none;
}

/* CONSISTENT BUTTON STYLING */
.btn-primary {
    background: #007bff !important;
    /* Consistent blue */
    border: 2px solid #007bff !important;
    border-radius: 10px;
    padding: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: white !important;
}

.btn-primary:hover {
    background: #0056b3 !important;
    /* Darker blue on hover */
    border-color: #0056b3 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.4);
}

.btn-outline-primary {
    border: 2px solid #007bff !important;
    color: #007bff !important;
    background: white !important;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-outline-primary:hover {
    background: #007bff !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 123, 255, 0.3);
}

/* Success and Secondary buttons */
.btn-success {
    background: #28a745 !important;
    border: 2px solid #28a745 !important;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background: #1e7e34 !important;
    border-color: #1e7e34 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #6c757d !important;
    color: #6c757d !important;
    background: white !important;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #6c757d !important;
    color: white !important;
    transform: translateY(-1px);
}

.otp-section {
    border-radius: 8px;
    border: 2px dashed #007bff;
    animation: slideDown 0.4s ease-out;
    background: #f8f9fa;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    border: none;
    padding: 1rem;
    font-weight: 500;
}

.alert-danger {
    background: #dc3545 !important;
    /* Consistent red */
    color: white;
    border: 2px solid #dc3545;
}

.alert-success {
    background: #28a745 !important;
    /* Consistent green */
    color: white;
    border: 2px solid #28a745;
}

/* Text Styling */
.text-primary {
    color: #007bff !important;
    /* Consistent blue */
}

.text-muted {
    color: #6c757d !important;
}

/* Link Styling */
a.text-decoration-none {
    transition: color 0.3s ease;
    color: #007bff;
}

a.text-decoration-none:hover {
    color: #0056b3 !important;
    /* Darker blue on hover */
}

/* Footer */
footer {
    margin-top: auto;
    background: #2c3e50 !important;
}

/* Page Title */
h2.text-primary {
    color: #007bff !important;
    /* Consistent blue */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Labels */
.form-label {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Small Text */
.form-text,
small.text-muted {
    color: #6c757d !important;
    font-size: 0.875rem;
}

/* Login Container Shadow on Hover */
.login-container:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease;
}

/* Better spacing for mobile */
@media (max-width: 768px) {
    .main-content {
        padding: 1rem 0.5rem;
    }

    .login-container {
        border-radius: 15px;
        margin: 0.5rem;
    }

    h2.text-primary {
        font-size: 1.5rem;
    }

    /* Mobile navbar adjustments */
    .navbar-custom .navbar-brand {
        font-size: 1.3rem;
    }
}

/* Navbar button styling for consistency */
.navbar-custom .btn-outline-light {
    border: 2px solid #007bff !important;
    color: #007bff !important;
    background: white !important;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-custom .btn-outline-light:hover {
    background: #007bff !important;
    color: white !important;
    transform: translateY(-1px);
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.login-tab:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Loading states */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fa-spin {
    animation: fa-spin 1s infinite linear;
}