/* ==========================================================================
   THÔNG TƯ 16/2025/TT-BXD — PHỤ LỤC I: QUY ĐỊNH HỆ THỐNG KÝ HIỆU BẢN VẼ CAD
   Đồng bộ ngôn ngữ thiết kế nhóm công cụ TT16 — GIS Việt Nam
   ========================================================================== */

:root {
    --tt16-primary: #1ab394;
    --tt16-primary-dark: #148f77;
    --tt16-primary-soft: #eafaf5;
    --tt16-primary-border: #8de0cb;
    --tt16-bg: #eef3f6;
    --tt16-panel: #ffffff;
    --tt16-border: #d8e2e8;
    --tt16-border-strong: #c2d1dc;
    --tt16-text: var(--color-mauchu-chatgpt, #202123);
    --tt16-muted: var(--color-mauchu-chatgpt, #202123);
    --tt16-group-bg: #f1f6f9;
    --tt16-cad-dark-bg: #141820;
    --tt16-cad-dark-border: #2b3547;
    --tt16-font: "Open Sans", "Segoe UI", Arial, sans-serif;
    --tt16-mono: Consolas, "SFMono-Regular", Menlo, Monaco, monospace;
}

body.tt16-pl1-page,
body.tt16-pl1-page {
    font-family: var(--tt16-font);
    color: var(--tt16-text);
    background: var(--tt16-bg);
}

body.tt16-pl1-page #page-wrapper {
    font-family: var(--tt16-font);
    color: var(--tt16-text);
    background: #dff7ef;
}

@media (min-width: 1024px) {
    html:has(body.tt16-pl1-page),
    body.tt16-pl1-page {
        height: 100dvh;
        overflow: hidden !important;
    }

    body.tt16-pl1-page #wrapper {
        height: 100dvh;
        overflow: hidden;
    }

    body.tt16-pl1-page #page-wrapper {
        height: 100dvh !important;
        min-height: 0 !important;
        padding: 0 !important;
        display: grid;
        grid-template-columns: 214px minmax(0, 1fr);
        grid-template-rows: auto minmax(0, 1fr);
        gap: 0;
        overflow: hidden;
    }
}

/* Top Command & Layer Composer Bar */
.tt16-topbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 2px 8px;
    background: transparent;
    border: 0;
    flex-wrap: wrap;
}

.tt16-topbar-left {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tt16-mobile-nav-btn {
    display: none;
    height: 30px;
    width: 30px;
    border: 1px solid var(--tt16-border-strong);
    border-radius: 4px;
    background: #f8fafc;
    color: var(--tt16-text);
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (max-width: 768px) {
    .tt16-mobile-nav-btn {
        display: inline-flex;
    }
}

.tt16-topbar-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt16-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.tt16-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 28px;
    padding: 0 9px;
    border-radius: 3px;
    border: 1px solid var(--tt16-border-strong);
    background: #ffffff;
    color: #1e293b;
    font-size: 11.8px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.14s ease;
    white-space: nowrap;
}

.tt16-btn:hover {
    border-color: var(--tt16-primary);
    color: var(--tt16-primary-dark);
    background: #f8fffe;
}

.tt16-btn-primary {
    background: var(--tt16-primary);
    border-color: var(--tt16-primary-dark);
    color: #ffffff !important;
}

.tt16-btn-primary:hover {
    background: var(--tt16-primary-dark);
    color: #ffffff !important;
}

.tt16-btn-cad-mode.is-active {
    background: #141820;
    border-color: #0f172a;
    color: #38bdf8 !important;
}

/* Dropdown tải 5 bộ Style ký hiệu chuẩn TT16-BXD & z-index modal xem PDF có sẵn */
body.tt16-pl1-page .swal2-container {
    z-index: 100000 !important;
}

body.tt16-pl1-page #id_modal_xempdf_modal_xempdf {
    z-index: 99990 !important;
}

body.tt16-pl1-page .modal-backdrop.modal-xempdf-backdrop {
    z-index: 99989 !important;
}

.tt16-dl-dropdown {
    position: relative;
    display: inline-flex;
}

.tt16-dl-trigger .tt16-dl-caret {
    font-size: 13px;
    margin-left: 1px;
    transition: transform 0.16s ease;
}

.tt16-dl-dropdown.is-open .tt16-dl-trigger .tt16-dl-caret {
    transform: rotate(180deg);
}

.tt16-dl-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 372px;
    max-width: calc(100vw - 20px);
    background: #ffffff;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    box-shadow: 0 18px 38px -8px rgba(15, 23, 42, 0.24), 0 4px 12px rgba(37, 99, 235, 0.1);
    z-index: 2500;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.tt16-dl-dropdown.is-open .tt16-dl-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.tt16-dl-menu-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 12px;
    background: #f5f9ff;
    border-bottom: 1px solid #dbeafe;
}

.tt16-dl-menu-title {
    font-size: 11.8px;
    font-weight: 700;
    color: #0f172a;
}

.tt16-dl-menu-sub {
    font-size: 10.8px;
    font-weight: 600;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #93c5fd;
    padding: 1px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.tt16-dl-list {
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.tt16-dl-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 9px;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color 0.14s ease, border-color 0.14s ease;
}

.tt16-dl-item:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
}

