.xtdn-wrapper {
    background-color: #F5F7FA;
    min-height: calc(100vh - 200px);
}

.xtdn-container {
    width: 87%;
    margin: 0 auto;
}

@media (max-width: 1199.98px) {
    .xtdn-container {
        width: 93%;
    }
}

@media (max-width: 767.98px) {
    .xtdn-container {
        width: 95%;
    }
}

.xtdn-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.08);
    border: 1px solid #EEF1F4;
}

.xtdn-card-title {
    color: var(--color-banding, #0B83BF);
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    text-transform: uppercase;
}

.xtdn-label {
    color: var(--color-dark, #262626);
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin-top: 25px;
    margin-bottom: 8px;
}

.xtdn-input {
    max-width: 320px;
    height: 40px;
    font-size: 14px;
}

.xtdn-btn-search {
    border-radius: 8px;
    background: var(--color-banding, #0B83BF);
    color: #FFF;
    text-align: center;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    height: 40px;
    padding: 0 18px;
    border: none;
}

.xtdn-btn-search:hover {
    background-color: #0959a0;
    color: #fff;
}

.xtdn-btn-register {
    border-radius: 8px;
    background: var(--color-banding, #0B83BF);
    color: #FFF;
    text-align: center;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    height: 40px;
    padding: 0 18px;
    border: none;
    text-decoration: none;
}

.xtdn-btn-register:hover {
    background-color: #0959a0;
    color: #fff;
}

.xtdn-hint {
    color: var(--Color-yellow, #E84600);
    font-size: 16px;
    font-style: italic;
    font-weight: 500;
    line-height: normal;
    margin-top: 20px;
}

.xtdn-hint-error {
    color: #E31B23;
    font-weight: 500;
}

.xtdn-search-card {
    min-height: 480px;
}

/* Sticky right-side guide */
.xtdn-sticky {
    position: sticky;
    top: 24px;
    align-self: flex-start;
}

.xtdn-guide-card .xtdn-card-title {
    margin-bottom: 18px;
}

.xtdn-step {
    display: flex;
    gap: 12px;
    padding: 10px 0;
    position: relative;
}

.xtdn-step:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 13px;
    top: 44px;
    bottom: -8px;
    width: 2px;
    background-color: #D6DCE3;
}

.xtdn-step-num {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #0B6FBF;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    position: relative;
    z-index: 1;
}

.xtdn-step-body {
    flex: 1 1 auto;
    min-width: 0;
}

.xtdn-step-title {
    color: #111827;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.xtdn-step-desc {
    color: #6B7280;
    font-size: 13px;
    line-height: 1.5;
}

.xtdn-substeps {
    margin: 4px 0 0;
    padding-left: 0;
    color: #6B7280;
    font-size: 13px;
    line-height: 1.7;
}

.xtdn-substeps li {
    margin-bottom: 2px;
}

@media (max-width: 991.98px) {
    .xtdn-sticky {
        position: static;
    }

    .xtdn-search-card {
        min-height: auto;
    }
}

/* Results table */
.xtdn-result-wrap {
    width: 100%;
    overflow-x: auto;
}

.xtdn-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.xtdn-result-table thead th {
    background-color: #E8F1FA;
    color: #0B6FBF;
    font-weight: 600;
    padding: 12px 16px;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.xtdn-result-table thead th.xtdn-col-mst,
.xtdn-result-table thead th.xtdn-col-action {
    text-align: center;
}

.xtdn-result-table tbody td {
    padding: 16px;
    border-bottom: 1px solid #EEF1F4;
    vertical-align: middle;
    color: #111827;
}

.xtdn-result-table tbody td.xtdn-col-action {
    text-align: center;
}

.xtdn-mst {
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
}

.xtdn-name {
    line-height: 1.45;
}

.xtdn-download {
    color: #0B6FBF;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    font-weight: 500;
}

.xtdn-download:hover {
    text-decoration: underline;
    color: #0959a0;
}

.xtdn-no-file {
    color: #9CA3AF;
}

.xtdn-btn-xac-thuc {
    background-color: #0B6FBF;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 7px 16px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    border: none;
    white-space: nowrap;
}

.xtdn-btn-xac-thuc:hover {
    background-color: #0959a0;
    color: #fff;
}

.xtdn-empty {
    color: #6B7280;
    font-style: italic;
    padding: 12px 0;
}

.xtdn-loading {
    color: #6B7280;
    padding: 12px 0;
}

/* Xác thực doanh nghiệp — form modal */
.xtdn-modal-dialog {
    max-width: 1000px;
    width: calc(100% - 32px);
}

.xtdn-modal-content {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.xtdn-modal-header {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid #EEF1F4;
}

.xtdn-modal-title {
    color: #0B6FBF;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    flex: 1 1 auto;
}

.xtdn-modal-close {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    line-height: 0;
}

.xtdn-modal-close:hover {
    opacity: 0.7;
}

.xtdn-modal-body {
    padding: 20px 24px 8px;
    overflow-y: auto;
    max-height: 75vh;
}

.xtdn-radio-row {
    display: flex;
    gap: 28px;
    margin-bottom: 12px;
}

.xtdn-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
}

.xtdn-radio input[type="radio"] {
    accent-color: #0B6FBF;
    width: 16px;
    height: 16px;
    margin: 0;
}

.xtdn-section {
    margin: 0 0 22px 0;
}

.xtdn-section > .xtdn-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 12px 0;
    padding: 0;
}

.xtdn-section-body {
    border-left: 1px solid #D4D4D4;
    padding-left: 16px;
    margin: 0 15px;
}

.xtdn-form-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
    margin-bottom: 12px;
}

.xtdn-form-row > .xtdn-field {
    grid-column: span 6;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    padding-bottom: 20px;
}

.xtdn-form-row > .xtdn-field > .xtdn-form-input,
.xtdn-form-row > .xtdn-field > .select2-container,
.xtdn-form-row > .xtdn-field > .xtdn-upload-box,
.xtdn-form-row > .xtdn-field > .xtdn-password-wrapper {
    margin-top: auto;
}

.xtdn-form-row.xtdn-row-2 > .xtdn-field {
    grid-column: span 3;
}

.xtdn-form-row.xtdn-row-3 > .xtdn-field {
    grid-column: span 2;
}

.xtdn-form-row.xtdn-row-2-1 > .xtdn-field:first-child {
    grid-column: span 4;
}

.xtdn-form-row.xtdn-row-2-1 > .xtdn-field:last-child {
    grid-column: span 2;
}

.xtdn-field-label {
    display: block;
    font-size: 13px;
    color: #374151;
    margin-bottom: 6px;
}

.xtdn-required {
    color: #E31B23;
}

.xtdn-field-error {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    color: #E31B23;
    font-size: 12px;
    line-height: 16px;
}

.xtdn-field-error.field-validation-valid,
.xtdn-field-error:empty {
    display: none;
}

.xtdn-form-input.input-validation-error,
.xtdn-form-input.xtdn-input-invalid {
    border-color: #E31B23;
}

.xtdn-form-input.input-validation-error:focus,
.xtdn-form-input.xtdn-input-invalid:focus {
    border-color: #E31B23;
    box-shadow: 0 0 0 0.15rem rgba(227, 27, 35, 0.15);
}

.xtdn-sub-label {
    display: block;
    font-style: italic;
    color: #E31B23;
    font-size: 12px;
    margin-top: 2px;
}

.xtdn-form-input {
    display: block;
    width: 100%;
    height: 38px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #D6DCE3;
    color: #111827;
    padding: 6px 12px;
    background-color: #fff;
}

select.xtdn-form-input {
    padding-right: 32px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23374151' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='4 6 8 10 12 6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.xtdn-form-input:focus {
    border-color: #0B6FBF;
    box-shadow: 0 0 0 0.15rem rgba(11, 111, 191, 0.12);
}

.xtdn-input-with-action {
    width: 100%;
}

.xtdn-password-wrapper {
    position: relative;
    width: 100%;
}

.xtdn-password-wrapper > .xtdn-password-input {
    padding-right: 36px;
}

.xtdn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.1rem;
}

.xtdn-toggle-password .fa {
    font-weight: 200 !important;
    color: #ccc !important;
}

.xtdn-btn-ghost {
    color: #0B6FBF;
    background: #fff;
    border: 1px solid #0B6FBF;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 0 14px;
    height: 38px;
    white-space: nowrap;
}

.xtdn-btn-ghost:hover {
    background: #EAF3FB;
    color: #0B6FBF;
}

.xtdn-upload-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 70px;
    border: 1.5px dashed #0B6FBF;
    border-radius: 6px;
    color: #0B6FBF;
    font-weight: 500;
    background-color: #F6FAFE;
    cursor: pointer;
}

.xtdn-upload-box:hover {
    background-color: #EAF3FB;
}

.xtdn-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.xtdn-upload-filename {
    margin-top: 6px;
    font-size: 13px;
    color: #374151;
}

.xtdn-field #TepVanBan {
    width: 100%;
}

.xtdn-field #TepVanBan .upload-block {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1.5px dashed #0B6FBF;
    color: #0B6FBF;
    background-color: #F6FAFE;
    border-radius: 6px;
    padding: 10px 20px;
    font-weight: 500;
}

