/* ==========================================================================
   KHỞI TẠO BIẾN & PHÔNG CHỮ MASTER
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300;400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@300;400;700&display=swap');

:root {
    --font-main: 'Comfortaa', cursive;
    --font-handwritten: 'Dancing Script', cursive;
    --color-moss: #4e6052;
    --color-moss-light: #637768;
    --color-light: #b7c7ba;
    /* Màu xanh rêu thương hiệu */
    --color-text-dark: #2c3e35;
    /* Màu chữ thẫm khi menu thả xuống */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ======================================================================= *
 *   RESET & BASE STYLES                                                   *
========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    background-color: #f3f2f2;
    color: #333;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body.grow {
    display: flex;
    flex-direction: column;
}

main {
    padding-top: 56px;
}

body.grow main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: var(--color-text-dark);
}

a:visited {
    color: var(--color-text-dark);
}

a:hover {
    color: var(--color-moss);
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

.page-wrapper {
    padding-top: 20px;
    padding-bottom: 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
}

body.grow .page-wrapper {
    flex: 1;
}

body.grow .box.grow {
    flex: 1;
}

body.grow .box.col-75 {
    flex: 75;
}

body.grow .box.col-25 {
    flex: 25;
}

.box {
    border-radius: 12px;
    background-color: white;
    border: 1px solid #ddd;
    padding: 40px;
}

.center-flex,
.box.center {
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
}

/* Hiệu ứng đường gạch chân chỉ mọc ra khi hover đầy tinh tế */
.bottom-line {
    position: relative;
}

.bottom-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: white;
    transition: var(--transition-smooth);
}

.bottom-line:hover::after {
    width: 100%;
}

/* Cấu trúc nút bấm Master */
.btn {
    display: inline-block;
    font-size: 14px;
    font-family: var(--font-main);
    font-weight: bold;
    text-decoration: none;
    padding: 0 20px;
    border-radius: 4px;
    transition: var(--transition-smooth);
    text-align: center;
    border: none;
    cursor: pointer;
    height: 42px;
    line-height: 42px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.txt {
    background-color: white;
    border: 1px solid var(--color-moss);
    height: 36px;
    line-height: 36px;
    border-radius: 4px;
    padding: 3px 10px;
}

button,
.txt,
.btn:focus {
    outline: none;
}

.btn-moss {
    background-color: var(--color-moss);
    color: white;
    border: 1px solid var(--color-moss);
    position: relative;
    overflow: hidden;
}

.btn-moss:disabled::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150px;
    height: 100%;
    width: 150px;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 10%,
            rgba(255, 255, 255, 0.35) 50%,
            rgba(255, 255, 255, 0) 90%);
    animation: mzShimmer 1s infinite linear;
}

.btn-moss:disabled,
.btn-moss:hover {
    background-color: var(--color-moss-light);
    color: white;
}

/* Nút dạng khối đặc (Trải nghiệm miễn phí) */
.btn-solid {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-moss);
}

.btn-solid:hover {
    background-color: white;
}

/* Nút dạng đường viền (Khám phá thêm) */
.btn-outline {
    background-color: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    border-color: white;
    color: white;
    background-color: rgba(255, 255, 255, 0.08);
}

.btn-moss:visited,
.btn-outline:visited {
    color: white;
}

.page-subject {
    text-transform: uppercase;
    color: var(--color-moss);
    margin-bottom: 30px;
    font-size: 20px;
}

.none-ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.none-btn {
    font-size: inherit;
    color: inherit;
    font-family: var(--font-main);
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
}

.icon {
    display: block;
    width: 16px;
    height: 16px;
    font-style: normal;
}