.tt16-dl-item.is-ready:hover {
    background: #eff6ff;
    border-color: #93c5fd;
}

.tt16-dl-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.tt16-dl-icon.is-cad {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.tt16-dl-icon.is-qgis {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.tt16-dl-icon.is-arcpro {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.tt16-dl-icon.is-arcmap {
    background: #ecfeff;
    color: #0891b2;
    border: 1px solid #a5f3fc;
}

.tt16-dl-icon.is-web {
    background: #f5f3ff;
    color: #7c3aed;
    border: 1px solid #ddd6fe;
}

.tt16-dl-icon.is-web-png {
    background: #fdf2f8;
    color: #db2777;
    border: 1px solid #fbcfe8;
}

.tt16-dl-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tt16-dl-name {
    display: block;
    font-size: 12.2px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt16-dl-right {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
    margin-left: auto;
}

.tt16-dl-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 1.5px 7px;
    border-radius: 999px;
    line-height: 1.35;
    white-space: nowrap;
    transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.tt16-dl-badge.is-ready {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.tt16-dl-item.is-ready:hover .tt16-dl-badge.is-ready {
    background: #bfdbfe;
    color: #1e40af;
    border-color: #60a5fa;
}

.tt16-dl-badge.is-soon {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.tt16-dl-code {
    font-family: var(--tt16-mono);
    font-size: 10.8px;
    color: #64748b;
    background: transparent;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt16-dl-action-ic {
    font-size: 12.5px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.14s ease, transform 0.14s ease;
}

.tt16-dl-item.is-ready .tt16-dl-action-ic {
    color: #2563eb;
}

.tt16-dl-item.is-ready:hover .tt16-dl-action-ic {
    color: #1d4ed8;
}

/* Layer Prefix / Suffix Quick Composer Strip */
.tt16-composer-bar {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 5px 12px;
    background: #f7fafc;
    border-bottom: 1px solid var(--tt16-border);
    font-size: 11.5px;
    flex-wrap: wrap;
}

.tt16-composer-group {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.tt16-composer-label {
    color: var(--tt16-muted);
    font-weight: 600;
    margin-right: 2px;
}

.tt16-chip {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 7px;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    font-family: var(--tt16-mono);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s ease;
}

.tt16-chip:hover {
    border-color: var(--tt16-primary);
    color: var(--tt16-primary-dark);
}

.tt16-chip.is-active {
    background: var(--tt16-primary);
    border-color: var(--tt16-primary-dark);
    color: #ffffff;
}

.tt16-composer-preview {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #475569;
    font-size: 11.2px;
}

.tt16-composer-preview code {
    padding: 2px 6px;
    border-radius: 3px;
    background: #e6f7f3;
    border: 1px solid #9be3d1;
    color: #0f766e;
    font-family: var(--tt16-mono);
    font-weight: 700;
}

/* Main 2-Column Workspace */
.tt16-workspace {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 8px;
    padding: 8px;
    background: var(--tt16-bg);
}

@media (max-width: 1480px) {
    .tt16-workspace {
        grid-template-columns: 184px minmax(0, 1fr);
        gap: 6px;
        padding: 6px;
    }
}

@media (max-width: 1160px) {
    .tt16-workspace {
        grid-template-columns: 204px minmax(0, 1fr);
    }
}

@media (max-width: 1023px) {
    .tt16-workspace {
        display: flex;
        flex-direction: column;
    }
}

/* Trên màn hình rộng, mục lục chiếm cả chiều cao cạnh thanh công cụ. */
@media (min-width: 1024px) {
    .tt16-workspace {
        display: contents;
    }

    .tt16-topbar {
        display: none;
    }

    .tt16-toc-panel {
        grid-column: 1;
        grid-row: 1;
    }

    .tt16-main-stream {
        grid-column: 2;
        grid-row: 1;
    }

    body.tt16-pl1-page #page-wrapper {
        grid-template-rows: minmax(0, 1fr);
    }
}

@media (min-width: 1024px) and (max-width: 1480px) {
    body.tt16-pl1-page #page-wrapper {
        grid-template-columns: 184px minmax(0, 1fr);
        gap: 0;
        padding: 0 !important;
    }

    .tt16-topbar {
        padding: 2px 4px;
    }
}

@media (min-width: 1024px) and (max-width: 1160px) {
    body.tt16-pl1-page #page-wrapper {
        grid-template-columns: 204px minmax(0, 1fr);
    }

}

.tt16-toc-panel,
.tt16-main-stream {
    background: var(--tt16-panel);
    border: 1px solid var(--tt16-border);
    border-radius: 4px;
    min-height: 0;
}

/* Custom Thin Scrollbars */
.tt16-toc-scroll::-webkit-scrollbar,
.tt16-main-stream::-webkit-scrollbar {
    width: 5px;
}

.tt16-toc-scroll::-webkit-scrollbar-track,
.tt16-main-stream::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 4px;
}

.tt16-toc-scroll::-webkit-scrollbar-thumb,
.tt16-main-stream::-webkit-scrollbar-thumb {
    background: #74849a;
    border: none;
    border-radius: 4px;
}

.tt16-toc-scroll,
.tt16-main-stream {
    scrollbar-width: thin;
    scrollbar-color: #74849a #e2e8f0;
}

html:has(body.tt16-pl1-page),
body.tt16-pl1-page {
    scrollbar-color: #74849a #e2e8f0;
}

html:has(body.tt16-pl1-page)::-webkit-scrollbar-track,
body.tt16-pl1-page::-webkit-scrollbar-track {
    background: #e2e8f0;
}

html:has(body.tt16-pl1-page)::-webkit-scrollbar-thumb,
body.tt16-pl1-page::-webkit-scrollbar-thumb {
    background: #74849a;
}

/* 1. Left Sticky TOC & Filter Rail */
.tt16-toc-panel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #dff7ef;
}

@media (min-width: 1024px) {
    .tt16-toc-panel {
        position: relative;
        overflow: visible;
    }

    .tt16-toc-panel::after {
        position: absolute;
        top: -4px;
        right: 0;
        bottom: -4px;
        width: 0.5px;
        background: var(--color-daidien-page-chuyenhetoado, #1ab394);
        content: "";
        pointer-events: none;
    }
}

.tt16-sidebar-controls {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    background: #ffffff;
    border-bottom: 1px solid var(--color-daidien-page-chuyenhetoado, #1ab394);
}

.tt16-filter-box {
    flex: 0 0 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
}

.tt16-sidebar-quick-actions {
    flex: 0 0 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 6px;
    padding: 0;
}

.tt16-sidebar-quick-actions #id_tt16_btn_xem_pdf {
    width: 100%;
    min-width: 0;
    height: 28px;
    box-sizing: border-box;
    justify-content: center;
    gap: 5px;
    padding: 0 6px;
    border-radius: 4px;
    border: 1px solid #f5c2c7;
    background: #fff5f5;
    color: #b91c1c !important;
    font-size: 11.4px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.06);
}

.tt16-sidebar-quick-actions #id_tt16_btn_xem_pdf > span {
    color: #b91c1c !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt16-sidebar-quick-actions #id_tt16_btn_xem_pdf i {
    color: #dc2626 !important;
    font-size: 12px;
    flex-shrink: 0;
}

.tt16-sidebar-quick-actions #id_tt16_btn_xem_pdf:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b !important;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.14);
}

.tt16-sidebar-quick-actions #id_tt16_btn_xem_pdf:hover > span,
.tt16-sidebar-quick-actions #id_tt16_btn_xem_pdf:hover i {
    color: #991b1b !important;
}

