/* =========================================================================
   HORECA FOOD — MODAL TÀI KHOẢN V3 (11/2026)
   Đăng nhập 2 cột (Đăng nhập | Chưa có tài khoản) + làm mới modal Đăng ký /
   Quên mật khẩu cho đồng bộ. Nạp ở mọi trang (elements/footer.php).
   ========================================================================= */

.hf-auth-modal,
#signup-modal,
#forgot-password-modal {
    --auth-font: "Be Vietnam Pro", Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --auth-ink: #1d2420;
    --auth-text: #5b625d;
    --auth-muted: #8a8f8b;
    --auth-line: #e6e8e3;
    --auth-soft: #f5f6f2;
    --auth-orange: #f26522;
    --auth-orange-dark: #d9541a;
}

/* ---------- Khung modal đăng nhập ---------- */
.hf-auth-modal .hf-auth-dialog {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 16px;
}

.hf-auth-modal .hf-auth {
    position: relative;
    padding: 40px;
    border: 0;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(17, 24, 20, .25);
    font-family: var(--auth-font);
    color: var(--auth-ink);
}

.hf-auth-modal .hf-auth__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--auth-soft);
    color: var(--auth-ink);
    font-size: 16px;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.hf-auth-modal .hf-auth__close:hover {
    background: var(--auth-orange);
    color: #fff;
    transform: rotate(90deg);
}

.hf-auth-modal .hf-auth__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

/* ---------- Cột trái: thẻ đăng nhập ---------- */
.hf-auth-modal .hf-auth__card {
    padding: 44px 40px 36px;
    border: 1px solid var(--auth-line);
    border-radius: 16px;
    background: #fff;
}

.hf-auth-modal .hf-auth__title {
    margin: 0;
    color: var(--auth-ink);
    font-family: var(--auth-font);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.02em;
}

.hf-auth-modal .hf-auth__sub {
    margin: 14px 0 30px;
    color: var(--auth-text);
    font-size: 15.5px;
    letter-spacing: .01em;
}

.hf-auth-modal .hf-auth__form {
    margin: 0;
}

.hf-auth-modal .hf-auth__field {
    position: relative;
    margin-bottom: 18px;
}

.hf-auth-modal .hf-auth__icon {
    position: absolute;
    top: 50%;
    left: 18px;
    color: var(--auth-muted);
    font-size: 15px;
    transform: translateY(-50%);
    pointer-events: none;
}

.hf-auth-modal .hf-auth__input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 18px 0 48px;
    border: 1px solid #dcdfd9;
    border-radius: 10px;
    background: #fff;
    color: var(--auth-ink);
    font-family: var(--auth-font);
    font-size: 15.5px;
    outline: none;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.hf-auth-modal .hf-auth__input::placeholder {
    color: #9aa09b;
}

.hf-auth-modal .hf-auth__input:focus {
    border-color: var(--auth-orange);
    box-shadow: 0 0 0 4px rgba(242, 101, 34, .12);
}

.hf-auth-modal .hf-auth__field .hf-auth__input[type="password"],
.hf-auth-modal .hf-auth__field .hf-auth__input.is-revealed {
    padding-right: 52px;
}

.hf-auth-modal .hf-auth__eye {
    position: absolute;
    top: 50%;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--auth-muted);
    font-size: 15px;
    transform: translateY(-50%);
    cursor: pointer;
}

.hf-auth-modal .hf-auth__eye:hover {
    background: var(--auth-soft);
    color: var(--auth-ink);
}

.hf-auth-modal .hf-auth__error {
    min-height: 0;
    margin: -4px 0 14px;
    font-size: 13.5px;
    line-height: 1.5;
}

.hf-auth-modal .hf-auth__error:empty {
    margin: 0;
}

.hf-auth-modal .hf-auth__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 54px;
    padding: 0 28px;
    border: 0;
    border-radius: 10px;
    background: var(--auth-orange);
    color: #fff !important;
    font-family: var(--auth-font);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .01em;
    text-decoration: none !important;
    box-shadow: 0 12px 24px rgba(242, 101, 34, .22);
    cursor: pointer;
    transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.hf-auth-modal .hf-auth__btn:hover {
    background: var(--auth-orange-dark);
    color: #fff;
    transform: translateY(-1px);
}

.hf-auth-modal .hf-auth__btn:disabled {
    opacity: .7;
    cursor: wait;
    transform: none;
}

.hf-auth-modal .hf-auth__forgot {
    display: block;
    margin-top: 24px;
    color: var(--auth-orange) !important;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

.hf-auth-modal .hf-auth__forgot:hover {
    color: var(--auth-orange-dark) !important;
    text-decoration: underline;
}

/* ---------- Cột phải: chưa có tài khoản ---------- */
.hf-auth-modal .hf-auth__aside {
    padding: 8px 8px 8px 0;
}

.hf-auth-modal .hf-auth__aside-title {
    margin: 0;
    color: var(--auth-ink);
    font-family: var(--auth-font);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.hf-auth-modal .hf-auth__aside-text {
    max-width: 340px;
    margin: 12px auto 26px;
    color: var(--auth-text);
    font-size: 14.5px;
    line-height: 1.65;
    text-align: center;
}

.hf-auth-modal .hf-auth__btn--inline {
    display: flex;
    width: auto;
    max-width: 240px;
    margin: 0 auto;
}

.hf-auth-modal .hf-auth__legal {
    margin-top: 40px;
    color: var(--auth-text);
    font-size: 14.5px;
    line-height: 1.85;
}

.hf-auth-modal .hf-auth__terms {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--auth-orange) !important;
    font-weight: 600;
    text-decoration: none;
}

.hf-auth-modal .hf-auth__terms sup {
    margin-right: 2px;
    color: var(--auth-ink);
}

.hf-auth-modal .hf-auth__legal p {
    margin: 0;
}

.hf-auth-modal .hf-auth__legal p a {
    color: var(--auth-orange) !important;
    font-weight: 600;
    text-decoration: none;
}

.hf-auth-modal .hf-auth__terms:hover,
.hf-auth-modal .hf-auth__legal p a:hover {
    text-decoration: underline;
}

/* ---------- Đăng ký + Quên mật khẩu: cùng ngôn ngữ thiết kế ---------- */
#signup-modal .modal-dialog,
#forgot-password-modal .modal-dialog {
    max-width: 480px;
    padding: 0 16px;
}

