/* ============================================ */
/* ADMIN LOGIN - EMSI BURUNDI                   */
/* COULEURS: Bleu #0A2FBF - Rouge #ED1C24 - Blanc #FFF */
/* ============================================ */

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

body {
    font-family: 'Arial', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0A2FBF 0%, #071F80 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    flex-direction: column;
}

.login-wrapper { 
    width: 100%; 
    max-width: 420px; 
}

.login-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(10, 47, 191, 0.4);
    border: none;
}

.login-card .brand { 
    text-align: center; 
    margin-bottom: 30px; 
}

.login-card .brand img { 
    max-height: 60px; 
    width: auto; 
    margin-bottom: 10px; 
}

.login-card .brand h4 { 
    color: #222; 
    font-weight: 700; 
    margin: 0; 
    font-size: 20px;
}

.login-card .brand h4 span { 
    color: #ED1C24; 
}

.login-card .brand p { 
    color: #999; 
    font-size: 14px; 
    margin: 5px 0 0; 
}

.login-card .form-group { 
    margin-bottom: 20px; 
}

.login-card .form-group label { 
    font-weight: 600; 
    color: #333; 
    font-size: 14px; 
    display: block; 
    margin-bottom: 5px; 
}

.login-card .form-group .input-group { 
    position: relative; 
}

.login-card .form-group .input-group .input-icon {
    position: absolute; 
    left: 15px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #bbb; 
    z-index: 10;
}

.login-card .form-control {
    border-radius: 8px; 
    border: 1px solid #e2eef2;
    padding: 12px 45px 12px 45px; 
    font-size: 14px;
    transition: all 0.3s ease; 
    width: 100%;
    outline: none;
    background: #ffffff;
    color: #333;
}

.login-card .form-control:focus {
    border-color: #0A2FBF;
    box-shadow: 0 0 0 3px rgba(10, 47, 191, 0.1);
}

.login-card .form-control::placeholder {
    color: #bbb;
}

/* ============================================ */
/* BUTTON                                       */
/* ============================================ */
.login-card .btn-login {
    width: 100%; 
    padding: 14px;
    background: #0A2FBF; 
    color: #ffffff;
    border: none; 
    border-radius: 8px;
    font-size: 16px; 
    font-weight: 600;
    transition: all 0.3s ease; 
    cursor: pointer;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-card .btn-login:hover { 
    background: #ED1C24; 
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(237, 28, 36, 0.3);
}

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

.btn-login.loading {
    pointer-events: none;
    opacity: 0.9;
    background: #071F80 !important;
}

.btn-login .btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

.btn-login.loading .btn-spinner {
    display: inline-block;
}

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

/* ============================================ */
/* PASSWORD TOGGLE (EYE ICON)                   */
/* ============================================ */
.password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #bbb;
    z-index: 10;
    background: none;
    border: none;
    font-size: 18px;
    transition: color 0.2s;
}

.password-toggle:hover { 
    color: #ED1C24; 
}

/* ============================================ */
/* REMEMBER ME + FORGOT PASSWORD                */
/* ============================================ */
.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    margin-bottom: 20px;
    font-size: 13px;
}

.form-footer .checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    cursor: pointer;
    user-select: none;
}

.form-footer .checkbox-label input[type="checkbox"] {
    width: 16px; 
    height: 16px;
    accent-color: #0A2FBF;
    cursor: pointer;
}

.form-footer .forgot-link {
    color: #0A2FBF;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.form-footer .forgot-link:hover {
    color: #ED1C24;
    text-decoration: underline;
}

/* ============================================ */
/* ALERTS                                       */
/* ============================================ */
.alert-login {
    max-width: 420px;
    margin: 0 auto 15px;
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
    border: none;
}

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

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
    border: none;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: none;
}

.alert i { 
    font-size: 18px; 
}

/* ============================================ */
/* SUCCESS OVERLAY                              */
/* ============================================ */
.success-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(10, 47, 191, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

.success-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.success-overlay .success-icon {
    width: 100px; height: 100px;
    border-radius: 50%;
    background: #ffffff;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: scaleIn 0.5s ease;
}
@keyframes scaleIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.success-overlay .success-icon i {
    font-size: 50px;
    color: #ED1C24;
}
.success-overlay h2 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px;
    text-align: center;
}
.success-overlay p {
    color: rgba(255,255,255,0.85);
    font-size: 15px;
    margin: 0;
    text-align: center;
}
.success-overlay .progress-bar {
    width: 250px; height: 4px;
    background: rgba(255,255,255,0.2);
    border-radius: 4px;
    margin-top: 25px;
    overflow: hidden;
}
.success-overlay .progress-bar .progress-fill {
    height: 100%; width: 0%;
    background: #ED1C24;
    border-radius: 4px;
    animation: fillProgress 1.8s ease forwards;
}
@keyframes fillProgress { from { width: 0%; } to { width: 100%; } }

/* ============================================ */
/* RESPONSIVE                                    */
/* ============================================ */
@media (max-width: 480px) {
    .login-card { 
        padding: 30px 20px; 
    }
    .login-card .brand h4 {
        font-size: 18px;
    }
    .login-card .brand img {
        max-height: 50px;
    }
    .login-card .btn-login {
        font-size: 15px;
        padding: 12px;
    }
    .form-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}
/* ============================================ */
/* RESET PASSWORD STYLES                        */
/* ============================================ */
.reset-info {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.reset-info strong {
    color: #0A2FBF;
}

.reset-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.reset-footer .back-link {
    color: #0A2FBF;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.reset-footer .back-link:hover {
    color: #ED1C24;
    text-decoration: underline;
}