.xtdn-field #TepVanBan .upload-block:hover {
    background-color: #EAF3FB;
    border-color: #0B6FBF;
    color: #0B6FBF;
}

.xtdn-field #TepVanBan .dropzone-items {
    margin-top: 8px;
}

.xtdn-field #TepVanBan .dropzone-item-custom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    margin-top: 6px;
}

.xtdn-modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px 18px;
    border-top: 1px solid #EEF1F4;
}

.xtdn-btn-cancel {
    background: transparent;
    color: #0B6FBF;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    padding: 8px 12px;
}

.xtdn-btn-cancel:hover {
    color: #0959a0;
}

.xtdn-btn-submit {
    background-color: #0B6FBF;
    color: #fff;
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
}

.xtdn-btn-submit:hover {
    background-color: #0959a0;
    color: #fff;
}

/* ====== Responsive ====== */

@media (max-width: 1199.98px) {
    .xtdn-card {
        padding: 22px 24px;
    }

    .xtdn-search-card {
        min-height: 440px;
    }
}

@media (max-width: 991.98px) {
    .xtdn-card {
        padding: 20px 22px;
    }

    .xtdn-card-title {
        font-size: 15px;
    }

    .xtdn-label {
        font-size: 15px;
        margin-top: 20px;
    }

    .xtdn-btn-search {
        font-size: 15px;
        height: 40px;
        padding: 0 16px;
    }

    .xtdn-btn-register {
        font-size: 15px;
        height: 40px;
        padding: 0 16px;
    }

    .xtdn-hint {
        font-size: 15px;
        margin-top: 16px;
    }

    .xtdn-search-card {
        min-height: auto;
    }

    .xtdn-modal-body {
        max-height: 70vh;
    }
}

