.ntm-button-wrap {
    text-align: center;
    margin: 22px 0;
}

.ntm-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    max-width: 100%;

    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff !important;
    font-size: 20px;
    font-weight: 800;
    padding: 15px 30px;
    border: 0;
    border-radius: 999px;
    text-decoration: none !important;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        filter 0.2s ease;

    cursor: pointer;
    vertical-align: middle;
    white-space: normal;
    text-align: center;
}

.ntm-download-btn:hover {
    filter: brightness(0.96);
    box-shadow: 0 14px 30px rgba(220, 38, 38, 0.34);
    transform: translateY(-1px);
}

.ntm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    margin: 0;
    font-size: 0;
    line-height: 1;
    vertical-align: middle;
}

.ntm-icon img,
.ntm-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 21px;
    max-height: 21px;
    object-fit: contain;
    object-position: center;
}

.ntm-icon svg {
    fill: currentColor;
    stroke: currentColor;
}

body.ntm-modal-open {
    overflow: hidden;
}

.ntm-modal-host:not([hidden]) {
    position: relative;
    z-index: 2147483646;
}

.ntm-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483646;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;
    box-sizing: border-box;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(3px);
}

.ntm-modal-content {
    position: relative;
    width: min(760px, 100%);
    max-width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;

    box-sizing: border-box;
    padding: 28px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.32);
    animation: ntmFadeIn 0.22s ease;

    color: #111827;
}

.ntm-modal-content * {
    box-sizing: border-box;
    max-width: 100%;
}

.ntm-modal-content .ntm-close {
    position: absolute;
    top: 14px;
    right: 14px;
    left: auto;

    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
    line-height: 1;
    font-weight: 400;

    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;

    cursor: pointer;
    z-index: 20;

    transition:
        background-color 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.ntm-modal-content .ntm-close:hover {
    color: #0f172a;
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.ntm-modal-content .ntm-close:focus-visible {
    outline: 2px solid #94a3b8;
    outline-offset: 2px;
}

.ntm-loading {
    text-align: center;
    padding: 48px 20px;
    color: #475569;
    font-weight: 600;
}

.ntm-modal-title {
    display: block;
    width: 100%;
    max-width: 100%;

    margin: 18px auto 10px;
    padding: 0 54px;

    color: #dc2626;
    text-align: center;
    font-size: 22px;
    font-weight: 850;
    line-height: 1.38;
    letter-spacing: -0.2px;
    text-decoration: none;

    overflow-wrap: anywhere;
    word-break: normal;
}

.ntm-modal-note {
    display: block;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 22px;
    padding: 9px 14px;

    text-align: center !important;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;

    font-size: 13px;
    line-height: 1.45;
}

.ntm-verify-area {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    width: 80%;
    margin: 0 auto 18px;
}

.ntm-code-input {
    flex: 1 1 260px;
    min-width: 0;
    width: 100%;
    max-width: none;

    padding: 14px 17px;
    color: #0f172a;
    background: #ffffff;

    border: 1.5px solid #4c1204;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.4;
    outline: none;

    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.ntm-code-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.ntm-verify-btn {
    flex: 0 0 auto;
    min-width: 145px;

    background: #0b7cff;
    color: #fff;
    border: 0;
    padding: 14px 22px;
    border-radius: 14px;

    font-size: 14px;
    line-height: 1.4;
    font-weight: 800;
    cursor: pointer;
    white-space: nowrap;

    box-shadow: 0 8px 18px rgba(11, 124, 255, 0.24);
    transition:
        background-color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.ntm-verify-btn:hover {
    background: #006be0;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(11, 124, 255, 0.28);
}

.ntm-verify-btn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.ntm-error-msg {
    min-height: 20px;
    margin: 0 0 14px;

    text-align: center;
    color: #dc2626;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.45;
}

.ntm-steps {
    display: flex;
    flex-direction: column;
    gap: 14px;

    text-align: left;
    line-height: 1.65;
    color: #111827;
}

.ntm-steps p {
    margin: 0;
}

.ntm-steps .highlight {
    color: #dc2626;
}

.ntm-steps .step-items {
    display: flex;
    align-items: baseline;
    gap: 9px;
    flex-wrap: wrap;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e5edf7;
    border-radius: 16px;
}

.ntm-steps .step-items p {
    flex: 1 0 100%;
    width: 100%;
    margin: 0;
}

.ntm-steps .keyword {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    background: #111827;
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-family: Roboto;
    font-size: 18px !important;
    font-weight: 800;
    line-height: 1.60;
}

.ntm-steps .btn-copy {
    flex: 0 0 auto;
    background: #eb8f25;
    color: #fff;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    padding: 6px 13px;
    text-transform: uppercase;

    transition:
        background-color 0.18s ease,
        transform 0.18s ease;
}

.ntm-steps .btn-copy:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

.ntm-steps .btn-copy.is-copied {
    background: #16a34a;
}

.ntm-steps a {
    color: #0b7cff;
    font-weight: 800;
    text-decoration: none;
}

.ntm-steps a:hover {
    text-decoration: underline;
}

.ntm-steps .image {
    width: 100%;
    margin: -2px 0 0;
}

.ntm-steps .image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;

    margin: 0;
    border-radius: 16px;
    border: 2px solid #6184b9ab;
    background: #fff;
    box-shadow: 0px 0px 8px 3px rgb(68 69 71 / 37%);
}

.ntm-hint {
    margin-top: -3px !important;
    padding: 11px 13px;

    color: #334155;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 12px;

    font-size: 14px;
    font-style: italic;
    line-height: 1.55;
}

.ntm-verify-bottom {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid #e5edf7;
}

/* Khu vực kết quả */
.ntm-result-wrap {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
    border-radius: 18px;
    margin: 20px auto;
    max-width: 720px;
    box-sizing: border-box;
}

.ntm-result-title {
    font-size: 28px;
    font-weight: 850;
    color: #166534;
    margin: 0 0 24px;
    line-height: 1.35;
}

.ntm-result-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: #1d4ed8;
    color: #fff !important;
    font-size: 19px;
    font-weight: 850;
    padding: 14px 42px;
    border-radius: 999px;
    text-decoration: none !important;
    box-shadow: 0 10px 22px rgba(29, 78, 216, 0.24);
}

.ntm-result-btn:hover {
    background: #1e40af;
}

.ntm-result-arrow {
    font-size: 34px;
    color: #1d4ed8;
    margin: 15px 0;
    font-weight: 800;
}

.ntm-result-link {
    background: #fff;
    border: 1px solid #dbe3ef;
    border-radius: 14px;
    padding: 15px 18px;
    display: inline-block;
    max-width: 100%;
    word-break: break-all;
    box-sizing: border-box;
}

.ntm-result-link a {
    color: #334155;
    text-decoration: none;
    font-size: 14px;
}

.ntm-result-error {
    text-align: center;
    color: #dc2626;
    padding: 30px;
    font-weight: 800;
}

/* Popup kết quả */
.ntm-result-page-message {
    position: relative;
    z-index: 1;
}

.ntm-result-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(3px);
    z-index: 2147483646;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;
    box-sizing: border-box;
}

.ntm-result-popup {
    position: relative;
    width: min(860px, 100%);
    max-height: 92vh;
    overflow: auto;
    border-radius: 22px;
    animation: ntmFadeIn 0.22s ease;
}

.ntm-result-close {
    position: absolute;
    right: 14px;
    top: 12px;
    z-index: 2;

    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: #475569;

    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.16);
}