.ic-creator {
    -webkit-mask-image: url('/icons/ic-creator.svg');
    mask-image: url('/icons/ic-creator.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: currentColor;
}

.icon-wrapper {
    display: inline-flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
}

.btn.icon-wrapper {
    justify-content: center;
}

.icon-wrapper .icon {
    margin-top: -3px;
}

svg.declare {
    position: absolute;
    overflow: hidden;
    width: 0;
    height: 0;

    /* display: none; bị lỗi trên phiên bản Firefox dưới bản 114, tức là trước tháng 6/2023  */
}

.hide {
    display: none !important;
}

.fade {
    transition: opacity 0.5s ease-in-out;
    opacity: 1;
}

@starting-style {
    .fade:not(.hide) {
        opacity: 0;
    }
}

.field-label {
    margin-bottom: 4px;
    font-weight: bold;
    white-space: nowrap;
}

.field-hint {
    font-style: italic;
}

/* ==========================================================================
   FORM CONTROL
   ========================================================================== */

.form-row {
    display: flex;
    flex-direction: row;
    gap: 15px;
}

.form-submit.form-row {
    justify-content: space-between;
}

.form-row .col-50 {
    flex: 50;
}

.form-alert {
    padding: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.form-alert .text {
    font-style: italic;
    margin-top: 12px;
}

.form-alert p.p {
    margin-top: 12px;
}

.form-content {
    /* Min width 300px trùng với Turnstile captcha*/
    min-width: 300px;
    max-width: 400px;
}

.form-content .center {
    text-align: center;
}

.form-item {
    margin-top: 15px;
}

.form-space {
    margin-top: 35px;
}

.form-content .txt,
.form-content .btn {
    width: 100%;
}

.form-content .link {
    font-weight: bold;
}

.form-content .link:hover {
    text-decoration: underline;
}

.form-submit {
    margin-top: 20px;
}

/* ==========================================================================
   Turnstile Captcha
   ========================================================================== */

.cf-turnstile {
    min-height: 65px;
    min-width: 300px;
    background-color: #ececec;
    border-radius: 3px;
    font-size: 0;
    line-height: 0;
    position: relative;
    overflow: hidden;
}

.cf-turnstile::after {
    content: "";
    position: absolute;
    top: 0;
    left: -150px;
    height: 100%;
    width: 150px;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.95) 50%,
            rgba(255, 255, 255, 0) 100%);
    animation: mzShimmer 1.2s infinite linear;
}

.widget .mz-modal {
    max-width: 350px;
    min-width: 350px;
}

.widget .mz-modal .mess {
    margin: 0;
}

.widget .alert-h65 {
    margin-top: 7px;
    height: 65px; /* Cao bằng captcha */
}

@keyframes mzShimmer {
    0% {
        left: -150px;
    }

    100% {
        left: 100%;
    }
}

.cf-turnstile>div {
    opacity: 0;
    animation: mzFadeIn 0.8s ease-in-out forwards;
    animation-delay: 0.5s;
    position: relative;
    z-index: 1;
    background-color: #ececec;
}

/* ==========================================================================
   SWITCH TOGGLE CONTROL
   ========================================================================== */

.switch-wrapper {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: 12px;
}

.switch-control.float {
    float: left;
    margin-right: 6px;
    display: block;
}

/* Khung chứa bao quanh công tắc (Định hình kích thước viên thuốc) */
.switch-control {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

/* Ẩn giấu hoàn toàn ô Checkbox mặc định của trình duyệt */
.switch-control input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

/* Lớp nền của thanh gạt (Mặc định: Trạng thái TẮT) */
.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: var(--transition-smooth);
}

/* Con chạy hình tròn (Viên bi) nằm bên trong nút gạt */
.switch-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: var(--transition-smooth);
}

/* Bẻ màu nền sang màu xanh rêu thương hiệu khi BẬT (Checked) */
.switch-control input:checked+.switch-slider {
    background-color: var(--color-moss);
}

/* Hoạt họa dịch chuyển viên bi tròn sang bên phải khi BẬT */
.switch-control input:checked+.switch-slider::before {
    transform: translateX(20px);
}

/* ==========================================================================
   CẤU TRÚC THANH HEADER TINH KHIẾT (Xuyên suốt từ trái sang phải)
   ========================================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    height: 56px;
    display: flex;
    align-items: center;
    background: var(--color-moss);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(225, 225, 225, 0.5);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.header-left a,
.header-left a:hover,
.header-left a:visited {
    color: inherit;
}

/* Khối trung gian dùng để dàn trận Flexbox cho riêng các phần tử trong Header */
.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* --- KHỐI TRÁI: LOGO & ĐIỀU HƯỚNG --- */
.header-left {
    display: flex;
    align-items: center;
    gap: 60px;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.85;
}

.logo:hover {
    opacity: 1;
}

.logo .icon {
    width: 26px;
    height: 26px;
    background: url('/images/mz-logo.png') center no-repeat;
    background-size: contain;
}

.mz-label {
    display: block;
    margin-top: 2px;
}

