:root {
    --primary-orange: #E65100;   /* Cam đậm cho khung */
    --earth-brown: #5D4037;      
    --light-brown-bg: #D7CCC8;   /* Màu nâu nhạt cho nền ngoài */
    --white: #FFFFFF;
}

body {
    background-color: var(--light-brown-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    margin: 0;
}

.login-card {
    background: var(--white); 
    width: 100%;
    max-width: 400px; 
    padding: 40px;
    border-radius: 12px; 
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); 
    /* Đóng khung màu cam đậm */
    border: 3px solid var(--primary-orange); 
    box-sizing: border-box;
}

.header { text-align: center; margin-bottom: 30px; }
.header h2 { color: var(--primary-orange); margin: 0; font-size: 26px; font-weight: 800; }
.header p { color: var(--earth-brown); font-size: 14px; margin-top: 5px; opacity: 0.8; }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; color: var(--earth-brown); font-weight: 600; margin-bottom: 8px; font-size: 14px; }

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input { 
    width: 100%; 
    padding: 14px 16px; 
    border: 1.5px solid #D1D1D1; 
    border-radius: 8px; 
    box-sizing: border-box; 
    font-size: 15px;
    transition: all 0.3s;
}

.input-group input:focus { 
    border-color: var(--primary-orange); 
    outline: none; 
    box-shadow: 0 0 0 3px rgba(230, 81, 0, 0.1); 
}

.toggle-btn {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 18px;
    display: flex;
}

.options-group { margin-bottom: 20px; }
.remember-me {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: var(--earth-brown);
}
.remember-me input { margin-right: 8px; accent-color: var(--primary-orange); }

.btn-login {
    width: 100%; 
    background-color: var(--primary-orange); 
    color: white; 
    border: none;
    padding: 16px; 
    border-radius: 8px; 
    font-size: 16px; 
    font-weight: bold; 
    cursor: pointer;
    transition: 0.3s;
}

.btn-login:hover { background-color: #BF360C; transform: translateY(-1px); }

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
}

.auth-links a {
    font-size: 13px;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
}

.auth-links a:hover { text-decoration: underline; }

.footer { text-align: center; margin-top: 25px; font-size: 13px; color: var(--earth-brown); }
.footer a { color: var(--primary-orange); font-weight: 700; text-decoration: none; }

/* ── Modal Đổi Mật Khẩu ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.hidden { display: none; }

.modal-box {
    background: var(--white);
    border-radius: 12px;
    border: 3px solid var(--primary-orange);
    padding: 32px 36px 24px;
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.modal-title {
    color: var(--primary-orange);
    text-align: center;
    margin: 0 0 22px 0;
    font-size: 20px;
    font-weight: 800;
}

.match-indicator {
    text-align: center;
    margin: 6px 0 10px;
}

.match-dots {
    font-size: 20px;
    letter-spacing: 6px;
    color: #ccc;
    transition: color 0.25s;
}

.match-dots.match   { color: #2e7d32; }
.match-dots.no-match { color: #c62828; }

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.btn-modal-cancel,
.btn-modal-confirm {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-modal-cancel {
    background: #c62828;
    color: #fff;
}

.btn-modal-cancel:hover { background: #b71c1c; transform: scale(1.08); }

.btn-modal-confirm {
    background: #2e7d32;
    color: #fff;
    opacity: 0.3;
    transform: scale(0.82);
}

.btn-modal-confirm:not(:disabled) {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.45);
}

.btn-modal-confirm:not(:disabled):hover { background: #1b5e20; transform: scale(1.08); }

.btn-modal-confirm:disabled { cursor: not-allowed; }

.modal-msg {
    text-align: center;
    font-size: 13px;
    margin: 14px 0 0;
    min-height: 18px;
}

.modal-msg.success { color: #2e7d32; font-weight: 600; }
.modal-msg.error   { color: #c62828; }