#signup-modal .modal-content,
#forgot-password-modal .modal-content {
    position: relative;
    padding: 36px 36px 30px;
    border: 0;
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(17, 24, 20, .25);
    font-family: var(--auth-font);
    color: var(--auth-ink);
}

#signup-modal .modal-header,
#forgot-password-modal .modal-header {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    padding: 0;
    border: 0;
}

#signup-modal .modal-header .modal-title {
    display: none;
}

#signup-modal .btn-close,
#forgot-password-modal .btn-close {
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border-radius: 50%;
    background-color: var(--auth-soft);
    background-size: 12px;
    opacity: 1;
    box-shadow: none;
}

#signup-modal .modal-body,
#forgot-password-modal .modal-body {
    padding: 0;
}

#signup-modal .modal-logo,
#forgot-password-modal .modal-logo,
#signup-modal .auth-divider {
    display: none;
}

#signup-modal h5.text-center,
#forgot-password-modal h5.text-center {
    margin: 0 0 22px;
    color: var(--auth-ink);
    font-family: var(--auth-font);
    font-size: 30px;
    font-weight: 700;
    text-align: left !important;
    letter-spacing: -.02em;
}

#forgot-password-modal p.text-muted {
    margin-top: -10px;
    color: var(--auth-text) !important;
    font-size: 14.5px;
    text-align: left !important;
}

#signup-modal fieldset.form-group,
#forgot-password-modal fieldset.form-group {
    margin-bottom: 16px;
}

#signup-modal fieldset label {
    display: block;
    margin-bottom: 6px;
    color: var(--auth-ink);
    font-size: 14px;
    font-weight: 600;
}

#signup-modal .form-control,
#forgot-password-modal .form-control {
    height: 50px;
    padding: 0 16px;
    border: 1px solid #dcdfd9;
    border-radius: 10px;
    background: #fff;
    color: var(--auth-ink);
    font-family: var(--auth-font);
    font-size: 15px;
    box-shadow: none;
}

#signup-modal .form-control:focus,
#forgot-password-modal .form-control:focus {
    border-color: var(--auth-orange);
    box-shadow: 0 0 0 4px rgba(242, 101, 34, .12);
}

#signup-modal .btn.btn-primary,
#forgot-password-modal .btn.btn-primary {
    width: 100%;
    height: 52px;
    margin-top: 4px;
    border: 0;
    border-radius: 10px;
    background: var(--auth-orange);
    color: #fff;
    font-family: var(--auth-font);
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(242, 101, 34, .22);
}

#signup-modal .btn.btn-primary:hover,
#forgot-password-modal .btn.btn-primary:hover {
    background: var(--auth-orange-dark);
}

#signup-modal .legal {
    color: var(--auth-text);
    font-size: 13px;
    line-height: 1.6;
}

#signup-modal .legal a,
#signup-modal .alt-path a {
    color: var(--auth-orange);
    font-weight: 600;
}

#signup-modal .alt-path {
    margin: 18px 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--auth-line);
    text-align: center;
    font-size: 14.5px;
}

#signup-modal .alt-path::before {
    content: "Đã có tài khoản? ";
    color: var(--auth-text);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hf-auth-modal .hf-auth {
        padding: 28px;
    }

    .hf-auth-modal .hf-auth__grid {
        gap: 28px;
    }

    .hf-auth-modal .hf-auth__card {
        padding: 32px 28px 28px;
    }

    .hf-auth-modal .hf-auth__title {
        font-size: 34px;
    }
}

@media (max-width: 767.98px) {
    .hf-auth-modal .hf-auth-dialog {
        padding: 0 12px;
    }

    .hf-auth-modal .hf-auth {
        padding: 18px;
        border-radius: 20px;
    }

    .hf-auth-modal .hf-auth__close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .hf-auth-modal .hf-auth__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .hf-auth-modal .hf-auth__card {
        padding: 26px 18px 20px;
    }

    .hf-auth-modal .hf-auth__title {
        font-size: 28px;
    }

    .hf-auth-modal .hf-auth__sub {
        margin: 8px 0 20px;
        font-size: 14px;
    }

    .hf-auth-modal .hf-auth__input,
    .hf-auth-modal .hf-auth__btn {
        height: 50px;
        font-size: 15px;
    }

    .hf-auth-modal .hf-auth__forgot {
        margin-top: 16px;
        font-size: 14px;
    }

    .hf-auth-modal .hf-auth__aside {
        padding: 4px 4px 6px;
    }

    .hf-auth-modal .hf-auth__aside-title {
        font-size: 20px;
    }

    .hf-auth-modal .hf-auth__aside-text {
        margin: 6px auto 16px;
        font-size: 13.5px;
    }

    .hf-auth-modal .hf-auth__legal {
        margin-top: 18px;
        font-size: 13px;
        line-height: 1.7;
    }

    #signup-modal .modal-content,
    #forgot-password-modal .modal-content {
        padding: 28px 20px 22px;
        border-radius: 20px;
    }

    #signup-modal h5.text-center,
    #forgot-password-modal h5.text-center {
        font-size: 25px;
    }
}