.nav-menu-list {
    margin-top: 2px;
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-menu-link {
    position: relative;
    padding: 6px 0;
    transition: var(--transition-smooth);
    opacity: 0.85;
}

.nav-menu-link:hover {
    opacity: 1;
}

/* ==========================================================================
   3. KHỐI PHẢI: TÀI KHOẢN & DROPDOWN PHÁP LÝ
   ========================================================================== */
.header-right {
    position: relative;
    display: flex;
    align-items: center;
    gap: 30px;
}

.btn-header {
    background: none;
    border: none;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    font-weight: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    transition: var(--transition-smooth);
    opacity: 0.85;
}

.btn-header:hover {
    opacity: 1;
}

a.btn-header:hover,
a.btn-header:visited {
    color: inherit;
}

.btn-header .icon {
    margin-top: -2px;
}

.btn-header .ic-user {
    width: 15px;
    opacity: 0.95;
}

.btn-header .label {
    display: block;
    margin-top: 2px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cấu trúc bảng menu thả xuống */
.dropdown-target-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 240px;
    background-color: white;
    /* Nền trắng để chữ bên trong nổi bật rõ ràng */
    border-radius: 6px;
    /* Đổ bóng mịn màng pha chút sắc rêu thẫm hệ thống */
    box-shadow: 0 15px 35px rgba(44, 62, 53, 0.12);
    padding: 12px 0;
    list-style: none;

    /* Trạng thái ẩn giấu ban đầu */
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: var(--transition-smooth);
}

.dropdown-target-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(4px);
}

.dropdown-item a {
    display: block;
    padding: 10px 24px;
    color: var(--color-text-dark);
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition-smooth);
}

.dropdown-item a:hover {
    background-color: #f4f6f5;
    /* Màu nền kem nhạt */
    color: var(--color-moss);
    /* Đổi chữ sang màu xanh rêu chủ đạo */
    padding-left: 26px;
    /* Khẽ dịch chữ sang phải tạo độ nẩy */
}

/* Đường chỉ phân tách mảnh mai */
.dropdown-divider {
    height: 1px;
    background-color: #eaeded;
    margin: 8px 0;
}

/* ==========================================================================
   4. HỆ THỐNG FOOTER MASTER (Dàn trận Table-Layout tương thích SSR)
   ========================================================================== */
footer {
    background-color: #555;
    padding: 60px 0 20px 0;
    color: #ccc;
}

footer a {
    transition: var(--transition-smooth);
}

footer a,
footer a:visited {
    color: inherit;
}

footer a:hover {
    color: white;
    padding-left: 2px;
}

