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

html, body {
    height: 100%;
    background: linear-gradient(135deg, var(--light) 0%, #e0e7ff 100%);
    font-family: 'Inter', sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    color: #334155;
    line-height: 1.6;
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.login-container {
    width: 100%;
    max-width: 500px;
}

.login-card {
    border: none;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.login-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.login-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.login-card-header img {
    max-height: 60px;
    margin-bottom: 1rem;
}

.login-card-header h2 {
    color: white;
    font-size: 1.75rem;
    margin: 0.5rem 0 0 0;
}

.login-card-body {
    padding: 2.5rem;
}

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

.form-label {
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #cbd5e1;
}

.input-group {
    position: relative;
}

.input-group-text {
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    background: transparent;
    border-right: none;
    color: var(--secondary);
    transition: all 0.3s ease;
}

.input-group .form-control {
    border-left: none;
}

/* Icon color change on input focus */
.input-group:has(.form-control:focus) .input-group-text {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-check {
    margin-bottom: 1.5rem;
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.35rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-label {
    color: var(--secondary);
    font-weight: 500;
    margin-left: 0.5rem;
    cursor: pointer;
}

.btn-login {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: 0.75rem;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.3);
    color: white;
}

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

.login-card-footer {
    padding: 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    margin: 0.25rem 0;
}

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

.error-feedback {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.session-message {
    margin-bottom: 1.5rem;
}

.alert {
    border-radius: 0.75rem;
    border: none;
}

.select2-selection__rendered {
    line-height: 25px !important;
}

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 38px !important;
    border: 2px solid #e2e8f0 !important;
    border-radius: 0.75rem !important;
}

.select2-selection__arrow {
    height: 38px !important;
}

@media (max-width: 768px) {
    main {
        padding: 1rem;
    }

    .login-card-header {
        padding: 2rem 1.5rem;
    }

    .login-card-body {
        padding: 1.5rem;
    }

    .login-container {
        max-width: 100%;
    }
}
