/* --- CSS RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /* Nền gradient hiện đại, có chiều sâu, loại bỏ cảm giác đơn điệu */
    background: radial-gradient(circle at top right, #e0f2fe, #f1f5f9, #e2e8f0);
    color: #1e293b;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* --- KHUNG CARD ĐĂNG NHẬP (GLASSMORPHISM / SHADOW MỀM) --- */
.login-card-wrapper {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04);
    padding: 40px 38px;
    transition: transform 0.3s ease;
}

/* --- LOGO & TIÊU ĐỀ --- */
.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    height: 48px;
    width: auto;
    margin-bottom: 10px;
    object-fit: contain;
}

.login-title {
    font-size: 14.5px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.2px;
}

/* --- FORM NHẬP LIỆU --- */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-field label {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

/* Input container */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 12px 16px;
    /* Khắc phục triệt để lỗi placeholder bị đè icon bằng cách tăng lề trái lên 45px */
    padding-left: 45px; 
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: all 0.2s ease;
}

.input-wrapper input:focus {
    border-color: #0284c7;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.12);
}

.input-wrapper input::placeholder {
    color: #94a3b8;
}

/* Icon bên trái input */
.input-icon-left {
    position: absolute;
    left: 10px;
    color: #64748b;
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s;
}

.input-wrapper input:focus ~ .input-icon-left {
    color: #0284c7;
}

/* Icon mắt ẩn/hiện mật khẩu bên phải */
.input-icon-right {
    position: absolute;
    right: 15px;
    color: #64748b;
    font-size: 15px;
    cursor: pointer;
    transition: color 0.2s;
}

.input-icon-right:hover {
    color: #1e293b;
}

/* --- MÃ XÁC THỰC (CAPTCHA) --- */
.captcha-row {
    display: flex;
    gap: 12px;
}

.captcha-row .input-wrapper input {
    padding-left: 45px; /* Giữ đồng bộ lề cho input captcha */
}

.captcha-box {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 0 16px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 5px;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 125px;
    user-select: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: background 0.2s;
}

.captcha-box:hover {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
}

/* --- TÙY CHỌN PHỤ (GHI NHỚ & QUÊN MẬT KHẨU) --- */
.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-top: 2px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    cursor: pointer;
    font-weight: 400;
}

.remember-me input[type="checkbox"] {
    accent-color: #0284c7;
    width: 16px;
    height: 16px;
    cursor: pointer;
    border-radius: 4px;
}

.forgot-link {
    color: #0284c7;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

/* --- NÚT ĐĂNG NHẬP CHÍNH --- */
.btn-submit {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.25);
    margin-top: 6px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.35);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(1px);
}

/* --- FOOTER BẢN QUYỀN --- */
.login-footer {
    margin-top: 26px;
    text-align: center;
    font-size: 12px;
    color: #64748b;
    letter-spacing: 0.2px;
}