/* Reset CSS cơ bản */

@font-face {
    font-family: 'Inter'; font-weight: 700;
    src: url('../fonts/inter-bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter'; font-weight: 800;
    src: url('../fonts/inter-extrabold.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter'; font-weight: 200;
    src: url('../fonts/inter-extralight.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter'; font-weight: 500;
    src: url('../fonts/inter-medium.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter'; font-weight: 400;
    src: url('../fonts/inter-regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter'; font-weight: 600;
    src: url('../fonts/inter-semibold.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', sans-serif; font-weight: 400;
}

.text-danger {
    font-family: 'Inter', sans-serif; font-weight: 400;
    font-size: 14px;
}


.m-h-180 {
    min-height: 180px !important;
}

.bg-process {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.img-loadding {
    display: block;
    margin: 0 auto;
    margin-top: 30em;
}

/* Container toàn màn hình */
.login-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: #0B83BF;
    overflow: hidden;
}

/* Ẩn badge reCAPTCHA */
.grecaptcha-badge {
    visibility: hidden;
}

/* Ảnh cầu ở phía dưới */
.bridge-img {
    position: absolute;
    bottom: 0;
    left: 0;
    width: auto;
    height: 85%;
    object-fit: cover;
}

/* Login form */
.login-form {
    width: 840px;
    margin: 40px auto;
    padding: 30px;
    background-color: #cde6f2;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.3);
    position: relative;
    z-index: 1000;
    left: 20%;
    top: 15%;
    transform: translate(-20%, -15%);
}

/* Tiêu đề */
.login-form .form-title {
    text-align: center;
    color: #0B83BF;
    font-size: 24px;
    font-family: 'Inter', sans-serif; font-weight: 600;
    margin-bottom: 30px;
}

/* Bố cục chia 2 cột: logo và input */
.form-content {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    min-height: 250px;
}

/* Logo bên trái */
.form-logo {
    display: flex;
    justify-content: center;
    /* căn giữa ngang */
    /*align-items: center;*/
    /* căn giữa dọc */
    min-height: 250px;
}

.form-logo img {
    width: 180px;
    height: 180px;
}

/* Phần form bên phải */
.form-container {
    flex-direction: column;
    justify-content: center;
    width: 100% !important;
    display: flex;
    min-height: 250px;
}

.form-fields {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    width: 100% !important;
    display: flex;
    min-height: 250px;
}

/* Từng nhóm nhập liệu: hiển thị label và input cùng hàng (trên màn hình lớn) */
.form-group {
    display: flex;
    align-items: center;
    /* căn giữa theo chiều dọc */
    margin-bottom: 2px;
}

.form-group label {
    min-width: 140px;
    /* khoảng rộng label */
    margin-right: 10px;
    font-family: 'Inter', sans-serif; font-weight: 400;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.form-group input {
    flex: 1;
    /* input sẽ chiếm phần còn lại */
    padding: 8px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    font-family: 'Inter', sans-serif; font-weight: 400;
}

.form-group input:focus {
    border-color: #66a3ff;
}

/* ====================================================================== */
/* Trang Đăng nhập (Login.cshtml) — thẻ 3 phần header/body/footer riêng,  */
/* chỉ áp dụng khi phần tử .login-form có thêm class .login-card, để      */
/* không ảnh hưởng các trang khác (ForgotPassword/Register/ChangePassword/*/
/* ResetPassword/LoginNotification/Authy) vẫn dùng layout .login-form cũ. */
/* ====================================================================== */

.login-form.login-card {
    width: 838px;
    max-width: 100%;
    margin: 40px auto;
    padding: 0;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.25);
    position: relative;
    left: 20%;
    top: 15%;
    right: auto;
    transform: translate(-20%, -15%);
    overflow: hidden;
}

.login-card-header {
    background-color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid #E3E3E3;
    padding: 20px;
}

.login-form.login-card .form-title {
    font-size: 26px;
    margin-bottom: 0;
}

.login-card-body {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 24px 36px;
    min-height: 0;
}

.login-card-body .form-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 0 0 121px;
    min-height: auto;
}

.login-card-body .form-logo img {
    width: 121px;
    height: 121px;
    border-radius: 50%;
}

.login-card-body .form-fields {
    min-height: 0;
}

.login-card-body .form-group label {
    min-width: 170px;
    color: #172B4D;
}

.login-card-body .form-group input {
    max-width: 312px;
    border-color: #C1C7D0;
    border-radius: 5px;
}

.login-card-body .form-group input:focus {
    border-color: #0B83BF;
}

/* Icon con mắt phải bám theo khung input mật khẩu, không theo cả hàng (label + input) */
.login-card-body .password-wrapper {
    flex: 1;
    max-width: 312px;
}

.login-card-body .password-wrapper input {
    width: 100%;
    max-width: 100%;
}

.login-card-body .forgot-password-row {
    margin-top: 6px;
    text-align: left;
    padding-left: 180px;
}

.login-card-footer {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 12px 36px;
    background-color: rgba(255, 255, 255, 0.8);
    border-top: 1px solid #E3E3E3;
}

.login-card-footer .btn-back,
.login-card-footer .btn-submit {
    flex: 1;
    height: 46px;
    border-radius: 8px;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    width: auto;
    margin: 0;
}

.login-card-footer .btn-back {
    background-color: #E2E8F0;
    color: #000;
}

.login-card-footer .btn-back:hover {
    background-color: #d6dee8;
    color: #000;
}

/* Bọc ô password + icon */
.password-wrapper {
    position: relative;
}

/* Khoảng trống cho icon bên phải input */
.password-wrapper input {
    padding-right: 40px;
}

/* Icon mắt nằm đè góc phải trên input */
.toggle-password {
    position: absolute;
    right: 10px;
    /* canh lề phải */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    /* hiển thị trỏ chuột khi hover */
    font-size: 1.1rem;
    /* cỡ icon */
}

.toggle-password .fa {
    font-weight: 200 !important;
    color: #ccc !important;
    /* màu icon */
}

/* Nút Đăng ký */
.btn-submit {
    width: 130px;
    padding: 5px;
    background-color: #0B83BF;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: block;
    /* Hiển thị dưới dạng block */
    margin: 0px 0px 0px 25px;
    /* Tự động căn giữa theo chiều ngang */
    outline: none;
}

.btn-submit:hover {
    background-color: #0B83BF;
}

.btn-submit:focus,
.btn-submit:active {
    outline: none !important;
    box-shadow: none !important;
}

/* Link dưới form */
.login-link {
    text-align: center;
    margin-bottom: 0px;
    font-size: 14px;
    color: #0B83BF;
}

.login-link a {
    color: #0B83BF;
    text-decoration: none;
}

.login-link a:hover {
    text-decoration: none;
    color: var(--red) !important;
}

.form-group-validate {
    margin-bottom: 15px !important;
}

.login-link-register {
    margin-top: 0px;
}

.mt-10-custom {
    margin-top: 10px !important
}


@media (max-width: 768px) {
    .login-form {
        width: 90%;
        top: auto;
        left: auto;
        transform: unset;
    }

    .login-form.login-card {
        width: 90%;
        position: relative;
        right: auto;
        top: auto;
        transform: unset;
        margin: 20px auto;
    }

    .form-content {
        flex-direction: column;
        /* Chuyển từ 2 cột sang 1 cột */
        align-items: center;
    }

    .login-card-body {
        flex-direction: column;
        align-items: center;
        padding: 20px;
    }

    .form-logo {
        margin-bottom: 20px;
        display: none;
    }

    /* Giảm kích thước logo cho mobile */
    .form-logo img {
        width: 120px;
        height: 120px;
    }

    .form-fields {
        width: 100%;
    }

    .toggle-password {
        transform: unset;
    }

    /* Cho label và input xếp dọc nhau */
    .form-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-group label {
        min-width: auto;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .form-group input {
        width: 100%;
    }

    .login-card-body .form-group input {
        max-width: 100%;
    }

    .login-card-body .password-wrapper {
        max-width: 100%;
        width: 100%;
    }

    .login-card-body .forgot-password-row {
        padding-left: 0;
    }

    .login-card-footer {
        padding: 12px 20px;
    }
}

@media (max-width: 480px) {
    .login-form {
        padding: 15px;
    }

    .login-card-header {
        padding: 14px;
    }

    .form-title {
        font-size: 1.1rem;
    }

    .btn-submit {
        font-size: 0.95rem;
    }
}