.tt16-sidebar-quick-actions #id_tt16_dl_wrap {
    width: 100%;
    min-width: 0;
    display: flex;
}

.tt16-sidebar-quick-actions #id_tt16_btn_dl_menu {
    width: 100%;
    min-width: 0;
    height: 28px;
    box-sizing: border-box;
    justify-content: center;
    padding: 0 6px;
    gap: 4px;
    border-radius: 4px;
    border: 1px solid #9ec5fe !important;
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    font-size: 11.4px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.06);
}

.tt16-sidebar-quick-actions #id_tt16_btn_dl_menu > span {
    color: #1d4ed8 !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tt16-sidebar-quick-actions #id_tt16_btn_dl_menu > i {
    color: #2563eb !important;
}

.tt16-sidebar-quick-actions #id_tt16_btn_dl_menu .fa-download {
    font-size: 11.5px;
    flex-shrink: 0;
}

.tt16-sidebar-quick-actions #id_tt16_btn_dl_menu .tt16-dl-caret {
    font-size: 10.5px;
    margin-left: 0;
    opacity: 0.92;
    flex-shrink: 0;
}

.tt16-sidebar-quick-actions #id_tt16_btn_dl_menu:hover,
.tt16-sidebar-quick-actions .tt16-dl-dropdown.is-open #id_tt16_btn_dl_menu {
    background: #dbeafe !important;
    border-color: #3b82f6 !important;
    color: #1e40af !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.14);
}

.tt16-sidebar-quick-actions #id_tt16_btn_dl_menu:hover > span,
.tt16-sidebar-quick-actions #id_tt16_btn_dl_menu:hover > i,
.tt16-sidebar-quick-actions .tt16-dl-dropdown.is-open #id_tt16_btn_dl_menu > span,
.tt16-sidebar-quick-actions .tt16-dl-dropdown.is-open #id_tt16_btn_dl_menu > i {
    color: #1e40af !important;
}

.tt16-sidebar-quick-actions .tt16-dl-menu {
    right: auto;
    left: 0;
    border-color: #93c5fd;
}

.tt16-sidebar-controls .tt16-search-input,
.tt16-sidebar-controls .tt16-geom-select {
    box-sizing: border-box;
    height: 28px;
    min-height: 28px;
    max-height: 28px;
}

@media (max-width: 1023px) {
    .tt16-toc-panel:has(.tt16-sidebar-quick-actions .tt16-dl-dropdown.is-open) {
        position: relative;
        z-index: 2501;
        overflow: visible;
    }
}

.tt16-search-wrap {
    position: relative;
}

.tt16-search-wrap .fa-search {
    position: absolute;
    left: 9px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 12px;
    pointer-events: none;
}

