/* Modern Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #666eea 100%);
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}


.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-title {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.login-subtitle {
    color: #666;
    font-size: 14px;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: #fff;
}

.form-control.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-control.success {
    border-color: #28a745;
    background-color: #f8fff9;
}

.input-group {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    transition: color 0.3s ease;
    z-index: 2;
}

.form-control.with-icon {
    padding-left: 45px;
}

.form-control:focus ~ .input-icon {
    color: #667eea;
}

.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
    z-index: 2;
}

.password-toggle:hover {
    color: #667eea;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #666eea 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-login .spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 10px;
}

.btn-login.loading .spinner {
    display: inline-block;
}

.btn-login.loading .btn-text {
    opacity: 0.7;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #dc3545;
    font-size: 14px;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease;
}

.error-message .error-icon {
    margin-right: 10px;
    font-size: 18px;
}

.success-message {
    background: #efe;
    color: #3c3;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #28a745;
    font-size: 14px;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease;
}

.success-message .success-icon {
    margin-right: 10px;
    font-size: 18px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.help-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: flex;
    align-items: center;
}

.help-text .help-icon {
    margin-right: 5px;
    font-size: 12px;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.form-footer a {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.footer-separator {
    color: #999;
    font-size: 14px;
}

.footer-credit {
    color: #999;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
    cursor: default;
}

.footer-credit:hover {
    color: #667eea;
}

.footer-credit .heart {
    color: #e74c3c;
    font-size: 12px;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

.security-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
    border-left: 4px solid #17a2b8;
}

.security-info h6 {
    color: #17a2b8;
    font-size: 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.security-info h6 .security-icon {
    margin-right: 8px;
}

.security-info p {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

.login-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step-indicator {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 14px;
}

.step-indicator .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e1e5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.step-indicator.active .step-number {
    background: #667eea;
    color: white;
}

.step-indicator.completed .step-number {
    background: #28a745;
    color: white;
}

.step-divider {
    width: 40px;
    height: 2px;
    background: #e1e5e9;
    margin: 0 10px;
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.fade-out {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

.slide-in {
    animation: slideIn 0.4s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Dark mode support */
[data-bs-theme="dark"] .login-container {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

[data-bs-theme="dark"] .login-card {
    background: rgba(33, 37, 41, 0.95);
    color: #e9ecef;
    border: 1px solid #495057;
}

[data-bs-theme="dark"] .login-title {
    color: #e9ecef;
}

[data-bs-theme="dark"] .login-subtitle {
    color: #adb5bd;
}

[data-bs-theme="dark"] .form-label {
    color: #adb5bd;
}

[data-bs-theme="dark"] .form-control {
    background-color: #495057;
    border-color: #6c757d;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control:focus {
    background-color: #5a6268;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
}

[data-bs-theme="dark"] .form-control.with-icon {
    background-color: #495057;
    color: #e9ecef;
}

[data-bs-theme="dark"] .form-control.with-icon:focus {
    background-color: #5a6268;
}

[data-bs-theme="dark"] .input-icon {
    color: #adb5bd;
}

[data-bs-theme="dark"] .form-control:focus ~ .input-icon {
    color: #667eea;
}

[data-bs-theme="dark"] .password-toggle {
    color: #adb5bd;
}

[data-bs-theme="dark"] .password-toggle:hover {
    color: #667eea;
}

[data-bs-theme="dark"] .btn-login {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    border: 1px solid #6c757d;
}

[data-bs-theme="dark"] .btn-login:hover {
    background: linear-gradient(135deg, #5a6268 0%, #7d8590 100%);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .error-message {
    background: #2d1b1b;
    color: #ff6b6b;
    border-left: 4px solid #dc3545;
}

[data-bs-theme="dark"] .success-message {
    background: #1b2d1b;
    color: #51cf66;
    border-left: 4px solid #28a745;
}

[data-bs-theme="dark"] .info-message {
    background: #1b2d4d;
    color: #74c0fc;
    border-left: 4px solid #007bff;
}

[data-bs-theme="dark"] .security-info {
    background: #343a40;
    color: #e9ecef;
    border: 1px solid #495057;
}

[data-bs-theme="dark"] .security-info h6 {
    color: #74c0fc;
}

[data-bs-theme="dark"] .form-footer {
    border-top-color: #6c757d;
}

[data-bs-theme="dark"] .form-footer a {
    color: #667eea;
}

[data-bs-theme="dark"] .form-footer a:hover {
    color: #8b9dc3;
}

[data-bs-theme="dark"] .footer-separator {
    color: #6c757d;
}

[data-bs-theme="dark"] .footer-credit {
    color: #6c757d;
}

[data-bs-theme="dark"] .footer-credit:hover {
    color: #667eea;
}

[data-bs-theme="dark"] .help-text {
    color: #adb5bd;
}

[data-bs-theme="dark"] .step-indicator {
    color: #adb5bd;
}

[data-bs-theme="dark"] .step-indicator .step-number {
    background: #495057;
    color: #adb5bd;
}

[data-bs-theme="dark"] .step-indicator.active .step-number {
    background: #667eea;
    color: white;
}

[data-bs-theme="dark"] .step-indicator.completed .step-number {
    background: #28a745;
    color: white;
}

[data-bs-theme="dark"] .step-divider {
    background: #6c757d;
}

[data-bs-theme="dark"] .form-control.error {
    background-color: #4a2c2c;
    border-color: #dc3545;
}

[data-bs-theme="dark"] .form-control.success {
    background-color: #2c4a2c;
    border-color: #28a745;
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        padding: 30px 20px;
        border-radius: 15px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn-login {
        padding: 12px;
        font-size: 16px;
    }
}

/* Accessibility improvements */
.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;
}

/* Focus indicators for better accessibility */
.form-control:focus,
.btn-login:focus,
.password-toggle:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .login-card {
        border: 2px solid #000;
    }
    
    .form-control {
        border-width: 2px;
    }
    
    .btn-login {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .login-card,
    .btn-login,
    .form-control,
    .error-message,
    .success-message,
    .fade-in,
    .fade-out,
    .slide-in {
        animation: none;
        transition: none;
    }
}

/* Status message styles for both light and dark modes */
.status-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    animation: slideDown 0.3s ease;
}

.status-message.error-message {
    background: #fee;
    color: #c33;
    border-left: 4px solid #dc3545;
}

.status-message.success-message {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #28a745;
}

.status-message.info-message {
    background: #e7f3ff;
    color: #0066cc;
    border-left: 4px solid #007bff;
}

.message-icon {
    margin-right: 10px;
    font-size: 18px;
}

.message-text {
    flex: 1;
}

/* Dark mode status messages */
[data-bs-theme="dark"] .status-message.error-message {
    background: #2d1b1b;
    color: #ff6b6b;
    border-left: 4px solid #dc3545;
}

[data-bs-theme="dark"] .status-message.success-message {
    background: #1b2d1b;
    color: #51cf66;
    border-left: 4px solid #28a745;
}

[data-bs-theme="dark"] .status-message.info-message {
    background: #1b2d4d;
    color: #74c0fc;
    border-left: 4px solid #007bff;
}

/* Form validation states */
.form-control.error {
    border-color: #dc3545;
    background-color: #fff5f5;
}

.form-control.success {
    border-color: #28a745;
    background-color: #f8fff9;
}

[data-bs-theme="dark"] .form-control.error {
    background-color: #4a2c2c;
    border-color: #dc3545;
    color: #ff6b6b;
}

[data-bs-theme="dark"] .form-control.success {
    background-color: #2c4a2c;
    border-color: #28a745;
    color: #51cf66;
}