@media (max-width: 767.98px) {
    .xtdn-card {
        padding: 18px 18px;
        border-radius: 8px;
    }

    .xtdn-card-title {
        font-size: 14px;
    }

    .xtdn-label {
        font-size: 14px;
        margin-top: 16px;
    }

    .xtdn-input {
        max-width: 100%;
    }

    .xtdn-btn-search {
        font-size: 14px;
        height: 38px;
        padding: 0 14px;
    }

    .xtdn-hint {
        font-size: 14px;
        margin-top: 14px;
    }

    /* Guide steps — tighter on mobile */
    .xtdn-step {
        gap: 10px;
        padding: 8px 0;
    }

    .xtdn-step-num {
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        font-size: 13px;
    }

    .xtdn-step:not(:last-child)::before {
        left: 11px;
        top: 38px;
    }

    .xtdn-step-title {
        font-size: 13px;
    }

    .xtdn-step-desc,
    .xtdn-substeps {
        font-size: 12px;
    }

    /* Results table — shrink paddings; horizontal scroll via .xtdn-result-wrap */
    .xtdn-result-table thead th,
    .xtdn-result-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }

    .xtdn-btn-xac-thuc {
        padding: 6px 12px;
        font-size: 12px;
    }

    /* Verify form modal */
    .xtdn-modal-dialog {
        width: calc(100% - 16px);
        margin-left: auto;
        margin-right: auto;
    }

    .xtdn-modal-header {
        padding: 14px 18px;
    }

    .xtdn-modal-title {
        font-size: 14px;
    }

    .xtdn-modal-body {
        padding: 16px 18px 4px;
        max-height: 65vh;
    }

    .xtdn-modal-footer {
        padding: 12px 18px 16px;
    }

    .xtdn-form-row {
        gap: 10px;
        margin-bottom: 10px;
    }

    .xtdn-form-row.xtdn-row-2 > .xtdn-field,
    .xtdn-form-row.xtdn-row-3 > .xtdn-field,
    .xtdn-form-row.xtdn-row-2-1 > .xtdn-field,
    .xtdn-form-row.xtdn-row-2-1 > .xtdn-field:first-child,
    .xtdn-form-row.xtdn-row-2-1 > .xtdn-field:last-child {
        grid-column: span 6;
    }

    .xtdn-radio-row {
        flex-wrap: wrap;
        gap: 14px;
    }

    .xtdn-input-with-action {
        flex-wrap: wrap;
    }

    .xtdn-btn-ghost {
        padding: 0 12px;
        font-size: 12px;
    }

    .xtdn-section {
        margin-bottom: 18px;
    }

    .xtdn-section > .xtdn-section-title {
        font-size: 13px;
        margin: 0 0 10px 0;
    }

    .xtdn-section-body {
        padding: 2px 0 0 18px;
    }

    .xtdn-field-label {
        font-size: 12px;
    }

    .xtdn-upload-box {
        min-height: 60px;
        font-size: 13px;
    }

    .xtdn-btn-submit {
        padding: 8px 18px;
        font-size: 13px;
    }
}

@media (max-width: 575.98px) {
    .xtdn-card {
        padding: 16px 14px;
    }

    .xtdn-sticky {
        top: 16px;
    }

    /* Stack search form fields when very narrow */
    .xtdn-search-card form {
        flex-wrap: wrap;
    }

    .xtdn-search-card form .form-control,
    .xtdn-search-card form .xtdn-input {
        flex: 1 1 100%;
        width: 100%;
    }

    .xtdn-btn-search {
        width: 100%;
        justify-content: center;
    }

    .xtdn-modal-footer {
        flex-wrap: wrap;
        gap: 10px;
    }

    .xtdn-btn-cancel,
    .xtdn-btn-submit {
        width: 100%;
        justify-content: center;
    }
}