.tt16-search-input {
    width: 100%;
    height: 34px;
    padding: 0 26px 0 28px;
    border: 1px solid #d7dfe5;
    border-radius: 3px;
    font-size: 12px;
    background: #ffffff;
    color: var(--tt16-text);
}

.tt16-search-input:focus {
    outline: none;
    border-color: var(--tt16-primary);
    box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.14);
}

.tt16-search-clear {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    display: none;
}

.tt16-search-clear.is-visible {
    display: block;
}

.tt16-geom-select {
    width: 100%;
    height: 28px;
    padding: 0 6px;
    border: 1px solid #d7dfe5;
    border-radius: 3px;
    font-size: 12.5px;
    background: #ffffff;
    color: var(--tt16-text);
}

.tt16-filter-box .select2-container {
    width: 100% !important;
    font-size: 12.2px;
}

@media (min-width: 1024px) and (max-width: 1480px) {
    .tt16-filter-box .select2-container {
        font-size: 11.2px;
    }

    .tt16-filter-box .select2-container--default .select2-selection--single .select2-selection__rendered {
        padding-left: 6px;
        padding-right: 19px;
    }
}

.tt16-filter-box .select2-container--default .select2-selection--single {
    position: relative;
    height: 28px !important;
    min-height: 28px !important;
    box-sizing: border-box;
    border: 1px solid #d7dfe5;
    border-radius: 3px;
    background-color: #ffffff;
}

.tt16-filter-box .select2-container--default.select2-container--open .select2-selection--single,
.tt16-filter-box .select2-container--default .select2-selection--single:has(.select2-selection__clear) {
    border-color: var(--tt16-primary) !important;
}

.tt16-filter-box .select2-container--default.select2-container--open.select2-container--below .select2-selection--single {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.tt16-filter-box .select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.tt16-filter-box .select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 8px;
    padding-right: 22px;
    line-height: 26px;
    color: var(--color-mauchu-chatgpt, #202123) !important;
}

.tt16-filter-box .select2-container--default .select2-selection--single:has(.select2-selection__clear) .select2-selection__rendered {
    padding-right: 40px;
}

.tt16-filter-box .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: var(--color-mauchu-chatgpt, #202123);
}

.tt16-filter-box .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 26px;
    right: 1px;
}

.tt16-filter-box .select2-container--default .select2-selection--single .select2-selection__clear {
    position: absolute;
    top: 50%;
    right: 18px;
    z-index: 2;
    width: 14px;
    height: 24px;
    margin: 0;
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    color: #ed5565;
    font-weight: bold;
    transform: translateY(-50%);
}

.tt16-geom-dropdown {
    z-index: 99999;
    font-family: var(--tt16-font);
    font-size: 12.5px;
}

.tt16-geom-dropdown .select2-dropdown {
    border: 1px solid var(--tt16-primary) !important;
    border-radius: 3px;
    box-sizing: border-box;
    min-width: 0 !important;
    width: 100% !important;
    overflow: hidden;
}