.footer-wrapper {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.footer-column {
    display: table-cell;
    vertical-align: top;
    padding-right: 30px;
}

.footer-column.brand-column {
    width: 35%;
}

.footer-logo {
    color: white;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
}

.footer-slogan {
    margin: 14px 0 10px 0;
    font-style: italic;
}

.footer-heading {
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 25px;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-copyright {
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #666;
    text-align: center;
}

.footer-copyright p {
    font-size: 12px;
    color: #bbbbbb;
    letter-spacing: 0.3px;
}

.footer-contacts {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-contacts .ic-zalo {
    height: 24px;
    width: 24px;
    margin-top: -3px;
}

.footer-contacts .ic-email {
    height: 21px;
    width: 21px;
    margin-top: -2px;
}

/* =========================================
   MOZY GLOBAL ALERT & TOAST COMPONENT
========================================= */

/* --- Modal Dialog --- */
.mz-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: mzFadeIn 0.2s ease;
}

.mz-modal {
    background: #ffffff;
    padding: 24px;
    border-radius: 8px;
    min-width: 300px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: mzPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: translateY(-12vh);
}

.mz-modal h3 {
    margin: 0 0 12px;
    font-size: 1.25rem;
    color: #111827;
}

.mz-modal div.mess {
    margin: 0 0 24px;
    color: #4B5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- Action Buttons --- */
.mz-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.mz-btn {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background 0.2s;
    outline: none;
}

.mz-btn-primary {
    background: #44ac89;
    color: white;
}

/* Xanh lá */
.mz-btn-primary:hover {
    background: #52be9a;
}

.mz-btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

/* Xám nhạt */
.mz-btn-secondary:hover {
    background: #E5E7EB;
}

/* --- Toast Notifications --- */
.mz-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.mz-toast {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    min-width: 250px;
    max-width: 350px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    pointer-events: auto;
    animation: mzSlideIn 0.3s ease forwards, mzSlideOut 0.3s ease 3s forwards;
}

/* 1. Toast Thông tin / Thành công (Tone xanh lá dịu mắt) */
.mz-toast-info {
    background-color: #F0FDF4;
    /* Màu nền xanh pastel rất nhẹ */
    border: 1px solid #b8eecb;
    /* Border đậm hơn nền một chút */
    color: #166534;
    /* Chữ màu xanh lá đậm để dễ đọc, không bị mờ */
}

/* 2. Toast Cảnh báo (Tone vàng cát / cam nhạt) */
.mz-toast-warn {
    background-color: #FFFBEB;
    /* Màu nền vàng kem nhẹ */
    border: 1px solid #f1e8c0;
    /* Border đậm hơn nền một chút */
    color: #92400E;
    /* Chữ màu nâu cam đậm */
}

/* 3. Toast Báo lỗi (Tone đỏ hồng nhạt) */
.mz-toast-error {
    background-color: #FEF2F2;
    /* Màu nền đỏ hồng cực nhẹ */
    border: 1px solid #FEE2E2;
    /* Border đậm hơn nền một chút */
    color: #991B1B;
    /* Chữ màu đỏ đô đậm để làm nổi bật lỗi */
}

ul.alert-list {
    margin-top: 10px;
    border-left: 2px solid #9ad3a1;
    padding: 0 0 0 28px;
    text-align: left;
}

/* =========================================
   ĐỊNH NGHĨA LOADER
========================================= */
.ss-loader {
    width: 30px;
    height: 30px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    /* Vòng nền nhạt */
    border-top: 2px solid #E4C57F;
    /* Nhánh quay màu vàng đậm */
    border-radius: 50%;

    /* Hiệu ứng quay vô tận */
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;

    /* Thêm một chút bóng đổ phát sáng nhẹ */
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Định nghĩa vòng quay */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* =========================================
   ĐỊNH NGHĨA CHO ĐỘ MẠNH MẬT KHẨU
========================================= */

.pwd-strength {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
}

.strength-dot {
    flex: 1;
    height: 4px;
    border-radius: 2px;
    background-color: rgba(0, 0, 0, 0.15);
    transition: background-color 0.4s ease-in-out, transform 0.3s ease;
}

.strength-dot.active {
    transform: scaleY(1.1);
    background-color: var(--strength-color);
}

/* --- Animations --- */
@keyframes mzFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes mzPopIn {
    from {
        transform: scale(0.8) translateY(0);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(-12vh);
        opacity: 1;
    }
}

@keyframes mzSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes mzFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
        display: none;
    }
}

@keyframes mzSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ==========================================================================
   5. ĐÁP ỨNG THIẾT BỊ (Responsive)
   ========================================================================== */

/* 💻 TABLET (Màn hình dưới 992px) */
@media screen and (max-width: 992px) {
    .nav-main {
        display: none;
    }

    /* Phá vỡ Table Layout để chuyển sang Flexbox có khả năng bẻ hàng */
    .footer-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 40px 20px;
        /* Khai báo khoảng cách: dọc 40px, ngang 20px */
    }

    /* Ép cột Thương hiệu (Brand) chiếm trọn 100% bề ngang để làm điểm nhấn */
    .footer-column.brand-column {
        width: 100%;
        padding-right: 0;
    }

    /* 3 cột thông tin còn lại chia đều không gian (mỗi cột ~30%) */
    .footer-column:not(.brand-column) {
        display: block;
        flex: 1;
        min-width: 200px;
        /* Bảo hiểm chống vỡ khung chữ */
        padding-right: 0;
    }

    .footer-heading {
        margin-bottom: 16px;
        /* Giảm khoảng đệm tiêu đề cho cân đối */
    }

    .footer-copyright {
        margin-top: 40px;
    }
}

/* 📱 SMARTPHONE (Màn hình dưới 768px) */
@media screen and (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    body.grow .page-wrapper {
        flex-direction: column;
    }

    body.grow .box.col-75,
    body.grow .box.col-25 {
        flex: none;
    }

    .box {
        padding: 30px;
    }

    .form-row.break {
        flex-direction: column;
    }

    header {
        height: 50px;
    }

    main {
        padding-top: 50px;
    }

    .logo {
        font-size: 20px;
    }

    .logo .icon {
        width: 22px;
        height: 22px;
    }

    .bottom-line:focus:after {
        display: none;
    }

    .header-right {
        gap: 15px;
    }

    footer {
        padding: 40px 0 20px 0;
        /* Thu gọn padding tổng thể trên mobile */
    }

    .footer-wrapper {
        flex-direction: column;
        /* Ép toàn bộ các cột xếp hàng dọc 100% */
        gap: 32px;
    }

    .footer-column:not(.brand-column) {
        width: 100%;
    }

    .footer-copyright {
        margin-top: 35px;
    }
}