.ntm-result-close:hover {
    background: #fff;
    color: #0f172a;
}

.ntm-result-popup .ntm-result-wrap {
    max-width: none;
    margin: 0;
    padding: 50px 34px 38px;
    border-radius: 22px;
    box-sizing: border-box;
}

.ntm-result-popup .ntm-result-link {
    display: block;
    margin: 0 auto;
    max-width: 680px;
    box-sizing: border-box;
}

/* Hạ z-index menu sticky Flatsome khi popup mở */
body.ntm-modal-open #header,
body.ntm-modal-open #header .header-wrapper,
body.ntm-modal-open .header-wrapper,
body.ntm-modal-open .header-main,
body.ntm-modal-open .header-bottom,
body.ntm-modal-open .stuck,
body.ntm-modal-open .sticky,
body.ntm-modal-open .sticky-jump,
body.ntm-modal-open .is-sticky,
body.ntm-modal-open .sticky-wrapper,
body.ntm-modal-open .mfp-wrap,
body.ntm-modal-open .off-canvas {
    z-index: 1 !important;
}

/* Tablet + mobile: ép layout dọc để không kéo ngang */
@media (max-width: 760px) {
    .ntm-modal-overlay {
        align-items: flex-start;
        padding: 10px;
        overflow-y: auto;
    }

    .ntm-modal-content {
        width: 100%;
        max-height: none;
        min-height: auto;
        margin: 8px 0;
        padding: 54px 15px 22px;
        border-radius: 18px;
    }

    .ntm-modal-content .ntm-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
    }

    .ntm-modal-title {
        margin: 4px auto 12px;
        padding: 0 46px;

        font-size: 18px;
        line-height: 1.45;
        text-align: center;

        overflow-wrap: anywhere;
        word-break: normal;
    }

    .ntm-modal-note {
        width: 100%;
        border-radius: 12px;
        font-size: 12.5px;
    }

    .ntm-verify-area {
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
    }

    .ntm-code-input {
        flex: 1 1 auto;
        width: 100%;
        min-width: 100%;
        max-width: none;
        padding: 13px 15px;
        border-radius: 13px;
    }

    .ntm-verify-btn {
        width: 100%;
        min-width: 100%;
        padding: 13px 18px;
        border-radius: 13px;
    }

    .ntm-steps {
        gap: 12px;
        line-height: 1.6;
    }

    .ntm-steps .step-items {
        flex-direction: column;
        align-items: stretch;
        gap: 9px;
        padding: 13px;
    }

    .ntm-steps .keyword {
        width: 100%;
        justify-content: center;
        text-align: center;
        font-size: 16px;
    }

    .ntm-steps .btn-copy {
        width: 25%;
    }

    .ntm-hint {
        font-size: 13.5px;
    }

    .ntm-result-overlay {
        align-items: flex-start;
        padding: 10px;
        overflow-y: auto;
    }

    .ntm-result-popup {
        max-height: none;
        margin: 8px 0;
    }

    .ntm-result-popup .ntm-result-wrap {
        padding: 46px 15px 28px;
    }

    .ntm-result-title {
        font-size: 22px;
    }

    .ntm-result-btn {
        width: 100%;
        font-size: 17px;
        padding: 13px 24px;
    }
}

@media (max-width: 420px) {
    .ntm-modal-overlay {
        padding: 6px;
    }

    .ntm-modal-content {
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 15px;
    }

    .ntm-modal-title {
        margin: 4px auto 12px;
        padding: 0 42px;

        font-size: 17px;
        line-height: 1.45;
        text-align: center;
    }

    .ntm-download-btn {
        width: 100%;
        padding: 14px 18px;
        font-size: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ntm-modal-content,
    .ntm-result-popup {
        animation: none;
    }

    .ntm-download-btn,
    .ntm-modal-content .ntm-close,
    .ntm-verify-btn,
    .ntm-steps .btn-copy {
        transition: none;
    }
}

@keyframes ntmFadeIn {
    from {
        opacity: 0;
        transform: scale(0.98) translateY(10px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}