.tt16-geom-dropdown .select2-dropdown--below {
    border-top: 0 !important;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.tt16-geom-dropdown .select2-dropdown--above {
    border-bottom: 0 !important;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.tt16-geom-dropdown .select2-results__option {
    padding: 6px 8px;
    color: var(--color-mauchu-chatgpt, #202123);
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.tt16-geom-dropdown.select2-container--default .select2-results__option--highlighted[aria-selected],
.tt16-geom-dropdown .select2-results__option--highlighted[aria-selected] {
    background-color: #1967d2 !important;
    color: #ffffff !important;
}

.tt16-filter-status {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    font-size: 11px;
    color: var(--tt16-muted);
    white-space: nowrap;
}

.tt16-filter-status-topbar {
    flex: 0 0 auto;
}

@media (min-width: 1024px) and (max-width: 1200px) {
    .tt16-topbar-left,
    .tt16-topbar-actions {
        flex-basis: 100%;
    }

    .tt16-filter-box {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 1023px) {
    .tt16-topbar {
        align-items: stretch;
    }

    .tt16-topbar-left,
    .tt16-topbar-actions {
        flex: 1 1 100%;
    }

    .tt16-filter-box {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 680px) {
    .tt16-filter-box {
        grid-template-columns: minmax(0, 1fr);
    }

    .tt16-filter-status {
        grid-column: 1 / -1;
    }

    .tt16-topbar-actions {
        justify-content: flex-start;
    }
}

.tt16-toc-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    background: #dff7ef;
}

.tt16-toc-scroll > :last-child {
    margin-bottom: 0;
}

.tt16-toc-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 8px;
    margin-bottom: 4px;
    border: 1px solid var(--tt16-primary-border);
    border-radius: 3px;
    background: #ffffff;
    color: #334155;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.12s ease;
}

.tt16-toc-item:hover {
    background: #f5fffc;
    border-color: var(--tt16-primary);
    color: #0f172a;
}

.tt16-toc-item.is-active {
    background: #fff7d6;
    border-color: #f59e0b;
    color: var(--color-mauchu-chatgpt, #202123);
    box-shadow: none;
}

.tt16-toc-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.tt16-toc-code {
    flex-shrink: 0;
    padding: 1px 5px;
    border-radius: 2px;
    background: #e2e8f0;
    color: #334155;
    font-size: 10px;
    font-weight: 700;
}

.tt16-toc-item.is-active .tt16-toc-code {
    background: #f59e0b;
    color: #ffffff;
}

.tt16-toc-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt16-toc-count {
    flex-shrink: 0;
    min-width: 22px;
    padding: 1px 5px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 10.5px;
    font-weight: 700;
    text-align: center;
}

.tt16-toc-sublist {
    display: grid;
    gap: 4px;
    padding-left: 6px;
    padding-right: 0;
    margin: 0 0 4px 6px;
    border-left: 1px solid var(--color-daidien-page-chuyenhetoado, #1ab394);
}

.tt16-toc-sublist.has-active-child {
    border-left-color: #f59e0b;
}

.tt16-toc-subitem {
    width: 100%;
    display: flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 8px;
    margin: 0;
    border: 1px solid var(--tt16-primary-border);
    border-radius: 3px;
    background: #ffffff;
    color: var(--color-mauchu-chatgpt, #202123);
    font-size: 11.2px;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: border-color 0.12s ease, background-color 0.12s ease;
}

.tt16-toc-subitem:hover {
    background: #f5fffc;
    border-color: var(--tt16-primary);
}

.tt16-toc-subitem.is-active {
    background: #fff7d6;
    border-color: #f59e0b;
    color: var(--color-mauchu-chatgpt, #202123);
}

/* 2. Center Continuous Vertical Specification Stream */
.tt16-main-stream {
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
}

.tt16-section-card {
    background: #ffffff;
    border: 0;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
}

.tt16-section-card.is-hidden-by-filter {
    display: none;
}

.tt16-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(90deg, #f3faf8 0%, #ffffff 65%);
    border-bottom: 1px solid var(--tt16-border);
    cursor: pointer;
}

.tt16-section-head-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex-wrap: wrap;
}

.tt16-muc-pill {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 3px;
    background: var(--tt16-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

.tt16-section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
}

.tt16-scale-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.tt16-section-head-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tt16-row-counter {
    font-size: 11.5px;
    color: var(--tt16-muted);
    font-weight: 600;
}

.tt16-collapse-icon {
    color: #64748b;
    transition: transform 0.18s ease;
}

.tt16-section-card.is-collapsed .tt16-collapse-icon {
    transform: rotate(-90deg);
}

.tt16-section-card.is-collapsed .tt16-section-body {
    display: none;
}

.tt16-section-body {
    padding: 12px 14px 14px;
}

@media (max-width: 1480px) {
    .tt16-main-stream {
        padding: 0;
    }

    .tt16-section-head {
        padding: 8px 10px;
    }

    .tt16-section-body {
        padding: 8px 8px 10px;
    }
}

/* General Regulations & Stamp Grid */
.tt16-general-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
    gap: 12px;
}

@media (max-width: 900px) {
    .tt16-general-grid {
        grid-template-columns: 1fr;
    }
}

.tt16-rules-list {
    margin: 0;
    padding-left: 18px;
    font-size: 12.4px;
    line-height: 1.55;
    color: #334155;
}

.tt16-rules-list li {
    margin-bottom: 5px;
}

.tt16-part2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 6px;
    margin-top: 10px;
}

.tt16-part2-card {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 7px 9px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #f8fafc;
    cursor: pointer;
    text-align: left;
    transition: all 0.14s ease;
}

.tt16-part2-card:hover {
    border-color: var(--tt16-primary);
    background: var(--tt16-primary-soft);
}

.tt16-part2-card strong {
    flex-shrink: 0;
    color: #0f766e;
    font-size: 11.5px;
}

.tt16-part2-card span {
    font-size: 11.6px;
    color: #334155;
    line-height: 1.35;
}

/* Blueprint & Technical Drawing Cards */
.tt16-blueprint-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 10px 0 14px;
}

@media (max-width: 980px) {
    .tt16-blueprint-grid {
        grid-template-columns: 1fr;
    }
}

.tt16-blueprint-card {
    border: 1px solid var(--tt16-border-strong);
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.tt16-blueprint-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 7px 10px;
    background: #f1f5f9;
    border-bottom: 1px solid var(--tt16-border);
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

.tt16-zoom-trigger-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
    border-radius: 3px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
}

.tt16-zoom-trigger-btn:hover {
    border-color: var(--tt16-primary);
    color: var(--tt16-primary-dark);
}

.tt16-svg-surface {
    background: #ffffff;
    transition: background-color 0.16s ease, border-color 0.16s ease;
}

body.tt16-cad-dark .tt16-svg-surface {
    background: var(--tt16-cad-dark-bg) !important;
    border-color: var(--tt16-cad-dark-border) !important;
}

.tt16-blueprint-body {
    flex: 1;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 210px;
    cursor: zoom-in;
}

.tt16-blueprint-body img {
    max-width: 100%;
    max-height: 255px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.tt16-scalebar-inset {
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px dashed #cbd5e1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
    color: var(--tt16-muted);
}

.tt16-scalebar-inset img {
    height: 26px;
    max-height: 26px;
}

/* Section Rules & Supplemental Col-7 Icons */
.tt16-meta-strip {
    margin-bottom: 10px;
    padding: 8px 11px;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--tt16-primary);
    border-radius: 3px;
    background: #f8fafc;
}

.tt16-meta-strip-title {
    font-size: 11.8px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tt16-col7-box {
    margin-bottom: 12px;
    padding: 8px 10px;
    border: 1px solid #dbe5ec;
    border-radius: 4px;
    background: #fcfdfe;
}

.tt16-col7-header {
    font-size: 11.8px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tt16-col7-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 6px;
}

.tt16-col7-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    background: #ffffff;
    cursor: zoom-in;
    transition: border-color 0.14s ease;
}

.tt16-col7-card:hover {
    border-color: var(--tt16-primary);
}

.tt16-col7-thumb {
    width: 50px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
}

.tt16-col7-thumb img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.tt16-col7-label {
    font-size: 11.4px;
    color: #334155;
    line-height: 1.3;
}

/* Mục 08 Quick Branch Jump Bar */
.tt16-branch-bar {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding: 7px 9px;
    background: #f1f5f9;
    border: 1px solid #dbe5ec;
    border-radius: 4px;
}

.tt16-branch-pill {
    padding: 3px 8px;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #1e293b;
    font-size: 11.3px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s ease;
}

.tt16-branch-pill:hover {
    border-color: var(--tt16-primary);
    background: var(--tt16-primary-soft);
    color: #0f766e;
}

/* Unified Specification Table */
.tt16-table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #1ab394;
    border-radius: 0;
}

.tt16-spec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12.2px;
    background: #ffffff;
}

.tt16-spec-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #eef4f7;
    color: #0f172a;
    font-weight: 700;
    font-size: 11.6px;
    padding: 7px 6px;
    border-bottom: 2px solid #cbd5e1;
    border-right: 1px solid #dbe4ec;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}

.tt16-spec-table thead th:nth-child(2) {
    white-space: normal;
    line-height: 1.25;
    min-width: 112px;
}

.tt16-spec-table[data-muc-table] thead th.tt16-name-tech-heading {
    min-width: 320px;
    white-space: normal !important;
    line-height: 1.25;
    text-align: center;
}

.tt16-name-tech-heading > span {
    display: block;
}

.tt16-name-tech-heading .fa-sliders {
    color: var(--tt16-primary-dark);
    margin-right: 3px;
}

.tt16-name-tech-heading small {
    display: block;
    margin-top: 2px;
    color: var(--tt16-muted);
    font-size: 10px;
    font-weight: 600;
}

.tt16-spec-table thead th:last-child,
.tt16-spec-table tbody td:last-child {
    border-right: 0;
}

.tt16-spec-table tbody td {
    padding: 6px 6px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #edf2f7;
    vertical-align: middle;
}

.tt16-spec-table tbody tr.tt16-sym-row {
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.tt16-spec-table[data-muc-table] thead th {
    background: #ffffff;
    border-bottom: 1px solid #1ab394;
    border-right: 1px solid #1ab394;
}

.tt16-spec-table[data-muc-table] tbody td {
    border-bottom: 1px solid #1ab394;
    border-right: 1px solid #1ab394;
}

.tt16-spec-table[data-muc-table] thead th:last-child,
.tt16-spec-table[data-muc-table] tbody td:last-child {
    border-right: 0;
}

.tt16-spec-table[data-muc-table] tbody tr.tt16-group-row td {
    border-bottom: 1px solid #1ab394;
}

.tt16-spec-table[data-muc-table] tbody tr.tt16-group-row.is-major-branch td {
    border-top: 1px solid #1ab394;
}

.tt16-spec-table[data-muc-table] tbody tr.tt16-sym-row.is-odd {
    background: #f7f7f7;
}

.tt16-spec-table[data-muc-table] tbody tr.tt16-sym-row.is-even {
    background: #ffffff;
}

.tt16-spec-table[data-muc-table] tbody tr.tt16-sym-row.is-selected {
    background: #fffde0 !important;
}

.tt16-spec-table[data-muc-table] tbody tr.tt16-sym-row.is-selected > td {
    background-color: transparent !important;
}

.tt16-spec-table tbody tr.is-row-hidden {
    display: none;
}

/* Group / Category Row inside Unified Table */
.tt16-spec-table tbody tr.tt16-group-row td {
    background: var(--tt16-group-bg);
    color: #0f172a;
    font-weight: 700;
    font-size: 12.2px;
    padding: 7px 10px;
    border-bottom: 1px solid #cbd5e1;
}

.tt16-spec-table tbody tr.tt16-group-row.is-major-branch td {
    background: #e6f4f1;
    color: #0f766e;
    border-top: 1px solid #9be3d1;
    border-bottom: 1px solid #9be3d1;
    font-size: 12.6px;
}

.tt16-td-stt {
    width: 28px;
    text-align: center;
    font-weight: 600;
    color: #475569;
    padding: 5px 3px !important;
}

.tt16-td-name {
    min-width: 145px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.35;
}

.tt16-spec-table[data-muc-table] .tt16-td-name {
    width: 330px;
    min-width: 320px;
}

.tt16-name-main-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 2px 8px;
    min-width: 0;
}

.tt16-name-txt {
    flex: 1 1 auto;
    min-width: 0;
}

.tt16-name-spec-wrap {
    margin-top: 6px;
    padding-top: 5px;
    border-top: 1px solid #dbe5eb;
    font-weight: 400;
}

.tt16-name-layer {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    margin-top: 0;
    line-height: 1.2;
}

.tt16-row-subnote {
    margin-top: 3px;
    font-size: 11px;
    font-weight: 400;
    color: #64748b;
}

.tt16-td-sym {
    width: 154px;
    min-width: 140px;
    text-align: center;
    padding: 6px 5px !important;
}

.tt16-sym-cell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
}

.tt16-sym-box {
    width: 100%;
    max-width: 148px;
    height: 56px;
    margin: 0 auto;
    border: 1px solid #dbe4ec;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    cursor: zoom-in;
}

.tt16-sym-box.tt16-svg-surface {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

body.tt16-cad-dark .tt16-sym-box.tt16-svg-surface {
    border-color: transparent !important;
    background: transparent !important;
}

.tt16-td-sym-merged .tt16-sym-box {
    width: 100%;
    max-width: 340px;
    height: 58px;
}

.tt16-sym-utilities {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.tt16-phase-layer-code {
    display: block;
    width: 100%;
    color: #0f172a;
    font-family: var(--tt16-mono);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    padding: 2px 0;
}

.tt16-phase-layer-code .tt16-layer-text {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: center;
    overflow-wrap: anywhere;
}

.tt16-phase-downloads {
    display: flex;
    gap: 4px;
    width: 100%;
}

.tt16-phase-download-link {
    display: inline-flex;
    flex: 1 1 50%;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    border: 1px solid #99f6e4;
    border-radius: 3px;
    background: #e6f7f3;
    color: #0f766e !important;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
}

.tt16-phase-download-link:hover {
    background: #ccfbf1;
}

.tt16-phase-download-link.is-png {
    border-color: #fbcfe8;
    background: #fdf2f8;
    color: #be185d !important;
}

.tt16-phase-download-link.is-png:hover {
    background: #fce7f3;
}

.tt16-sym-box img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.tt16-sym-box.is-compact-sym img {
    max-width: 78px;
    max-height: 40px;
}

.tt16-sym-empty {
    color: #cbd5e1;
    font-size: 11px;
}

/* Layer Code under the category name */
.tt16-layer-pill {
    display: inline-flex;
    max-width: 100%;
    align-items: center;
    gap: 5px;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-family: var(--tt16-mono);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s ease;
    text-align: left;
    white-space: normal;
    vertical-align: top;
}

.tt16-layer-pill .tt16-layer-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.tt16-layer-pill:hover {
    border-color: var(--tt16-primary);
    background: var(--tt16-primary-soft);
    color: #0f766e;
}

.tt16-layer-pill .fa-copy {
    font-size: 10.5px;
    color: #64748b;
    flex-shrink: 0;
}

.tt16-td-geom {
    width: 50px;
    text-align: center;
    white-space: nowrap;
    padding: 5px 4px !important;
}

.tt16-geom-badge {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10.8px;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #dbe4ec;
}

.tt16-td-color {
    width: 60px;
    text-align: center;
    white-space: nowrap;
    padding: 5px 4px !important;
}

.tt16-tech-list {
    display: grid;
    gap: 4px;
    font-size: 10.8px;
    line-height: 1.3;
}

.tt16-tech-summary {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 5px;
    margin-bottom: 2px;
}

.tt16-tech-item {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    align-items: start;
    gap: 5px;
    padding-bottom: 3px;
    border-bottom: 1px dashed #e5edf2;
}

.tt16-tech-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.tt16-tech-label {
    color: #64748b;
    font-weight: 600;
}

.tt16-tech-value {
    min-width: 0;
    color: #334155;
    overflow-wrap: anywhere;
    font-family: var(--tt16-mono);
    font-size: 10.4px;
}

.tt16-tech-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 6px;
    border: 1px solid #d5e1e8;
    border-radius: 3px;
    background: #ffffff;
    color: #334155;
    font-family: var(--tt16-font);
    font-size: 10.8px;
    font-weight: 700;
    gap: 4px;
    white-space: nowrap;
}

.tt16-tech-color-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 20px;
    padding: 2px 6px;
    border: 1px solid #d5e1e8;
    border-radius: 11px;
    background: #ffffff;
    font-family: var(--tt16-font);
    font-size: 10.8px;
    font-weight: 600;
    white-space: nowrap;
}

.tt16-tech-color-badge > small,
.tt16-tech-scale-badge > small,
.tt16-tech-badge > small {
    color: #64748b;
    font-size: 8.8px;
    font-weight: 700;
}

.tt16-tech-color-copy {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: nowrap;
    gap: 4px;
    white-space: nowrap;
}

.tt16-tech-color-copy strong {
    color: #334155;
}

.tt16-tech-color-copy small {
    color: #64748b;
    font-family: var(--tt16-mono);
    font-size: 9.6px;
}

.tt16-tech-scale-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 20px;
    padding: 2px 6px;
    border: 1px solid #d5e1e8;
    border-radius: 3px;
    background: #ffffff;
    color: #334155;
    font-size: 9.8px;
    white-space: nowrap;
}

.tt16-color-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 7px;
    border-radius: 10px;
    border: 1px solid #dbe4ec;
    background: #ffffff;
    font-size: 11.2px;
    font-weight: 600;
    color: #334155;
}

