/* =================================================
   CSS CHO FORM ĐĂNG NHẬP CUSTOM (login.css)
================================================= */

/* Box bọc ngoài form */
.member-form-wrapper {
    max-width: 450px;
    margin: 0 auto;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Label cho các ô nhập liệu */
.member-form-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

/* Các ô nhập liệu */
.member-form-wrapper input[type="text"],
.member-form-wrapper input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #f8fafc;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.member-form-wrapper input[type="text"]:focus,
.member-form-wrapper input[type="password"]:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    outline: none;
}

/* =================================================
   CSS CHO NÚT CON MẮT (Trang Đăng Nhập)
================================================= */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 20px; /* BƯỚC 1: Chuyển margin ra ngoài khung bọc */
}

.password-wrapper input {
    margin-bottom: 0 !important; /* BƯỚC 2: Xóa margin của ô input bên trong để khung bọc ôm sát vào ô */
    padding-right: 45px !important;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%); /* BƯỚC 3: Căn giữa tuyệt đối hoàn hảo */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.toggle-password svg {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    transition: all 0.2s ease;
    display: block;
}

.toggle-password:hover svg {
    color: #3b82f6;
    transform: scale(1.1);
}

/* =================================================
   Giao diện nút Ghi nhớ đăng nhập
================================================= */
.login-remember {
    margin-bottom: 20px;
    display: block;
}

.login-remember label {
    display: flex !important;
    flex-direction: row; 
    justify-content: flex-start;
    align-items: center;
    cursor: pointer;
    font-weight: 500 !important;
    color: #64748b !important;
    font-size: 14px;
    gap: 10px; 
    padding-left: 0 !important;
}

.login-remember input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #f8fafc;
    cursor: pointer;
    display: grid;
    place-content: center;
    transition: all 0.2s ease;
    margin: 0 !important;
    position: relative;
    float: none !important;
}

.login-remember input[type="checkbox"]:checked {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.login-remember input[type="checkbox"]::before {
    content: "";
    width: 10px;
    height: 10px;
    clip-path: polygon(14% 44%, 0 58%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: white;
}

.login-remember input[type="checkbox"]:checked::before {
    transform: scale(1);
}

.login-remember input[type="checkbox"]:hover {
    border-color: #3b82f6;
}

/* =================================================
   Nút Đăng nhập & Footer
================================================= */
.member-form-wrapper .login-submit input[type="submit"] {
    width: 100%;
    padding: 14px;
    background-color: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.member-form-wrapper .login-submit input[type="submit"]:hover {
    background-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.form-footer-links {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14.5px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    clear: both;
}

.form-footer-links a.footer-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.form-footer-links a.footer-link:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.form-footer-separator {
    color: #cbd5e1;
    margin: 0 4px;
}

.login-error-msg {
    background: #fef2f2;
    color: #ef4444;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    border: 1px solid #fecaca;
    text-align: center;
}

/* =================================================
   THÔNG BÁO ĐÃ ĐĂNG NHẬP (Giao diện mới)
================================================= */
.logged-in-wrapper {
    text-align: center;
    padding: 40px 30px;
}

.logged-in-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    color: #10b981; /* Màu xanh lá */
    background: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logged-in-icon svg {
    width: 32px;
    height: 32px;
}

.logged-in-notice h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 700;
}

.logged-in-notice p {
    color: #64748b;
    margin: 0 0 25px;
    font-size: 15px;
}

.btn-home-return {
    display: inline-block;
    background: #3b82f6;
    color: #fff !important;
    padding: 12px 26px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-home-return:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.3);
}