/* --- FILE: wwwroot/css/dangnhap.css --- */

/* 1. Cấu hình Body: Xếp dọc (Header -> Main -> Footer) */
body {
    background: url('https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR1eNvzn8bSylBZFY0IGpbMq9ANeJwFSHXjIg&s') no-repeat center center fixed; /* Chỉnh lại đường dẫn ảnh của bạn */
    background-size: cover;
    
    /* QUAN TRỌNG: Giữ cấu trúc dọc cho trang web */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Chiều cao tối thiểu bằng màn hình */
}

/* 2. Cấu hình Main: Chiếm khoảng trống còn lại và Căn giữa Form */
main {
    flex: 1; /* Tự động giãn để đẩy footer xuống đáy */
    display: flex;
    justify-content: center; /* Căn giữa ngang */
    align-items: center;     /* Căn giữa dọc */
    padding: 20px;           /* Khoảng cách an toàn trên mobile */
    width: 100%;
}

/* --- 3. Style cho Wrapper (Khung đăng nhập) --- */
.wrapper {
    position: relative;
    width: 400px;
    height: 440px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    border: 2px solid rgba(255, 255, 255, .5);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 0, 0, .5);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; 
    transition: height .2s ease;
    
    /* Xóa margin-top cũ vì đã căn giữa bằng thẻ main rồi */
    margin: 0; 
}

.wrapper.active {
    height: 600px;
}

.wrapper.active-forgot {
    height: 400px;
}

/* --- 4. Các phần còn lại giữ nguyên --- */
.wrapper .form-box {
    width: 100%;
    padding: 40px;    
}

.wrapper .form-box.login {
    transition: transform .18s ease;
    transform: translateX(0);
}

.wrapper.active .form-box.login,
.wrapper.active-forgot .form-box.login {
    transform: translateX(-400px);
}

.wrapper .form-box.register,
.wrapper .form-box.forgot {
    position: absolute;
    transform: translateX(400px);
    transition: none;
}

.wrapper.active .form-box.register,
.wrapper.active-forgot .form-box.forgot {
    transition: transform .18s ease;
    transform: translateX(0);
}

/* Style chữ và input */
.form-box h2 {
    font-size: 2em;
    color: #162938;
    text-align: center;
}

.input-box {
    position: relative;
    width: 100%;
    height: 50px;
    border-bottom: 2px solid #162938;
    margin: 30px 0;
}

.input-box label {
    position: absolute;
    top: 50%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 1em;
    color: #162938;
    font-weight: 500;
    pointer-events: none;
    transition: .5s;
}

.input-box input:focus~label,
.input-box input:valid~label,
.input-box input:not(:placeholder-shown) ~ label { 
    top: -5px;
}

.input-box input {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1em;
    color: #162938;
    font-weight: 600;
    padding: 0 35px 0 5px;
}

.input-box .icon {
    position: absolute;
    right: 8px;
    font-size: 1.2em;
    color: #162938;
    line-height: 57px;
}

.remember-forgot {
    font-size: .9em;
    color: #162938;
    font-weight: 500;
    margin: -15px 0 15px ;
    display: flex;
    justify-content: space-between;
}
.remember-forgot a {
    color: #162938;
    text-decoration: none ; /* Bỏ gạch chân */
    font-weight: 600;
}

.btn {
    width: 100%;
    height: 45px;
    background: #162938;
    border: none;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    color: #fff;
    font-weight: 500;
    font-weight: bold;
}

.btn:hover, 
.btn:focus, 
.btn:active {
    background: #162938 !important; /* !important để bắt buộc giữ màu nền */
    color: #fff !important;         /* Giữ màu chữ trắng */
    opacity: 1 !important;          /* Không cho mờ đi */
    outline: none !important;       /* Xóa viền xanh khi bấm vào */
    border: none !important;        /* Đảm bảo không hiện viền lạ */
    box-shadow: none !important;    /* Xóa bóng mờ nếu có */
}

.login-register {
    font-size: .9em;
    color: #162938;
    text-align: center;
    font-weight: 500;
    margin: 25px 0 10px;
}

.login-register p a {
    color: #162938;
    text-decoration: none;
    font-weight: 600;
}
.info-text {
    margin-bottom: 15px;
    text-align: center;
}

/* Màu mặc định ở chế độ sáng (nếu cần) */
.info-text p {
    color: #162938 !important;
}

/* Đổi màu chữ khi ở chế độ tối (Dark Mode) */
.dark-theme .info-text p {
    color: #cccccc !important; /* Màu xám nhạt hoặc trắng để dễ đọc trên nền đen */
}
/* --- THIẾT LẬP CHO CHẾ ĐỘ TỐI (DARK THEME) --- */

/* 1. Đổi màu khung wrapper/form */
.dark-theme .wrapper {
    background: #1a1a1a;
    border: 2px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* 2. Đổi màu tiêu đề H2 */
.dark-theme .form-box h2 {
    color: #ff6b6b;
}

/* 3. Đổi màu đường gạch dưới và chữ trong ô Input */
.dark-theme .input-box {
    border-bottom: 2px solid #ffffff;
}

.dark-theme .input-box input {
    color: #ffffff;
}

.dark-theme .input-box label {
    color: #ffffff;
}

/* 4. Đổi màu các Icon (Material Symbols) */
.dark-theme .input-box .icon span {
    color: #ffffff;
}

/* 5. Đổi màu phần Ghi nhớ & Quên mật khẩu */
.dark-theme .remember-forgot {
    color:#ffffff;
}

.dark-theme .remember-forgot a {
    color: #ff6b6b; /* Giữ màu đỏ thương hiệu Pineas cho link nổi bật */    
}

/* 6. Đổi màu văn bản điều hướng bên dưới */
.dark-theme .login-register p {
    color: #ffffff;
}

.dark-theme .login-register p a {
    color: #ff6b6b; /* Giữ màu đỏ thương hiệu Pineas cho link nổi bật */
}

/* 7. Nút bấm - Bạn có thể giữ nguyên hoặc làm sáng hơn */
.dark-theme .btn {
    background: #ffffff;
    color: #1a1a1a;
}

