/* ============================================
   LOGIN STYLES
   Version: 1.0.0
   FIXED: Password toggle button visible
============================================ */

/* ============================================
   1. CONTAINER
============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

/* ============================================
   2. LOGIN CARD
============================================ */
.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   3. HEADER
============================================ */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    display: block;
    margin: 0 auto 15px;
}

.login-header h2 {
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
}

.login-header p {
    color: #6c757d;
    margin-bottom: 0;
}

/* ============================================
   4. FORM
============================================ */
.login-form .form-label {
    font-weight: 600;
    color: #555;
    font-size: 14px;
    margin-bottom: 6px;
}

.login-form .form-label i {
    color: #667eea;
}

.login-form .form-control {
    border-radius: 10px;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
    font-size: 15px;
    width: 100%;
    height: 48px;
}

.login-form .form-control:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    border-color: #667eea;
}

.login-form .form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.login-form .form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}

/* ============================================
   5. PASSWORD INPUT GROUP - FIXED
============================================ */
.password-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.password-input-group .form-control {
    border-radius: 10px 0 0 10px;
    border-right: none;
    flex: 1;
}

.password-input-group .form-control:focus {
    border-color: #667eea;
    z-index: 2;
}

/* 🔥 CRITICAL: Password Toggle Button - Make it visible */
.password-toggle-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px;
    min-width: 50px;
    height: 48px;
    border: 2px solid #e0e0e0;
    border-left: none;
    background: white;
    border-radius: 0 10px 10px 0;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.password-toggle-btn:hover {
    background: #f8f9fa;
    color: #667eea;
    border-color: #667eea;
}

.password-toggle-btn:active {
    transform: scale(0.95);
}

.password-toggle-btn i {
    pointer-events: none;
    font-size: 18px;
}

/* Highlight when password field is focused */
.password-input-group .form-control:focus + .password-toggle-btn {
    border-color: #667eea;
    background: #f8f9fa;
}

/* Invalid state */
.password-input-group .form-control.is-invalid {
    border-color: #dc3545;
}

.password-input-group .form-control.is-invalid + .password-toggle-btn {
    border-color: #dc3545;
}

/* ============================================
   6. ALERTS
============================================ */
.custom-alert {
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
}

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

.custom-alert .alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.custom-alert .alert-content {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.custom-alert.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #28a745;
}

.custom-alert.alert-success .alert-icon {
    color: #28a745;
}

.custom-alert.alert-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.custom-alert.alert-error .alert-icon {
    color: #dc3545;
}

.custom-alert.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffe8a1);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.custom-alert.alert-warning .alert-icon {
    color: #ffc107;
}

.custom-alert.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.custom-alert.alert-info .alert-icon {
    color: #17a2b8;
}

.custom-alert .btn-close {
    font-size: 12px;
    padding: 6px;
    opacity: 0.6;
}

.custom-alert .btn-close:hover {
    opacity: 1;
}

/* Invalid Feedback */
.invalid-feedback {
    font-size: 13px;
    margin-top: 5px;
    color: #dc3545;
    display: none;
}

.invalid-feedback.show {
    display: block;
}

/* ============================================
   7. FORGOT PASSWORD LINK
============================================ */
.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.forgot-link:hover {
    text-decoration: underline;
    color: #5a67d8;
}

/* ============================================
   8. LOGIN BUTTON
============================================ */
.btn-login {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 10px;
    padding: 13px;
    font-weight: 600;
    color: white;
    width: 100%;
    transition: all 0.3s ease;
    font-size: 16px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================
   9. RESPONSIVE
============================================ */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-logo {
        width: 100px;
        height: 100px;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
    
    .password-toggle-btn {
        width: 45px;
        min-width: 45px;
        height: 44px;
        font-size: 16px;
    }
    
    .login-form .form-control {
        height: 44px;
        font-size: 14px;
    }
}

@media (max-width: 380px) {
    .login-card {
        padding: 20px 15px;
    }
    
    .password-toggle-btn {
        width: 40px;
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
    
    .login-form .form-control {
        height: 40px;
        font-size: 13px;
        padding: 8px 12px;
    }
}