.tt16-color-pill.is-copyable {
    cursor: pointer;
    transition: border-color 0.12s ease, background-color 0.12s ease, color 0.12s ease;
}

.tt16-color-pill.is-copyable:hover {
    border-color: var(--tt16-primary);
    background: var(--tt16-primary-soft);
    color: #0f766e;
}

.tt16-color-dot {
    width: 11px;
    height: 11px;
    border-radius: 2px;
    border: 1px solid rgba(15, 23, 42, 0.28);
    flex-shrink: 0;
}

@media (max-width: 1480px) {
    .tt16-spec-table {
        font-size: 11.8px;
    }

    .tt16-spec-table thead th {
        padding: 6px 4px;
        font-size: 11.2px;
    }

    .tt16-spec-table tbody td {
        padding: 5px 4px;
    }

    .tt16-td-sym {
        width: 130px;
        min-width: 120px;
        padding: 5px 4px !important;
    }

    .tt16-sym-box {
        width: 100%;
        height: 50px;
        padding: 2px;
    }

    .tt16-td-sym-merged .tt16-sym-box {
        max-width: 266px;
        height: 50px;
    }

    .tt16-sym-box.is-compact-sym img {
        max-width: 68px;
        max-height: 36px;
    }

    .tt16-layer-pill {
        padding: 2px 5px;
        font-size: 10.4px;
        max-width: 100%;
    }

    .tt16-layer-pill .tt16-layer-text {
        overflow-wrap: anywhere;
    }
}

