/* Modern Login Page Styling - Bootstrap 5 with Dark Mode */

/* Fix Bootstrap 5 Modal z-index conflict with jQuery UI */
.modal-backdrop {
    z-index: 1050 !important;
}

.modal {
    z-index: 1060 !important;
}

html, body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body {
    /* Plain White Background - Use dark text */
    background: #ffffff !important;
    --footer-color: rgba(0, 0, 0, 0.7);
    --footer-shadow: none;
    
    /* Gradient Background Options (Uncomment one to use) */
    
    /* Option 1: Blue Purple - Use white text */
    /* background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7e22ce 100%) !important; */
    /* --footer-color: rgba(255, 255, 255, 0.95); */
    /* --footer-shadow: 0 2px 4px rgba(0,0,0,0.8); */
    
    /* Option 2: Purple Pink - Use white text */
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important; */
    /* --footer-color: rgba(255, 255, 255, 0.95); */
    /* --footer-shadow: 0 2px 4px rgba(0,0,0,0.8); */
    
    /* Option 3: Ocean Blue - Use white text */
    /* background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%) !important; */
    /* --footer-color: rgba(255, 255, 255, 0.95); */
    /* --footer-shadow: 0 2px 4px rgba(0,0,0,0.8); */
    
    /* Option 4: Sunset Orange - Use dark text */
    /* background: linear-gradient(135deg, #FA8BFF 0%, #2BD2FF 50%, #2BFF88 100%) !important; */
    /* --footer-color: rgba(0, 0, 0, 0.8); */
    /* --footer-shadow: 0 2px 4px rgba(255,255,255,0.8); */
    
    /* Option 5: Professional Dark Blue - Use white text */
    /* background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%) !important; */
    /* --footer-color: rgba(255, 255, 255, 0.95); */
    /* --footer-shadow: 0 2px 4px rgba(0,0,0,0.8); */
    
    /* Option 6: Plain Solid Blue - Use white text */
    /* background: #2563eb !important; */
    /* --footer-color: rgba(255, 255, 255, 0.95); */
    /* --footer-shadow: 0 2px 4px rgba(0,0,0,0.8); */
    
    /* Option 7: Plain Solid Purple - Use white text */
    /* background: #7c3aed !important; */
    /* --footer-color: rgba(255, 255, 255, 0.95); */
    /* --footer-shadow: 0 2px 4px rgba(0,0,0,0.8); */
    
    /* Option 8: Plain Solid Dark - Use white text */
    /* background: #1e293b !important; */
    /* --footer-color: rgba(255, 255, 255, 0.95); */
    /* --footer-shadow: 0 2px 4px rgba(0,0,0,0.8); */
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    padding: 10px 10px 10px 10px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

[data-bs-theme="dark"] body {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important;
}

.container {
    max-width: 480px !important;
    padding: 0 !important;
    margin: 20px auto !important;
    flex-shrink: 0 !important;
}

.row {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3) !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 10px 15px !important;
}

[data-bs-theme="dark"] .row {
    background: rgba(45, 51, 56, 0.95) !important;
}

/* Hide image side - single column layout */
.col-md-8 {
    display: none !important;
}

/* Form Side - Full width */
.col-md-4 {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Logo */
.image_class {
    text-align: center !important;
    margin-bottom: 15px !important;
}

.image_class img {
    max-width: 250px !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Form Title */
.form-signin-heading {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--bs-body-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 10px;
    padding: 12px 15px;
    border: 1px solid var(--bs-border-color);
    margin-bottom: 15px;
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    background-color: var(--bs-body-bg);
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
    margin-bottom: 15px;
}

.password-wrapper .fa-eye,
.password-wrapper .fa-eye-slash {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--bs-secondary-color);
    z-index: 10;
}

/* Checkbox */
.checkbox {
    margin: 15px 0;
}

.checkbox label {
    color: var(--bs-body-color);
    font-weight: 500;
}

.confirm-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.confirm-link:hover {
    text-decoration: underline;
}

/* Login Button */
.btn-login,
button[type="submit"],
button#Btn {
    border-radius: 10px !important;
    padding: 14px 20px !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
}

.btn-login:hover:not(:disabled),
button[type="submit"]:hover:not(:disabled),
button#Btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%) !important;
}

.btn-login:disabled,
button[type="submit"]:disabled,
button#Btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    background: linear-gradient(135deg, #a0a0a0 0%, #808080 100%) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    color: #ffffff !important;
}

.btn-login:active:not(:disabled),
button[type="submit"]:active:not(:disabled),
button#Btn:active:not(:disabled) {
    transform: translateY(0) !important;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3) !important;
}

/* Links */
.text-center a {
    color: #667eea;
    text-decoration: none;
    margin: 0 8px;
    font-weight: 500;
}

.text-center a:hover {
    text-decoration: underline;
    color: #764ba2;
}

/* Alerts */
.alert {
    border-radius: 10px;
    margin: 20px auto;
    max-width: 480px;
    padding: 15px;
    border: none;
    text-align: center;
    font-weight: 500;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    color: #856404;
}

[data-bs-theme="dark"] .alert-warning {
    background: linear-gradient(135deg, #664d03 0%, #997404 100%);
    color: #ffecb5;
}

.alert-success {
    background: linear-gradient(135deg, #d1e7dd 0%, #badbcc 100%);
    color: #0f5132;
}

[data-bs-theme="dark"] .alert-success {
    background: linear-gradient(135deg, #051b11 0%, #0a3622 100%);
    color: #75b798;
}

/* Footer */
.page-header,
.page-footer {
    position: relative !important;
    text-align: center !important;
    margin: 5px 0 5px 0 !important;
    padding: 5px 5px !important;
    border: none !important;
    background: transparent !important;
}

.page-header p,
.page-header h6,
.page-footer p,
.page-footer h6 {
    margin: 0 !important;
    font-size: 0.75rem !important; /* Smaller size */
}

.page-header a,
.page-footer a {
    color: var(--footer-color, rgba(0, 0, 0, 0.7)) !important;
    text-decoration: none !important;
    font-size: 0.75rem !important; /* Smaller size - was 0.875rem */
    text-shadow: var(--footer-shadow, none) !important;
    font-weight: 400 !important; /* Lighter weight - was 500 */
}

[data-bs-theme="dark"] .page-header a,
[data-bs-theme="dark"] .page-footer a {
    color: rgba(255, 255, 255, 0.9) !important;
}

.page-header a:hover,
.page-footer a:hover {
    color: #667eea !important;
    text-decoration: underline !important;
}

/* Responsive */
@media (max-width: 768px) {
    .col-md-8 {
        display: none;
    }
    
    .col-md-4 {
        padding: 30px 20px;
    }
    
    .form-signin-heading {
        font-size: 1.5rem;
    }
}

/* Remove old styles */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Clearfix */
.clearfix {
    height: 10px;
}

/* External Links Dropdown */
.external-links {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.external-links-toggle {
    color: #6c757d;
    font-size: 0.875rem;
    cursor: pointer;
    transition: color 0.3s;
    user-select: none;
}

.external-links-toggle:hover {
    color: #667eea;
}

.external-links-list {
    margin-top: 15px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.external-links-list.show {
    display: block;
}

.external-link-item {
    display: block;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 8px;
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s;
}

.external-link-item:hover {
    background: #667eea;
    color: white;
    transform: translateX(5px);
    text-decoration: none;
}

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