/* Reset and Base Styles */
:root {
    --primary-color: #4361ee;
    --primary-hover: #3a56d4;
    --text-color: #2d3748;
    --light-gray: #f7fafc;
    --border-color: #e2e8f0;
    --error-color: #e53e3e;
    --success-color: #38a169;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f8fafc;
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Main Container */
.login-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

/* Auth Form */
.auth-form-light {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 2.5rem;
    width: 100%;
    transition: var(--transition);
    animation: fadeIn 0.5s ease-out forwards;
}

/* Brand Logo */
.brand-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.brand-logo img.logo-form {
    max-width: 200px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
}

.brand-logo h2 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.75rem;
}

.brand-logo p {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Form Elements */
.login-form {
    margin-top: 2rem;
}

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

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

.input-icon {
    position: absolute;
    left: 12px;
    color: black !important;
    font-size: 1rem;
    pointer-events: none;
}

.input-icon svg{
    color: black !important;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 40px;
    font-size: 0.9375rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: var(--transition);
    background-color: #f8fafc;
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
    background-color: white;
}

/* Toggle Password */
.toggle-password {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    font-size: 1rem;
    transition: color 0.2s;
}

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

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1.5rem 0;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
}

.remember-me label {
    font-size: 0.875rem;
    color: #475569;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

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

.btn-text {
    transition: opacity 0.3s;
}

.btn-loading {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loading {
    opacity: 1;
}

/* Session Info */
.session-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 1.5rem 0;
    padding: 0.75rem;
    background-color: #f1f5f9;
    border-radius: 6px;
    font-size: 0.875rem;
    color: #475569;
}

.session-info i {
    color: var(--primary-color);
}

/* Register Link */
.register-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.register-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Footer */
.login-footer {
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8125rem;
    color: #94a3b8;
}

/* Error States */
.form-control.is-invalid {
    border-color: var(--error-color);
    padding-right: 2.25rem;
    background-image: none;
}

.invalid-feedback {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--error-color);
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .auth-form-light {
        padding: 1.5rem;
    }
    
    .brand-logo h2 {
        font-size: 1.5rem;
    }
    
    .brand-logo p {
        font-size: 0.9375rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }
}

/* Loading State */
.btn.loading .btn-text {
    visibility: hidden;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}