:root {
    /* Light mode variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f6f9fe;
    --bg-tertiary: #f1f6fe;
    --text-primary: #444444;
    --text-secondary: #777777;
    --text-muted: #999999;
    --border-color: #e2eefd;
    --card-shadow: 0 0 29px 0 rgba(68, 88, 144, 0.12);
    --card-shadow-hover: 0px 0 25px 0 rgba(16, 110, 234, 0.1);
    --primary-color: #cc0000;
    --primary-hover: #990000;
    --navbar-bg: #ffffff;
    --topbar-bg: #cc0000;
    --hero-overlay: rgba(0, 0, 0, 0.7);
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --footer-bg: #f1f6fe;
    --gradient-primary: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    --gradient-student: linear-gradient(135deg, #cc0000 0%, #990000 50%, #7d0000 100%);
}

[data-theme="dark"] {
    /* Dark mode variables */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --text-primary: #ffffff;
    --text-secondary: #e9ecef;
    --text-muted: #adb5bd;
    --border-color: #495057;
    --card-shadow: 0 0 29px 0 rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0px 0 25px 0 rgba(255, 255, 255, 0.1);
    --primary-color: #cc0000;
    --primary-hover: #990000;
    --navbar-bg: #2d2d2d;
    --topbar-bg: #cc0000;
    --hero-overlay: rgba(0, 0, 0, 0.8);
    --input-bg: #404040;
    --input-border: #6c757d;
    --footer-bg: #2d2d2d;
    --gradient-primary: linear-gradient(135deg, #cc0000 0%, #990000 100%);
    --gradient-student: linear-gradient(135deg, #cc0000 0%, #990000 50%, #7d0000 100%);
}

* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-container {
    margin-top: 0;
    position: relative;
}

.login-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    max-width: 1200px;
    margin: 40px auto;
    min-height: 650px;
}

.login-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-5px);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    z-index: 1;
}

/* Student Section - Left Side - ENLARGED */
.student-section {
    background: var(--gradient-student);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    min-height: 650px;
}

.student-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.student-container {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    width: 100%;
}

.student-icon-wrapper {
    margin-bottom: 2.5rem;
}

.student-icon-wrapper i {
    font-size: 8rem;
    color: white;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.05);
    }
}

.student-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.student-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.student-features {
    text-align: left;
    max-width: 320px;
    margin: 0 auto;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(8px);
}

.feature-item i {
    font-size: 1.3rem;
    margin-right: 1rem;
    width: 24px;
    text-align: center;
}

.feature-item span {
    font-weight: 500;
    font-size: 1rem;
}

/* Form Section - Right Side - ENLARGED */
.form-section {
    padding: 0;
    display: flex;
    align-items: center;
}

.form-section .card-body {
    padding: 3rem;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Logo Styling - ENLARGED */
.mobile-logo {
    height: 70px;
    width: auto;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.desktop-logo {
    height: 80px;
    width: auto;
    border-radius: 12px;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.desktop-logo:hover {
    transform: scale(1.05);
}

/* Login Title - ENLARGED */
.login-title {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 0.75rem;
    font-size: 2rem;
}

.login-title i {
    color: var(--primary-color);
}

/* Form Styling - ENLARGED */
.form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.form-label i {
    color: var(--primary-color);
    width: 20px;
}

.form-control {
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    height: auto;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    background-color: var(--input-bg);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(255, 0, 0, 0.25);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Button Styling - ENLARGED */
.login-btn {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 1.2rem;
    height: auto;
    margin-top: 1rem;
}

.login-btn:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.3);
}

.login-btn:active {
    transform: translateY(-1px);
}

.login-btn:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 0, 0, 0.25);
}

.login-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

/* Loading Animation */
.btn-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Links Styling - ENLARGED */
.admin-login-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.admin-login-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Error Styling - ENLARGED */
.invalid-feedback {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

.is-invalid {
    border-color: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }

    .form-section .card-body {
        padding: 2rem;
    }

    .student-section {
        display: none;
    }

    .login-card {
        margin-top: 2rem;
        max-width: 500px;
        min-height: auto;
    }

    .mobile-logo {
        height: 60px;
    }

    .login-title {
        font-size: 1.75rem;
    }

    .form-control {
        padding: 0.875rem 1rem;
        font-size: 1rem;
    }

    .login-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .form-section .card-body {
        padding: 1.5rem;
    }

    .login-btn {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }

    .login-title {
        font-size: 1.5rem;
    }

    .mobile-logo {
        height: 50px;
    }
}

/* Large screens - ENLARGED */
@media (min-width: 1200px) {
    .student-icon-wrapper i {
        font-size: 10rem;
    }

    .student-content h2 {
        font-size: 3rem;
    }

    .student-content p {
        font-size: 1.4rem;
    }

    .form-section .card-body {
        padding: 4rem;
    }

    .feature-item {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .feature-item i {
        font-size: 1.5rem;
    }

    .feature-item span {
        font-size: 1.1rem;
    }
}

/* Focus indicators for accessibility */
.form-control:focus,
.login-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Text colors */
.text-muted {
    color: var(--text-muted) !important;
    font-size: 1rem;
}

.border-top {
    border-color: var(--border-color) !important;
}

/* Additional styling for better integration */
.text-center p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Ensure proper spacing */
.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 2rem !important;
}

/* Fix for form spacing */
.form-section .card-body form {
    margin-bottom: 0;
}

/* Ensure the card takes proper height */
.row.g-0 {
    min-height: 650px;
}

.col-md-6 {
    min-height: 650px;
}

/* Enhanced card shadow and border radius */
.login-card {
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .login-card {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}