/* Search Highlight */
mark.tt16-hl {
    background: #fef08a;
    color: #0f172a;
    padding: 0 2px;
    border-radius: 2px;
}

/* Đồng bộ chữ nội dung theo màu chữ ChatGPT của hệ thống. */
.tt16-topbar-title,
.tt16-meta-strip-title,
.tt16-btn,
.tt16-dl-menu-title,
.tt16-dl-name,
.tt16-dl-code,
.tt16-dl-action-ic,
.tt16-composer-label,
.tt16-chip,
.tt16-composer-preview,
.tt16-toc-item,
.tt16-toc-item:hover,
.tt16-toc-code,
.tt16-toc-count,
.tt16-toc-subitem,
.tt16-section-title,
.tt16-row-counter,
.tt16-row-subnote,
.tt16-collapse-icon,
.tt16-rules-list,
.tt16-part2-card,
.tt16-part2-card strong,
.tt16-part2-card span,
.tt16-blueprint-head,
.tt16-zoom-trigger-btn,
.tt16-scalebar-inset,
.tt16-col7-header,
.tt16-col7-label,
.tt16-branch-pill,
.tt16-scale-pill,
.tt16-spec-table thead th,
.tt16-spec-table tbody tr.tt16-group-row td,
.tt16-td-stt,
.tt16-td-name,
.tt16-name-tech-heading small,
.tt16-phase-layer-code,
.tt16-layer-pill,
.tt16-geom-badge,
.tt16-tech-label,
.tt16-tech-value,
.tt16-tech-badge,
.tt16-tech-badge > small,
.tt16-tech-color-badge,
.tt16-tech-color-badge > small,
.tt16-tech-color-copy strong,
.tt16-tech-color-copy small,
.tt16-tech-scale-badge,
.tt16-tech-scale-badge > small,
mark.tt16-hl {
    color: var(--color-mauchu-chatgpt, #202123);
}

.tt16-chip.is-active {
    color: #ffffff;
}

/* Interactive Zoom / Pan Lightbox Modal */
.tt16-zoom-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.76);
    display: none;
    flex-direction: column;
}

.tt16-zoom-modal.is-open {
    display: flex;
}

.tt16-zoom-topbar {
    height: 46px;
    padding: 0 14px;
    background: #0f172a;
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #1e293b;
}

.tt16-zoom-title {
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tt16-zoom-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.tt16-zoom-btn {
    height: 28px;
    padding: 0 9px;
    border-radius: 3px;
    border: 1px solid #334155;
    background: #1e293b;
    color: #f1f5f9 !important;
    font-size: 11.8px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tt16-zoom-btn:hover {
    background: #334155;
    border-color: var(--tt16-primary);
}

.tt16-zoom-stage {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    cursor: grab;
    user-select: none;
}

body.tt16-cad-dark .tt16-zoom-stage {
    background: #0d1117;
}

.tt16-zoom-stage.is-dragging {
    cursor: grabbing;
}

.tt16-zoom-canvas {
    transform-origin: center center;
    padding: 20px;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    max-width: 90vw;
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tt16-zoom-canvas img {
    min-width: min(340px, 72vw);
    min-height: min(200px, 50vh);
    max-width: 86vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    pointer-events: none;
    display: block;
}
