/* Máy tính: một phong cách chung cho vùng nội dung của mọi tab nghiệp vụ (anh Hiệp 2026-10-28 "triển khai đi" sau bản rà soát
   Fable 5.1, https://claude.ai/artifact/HZdbVW5cdtRC5r1rdqB737). Quy tắc: docs/huashu/design-system/BMS-DESKTOP-PAGE-FRAME.md §4.
   Chỉ trình bày (CSS), không đổi nghiệp vụ / quyền / dữ liệu. Điện thoại (html.bms-phone-v2) và màn < 901px giữ nguyên.
   Trình duyệt cũ không hiểu CSS lồng nhau thì bỏ qua cả khối, trang giữ giao diện cũ.
   `#bms-dc-weight` không tồn tại: chỉ để bộ chọn gốc nặng ngang các quy tắc "wave" cũ có id trong :is(). */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body.bms-opendesign-v8 :is(
    .panel[data-panel="tasks"], .panel[data-panel="project"], .panel[data-panel="crm"], .panel[data-panel="srm"],
    .panel[data-panel="hrm"], .panel[data-panel="tpm"], .panel[data-panel="ifm"], .panel[data-panel="warehouse"],
    .panel[data-panel="settings"], .panel[data-panel="users"],
    /* các bước quy trình dự án (mở từ Danh sách dự án): BTGV/giá vốn, TTTV, báo giá, phê duyệt, kế hoạch, cung ứng, sản xuất, kiểm tra, thành phẩm, công nợ, đóng gói */
    .panel[data-panel="costing"], .panel[data-panel="summary"], .panel[data-panel="quotation"], .panel[data-panel="approval"],
    .panel[data-panel="production-plan"], .panel[data-panel="inventory"], .panel[data-panel="production-execution"], .panel[data-panel="qc"],
    .panel[data-panel="finished-goods"], .panel[data-panel="receivables"], .panel[data-panel="documents"], .panel[data-panel="workflow-stage"],
    .panel[data-panel="feedback-center"], .panel[data-panel="guide"], .panel[data-panel="recovery-center"], .panel[data-panel="dashboard"]
  ):is(.active, #bms-dc-weight) {
    /* đường kẻ cũ của từng module (#C8D8EF xanh nhạt) về một màu viền chung */
    --line: var(--bms-border);
    --line-strong: var(--bms-border);
    --hrm-line: var(--bms-border);
    --dc-row-line: color-mix(in srgb, var(--bms-border) 62%, var(--bms-surface));

    /* 0. Khung tab không vẽ thẻ ngoài (trước đây là ô trắng bọc các thẻ con = thẻ lồng thẻ); các khối bên trong là thẻ */
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;

    /* 1. Thẻ: bo 12, viền 1px, không bóng, chỉ MỘT lớp */
    & :where(.srm-v2-card):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.hrm-card):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.tpm-card):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.crm-v2-card):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.wk-card):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.project-queue-section):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.settings-card):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.task-list):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.task-calendar-main):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.task-notes-layout):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.app-download-section):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.telegram-hub-section):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.integration-form):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.bms-ai-connections-v8__header):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.bms-document-template-admin-v8__header):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.srm-plan-board):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.hrm-request-card):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.srm-transport-reconciliation-head):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.meal-self-lunch):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team), & :where(.meal-self-team):is(.srm-v2-card, .hrm-card, .tpm-card, .crm-v2-card:not(.crm-v2-kpi), .wk-card, .project-queue-section, .settings-card,
      .task-list, .task-calendar-main, .task-notes-layout, .app-download-section, .telegram-hub-section, .integration-form,
      .bms-ai-connections-v8__header, .bms-document-template-admin-v8__header, .srm-plan-board, .hrm-request-card,
      .srm-transport-reconciliation-head, .meal-self-lunch, .meal-self-team) {
      border: 1px solid var(--bms-border);
      border-radius: 12px;
      box-shadow: none;
      background: var(--bms-surface);
    }
    & :where(.srm-v2-table):is(.srm-v2-table, .hrm-table-wrap, .crm-v2-table-wrap, .table-wrap, .lt-table-wrap, .bms-permission-grid__scroller, .hrm-attcal-wrap), & :where(.hrm-table-wrap):is(.srm-v2-table, .hrm-table-wrap, .crm-v2-table-wrap, .table-wrap, .lt-table-wrap, .bms-permission-grid__scroller, .hrm-attcal-wrap), & :where(.crm-v2-table-wrap):is(.srm-v2-table, .hrm-table-wrap, .crm-v2-table-wrap, .table-wrap, .lt-table-wrap, .bms-permission-grid__scroller, .hrm-attcal-wrap), & :where(.table-wrap):is(.srm-v2-table, .hrm-table-wrap, .crm-v2-table-wrap, .table-wrap, .lt-table-wrap, .bms-permission-grid__scroller, .hrm-attcal-wrap), & :where(.lt-table-wrap):is(.srm-v2-table, .hrm-table-wrap, .crm-v2-table-wrap, .table-wrap, .lt-table-wrap, .bms-permission-grid__scroller, .hrm-attcal-wrap), & :where(.bms-permission-grid__scroller):is(.srm-v2-table, .hrm-table-wrap, .crm-v2-table-wrap, .table-wrap, .lt-table-wrap, .bms-permission-grid__scroller, .hrm-attcal-wrap), & :where(.hrm-attcal-wrap):is(.srm-v2-table, .hrm-table-wrap, .crm-v2-table-wrap, .table-wrap, .lt-table-wrap, .bms-permission-grid__scroller, .hrm-attcal-wrap) {
      border: 1px solid var(--bms-border);
      border-radius: 12px;
      box-shadow: none;
    }
    /* thẻ / khung bảng nằm trong thẻ: bỏ viền thứ hai (chia mục bằng khoảng trắng + tiêu đề khối) */
    & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .wk-card, .project-queue-section, .srm-plan-board)
      :where(.srm-v2-card):is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .telegram-hub-section, .integration-form, .app-download-section), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .wk-card, .project-queue-section, .srm-plan-board)
      :where(.hrm-card):is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .telegram-hub-section, .integration-form, .app-download-section), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .wk-card, .project-queue-section, .srm-plan-board)
      :where(.tpm-card):is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .telegram-hub-section, .integration-form, .app-download-section), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .wk-card, .project-queue-section, .srm-plan-board)
      :where(.settings-card):is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .telegram-hub-section, .integration-form, .app-download-section), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .wk-card, .project-queue-section, .srm-plan-board)
      :where(.telegram-hub-section):is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .telegram-hub-section, .integration-form, .app-download-section), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .wk-card, .project-queue-section, .srm-plan-board)
      :where(.integration-form):is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .telegram-hub-section, .integration-form, .app-download-section), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .wk-card, .project-queue-section, .srm-plan-board)
      :where(.app-download-section):is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .telegram-hub-section, .integration-form, .app-download-section) {
      border-color: transparent;
      border-radius: 0;
      background: transparent;
      padding-inline: 0;
    }
    & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .srm-plan-board) :where(.srm-v2-table):is(.srm-v2-table, .hrm-table-wrap, .table-wrap, .lt-table-wrap), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .srm-plan-board) :where(.hrm-table-wrap):is(.srm-v2-table, .hrm-table-wrap, .table-wrap, .lt-table-wrap), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .srm-plan-board) :where(.table-wrap):is(.srm-v2-table, .hrm-table-wrap, .table-wrap, .lt-table-wrap), & :is(.srm-v2-card, .hrm-card, .tpm-card, .settings-card, .srm-plan-board) :where(.lt-table-wrap):is(.srm-v2-table, .hrm-table-wrap, .table-wrap, .lt-table-wrap) {
      border-radius: 10px;
    }
    & .hrm-supporting-card { background: var(--bms-surface); }
    & .hrm-metric { border-top-width: 1px; }

    /* 2. Tiêu đề khối 15/600, không eyebrow viết hoa */
    & :where(h3):is(h3):not(dialog *, [role="dialog"] *, .dnt-dup) { font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; }
    & :where(h4):is(h4):not(dialog *, [role="dialog"] *) { font-size: 14px; font-weight: 600; }
    & :where(.eyebrow):is(.eyebrow, .hrm-kicker, .sir-kicker, .srm-section-kicker):not(dialog *, [role="dialog"] *), & :where(.hrm-kicker):is(.eyebrow, .hrm-kicker, .sir-kicker, .srm-section-kicker):not(dialog *, [role="dialog"] *), & :where(.sir-kicker):is(.eyebrow, .hrm-kicker, .sir-kicker, .srm-section-kicker):not(dialog *, [role="dialog"] *), & :where(.srm-section-kicker):is(.eyebrow, .hrm-kicker, .sir-kicker, .srm-section-kicker):not(dialog *, [role="dialog"] *) { display: none !important; }
    & header > div > small:first-child:has(+ h3):not(dialog *, [role="dialog"] *) { display: none; } /* dòng chữ nhỏ viết hoa trên tiêu đề khối (vd. ĐƠN MUA) */
    & .hrm-facts > div { border: 0; border-radius: 10px; background: var(--bms-surface-subtle); }

    /* 3. Nút: cao 40, bo 8, chữ 14/600 (cả nút cạnh ô tìm); nút trong dòng 32 bo 6 */
    & .btn:not(.bms-search *, dialog *, [role="dialog"] *) {
      min-height: 40px;
      height: auto;
      padding: 0 16px;
      border-radius: 8px;
      font: 600 14px/1.15 var(--bms-font-ui);
      box-shadow: none;
    }
    & .btn.secondary:not(.bms-search *), & .btn:not(.primary, .danger, .success, .bms-search *) { border-color: var(--bms-border-strong); }
    /* nguy hiểm: nền trắng, chữ + viền đỏ (đỏ đặc chỉ trong hộp xác nhận) */
    & .btn.danger:not(dialog *, [role="dialog"] *) {
      border-color: color-mix(in srgb, var(--bms-danger) 45%, var(--bms-surface));
      background: var(--bms-surface);
      color: var(--bms-danger);
    }
    & .btn.danger:not(dialog *, [role="dialog"] *):hover:not(:disabled) { border-color: var(--bms-danger); background: var(--bms-danger-soft); color: var(--bms-danger); }
    /* tạm khoá: mờ đi, giữ màu của loại nút (không tô hồng / xanh đặc) */
    & .btn:disabled, & .btn[aria-disabled="true"] { opacity: .5; filter: none; cursor: not-allowed; }
    & :is(div, header, section, form, nav):has(> .bms-search) > .btn,
    & :is(div, header, section, form, nav):has(> .bms-search) > :is(div, span) > .btn {
      min-height: 40px;
      padding: 0 16px;
      border-radius: 8px;
    }
    & :is(td, .pms-row, .tpm-row, .srm-supplier-row, .sir-card) .btn:not(.bms-search *) {
      min-height: 32px;
      padding: 0 12px;
      border-radius: 6px;
      font-size: 13px;
    }
    & .btn:is(.compact, .mini-btn):not(.bms-search *) { min-height: 32px; padding-inline: 12px; border-radius: 6px; font-size: 13px; }

    /* 4. Bảng: tiêu đề cột 12/600 viết hoa xám, nền nhạt, cao 40; dòng 44; số canh phải */
    & table:not(.hrm-attcal-grid, .meal-track-table, .bms-permission-grid__table, .btgv-sp-norm) {
      & > thead th {
        height: 40px;
        padding: 0 12px;
        border-bottom: 1px solid var(--bms-border);
        background: var(--bms-surface-subtle);
        color: var(--bms-text-muted);
        font: 600 12px/1.2 var(--bms-font-ui);
        letter-spacing: .04em;
        text-transform: uppercase;
        vertical-align: middle;
      }
      & > tbody td {
        height: 44px;
        padding-block: 8px;
        padding-inline: 12px;
        border-bottom: 1px solid var(--dc-row-line);
        font-size: 14px;
        vertical-align: middle;
      }
      & > tbody tr:last-child > td { border-bottom: 0; }
      & td :where(.num):is(.num, .money, .qty), & td :where(.money):is(.num, .money, .qty), & td :where(.qty):is(.num, .money, .qty), & td.num, & th.num { font-variant-numeric: tabular-nums; }
    }
    & .wk-table > thead th { font-size: 12px; }
    & .wk-table > tbody td { height: 48px; font-size: 14px; }
    & .hrm-emp-table .hrm-emp-ava, & .hrm-emp-table td:first-child :where(img):is(img, .hrm-emp-avatar), & .hrm-emp-table td:first-child :where(.hrm-emp-avatar):is(img, .hrm-emp-avatar) { width: 28px; height: 28px; }

    /* 5. KPI: MỘT hàng, MỘT khối trung tính, các ô chia vạch, giá trị 22/700 */
    & :where(.task-metrics):is(.task-metrics, .crm-v2-kpis, .hrm-metrics, .wk-kpis, .meal-track-kpis), & :where(.crm-v2-kpis):is(.task-metrics, .crm-v2-kpis, .hrm-metrics, .wk-kpis, .meal-track-kpis), & :where(.hrm-metrics):is(.task-metrics, .crm-v2-kpis, .hrm-metrics, .wk-kpis, .meal-track-kpis), & :where(.wk-kpis):is(.task-metrics, .crm-v2-kpis, .hrm-metrics, .wk-kpis, .meal-track-kpis), & :where(.meal-track-kpis):is(.task-metrics, .crm-v2-kpis, .hrm-metrics, .wk-kpis, .meal-track-kpis) {
      display: grid;
      grid-template-columns: none;
      grid-auto-flow: column;
      grid-auto-columns: minmax(0, 1fr);
      gap: 0;
      overflow: hidden;
      border: 1px solid var(--bms-border);
      border-radius: 12px;
      background: var(--bms-surface);
      box-shadow: none;
    }
    & :is(.task-metrics, .crm-v2-kpis, .hrm-metrics, .wk-kpis, .meal-track-kpis) > * {
      min-height: 72px;
      margin: 0;
      padding: 12px 16px;
      border: 0;
      border-left: 1px solid var(--bms-border);
      border-radius: 0;
      box-shadow: none;
      background: transparent;
    }
    & :is(.task-metrics, .crm-v2-kpis, .hrm-metrics, .wk-kpis, .meal-track-kpis) > :first-child { border-left: 0; }
    & :is(.task-metric, .crm-v2-kpi, .hrm-metric, .wk-kpi) :where(strong):is(strong, b):first-of-type, & :is(.task-metric, .crm-v2-kpi, .hrm-metric, .wk-kpi) :where(b):is(strong, b):first-of-type { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
    & .task-metric { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 4px; }
    & .wk-kpi:is(.is-active, [aria-pressed="true"]) { background: var(--bms-surface-selected); box-shadow: inset 0 -2px 0 var(--bms-primary); }

    /* 6. Nhãn trạng thái: cao 22, bo 6, 12/600, nền nhạt + chữ đậm; không viền, không chấm */
    & :where(.status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.srm-v2-badge):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.hrm-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.tpm-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.crm-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.crm-pill):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.wk-chip):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.sir-chip):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.pms-tag):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.telegram-status-badge):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button), & :where(.integration-status-badge):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag,
      .telegram-status-badge, .integration-status-badge):not(button) {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      min-height: 22px;
      padding: 0 8px;
      border: 0;
      border-radius: 6px;
      font: 600 12px/1.2 var(--bms-font-ui);
      letter-spacing: 0;
      text-transform: none;
      white-space: nowrap;
    }
    & .srm-plan-master-table .srm-v2-badge::before { display: none; }
    /* không dùng tím cho trạng thái: chờ duyệt / gửi lại = cảnh báo (vàng); nghỉ phép = thông tin (xanh) */
    & :where(.srm-v2-badge):is(.srm-v2-badge.status-submitted, .srm-v2-badge.status-pending, .srm-v2-badge.status-received_partial, .status.revision), & :where(.status):is(.srm-v2-badge.status-submitted, .srm-v2-badge.status-pending, .srm-v2-badge.status-received_partial, .status.revision) {
      border: 0; background: var(--bms-warning-soft); color: var(--bms-warning);
    }
    & .hrm-emp-st[data-st="leave"] { background: var(--bms-info-soft) !important; color: var(--bms-info) !important; }

    /* 7. Ô nhập: cao 40, bo 8, viền đậm hơn viền thẻ */
    & :where(input):is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="hidden"]), select):not(.bms-search *, td *, dialog *, [role="dialog"] *), & :where(select):is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="hidden"]), select):not(.bms-search *, td *, dialog *, [role="dialog"] *) {
      min-height: 40px;
      border-radius: 8px;
      font-size: 14px;
    }
    & textarea:not(td *, dialog *, [role="dialog"] *) { border-radius: 8px; font-size: 14px; }

    /* 8. Trống: nền xám nhạt bo 10, không nét đứt, chữ giữa */
    & :where(.ifm-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.wk-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.sir-empty-state):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.empty-state):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.bms-ai-connections-v8__empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.bms-document-template-admin-v8__empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.lt-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.tpm-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.srm-transport-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.task-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.hrm-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.production-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.inventory-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.relationship-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.cost-mapping-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.commercial-search-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.document-action-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.ar-empty-state):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.task-report-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.qc-empty-checklist):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.project-document-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.document-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.sl-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.sir-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *), & :where(.feedback-empty):is(.ifm-empty, .wk-empty, .sir-empty-state, .empty-state, .bms-ai-connections-v8__empty, .bms-document-template-admin-v8__empty,
      .lt-empty, .tpm-empty, .srm-transport-empty, .task-empty, .hrm-empty, .production-empty, .inventory-empty, .relationship-empty,
      .cost-mapping-empty, .commercial-search-empty, .document-action-empty, .ar-empty-state, .task-report-empty, .qc-empty-checklist,
      .project-document-empty, .document-empty, .sl-empty, .sir-empty, .feedback-empty):not(td > *) {
      border: 0;
      border-radius: 10px;
      background: var(--bms-surface-subtle);
      padding: 28px 20px;
      color: var(--bms-text-muted);
      font-size: 13px;
      text-align: center;
      box-shadow: none;
    }
    & td > :where(.hrm-empty):is(.hrm-empty, .task-empty, .wk-empty), & td > :where(.task-empty):is(.hrm-empty, .task-empty, .wk-empty), & td > :where(.wk-empty):is(.hrm-empty, .task-empty, .wk-empty) { padding: 28px 12px; background: none; color: var(--bms-text-muted); font-size: 13px; text-align: center; }

    /* 9. Lọc nhanh ở màn hàng đợi = hàng KPI bấm được (kiểu Kho), thay chip ngoài trang (Fable 5.1, quyết định 28/10) */
    & :where(.ifm-quick-filters):is(.ifm-quick-filters, .pms-chips:is([data-pms-chips="plan"], [data-pms-chips="qc"]), .ann-seg[role="group"]:has(> button > b)), & :where(.pms-chips):is(.ifm-quick-filters, .pms-chips:is([data-pms-chips="plan"], [data-pms-chips="qc"]), .ann-seg[role="group"]:has(> button > b)), & :where(.ann-seg):is(.ifm-quick-filters, .pms-chips:is([data-pms-chips="plan"], [data-pms-chips="qc"]), .ann-seg[role="group"]:has(> button > b)) {
      display: grid;
      flex: 1 0 100%;
      grid-auto-flow: column;
      grid-auto-columns: minmax(0, 1fr);
      gap: 0;
      width: 100%;
      height: auto;
      min-height: 0;
      margin: 0 0 4px;
      padding: 0;
      overflow: hidden;
      border: 1px solid var(--bms-border);
      border-radius: 12px;
      background: var(--bms-surface);
      box-shadow: none;
      & > button {
        appearance: none;
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 4px;
        width: auto;
        height: auto;
        min-height: 72px;
        margin: 0;
        padding: 12px 16px;
        border: 0;
        border-left: 1px solid var(--bms-border);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        color: var(--bms-text-muted);
        font: 500 12px/1.3 var(--bms-font-ui);
        text-align: left;
        cursor: pointer;
      }
      & > button:first-child { border-left: 0; }
      & > button:hover:not(:disabled) { background: var(--bms-surface-subtle); }
      & > button[aria-pressed="true"] { background: var(--bms-surface-selected); box-shadow: inset 0 -2px 0 var(--bms-primary); color: var(--bms-text); }
      & > button:disabled { opacity: .5; cursor: default; }
      & > button > span { color: inherit; font: inherit; }
      & > button > :where(b):is(b, .pms-count), & > button > :where(.pms-count):is(b, .pms-count) {
        position: static;
        display: block;
        min-width: 0;
        height: auto;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: none;
        box-shadow: none;
        color: var(--bms-text);
        font: 700 22px/1.1 var(--bms-font-ui);
        font-variant-numeric: tabular-nums;
      }
      & > button > i { color: var(--bms-text-subtle); font: 400 12px/1.2 var(--bms-font-ui); font-style: normal; }
    }
    & :where(.ifm-payment-filterbar):is(.ifm-payment-filterbar, .ann-head, .pms-card-head):has(> :is(.ifm-quick-filters, .pms-chips, .ann-seg)), & :where(.ann-head):is(.ifm-payment-filterbar, .ann-head, .pms-card-head):has(> :is(.ifm-quick-filters, .pms-chips, .ann-seg)), & :where(.pms-card-head):is(.ifm-payment-filterbar, .ann-head, .pms-card-head):has(> :is(.ifm-quick-filters, .pms-chips, .ann-seg)) { flex-wrap: wrap; row-gap: 12px; }
    & :is(.ifm-payment-filterbar, .ann-head) > :where(.ifm-payment-filter):is(.ifm-payment-filter, .bms-search), & :is(.ifm-payment-filterbar, .ann-head) > :where(.bms-search):is(.ifm-payment-filter, .bms-search) { margin-left: auto; }
    & .ann-head > .bms-search { --bms-search-width: 420px; }
    & .ann-head > .bms-search + .btn { margin-left: 8px; }
    & .srm-transport-filters > .srm-transport-carrier-search.bms-search { --bms-search-width: 360px; }
    /* đầu khối chỉ nhắc lại tên tab đã có trên cây thư mục */
    & .srm-transport-reconciliation-head:not(:has(button, input, select, a[href])) { display: none; }

    /* 10. Bước quy trình dự án (kiểm thử 28/10): thẻ bo 12 không bóng, KPI một khối, nhãn bo 6, nút 40/8, bộ chuyển dạng khung */
    & :where(.bs-sheetbox):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.approval-decision-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.approval-board-facts):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.khx-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.inventory-main-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.inventory-product-overview):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.production-order-rail):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.production-command):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.production-finance-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.production-extra-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.qc-detail):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.fg-main-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.fg-batches):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.fg-delivery-panel):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.document-step-detail):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.project-task-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.ai-analysis-panel):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.project-documents-panel):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.project-editor-section):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.quotation-paper):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.summary-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.receivables-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.cost-summary-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.quotation-roadmap-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.quotation-internal-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.task-calendar-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.metric):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card), & :where(.dashboard-insight-card):is(.bs-sheetbox, .approval-decision-card, .approval-board-facts, .khx-card, .inventory-main-card, .inventory-product-overview,
      .production-order-rail, .production-command, .production-finance-card, .production-extra-card, .qc-detail, .fg-main-card, .fg-batches,
      .fg-delivery-panel, .document-step-detail, .project-task-card, .ai-analysis-panel, .project-documents-panel, .project-editor-section,
      .quotation-paper, .summary-card, .receivables-card, .cost-summary-card, .quotation-roadmap-card, .quotation-internal-card, .task-calendar-card,
      .metric, .dashboard-insight-card) {
      border: 1px solid var(--bms-border);
      border-radius: 12px;
      box-shadow: none;
      background: var(--bms-surface);
    }
    & :where(.inventory-metrics):is(.inventory-metrics, .qc-metrics, .fg-metrics, .production-metrics):not(:empty), & :where(.qc-metrics):is(.inventory-metrics, .qc-metrics, .fg-metrics, .production-metrics):not(:empty), & :where(.fg-metrics):is(.inventory-metrics, .qc-metrics, .fg-metrics, .production-metrics):not(:empty), & :where(.production-metrics):is(.inventory-metrics, .qc-metrics, .fg-metrics, .production-metrics):not(:empty) {
      display: grid;
      grid-template-columns: none;
      grid-auto-flow: column;
      grid-auto-columns: minmax(0, 1fr);
      gap: 0;
      margin: 0 0 16px;
      padding: 0;
      overflow: hidden;
      border: 1px solid var(--bms-border);
      border-radius: 12px;
      background: var(--bms-surface);
      box-shadow: none;
    }
    & :where(.inventory-metric):is(.inventory-metric, .qc-metric, .fg-metric, .production-metric), & :where(.qc-metric):is(.inventory-metric, .qc-metric, .fg-metric, .production-metric), & :where(.fg-metric):is(.inventory-metric, .qc-metric, .fg-metric, .production-metric), & :where(.production-metric):is(.inventory-metric, .qc-metric, .fg-metric, .production-metric) {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 4px;
      min-height: 72px;
      margin: 0;
      padding: 12px 16px;
      border: 0;
      border-left: 1px solid var(--bms-border);
      border-radius: 0;
      box-shadow: none;
      background: transparent;
      color: var(--bms-text-muted);
      font: 500 12px/1.3 var(--bms-font-ui);
    }
    & :where(.inventory-metric):is(.inventory-metric, .qc-metric, .fg-metric, .production-metric):first-child, & :where(.qc-metric):is(.inventory-metric, .qc-metric, .fg-metric, .production-metric):first-child, & :where(.fg-metric):is(.inventory-metric, .qc-metric, .fg-metric, .production-metric):first-child, & :where(.production-metric):is(.inventory-metric, .qc-metric, .fg-metric, .production-metric):first-child { border-left: 0; }
    & :is(.inventory-metric, .qc-metric, .fg-metric, .production-metric) > strong { font-size: 22px; font-weight: 700; color: var(--bms-text); font-variant-numeric: tabular-nums; }
    & :where(.khx-pill):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.inventory-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.inventory-issue-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.production-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.fg-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.qc-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.doc-badge):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.document-step-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.document-data-type):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.project-fact-priority):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.approval-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.quotation-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button), & :where(.receivable-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status,
      .document-data-type, .project-fact-priority, .approval-status, .quotation-status, .receivable-status):not(button) {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      min-height: 22px;
      padding: 0 8px;
      border: 0;
      border-radius: 6px;
      font: 600 12px/1.2 var(--bms-font-ui);
      letter-spacing: 0;
      text-transform: none;
      white-space: nowrap;
      box-shadow: none;
    }
    & :where(.khx-pill):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status)::before, & :where(.inventory-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status)::before, & :where(.inventory-issue-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status)::before, & :where(.production-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status)::before, & :where(.fg-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status)::before, & :where(.qc-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status)::before, & :where(.doc-badge):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status)::before, & :where(.document-step-status):is(.khx-pill, .inventory-status, .inventory-issue-status, .production-status, .fg-status, .qc-status, .doc-badge, .document-step-status)::before { display: none; }
    & :where(.bs-modeseg):is(.bs-modeseg, .bs-how, .inventory-filters:not(:has(select, input))), & :where(.bs-how):is(.bs-modeseg, .bs-how, .inventory-filters:not(:has(select, input))), & :where(.inventory-filters):is(.bs-modeseg, .bs-how, .inventory-filters:not(:has(select, input))) {
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      gap: 2px;
      height: 40px;
      min-height: 40px;
      padding: 3px;
      border: 1px solid var(--bms-border);
      border-radius: 8px;
      background: var(--bms-surface-subtle);
      box-shadow: none;
    }
    & :is(.bs-modeseg, .bs-how, .inventory-filters:not(:has(select, input))) > button {
      box-sizing: border-box;
      height: 32px;
      min-height: 32px;
      padding: 0 14px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      box-shadow: none;
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
    }
    & :is(.bs-modeseg, .bs-how, .inventory-filters:not(:has(select, input))) > button:is([aria-pressed="true"], .active, .is-active) { background: var(--bms-surface); color: var(--bms-primary); box-shadow: none; }
    & :where(.bs-pickbtn):is(.bs-pickbtn, .cost-combined-complete, .project-tree-trigger, .project-document-supplement-open), & :where(.cost-combined-complete):is(.bs-pickbtn, .cost-combined-complete, .project-tree-trigger, .project-document-supplement-open), & :where(.project-tree-trigger):is(.bs-pickbtn, .cost-combined-complete, .project-tree-trigger, .project-document-supplement-open), & :where(.project-document-supplement-open):is(.bs-pickbtn, .cost-combined-complete, .project-tree-trigger, .project-document-supplement-open) { border-radius: 8px; box-shadow: none; }
    & .cost-combined-complete { min-height: 40px; height: 40px; }
    & .project-tree-trigger { min-height: 40px; }
    & .workflow-page-actions :where(.btn):is(.btn, select), & .workflow-page-actions :where(select):is(.btn, select) { min-height: 40px; height: 40px; border-radius: 8px; box-shadow: none; }
    & :is(td, .sxx-act, .inventory-row-actions, .fg-actions, .qc-actions, .doc-actions) .btn { min-height: 32px; height: 32px; border-radius: 6px; box-shadow: none; }
    & :is(.inventory-footer, .fg-delivery-panel, .sxx-qc, .khx-acts2, .bs-tools) .btn { min-height: 40px; height: 40px; border-radius: 8px; box-shadow: none; }
    & .bs-tools .btn:has(> svg:only-child), & .bs-tools .btn[aria-label]:empty { width: 40px; padding: 0; }
    & .bs-quick-in { min-height: 40px; height: 40px; border-radius: 8px; }
    & .khx-gb { border-radius: 6px; }
    & .project-sales-items { border-radius: 12px; }
    & :where(.fg-delivery-panel):is(.fg-delivery-panel) { border-color: var(--bms-border); }
    & .fg-toolbar { flex-wrap: wrap; row-gap: 8px; }
    & .fg-toolbar > .inventory-filters { flex: 0 0 auto; width: auto; max-width: none; flex-wrap: nowrap; }
    & .fg-toolbar > .bms-search { margin-left: auto; }
    & .quotation-tool-btn { border-radius: 6px; box-shadow: none; }
    /* Phản hồi / Hướng dẫn */
    & .feedback-table th button { border-radius: 4px; }
    & .guide-mode-switch { height: 40px; padding: 3px; border-radius: 8px; }
    & .guide-mode-switch button { min-height: 32px; height: 32px; border-radius: 6px; }
    & .guide-topic-list button { border-radius: 8px; }
    & .guide-content-header .btn { min-height: 40px; height: 40px; }
    & .guide-topic-list button { min-height: 40px; }
    /* Dashboard: dòng chữ nhỏ viết hoa trên thẻ ẩn, tiêu đề thẻ 15/600 */
    & :where(.dashboard-command-eyebrow):is(.dashboard-command-eyebrow, .dashboard-insight-card header span, .dashboard-queue-heading > div > span), & :where(span):is(.dashboard-command-eyebrow, .dashboard-insight-card header span, .dashboard-queue-heading > div > span) { display: none; }
    & .dashboard-approval-toggle { min-height: 40px; border-radius: 8px; }
    /* danh sách sửa của giám sát 28/10 */
    & .project-task-card td :where(input):is(input, select), & .project-task-card td :where(select):is(input, select) { min-height: 32px; height: 32px; border-radius: 6px; font-size: 14px; }
    & .approval-auto-trigger { border-radius: 8px; min-height: 40px; }
    & :where(input):is(.meal-settings-open input, .hrm-meal-settings td > select, .meal-settings td > select, .meal-settings td > input), & :where(select):is(.meal-settings-open input, .hrm-meal-settings td > select, .meal-settings td > select, .meal-settings td > input) { min-height: 40px; height: 40px; border-radius: 8px; }
    & .srm-plan-count { min-height: 22px; height: auto; padding: 0 8px; border-radius: 6px; font-size: 12px; line-height: 22px; }
    & .lt-tab b { border-radius: 6px; }
    & .lt-field textarea { border-radius: 8px; }
    & .warehouse-reservation-button { width: 32px; height: 32px; min-width: 32px; }
    & .deal-line-toggle { border-radius: 6px; }
  }
}

/* nút "…" gom thao tác (bms-desktop-overflow.js): nút gốc ẩn, menu liệt kê và bấm chính nút gốc */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) .dof-hidden { display: none !important; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .btn.dof-more { min-width: 40px; padding: 0 !important; font-size: 18px; letter-spacing: .05em; line-height: 1; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 :is(td, li, .sir-card, [class*="-row"], [class*="row-"], [class*="-item"]) .btn.dof-more { min-width: 32px; min-height: 32px; }
  html:not(.bms-phone-v2) .dof-menu { position: fixed; z-index: 130; display: grid; min-width: 200px; max-width: 320px; padding: 6px; border: 1px solid var(--bms-border, #E0E0E0); border-radius: 12px; background: var(--bms-surface, #fff); box-shadow: 0 16px 40px rgba(15, 23, 42, .16); }
  /* display:grid ở trên đè thuộc tính hidden → menu đã đóng vẫn hiện (anh Hiệp 2026-11-02); hidden phải thắng */
  .dof-menu[hidden] { display: none !important; }
  html:not(.bms-phone-v2) .dof-menu .dof-item { display: flex; align-items: center; min-height: 36px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--bms-text, #101010); font: 500 14px/1.2 var(--bms-font-ui, Roboto, system-ui, sans-serif); text-align: left; cursor: pointer; }
  html:not(.bms-phone-v2) .dof-menu .dof-item:is(:hover, :focus-visible) { outline: none; background: var(--bms-surface-subtle, #F7F7F7); }
  html:not(.bms-phone-v2) .dof-menu .dof-item.is-danger { color: var(--bms-danger, #D63B3B); }
  html:not(.bms-phone-v2) .dof-menu .dof-item:disabled { opacity: .5; cursor: not-allowed; }
}

/* chip / bộ chọn ngoài trang chuyển vào bảng Lọc (bms-desktop-filter-move.js): nút Lọc tự thêm khi ô tìm chưa có */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) .bms-search__popover .dfm-group { display: grid; gap: 8px; margin: 0 0 12px; }
  html:not(.bms-phone-v2) .bms-search__popover .dfm-group:last-child { margin-bottom: 0; }
  html:not(.bms-phone-v2) .bms-search__popover .dfm-group > .dfm-label { color: var(--bms-text-muted, #6F6F6F); font: 600 12px/1.2 var(--bms-font-ui, Roboto, system-ui, sans-serif); }
  html:not(.bms-phone-v2) .bms-search__popover .dfm-group :is([role="group"], .srm-transport-kind-filter, .lt-status) { display: flex; flex-wrap: wrap; gap: 6px; }
  html:not(.bms-phone-v2) .bms-search__popover .dfm-group :where(select):is(select, .srm-transport-select, details), html:not(.bms-phone-v2) .bms-search__popover .dfm-group :where(.srm-transport-select):is(select, .srm-transport-select, details), html:not(.bms-phone-v2) .bms-search__popover .dfm-group :where(details):is(select, .srm-transport-select, details) { width: 100%; max-width: none; }
  html:not(.bms-phone-v2) .bms-search__popover.dfm-popover { min-width: 280px; max-width: 360px; }
  html:not(.bms-phone-v2) .bms-search__popover .dfm-group .srm-transport-period-menu { position: static; inset: auto; margin-top: 8px; box-shadow: none; }
}

/* Hình dạng chung (anh Hiệp 2026-10-28 09:00Z): mọi nút bấm, ô tìm và nút Lọc là hình chữ nhật bo nhẹ, không còn dạng viên tròn.
   Bo 8 cho nút / ô tìm cao 36–48, bo 6 cho nút nhỏ và nút Lọc nằm trong ô tìm. Áp cả thanh trên và menu trái. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body .bms-search:not(#\#) { border-radius: 8px; }
  html:not(.bms-phone-v2) body .bms-search:not(#\#) > .bms-search__filter { border-radius: 6px; }
  html:not(.bms-phone-v2) body .bms-search:not(#\#) > .bms-search__popover { border-radius: 12px; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.btn):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn), html:not(.bms-phone-v2) body:not(#\#) :where(.floating-action-bubble):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn), html:not(.bms-phone-v2) body:not(#\#) :where(.notification-bell):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn), html:not(.bms-phone-v2) body:not(#\#) :where(.sidebar-collapse-toggle):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn), html:not(.bms-phone-v2) body:not(#\#) :where(.hrm-emp-tbtn):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn), html:not(.bms-phone-v2) body:not(#\#) :where(summary):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn), html:not(.bms-phone-v2) body:not(#\#) :where(.pms-chip):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn), html:not(.bms-phone-v2) body:not(#\#) :where(button):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn), html:not(.bms-phone-v2) body:not(#\#) :where(.lt-btn):is(.btn, .floating-action-bubble, .notification-bell, .sidebar-collapse-toggle, .hrm-emp-tbtn, .srm-admin-tools > summary, .pms-chip, .srm-dview > button, .lt-btn) { border-radius: 8px; }
  html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked :where(button):is(button.floating-action-bubble, .pop-nexus-launcher):not(#\#):not(#\#), html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked :where(.pop-nexus-launcher):is(button.floating-action-bubble, .pop-nexus-launcher):not(#\#):not(#\#) { border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-section-header .btn { border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .lt-seg > button { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) :is(td, .pms-row, .tpm-row, .srm-supplier-row, .sir-card) .btn,
  html:not(.bms-phone-v2) body:not(#\#) .btn:is(.compact, .mini-btn) { border-radius: 6px; }
}

/* Một chiều cao chung (anh Hiệp 2026-10-28 09:13Z "kích thước chiều cao của các nút cũng cần được đồng bộ"):
   nút, ô tìm, ô nhập, nút thanh trên và các ô ở menu trái (mục menu, thông tin tài khoản, Đăng xuất) cao 40, bo 8, cùng bề ngang.
   Chỉ nút trong dòng bảng là 32 (bảng gọn). Nút Lọc nằm trong ô tìm cao 32. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body .bms-search:not(#\#) { height: 40px; min-height: 40px; max-height: 40px; padding-left: 14px; padding-right: 4px; gap: 8px; }
  html:not(.bms-phone-v2) body .bms-search:not(#\#) > .bms-search__filter { height: 32px; min-height: 32px; padding: 0 12px; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.lt-btn):is(.lt-btn, .hrm-emp-tbtn, .srm-admin-tools > summary, .display-tv-pair .btn, .pms-chips:not([data-pms-chips="plan"], [data-pms-chips="qc"]) > .pms-chip), html:not(.bms-phone-v2) body:not(#\#) :where(.hrm-emp-tbtn):is(.lt-btn, .hrm-emp-tbtn, .srm-admin-tools > summary, .display-tv-pair .btn, .pms-chips:not([data-pms-chips="plan"], [data-pms-chips="qc"]) > .pms-chip), html:not(.bms-phone-v2) body:not(#\#) :where(summary):is(.lt-btn, .hrm-emp-tbtn, .srm-admin-tools > summary, .display-tv-pair .btn, .pms-chips:not([data-pms-chips="plan"], [data-pms-chips="qc"]) > .pms-chip), html:not(.bms-phone-v2) body:not(#\#) :where(.btn):is(.lt-btn, .hrm-emp-tbtn, .srm-admin-tools > summary, .display-tv-pair .btn, .pms-chips:not([data-pms-chips="plan"], [data-pms-chips="qc"]) > .pms-chip), html:not(.bms-phone-v2) body:not(#\#) :where(.pms-chip):is(.lt-btn, .hrm-emp-tbtn, .srm-admin-tools > summary, .display-tv-pair .btn, .pms-chips:not([data-pms-chips="plan"], [data-pms-chips="qc"]) > .pms-chip) { height: 40px; min-height: 40px; box-sizing: border-box; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-section-header .btn { min-height: 40px; height: 40px; }
  html:not(.bms-phone-v2) body:not(#\#) .display-tv-pair input { height: 40px; min-height: 40px; }
  html:not(.bms-phone-v2) body:not(#\#) .topbar .notification-bell,
  html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked :where(button):is(button.floating-action-bubble, .pop-nexus-launcher):not(#\#):not(#\#), html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked :where(.pop-nexus-launcher):is(button.floating-action-bubble, .pop-nexus-launcher):not(#\#):not(#\#) { width: 40px; min-width: 40px; height: 40px; min-height: 40px; flex-basis: 40px; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .topbar .shell-global-search .bms-search:not(#\#):not(#\#) { height: 40px; min-height: 40px; max-height: 40px; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .topbar button#notificationBell:not(#\#):not(#\#) { width: 40px; min-width: 40px; height: 40px; min-height: 40px; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 #tasksWorkPane:not(#\#):not(#\#) #taskCreateBtn { height: 40px; min-height: 40px; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.lt-tab):is(.lt-tab, .bms-permission-grid__controls .btn, .bms-ai-connections-v8 footer .btn), html:not(.bms-phone-v2) body:not(#\#) :where(.btn):is(.lt-tab, .bms-permission-grid__controls .btn, .bms-ai-connections-v8 footer .btn) { height: 40px; min-height: 40px; box-sizing: border-box; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 #mainNavigation:not(#\#) {
    & .nav-item { height: 40px; min-height: 40px; border-radius: 8px; }
    & .mobile-nav-profile { box-sizing: border-box; height: 40px; min-height: 40px; padding: 0 10px; gap: 8px; grid-template-columns: 24px minmax(0, 1fr); border-radius: 8px; }
    & .mobile-nav-profile .mobile-user-avatar { width: 24px; height: 24px; min-width: 24px; font-size: 11px; }
    & .mobile-nav-profile strong { font-size: 13px; line-height: 16px; }
    & .mobile-nav-profile small { font-size: 11px; line-height: 13px; }
    & .mobile-nav-profile .mobile-nav-close { display: none; }
    & .mobile-nav-logout { box-sizing: border-box; height: 40px; min-height: 40px; border-radius: 8px; }
  }
}

/* Chiều dài nút theo cỡ cố định (bms-button-width.js đặt data-bw): 96 / 136 / 184 / 240, trong dòng bảng 72 / 104 / 136, nút biểu tượng vuông */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) [data-bw]:not([data-bw="icon"]) {
    box-sizing: border-box;
    flex: 0 0 auto;
    justify-content: center;
    padding-inline: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
  }
  /* nút có số đếm (badge) ở góc: không cắt badge (Nhân sự › Lưu ý, anh Hiệp 2026-10-29) */
  html:not(.bms-phone-v2) body:not(#\#) [data-bw][data-bw-badge] { overflow: visible; }
  html:not(.bms-phone-v2) body:not(#\#) [data-bw="1"] { width: 96px; min-width: 96px; max-width: 96px; }
  html:not(.bms-phone-v2) body:not(#\#) [data-bw="2"] { width: 136px; min-width: 136px; max-width: 136px; }
  html:not(.bms-phone-v2) body:not(#\#) [data-bw="3"] { width: 184px; min-width: 184px; max-width: 184px; }
  html:not(.bms-phone-v2) body:not(#\#) [data-bw="4"] { width: 240px; min-width: 240px; max-width: 240px; }
  html:not(.bms-phone-v2) body:not(#\#) [data-bw="r1"] { width: 72px; min-width: 72px; max-width: 72px; padding-inline: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) [data-bw="r2"] { width: 104px; min-width: 104px; max-width: 104px; padding-inline: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) [data-bw="r3"] { width: 136px; min-width: 136px; max-width: 136px; padding-inline: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) [data-bw="icon"] { box-sizing: border-box; width: 40px; min-width: 40px; padding: 0; justify-content: center; }
  html:not(.bms-phone-v2) body:not(#\#) :is(td, .pms-row, .tpm-row, .srm-supplier-row, .sir-card) [data-bw="icon"] { width: 32px; min-width: 32px; }
}

/* Thanh trên: ô tìm, Chat, chuông, Nexus cách đều 8px (anh Hiệp 09:22Z "không cách đều"): bỏ ô tài khoản ẩn (tên + Đăng xuất đã ở menu trái) đang chiếm 10px giữa chuông và Nexus. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) header.topbar:not(#\#) #currentUserBox { display: none; }
  html:not(.bms-phone-v2) header.topbar:not(#\#) .topbar-user-actions { margin-left: -10px; gap: 8px; }
}
/* Bộ chuyển cách xem / tab dạng khung (Bể nhu cầu "Từng vật tư · Gộp theo DNXK · Gộp theo dự án", lịch Tháng/Tuần, cài đặt, …)
   cùng kiểu với nút (anh Hiệp 09:38Z): khung cao 40 bo 8, ô bên trong cao 32 bo 6, ô đang chọn nền trắng chữ xanh.
   Kho (.wk-seg: "Dự án cần tạo DNXK · DNXK nội bộ · DNXK đã phát hành", Thiết bị & CCDC, Tồn kho) cũng vậy, không còn viên thuốc 48px (anh Hiệp 2026-10-29). */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) :where(.srm-dview):is(.srm-dview, .task-calendar-views, .segmented, .lt-seg, .wk-seg), html:not(.bms-phone-v2) body:not(#\#):not(#\#) :where(.task-calendar-views):is(.srm-dview, .task-calendar-views, .segmented, .lt-seg, .wk-seg), html:not(.bms-phone-v2) body:not(#\#):not(#\#) :where(.segmented):is(.srm-dview, .task-calendar-views, .segmented, .lt-seg, .wk-seg), html:not(.bms-phone-v2) body:not(#\#):not(#\#) :where(.lt-seg):is(.srm-dview, .task-calendar-views, .segmented, .lt-seg, .wk-seg), html:not(.bms-phone-v2) body:not(#\#):not(#\#) :where(.wk-seg):is(.srm-dview, .task-calendar-views, .segmented, .lt-seg, .wk-seg) { box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px; height: 40px; min-height: 40px; padding: 3px; border: 1px solid var(--bms-border); border-radius: 8px; background: var(--bms-surface-subtle); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) :is(.srm-dview, .task-calendar-views, .segmented, .lt-seg, .wk-seg) > :is(button, [role="tab"], [role="radio"]) { box-sizing: border-box; height: 32px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 6px; font-size: 13px; font-weight: 600; white-space: nowrap; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .srm-dview-chip { border-radius: 6px; min-height: 28px; }
}
/* Tác vụ: "Việc của tôi / Tôi đã giao" (Công việc) và "Chờ tôi phê duyệt / Yêu cầu của tôi / Đã xử lý" (Phê duyệt & Biểu mẫu) cùng kiểu khung trên,
   không còn viên thuốc 48px; nút trên hàng đầu Phê duyệt cao 40 bo 8 như "+ Thêm công việc" (anh Hiệp 2026-10-29 "chưa đồng bộ"). */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) :where(.task-view-tabs):is(#tasksWorkPane .task-view-tabs, .task-approvals-content .hrm-approval-switch), html:not(.bms-phone-v2) body:not(#\#):not(#\#) :where(.hrm-approval-switch):is(#tasksWorkPane .task-view-tabs, .task-approvals-content .hrm-approval-switch) { box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px; height: 40px; min-height: 40px; padding: 3px; border: 1px solid var(--bms-border); border-radius: 8px; background: var(--bms-surface-subtle); box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) :is(#tasksWorkPane .task-view-tabs, .task-approvals-content .hrm-approval-switch) > button { box-sizing: border-box; height: 32px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 6px; background: transparent; color: var(--bms-text-muted); box-shadow: none; font: 600 13px/1 var(--bms-font-ui); white-space: nowrap; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) :is(#tasksWorkPane .task-view-tabs, .task-approvals-content .hrm-approval-switch) > button:is(.active, [aria-selected="true"]) { background: var(--bms-surface); color: var(--bms-primary); box-shadow: var(--bms-shadow-1); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content .hrm-approval-bar { --hrm-bar-h: 40px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content .hrm-approval-head-actions .btn { box-sizing: border-box; height: 40px; min-height: 40px; border-radius: 8px; }
  /* Cả hàng theo đúng quy tắc chung (anh Hiệp 2026-10-30 "kiểm tra lại kích thước các nút của cả dòng", "đã tuân theo quy tắc kích thước của toàn hệ thống chưa"):
     ô trong bộ chuyển chữ 13/600 như mọi bộ chuyển khác; nút có chữ 14/600 với bề ngang cố định (data-bw); các khối trên hàng cách nhau 8. */
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) :is(#tasksWorkPane .task-view-tabs, .task-approvals-content .hrm-approval-switch) > button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #tasksWorkPane #taskCreateBtn { font: 600 14px/1 var(--bms-font-ui); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #tasksWorkPane:not([hidden]) { column-gap: 8px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #tasksWorkPane .task-toolbar,
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content :where(.hrm-approval-bar):is(.hrm-approval-bar, .hrm-approval-tools, .hrm-approval-head-actions), html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content :where(.hrm-approval-tools):is(.hrm-approval-bar, .hrm-approval-tools, .hrm-approval-head-actions), html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content :where(.hrm-approval-head-actions):is(.hrm-approval-bar, .hrm-approval-tools, .hrm-approval-head-actions) { column-gap: 8px; }
  /* Ô tìm Công việc không kéo dài hết hàng (anh Hiệp 2026-10-30 "dài quá"): rộng 420 như ô tìm Kho, CRM, Thông báo; nằm sát "+ Thêm công việc" như ô tìm Phê duyệt. */
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #tasksWorkPane .task-toolbar .task-search { --bms-search-width: 420px; flex: 0 1 420px; width: 420px; min-width: 260px; max-width: 420px; margin-left: auto; }
  /* Phê duyệt: nút dồn về mép phải, "Tạo yêu cầu" ngoài cùng bên phải, "Luồng duyệt" cạnh bên trái, ô tìm rộng 420 như Công việc, đứng trước hai nút (anh Hiệp 2026-10-30). */
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content .hrm-approval-tools { justify-content: flex-end; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content .hrm-approval-tools > .hrm-approval-search { --bms-search-width: 420px; order: 1; margin-left: 0; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content .hrm-approval-tools > .hrm-approval-head-actions { order: 2; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .task-approvals-content .hrm-approval-head-actions > #hrmNewRequest { order: 2; }
}
/* Thông báo, Chat nội bộ, BCC Nexus theo cùng quy tắc nút: nút trong khung cao 40 bo 8; nút ở đầu khung (đóng, mở rộng, Đánh dấu đã đọc)
   cao 32 bo 6; ô soạn tin bo 16 (như ứng dụng Claude), nút trong ô soạn (công cụ, đính kèm, gửi) 32 bo 6. Tab chuyển (Hội thoại / Đang online) giữ kiểu segmented. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) :is(#notificationDropdown, .internal-chat-window, #popNexusWindow) :where(button):is(button, .btn):not(.floating-action-bubble, [role="tab"], .chat-sidebar-tabs > button, .chat-type-tabs > button, .chat-conversation, .chat-online-user, .notification-item, .notification-item button, [data-chat-list] > *, [data-chat-online-list] > *), html:not(.bms-phone-v2) body:not(#\#) :is(#notificationDropdown, .internal-chat-window, #popNexusWindow) :where(.btn):is(button, .btn):not(.floating-action-bubble, [role="tab"], .chat-sidebar-tabs > button, .chat-type-tabs > button, .chat-conversation, .chat-online-user, .notification-item, .notification-item button, [data-chat-list] > *, [data-chat-online-list] > *) {
    box-sizing: border-box;
    min-height: 40px;
    height: 40px;
    border-radius: 8px;
  }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) :is(#notificationDropdown > header, .internal-chat-header, .chat-thread-header, .pop-nexus-header, .pop-nexus-message) :where(button):is(button, .btn), html:not(.bms-phone-v2) body:not(#\#):not(#\#) :is(#notificationDropdown > header, .internal-chat-header, .chat-thread-header, .pop-nexus-header, .pop-nexus-message) :where(.btn):is(button, .btn) {
    min-height: 32px;
    height: 32px;
    border-radius: 6px;
  }
  html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked #popNexusWindow .pop-nexus-header-actions .pop-nexus-close:not(#\#):not(#\#):not(#\#):not(#\#) { width: 32px; min-width: 32px; height: 32px; min-height: 32px; border-radius: 6px; }
  html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked #popNexusWindow:not(#\#) .pop-nexus-composer:not(#\#) { border-radius: 16px; }
  html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked #popNexusWindow:not(#\#) .pop-nexus-composer :where(.pop-nexus-tools-toggle):is(.pop-nexus-tools-toggle, .pop-nexus-attach, .pop-nexus-send):not(#\#), html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked #popNexusWindow:not(#\#) .pop-nexus-composer :where(.pop-nexus-attach):is(.pop-nexus-tools-toggle, .pop-nexus-attach, .pop-nexus-send):not(#\#), html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked #popNexusWindow:not(#\#) .pop-nexus-composer :where(.pop-nexus-send):is(.pop-nexus-tools-toggle, .pop-nexus-attach, .pop-nexus-send):not(#\#) { width: 32px; min-width: 32px; height: 32px; min-height: 32px; border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .internal-chat-window :where(.chat-composer):is(.chat-composer, .chat-composer-box, .chat-input-wrap), html:not(.bms-phone-v2) body:not(#\#) .internal-chat-window :where(.chat-composer-box):is(.chat-composer, .chat-composer-box, .chat-input-wrap), html:not(.bms-phone-v2) body:not(#\#) .internal-chat-window :where(.chat-input-wrap):is(.chat-composer, .chat-composer-box, .chat-input-wrap) { border-radius: 16px; }
  html:not(.bms-phone-v2) body:not(#\#) .internal-chat-window :where(.chat-send):is(.chat-send, .chat-composer > button), html:not(.bms-phone-v2) body:not(#\#) .internal-chat-window :where(button):is(.chat-send, .chat-composer > button) { min-height: 32px; height: 32px; width: 32px; min-width: 32px; border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .internal-chat-window .bms-search:not(#\#) { height: 40px; min-height: 40px; max-height: 40px; }
  /* Nút × bỏ tệp chờ gửi: chấm tròn 22px ở góc thẻ tệp, không theo nút 40 bo 8 ở trên (bị kéo thành thanh dọc). */
  html:not(.bms-phone-v2) body:not(#\#) .internal-chat-window .chat-compose-file > button:not(#\#):not(#\#) { width: 22px; min-width: 22px; height: 22px; min-height: 22px; border-radius: 50%; }
}
/* Khung Thông báo theo kiểu mới (anh Hiệp 10:09Z): khung bo 12 viền #E0E0E0, dòng trắng phân cách 1px, chưa đọc = chấm xanh trước tiêu đề
   (bỏ nền xanh + vạch trái), nội dung 13px tối đa 2 dòng, dưới cùng giờ bên trái và nút dẫn trực tiếp có chữ (cao 32 bo 6) bên phải. */
.notification-link-label { display: none; }
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) #notificationDropdown { width: 400px; max-width: calc(100vw - 32px); border: 1px solid var(--bms-border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15, 23, 42, .12); overflow: hidden; }
  html:not(.bms-phone-v2) body:not(#\#) #notificationDropdown > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--bms-border); }
  html:not(.bms-phone-v2) body:not(#\#) #notificationDropdown > header > strong { font-size: 15px; font-weight: 600; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-item {
    display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; grid-template-areas: "dot title title" ". body body" ". meta action";
    column-gap: 10px; row-gap: 4px; align-items: center; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--bms-border);
    background: var(--bms-surface); box-shadow: none; cursor: pointer;
  }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-item:hover { background: var(--bms-surface-subtle); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-item::before { content: ""; grid-area: dot; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-item.unread::before { background: var(--bms-primary); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-item > strong { grid-area: title; margin: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--bms-text); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-item.read > strong { font-weight: 500; color: var(--bms-text-muted); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-message { display: contents; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-message > span { grid-area: body; margin: 0; font-size: 13px; line-height: 18px; color: var(--bms-text-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-meta { grid-area: meta; display: flex; align-items: center; gap: 8px; margin: 0; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #notificationList .notification-meta small { margin: 0; white-space: nowrap; font-size: 12px; color: var(--bms-text-muted); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) #notificationList .notification-read-state { display: none !important; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) #notificationList .notification-project-link {
    grid-area: action; justify-self: end; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; min-height: 32px; padding: 0 10px;
    border: 1px solid var(--bms-border-strong, #C9CED6); border-radius: 6px; background: var(--bms-surface); color: var(--bms-primary); font-size: 13px; font-weight: 600; white-space: nowrap;
  }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) #notificationList .notification-project-link:hover { border-color: var(--bms-primary); background: var(--bms-primary-soft); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) #notificationList .notification-project-link svg { flex: 0 0 auto; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; }
  html:not(.bms-phone-v2) body:not(#\#) #notificationList .notification-link-label { display: inline; overflow: hidden; text-overflow: ellipsis; }
}
/* Nút "Lọc" cho trang không có ô tìm (bms-desktop-filter-move.js PROXIES, vd. Sản xuất › Tổng quan): ô cuối hàng số liệu,
   cao 40 bo 8 viền như nút phụ, hiện giá trị đang chọn ("Lọc · Tháng này"); hàng nút cũ trong trang ẩn để bảng số liệu lên đầu trang. */
.dfm-row-hidden { display: none !important; }
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) .dfm-solo { flex: 0 0 auto; display: inline-flex; align-items: center; width: auto; height: 40px; min-height: 40px; padding: 0; gap: 0; border: 0; background: transparent; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#) .dfm-solo[hidden] { display: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .dfm-solo > .dfm-filter { box-sizing: border-box; display: inline-flex; align-items: center; gap: 6px; height: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--bms-border-strong, #C9CED6); border-radius: 8px; background: var(--bms-surface); color: var(--bms-text); font-size: 14px; font-weight: 600; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .dfm-solo > .dfm-filter[aria-expanded="true"] { border-color: var(--bms-primary); color: var(--bms-primary); }
  html:not(.bms-phone-v2) body:not(#\#) .dfm-solo .dfm-value:not(:empty)::before { content: "·"; margin-right: 6px; color: var(--bms-text-muted); }
  html:not(.bms-phone-v2) body:not(#\#) .dfm-solo .dfm-value { color: var(--bms-primary); }
  html:not(.bms-phone-v2) body:not(#\#) .dfm-solo :where(.bms-search__icon):is(.bms-search__icon, .bms-search__chevron), html:not(.bms-phone-v2) body:not(#\#) .dfm-solo :where(.bms-search__chevron):is(.bms-search__icon, .bms-search__chevron) { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  html:not(.bms-phone-v2) body:not(#\#) .dfm-popover { min-width: 300px; padding: 12px; display: grid; gap: 12px; border: 1px solid var(--bms-border); border-radius: 12px; background: var(--bms-surface); box-shadow: 0 12px 32px rgba(15, 23, 42, .12); }
  html:not(.bms-phone-v2) body:not(#\#) .dfm-popover[hidden] { display: none; }
  html:not(.bms-phone-v2) body:not(#\#) .dfm-popover .dfm-group { display: grid; gap: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .dfm-popover .dfm-label { font-size: 12px; font-weight: 600; color: var(--bms-text-muted); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .dfm-popover .pms-chips { box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 3px; border: 1px solid var(--bms-border); border-radius: 8px; background: var(--bms-surface-subtle); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .dfm-popover .pms-chip { flex: 1 1 0; height: 32px; min-height: 32px; width: auto; min-width: 0; max-width: none; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--bms-text-muted); font-size: 13px; font-weight: 600; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .dfm-popover .pms-chip[aria-pressed="true"] { background: var(--bms-surface); color: var(--bms-primary); box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .dfm-popover .btn { width: 100%; min-width: 0; max-width: none; height: 40px; border-radius: 8px; }
}
/* Tiến trình 12 bước của dự án gọn lại (anh Hiệp 10:21Z, theo thanh đoạn màu của thẻ dự án): mỗi bước là một đoạn cao 8 bo 4,
   tên bước 11px một dòng ở dưới; bỏ vòng số, dòng trạng thái và đường nối. Xanh lá = xong, cam = đang làm, đỏ = vướng,
   xám = chưa tới / bỏ qua; bước đang xem viền xanh. Bấm đoạn vẫn mở bước như cũ. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-track { display: flex; align-items: flex-start; gap: 6px; padding: 4px 0 0; margin: 0; overflow: visible; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-track::before, html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-track::after { display: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node { position: relative; flex: 1 1 0; min-width: 0; width: auto; height: auto; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 2px 0; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; transform: none; cursor: pointer; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node.workflow-mobile-dashboard { display: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node::after { display: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node :where(.workflow-node-number):is(.workflow-node-number, small, .workflow-current-marker, .workflow-current-bar), html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node :where(small):is(.workflow-node-number, small, .workflow-current-marker, .workflow-current-bar), html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node :where(.workflow-current-marker):is(.workflow-node-number, small, .workflow-current-marker, .workflow-current-bar), html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node :where(.workflow-current-bar):is(.workflow-node-number, small, .workflow-current-marker, .workflow-current-bar) { display: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node > strong { order: 2; display: block; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 11px; line-height: 14px; font-weight: 500; color: var(--bms-text-muted); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node::before { content: ""; position: static; inset: auto; width: auto; transform: none; order: 1; display: block; height: 8px; border-radius: 4px; background: #D9DCE1; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node.status-completed::before { background: #5A9E5C; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node.status-in_progress::before { background: #C9823F; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node.status-blocked::before { background: var(--bms-danger, #DC2626); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node.status-skipped::before { background: #ECEEF1; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node.is-current::before { box-shadow: 0 0 0 2px var(--bms-surface), 0 0 0 4px var(--bms-primary); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node.is-current > strong { color: var(--bms-primary); font-weight: 600; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node:hover::before { filter: brightness(.92); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node.permission-none { cursor: not-allowed; opacity: .6; }
}
/* Số việc mới (badge) luôn bám đúng mục của nó: mục menu trái là gốc định vị; menu thu gọn thì badge ở góc trên phải ô biểu tượng (anh Hiệp 10:36Z). */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) #mainNavigation:not(#\#) .nav-item { position: relative; }
  html:not(.bms-phone-v2) body.sidebar-collapsed #mainNavigation:not(#\#) .nav-item .task-nav-badge { position: absolute; top: 2px; right: 2px; left: auto; margin: 0; }
}
/* Thẻ tiến trình 12 bước thấp gọn (anh Hiệp 10:40Z): lề 12/16, dòng tên dự án 32px, thanh bước ngay dưới. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip { padding: 12px 16px; margin-bottom: 12px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-v8-head { min-height: 32px; height: auto; padding: 0 0 8px; align-items: center; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-v8-head-actions .btn,
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-v8-discussion { height: 32px; min-height: 32px; border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-track { padding: 2px 0 0; height: auto; min-height: 0; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node { padding: 0; gap: 4px; height: 28px; max-height: 28px; justify-content: flex-start; }
}
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node::before { flex: 0 0 8px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #workflowStrip .workflow-node > strong { flex: 0 0 auto; height: 14px; padding: 0; }
}
/* Nút mở công cụ trong ô soạn BCC Nexus = 3 gạch (anh Hiệp 10:08Z/10:37Z), không dùng logo Nexus: nền nhạt, mở thì nền xanh. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked #popNexusWindow .pop-nexus-composer .pop-nexus-tools-toggle:not(#\#):not(#\#) { border-radius: 6px; background: var(--bms-surface-subtle, #F1F3F6); color: var(--bms-text); }
  html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked #popNexusWindow .pop-nexus-composer .pop-nexus-tools-toggle:is([aria-expanded="true"], .on):not(#\#):not(#\#) { background: var(--bms-primary); color: #fff; box-shadow: none; }
  html:not(.bms-phone-v2) #floatingActionsContainer.is-topbar-docked #popNexusWindow .pop-nexus-composer .pop-nexus-tools-toggle > svg:not(#\#):not(#\#) { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
}
/* "+ Thêm công việc" (Tác vụ › Công việc) cùng quy tắc nút: bo 8, cao 40 (anh Hiệp 10:38Z: vẫn còn dạng viên). */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #tasksWorkPane #taskCreateBtn, html:not(.bms-phone-v2) body:not(#\#):not(#\#) #taskCreateBtn { border-radius: 8px; height: 40px; min-height: 40px; }
}
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) .pms-kpi.has-dfm { grid-template-columns: repeat(6, minmax(0, 1fr)) auto; }
  html:not(.bms-phone-v2) body:not(#\#) .pms-kpi.has-dfm > .dfm-solo { align-self: center; justify-self: end; margin: 0 12px; }
}

/* Bảng tính giá vốn (btgv-sheet.css dùng !important + bo 999): về nút 40 bo 8, ô nhập nhanh 40 bo 8, nút chính đầu trang 40 bo 8 */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) :where(.bs-tb):is(.bs-tb, .bs-pickbtn, .bs-solbar), html:not(.bms-phone-v2) body:not(#\#) :where(.bs-pickbtn):is(.bs-tb, .bs-pickbtn, .bs-solbar), html:not(.bms-phone-v2) body:not(#\#) :where(.bs-solbar):is(.bs-tb, .bs-pickbtn, .bs-solbar) { height: 40px !important; min-height: 40px !important; border-radius: 8px !important; box-shadow: none !important; }
  html:not(.bms-phone-v2) body:not(#\#) .bs-tb { padding: 0 14px !important; }
  html:not(.bms-phone-v2) body.bs-new:not(#\#) #completeSolutionCostBtn { height: 40px !important; min-height: 40px !important; border-radius: 8px !important; padding: 0 16px !important; font-size: 14px; box-shadow: none !important; }
  html:not(.bms-phone-v2) body:not(#\#) :is(.bs-root, .bs-pophost) input.bs-quick-in:not(tfoot *) { height: 40px !important; border-radius: 8px !important; border-style: solid !important; }
  html:not(.bms-phone-v2) body:not(#\#) .bs-pop footer .btn { border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .bs-pick-n { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.project-sales-package-split):is(.project-sales-package-split, .package-mode-seg), html:not(.bms-phone-v2) body:not(#\#) :where(.package-mode-seg):is(.project-sales-package-split, .package-mode-seg) { border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) :is(.project-sales-package-split, .package-mode-seg) button { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) .panel[data-panel="approval"] .approval-actions .btn { height: 40px; min-height: 40px; border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .inventory-quantity-edit { min-height: 24px; border-radius: 6px; }
}

/* Hộp thoại / ngăn kéo / biểu mẫu nổi trên máy tính theo cùng ngôn ngữ thẻ-nút-ô nhập của trang (kiểm thử 28/10):
   khung bo 12 viền 1px; nút 40 bo 8 (nút ở đầu khung: đóng, mở rộng = 32 bo 6, vuông nếu chỉ có biểu tượng); ô nhập / chọn 40 bo 8; nhãn bo 6. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) :where(dialog):is(dialog, .btgv-revision-card, .production-drawer-card, .relationship-drawer > aside, .bms-whatsnew__card), html:not(.bms-phone-v2) body:not(#\#) :where(.btgv-revision-card):is(dialog, .btgv-revision-card, .production-drawer-card, .relationship-drawer > aside, .bms-whatsnew__card), html:not(.bms-phone-v2) body:not(#\#) :where(.production-drawer-card):is(dialog, .btgv-revision-card, .production-drawer-card, .relationship-drawer > aside, .bms-whatsnew__card), html:not(.bms-phone-v2) body:not(#\#) :where(aside):is(dialog, .btgv-revision-card, .production-drawer-card, .relationship-drawer > aside, .bms-whatsnew__card), html:not(.bms-phone-v2) body:not(#\#) :where(.bms-whatsnew__card):is(dialog, .btgv-revision-card, .production-drawer-card, .relationship-drawer > aside, .bms-whatsnew__card) { border-radius: 12px; }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    :where(.btn):is(.btn, button.primary, button.secondary):not(.bms-search *, header *, .dialog-head *, .drawer-head *, [role="tab"], .segmented *, .lt-seg *, td *, .chat-sidebar-tabs *, .chat-type-tabs *, .pop-nexus-composer *, .pop-nexus-message *, .meal-self-pick), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    :where(button):is(.btn, button.primary, button.secondary):not(.bms-search *, header *, .dialog-head *, .drawer-head *, [role="tab"], .segmented *, .lt-seg *, td *, .chat-sidebar-tabs *, .chat-type-tabs *, .pop-nexus-composer *, .pop-nexus-message *, .meal-self-pick) {
    box-sizing: border-box;
    min-height: 40px;
    height: 40px;
    padding: 0 16px;
    border-radius: 8px;
    font: 600 14px/1.15 var(--bms-font-ui);
    box-shadow: none;
  }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    :is(header, .dialog-head, .drawer-head) :where(button):is(button, .btn):not(.bms-search *, [role="tab"], .segmented *), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    :is(header, .dialog-head, .drawer-head) :where(.btn):is(button, .btn):not(.bms-search *, [role="tab"], .segmented *) {
    box-sizing: border-box;
    min-height: 32px;
    height: 32px;
    border-radius: 6px;
    box-shadow: none;
  }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    :is(header, .dialog-head, .drawer-head) :where(button):is(button, .btn):is(.icon-btn, [aria-label="Đóng"], [aria-label="Close"], [id$="Close"], [data-close]):not(:has(> span:not(:empty))), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    :is(header, .dialog-head, .drawer-head) :where(.btn):is(button, .btn):is(.icon-btn, [aria-label="Đóng"], [aria-label="Close"], [id$="Close"], [data-close]):not(:has(> span:not(:empty))) { width: 32px; min-width: 32px; padding: 0; }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    td :where(.btn):is(.btn, button):not(.bms-search *, [role="tab"]), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    td :where(button):is(.btn, button):not(.bms-search *, [role="tab"]) { min-height: 32px; height: 32px; padding: 0 12px; border-radius: 6px; font-size: 13px; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    :where(input):is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="hidden"]), select):not(.bms-search *, td *, .pop-nexus-composer *, .chat-composer *), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card)
    :where(select):is(input:not([type="checkbox"], [type="radio"], [type="range"], [type="color"], [type="file"], [type="hidden"]), select):not(.bms-search *, td *, .pop-nexus-composer *, .chat-composer *) {
    box-sizing: border-box;
    min-height: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 14px;
  }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer, .btgv-revision-card) textarea:not(td *, .pop-nexus-composer *, .chat-composer *) { border-radius: 8px; font-size: 14px; }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.srm-v2-badge):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.hrm-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.tpm-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.crm-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.crm-pill):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.wk-chip):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.sir-chip):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.pms-tag):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.khx-pill):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.inventory-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.fg-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.qc-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.doc-badge):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button), html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer)
    :where(.production-status):is(.status, .srm-v2-badge, .hrm-status, .tpm-status, .crm-status, .crm-pill, .wk-chip, .sir-chip, .pms-tag, .khx-pill, .inventory-status, .fg-status, .qc-status, .doc-badge, .production-status):not(button) {
    min-height: 22px; padding: 0 8px; border: 0; border-radius: 6px; font: 600 12px/1.2 var(--bms-font-ui); text-transform: none; letter-spacing: 0;
  }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer) table:not(.bs-sheet, .quotation-items-table) > thead th { height: 40px; padding: 0 12px; background: var(--bms-surface-subtle); color: var(--bms-text-muted); font: 600 12px/1.2 var(--bms-font-ui); letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; }
  html:not(.bms-phone-v2) body:not(#\#) :is(dialog, [role="dialog"]:not(section.panel), .inventory-drawer, .production-drawer-card, .qc-drawer, .relationship-drawer) table:not(.bs-sheet, .quotation-items-table) > tbody td { height: 44px; padding: 8px 12px; font-size: 14px; vertical-align: middle; }
}

/* Rà từng tab/hộp thoại trên máy tính (kiểm thử 28/10): những chỗ còn dạng viên tròn / bo 12 ở nút nhỏ / bóng đổ, đưa về quy tắc chung. */
@media (min-width: 901px) {
  /* Tác vụ: Lịch (nút điều hướng 40 bo 8, ô ngày bo 6), Ghi chú (nút công cụ 32 bo 6, thư mục bo 8, mục ghi chú không bóng), Báo cơm */
  html:not(.bms-phone-v2) body:not(#\#) .task-calendar-nav button { min-height: 40px; height: 40px; border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .task-calendar-date { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) :where(button):is(.task-notes-toolbar button, .task-notes-compose, #noteFolderAdd, .task-notes-tool-group button), html:not(.bms-phone-v2) body:not(#\#) :where(.task-notes-compose):is(.task-notes-toolbar button, .task-notes-compose, #noteFolderAdd, .task-notes-tool-group button), html:not(.bms-phone-v2) body:not(#\#) :where(#noteFolderAdd):is(.task-notes-toolbar button, .task-notes-compose, #noteFolderAdd, .task-notes-tool-group button) { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .task-notes-toolbar :where(.btn):is(.btn, button.dof-more), html:not(.bms-phone-v2) body:not(#\#) .task-notes-toolbar :where(button):is(.btn, button.dof-more) { min-height: 32px; height: 32px; }
  html:not(.bms-phone-v2) body:not(#\#) .task-notes-folder button { border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .task-notes-item { border-radius: 8px; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#) .task-notes-item small em { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .meal-self-tag { border-radius: 6px; padding: 2px 8px; font-weight: 600; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.meal-self-pick):is(.meal-self-pick, .meal-proxy-qty button), html:not(.bms-phone-v2) body:not(#\#) :where(button):is(.meal-self-pick, .meal-proxy-qty button) { border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .meal-remind { border-radius: 12px; }
  html:not(.bms-phone-v2) body:not(#\#) .meal-remind footer .btn { min-height: 40px; height: 40px; border-radius: 8px; }
  /* Nhân sự: ô nhập biểu mẫu nhân sự 40; bộ chọn người nhận trong Soạn thông báo dạng khung 40/32 */
  html:not(.bms-phone-v2) body:not(#\#) .hrm-emp-form .hrm-emp-g4 :where(input):is(input, select), html:not(.bms-phone-v2) body:not(#\#) .hrm-emp-form .hrm-emp-g4 :where(select):is(input, select) { height: 40px !important; min-height: 40px !important; }
  html:not(.bms-phone-v2) body:not(#\#) .ann-seg:not(:has(> button > b)) { height: 40px; padding: 3px; border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .ann-seg:not(:has(> button > b)) > button { height: 32px; border-radius: 6px; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#) .ann-seg button b { border-radius: 6px; }
  /* Mua hàng: nhãn điều khoản / chênh lệch nhận hàng bo 6; ô ghi chú gửi giỏ 40 bo 8 */
  html:not(.bms-phone-v2) body:not(#\#) :where(.srm-po-pay-chip):is(.srm-po-pay-chip, .srm-diff-chip, .srm-wh-tag, .srm-pt-chip, .srm-pt-pill), html:not(.bms-phone-v2) body:not(#\#) :where(.srm-diff-chip):is(.srm-po-pay-chip, .srm-diff-chip, .srm-wh-tag, .srm-pt-chip, .srm-pt-pill), html:not(.bms-phone-v2) body:not(#\#) :where(.srm-wh-tag):is(.srm-po-pay-chip, .srm-diff-chip, .srm-wh-tag, .srm-pt-chip, .srm-pt-pill), html:not(.bms-phone-v2) body:not(#\#) :where(.srm-pt-chip):is(.srm-po-pay-chip, .srm-diff-chip, .srm-wh-tag, .srm-pt-chip, .srm-pt-pill), html:not(.bms-phone-v2) body:not(#\#) :where(.srm-pt-pill):is(.srm-po-pay-chip, .srm-diff-chip, .srm-wh-tag, .srm-pt-chip, .srm-pt-pill) { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .srm-pt-icon { border-radius: 6px; width: 32px; height: 32px; }
  /* Nhân sự: ngăn hồ sơ nhân sự bo 12, tab trong ngăn 40 */
  html:not(.bms-phone-v2) body:not(#\#) .hrm-emp-drawer { border-radius: 12px; }
  html:not(.bms-phone-v2) body:not(#\#) .hrm-emp-tabs > button { min-height: 40px; height: 40px; }
  html:not(.bms-phone-v2) body:not(#\#) .bms-document-template-admin-v8__header-actions .btn { border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .srm-submit-compact label.srm-submit-note { min-height: 40px; border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .srm-submit-compact .srm-submit-note input { min-height: 36px; height: 36px; border-radius: 0; }
  /* Sản xuất › Tổng quan: dòng máy bo 8 */
  html:not(.bms-phone-v2) body:not(#\#) .tpm-panel .pms-machine { border-radius: 8px; }
  /* Kho: nút xem giữ hàng trong dòng bo 6 */
  html:not(.bms-phone-v2) body:not(#\#) .warehouse-reservation-button { border-radius: 6px; }
  /* Cài đặt: nhãn trạng thái bo 6; nút biểu tượng Ngôn ngữ / Định mức / Phân quyền vuông bo 6; nút thêm bo 8 */
  html:not(.bms-phone-v2) body:not(#\#) :where(.system-broadcast-badge):is(.system-broadcast-badge, .app-runtime-status, .btgv-nexus-badge, .pop-nexus-connection-state, .pop-feedback-status, .chat-delivery-status), html:not(.bms-phone-v2) body:not(#\#) :where(.app-runtime-status):is(.system-broadcast-badge, .app-runtime-status, .btgv-nexus-badge, .pop-nexus-connection-state, .pop-feedback-status, .chat-delivery-status), html:not(.bms-phone-v2) body:not(#\#) :where(.btgv-nexus-badge):is(.system-broadcast-badge, .app-runtime-status, .btgv-nexus-badge, .pop-nexus-connection-state, .pop-feedback-status, .chat-delivery-status), html:not(.bms-phone-v2) body:not(#\#) :where(.pop-nexus-connection-state):is(.system-broadcast-badge, .app-runtime-status, .btgv-nexus-badge, .pop-nexus-connection-state, .pop-feedback-status, .chat-delivery-status), html:not(.bms-phone-v2) body:not(#\#) :where(.pop-feedback-status):is(.system-broadcast-badge, .app-runtime-status, .btgv-nexus-badge, .pop-nexus-connection-state, .pop-feedback-status, .chat-delivery-status), html:not(.bms-phone-v2) body:not(#\#) :where(.chat-delivery-status):is(.system-broadcast-badge, .app-runtime-status, .btgv-nexus-badge, .pop-nexus-connection-state, .pop-feedback-status, .chat-delivery-status) { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.lt-arrow):is(.lt-arrow, .lt-icon, .bms-permission-grid__expand, .btgv-sp-del), html:not(.bms-phone-v2) body:not(#\#) :where(.lt-icon):is(.lt-arrow, .lt-icon, .bms-permission-grid__expand, .btgv-sp-del), html:not(.bms-phone-v2) body:not(#\#) :where(.bms-permission-grid__expand):is(.lt-arrow, .lt-icon, .bms-permission-grid__expand, .btgv-sp-del), html:not(.bms-phone-v2) body:not(#\#) :where(.btgv-sp-del):is(.lt-arrow, .lt-icon, .bms-permission-grid__expand, .btgv-sp-del) { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.btgv-sp-add):is(.btgv-sp-add, .btgv-sp-mini), html:not(.bms-phone-v2) body:not(#\#) :where(.btgv-sp-mini):is(.btgv-sp-add, .btgv-sp-mini) { border-radius: 6px; border-style: solid; }
  html:not(.bms-phone-v2) body:not(#\#) .btgv-norm-kinds > button { border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) #aiKnowledgeTokenExpiry { height: 40px; min-height: 40px; }
  /* "Có gì mới": nút đóng vuông 32 bo 6, nút chân 40 bo 8 */
  html:not(.bms-phone-v2) body:not(#\#) .bms-whatsnew__close { flex-basis: 32px; width: 32px; height: 32px; border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .bms-whatsnew__btn { min-height: 40px; height: 40px; border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .bms-whatsnew__tour-chip { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .bms-whatsnew-tour__pop { border-radius: 12px; }
}

/* Dashboard (thiết kế riêng, giữ bố cục): nhãn trạng thái bo 6, chip tổng hợp tiến độ bo 6, nút biểu tượng tiến độ vuông bo 8, nút xem chi tiết trên thanh gantt bo 6; thẻ không bóng. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) .panel[data-panel="dashboard"] :where(.status):is(.status, .dashboard-recent-project .status) { border-radius: 6px; min-height: 22px; font-weight: 600; }
  html:not(.bms-phone-v2) body:not(#\#) .panel[data-panel="dashboard"] .dashboard-insight-card { border-radius: 12px; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#) .panel[data-panel="dashboard"] .dashboard-approval-actions .btn { border-radius: 6px; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#) .production-progress__summary-chip { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.production-progress__icon-btn):is(.production-progress__icon-btn, .production-progress__close-btn), html:not(.bms-phone-v2) body:not(#\#) :where(.production-progress__close-btn):is(.production-progress__icon-btn, .production-progress__close-btn) { width: 40px; height: 40px; border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#) .production-progress__segmented > .production-progress__segment { height: 32px; min-height: 32px; border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .production-progress__segmented:not([hidden]) { padding: 3px; height: 40px; box-sizing: border-box; align-items: center; }
  html:not(.bms-phone-v2) body:not(#\#) .production-progress__eye-trigger { border-radius: 8px; }
  /* Thông báo nổi (toast): bo 8, chữ 13/600 */
  html:not(.bms-phone-v2) body:not(#\#) .toast { border-radius: 8px; padding: 12px 16px; font-weight: 600; box-shadow: 0 12px 32px rgba(15, 23, 42, .14); }
}

/* Danh sách sửa của giám sát (28/10): chip trong bảng Lọc, ngăn giỏ mua, hộp TPM, Chat, Nexus, "Có gì mới" */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#) .bms-search__popover .project-queue-chip { height: 32px; min-height: 32px; border-radius: 6px; padding: 0 10px; }
  html:not(.bms-phone-v2) body:not(#\#) #relationshipDrawer td > select.srm-vat-sel { height: 32px; min-height: 32px; border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .srm-submit-check { border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) dialog.tpm-dialog .tpm-dialog-close { width: 32px; min-width: 32px; height: 32px; padding: 0; border-radius: 6px; }
  html:not(.bms-phone-v2) body:not(#\#) .chat-type-tabs { box-sizing: border-box; display: inline-flex; align-items: center; gap: 2px; height: 40px; padding: 3px; border: 1px solid var(--bms-border); border-bottom: 1px solid var(--bms-border); border-radius: 8px; background: var(--bms-surface-subtle); }
  html:not(.bms-phone-v2) body:not(#\#) .chat-type-tabs > button { box-sizing: border-box; height: 32px; min-height: 32px; padding: 0 14px; border: 0; border-radius: 6px; font-size: 13px; font-weight: 600; background: transparent; }
  html:not(.bms-phone-v2) body:not(#\#) .chat-type-tabs > button.active { background: var(--bms-surface); color: var(--bms-primary); }
  html:not(.bms-phone-v2) body:not(#\#) .pop-nexus-mode-badge { min-height: 22px; padding: 0 8px; border-radius: 6px; font: 600 12px/22px var(--bms-font-ui); text-transform: none; letter-spacing: 0; }
  html:not(.bms-phone-v2) body:not(#\#) .bms-whatsnew__eyebrow { text-transform: none; letter-spacing: 0; }
  html:not(.bms-phone-v2) body:not(#\#) :where(.bms-whatsnew__module):is(.bms-whatsnew__module, .bms-whatsnew__tour-chip), html:not(.bms-phone-v2) body:not(#\#) :where(.bms-whatsnew__tour-chip):is(.bms-whatsnew__module, .bms-whatsnew__tour-chip) { border-radius: 6px; height: 22px; line-height: 22px; }
}
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) :where(.quotation-roadmap-card):is(.quotation-roadmap-card, .quotation-internal-card), html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) :where(.quotation-internal-card):is(.quotation-roadmap-card, .quotation-internal-card) { border-radius: 12px; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) .approval-auto-trigger { border-radius: 8px; min-height: 40px; }
}

/* Dashboard gọn (anh Hiệp 28/10 12:39Z "Thiết kế gọn lại giao diện của dashboard"): bỏ lời chào to (tên tab đã có trên cây thư mục),
   4 số liệu thành một khối thấp, 3 thẻ một hàng thấp hơn, khung tiến độ: tiêu đề + chip tổng hợp chung một hàng, thanh công cụ 48. Chỉ máy tính. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] > .section-title { display: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] > .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0 0 12px; overflow: hidden;
    border: 1px solid var(--bms-border); border-radius: 12px; background: var(--bms-surface);
  }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] > .metric-grid > .metric {
    min-height: 64px; padding: 10px 16px; border: 0; border-radius: 0; background: transparent;
    box-shadow: inset -1px 0 0 var(--bms-border); /* vạch chia bên phải mỗi ô (thứ tự ô theo grid-area, không theo DOM) */
    display: flex; flex-direction: column; justify-content: center; gap: 2px;
  }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] > .metric-grid > .metric:nth-child(4) { box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] > .metric-grid > .metric strong { margin: 0; font-size: 20px; line-height: 24px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-insight-grid { gap: 12px; margin: 0 0 12px; align-items: stretch; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-insight-card { padding: 12px 14px; min-height: 0; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-insight-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* anh 12:50Z: "Dự án tạo gần đây" rộng bằng 2 ô số liệu ở trên; danh sách xếp 2 cột */
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-insight-card:last-child { grid-column: span 2; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] #dashboardRecentProjects { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] #dashboardRecentProjects > .dashboard-recent-project:nth-child(2) { border-top: 0; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-insight-card > header { margin: 0 0 8px; min-height: 24px; align-items: center; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-insight-card h3 { font-size: 15px; line-height: 20px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] #dashboardStatusTotal { font-size: 20px; line-height: 24px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-status-bars { gap: 10px; min-height: 0; align-content: start; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-status-row > div { margin-bottom: 2px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-status-row progress { height: 6px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] #dashboardRecentProjects > .dashboard-recent-project { padding: 5px 0; gap: 8px; min-height: 38px; margin: 0; border: 0; border-top: 1px solid var(--bms-border); border-radius: 0; background: transparent; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] #dashboardRecentProjects > .dashboard-recent-project:first-child { border-top: 0; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] #dashboardRecentProjects > .dashboard-recent-project time { font-size: 11px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-recent-project > div { gap: 1px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="dashboard"] .dashboard-approval-item { padding: 6px 10px; }
  /* Khung tiến độ (anh 13:10Z: bố trí lại theo mục đích dùng): hàng 1 = tiêu đề (trái) + bộ lọc Tất cả/Đúng tiến độ/Thiếu cập nhật (phải);
     hàng 2 = chọn kỳ + thu phóng (trái) + các số đếm (phải); rồi bảng, chân. Thanh công cụ display:contents để con của nó vào đúng ô lưới. */
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__panel { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; border-radius: 12px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__title-bar { grid-row: 1; grid-column: 1 / -1; display: flex; align-items: center; min-height: 48px; padding: 0 16px; text-align: left; border-bottom: 1px solid var(--pp-border); background: var(--pp-subtle); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__title-bar h3 { font-size: 15px; line-height: 20px; margin: 0; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__toolbar { display: contents; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__segmented:not([hidden]) { grid-row: 2; grid-column: 1; justify-self: start; align-self: center; margin: 0; padding: 4px 0 4px 12px; height: auto; gap: 6px; border: 0; background: transparent; min-height: 48px; border-bottom: 1px solid var(--pp-border); border-radius: 0; }
html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__segmented > .production-progress__segment { height: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--pp-border); border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--pp-muted); background: var(--pp-surface); }
html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__segment.is-missing { color: var(--pp-danger); border-color: var(--pp-danger); background: var(--pp-danger-soft); }
html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__segment-count { font-size: 13px; color: var(--pp-fg); }
html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__segment.is-missing .production-progress__segment-count, html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__segment[aria-pressed="true"] .production-progress__segment-count { color: inherit; }
html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__summary-chip[data-summary="missing"] { display: none; }
html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__segment[data-progress-filter="ontrack"] { display: none; }
html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__segmented > .production-progress__segment[aria-pressed="true"] { color: var(--pp-accent); border-color: var(--pp-accent); background: var(--pp-accent-soft); font-weight: 650; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__panel::before { content: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__period { grid-row: 2; grid-column: 3; display: flex; align-items: center; gap: 6px; min-height: 48px; padding: 4px 12px; border-bottom: 1px solid var(--pp-border); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__summary:not([hidden]) { grid-row: 2; grid-column: 2; display: flex; justify-content: flex-start; align-items: center; min-height: 48px; padding: 4px 12px 4px 6px; gap: 6px; background: transparent; border-bottom: 1px solid var(--pp-border); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__summary-chip { height: 40px; align-items: center; padding: 0 12px; border-radius: 8px; font-size: 13px; background: var(--pp-surface); }
  /* chip dòng sản xuất đang chọn: nền màu của dòng, chữ trắng (nền trắng ở trên không được đè lên lúc đang chọn) */
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__line-chip[aria-pressed="true"] { background: var(--line); border-color: var(--line); color: #fff; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__timeline-shell { grid-row: 3; grid-column: 1 / -1; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #productionProgressDashboard .production-progress__footer { grid-row: 4; grid-column: 1 / -1; min-height: 36px; padding: 6px 12px; }
}

/* Anh Hiệp chốt 28/10 12:43Z: nút "?" gợi ý Nexus giữ tròn như mockup; bỏ mục Hướng dẫn ở menu trái (đã có Nexus hướng dẫn). Chỉ máy tính. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #mainNavigation .nav-item[data-panel="guide"] { display: none; }
}

/* Anh Hiệp 28/10 12:45Z: dòng dự án đang mở nổi bật hơn (giữ chiều cao dòng như mockup): nền xanh nhạt đậm hơn, viền xanh trên dưới, vạch trái xanh, mã xanh đậm, nhãn "Đang mở" dạng chip. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) .panel[data-panel="project"] tr.dashboard-project-row[data-active="true"] > td {
    background: color-mix(in srgb, var(--bms-primary) 10%, #fff);
    box-shadow: inset 0 1px 0 var(--bms-primary), inset 0 -1px 0 var(--bms-primary);
  }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) .panel[data-panel="project"] tr.dashboard-project-row[data-active="true"] > td.pq-code {
    box-shadow: inset 6px 0 0 var(--bms-primary), inset 0 1px 0 var(--bms-primary), inset 0 -1px 0 var(--bms-primary);
  }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) .panel[data-panel="project"] tr.dashboard-project-row[data-active="true"] .dashboard-project-code > span { color: var(--bms-primary); }
  /* chip "Đang mở" neo góc trên bên phải của dòng, không làm dòng cao thêm (anh 12:48Z, 12:51Z) */
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) .panel[data-panel="project"] tr.dashboard-project-row[data-active="true"] { position: relative; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#):not(#\#) .panel[data-panel="project"] .pq-open-badge {
    position: absolute; right: 8px; top: 3px; z-index: 5; display: inline-flex; align-items: center; height: 16px; margin: 0; padding: 0 5px; border-radius: 4px;
    background: var(--bms-primary); color: #fff; font: 700 10px/1 var(--bms-font-ui); white-space: nowrap;
  }
}
/* Mua hàng: thanh 7 bước hiện lại trên cùng, cùng kiểu thanh 12 bước của Dự án (anh Hiệp 13:22Z):
   đoạn màu 8px + tên bước 11px, xanh lá = đã qua, bước đang xem viền xanh. Bấm đoạn vẫn chuyển bước như cũ. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven { display: flex !important; align-items: flex-start; gap: 6px; margin: 0 0 12px; padding: 12px 16px; border-radius: 12px; box-shadow: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step { position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 0; height: 28px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step::after { display: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step > span { display: none; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step::before { content: ""; display: block; flex: 0 0 8px; height: 8px; border-radius: 4px; background: #D9DCE1; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step.done::before { background: #5A9E5C; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step.current::before { background: var(--bms-primary); box-shadow: 0 0 0 2px var(--bms-surface), 0 0 0 4px var(--bms-primary); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; font-size: 11px; line-height: 14px; height: 14px; font-weight: 500; color: var(--bms-text-muted); }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step.current > strong { color: var(--bms-primary); font-weight: 600; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel[data-panel="srm"] .srm-purchase-rail-seven > .srm-purchase-step:hover::before { filter: brightness(.92); }
}
/* Phân quyền: bỏ 3 dòng giải thích dưới thanh công cụ (Phạm vi…, Tích ô…, ✓ Có quyền…) trên máy tính (anh Hiệp 13:25Z). */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .bms-permission-grid__summary { display: none; }
  /* nút Khôi phục mặc định cùng cỡ nút Lưu thay đổi (40px, bo 8) */
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) #permissionGrid .btn.mini-btn { min-height: 40px; height: 40px; padding-inline: 16px; border-radius: 8px; font-size: inherit; }
}
/* Tên bấm được trong bảng (.btn.link: tên khách hàng, cơ hội, chiến dịch…) là chữ chứ không phải nút (kiểm tra v8.0.0: tên dài bị cắt cả 2 dòng). */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .panel.active :is(td, li) .btn.link { width: auto; min-width: 0; max-width: 100%; height: auto; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none; white-space: normal; overflow: visible; text-align: left; line-height: 1.35; justify-content: flex-start; }
}

/* Tài chính (anh Hiệp 2026-10-28, kiểm tra v8.0.0): bảng đề nghị cao tới đáy màn hình
   (tính cả zoom 0.85), dòng tổng dính đáy nằm TRÊN cột Thao tác dính phải (nút Xem không đè lên tổng). */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .ifm-payment-table { max-height: max(360px, calc(100dvh - 330px)); }
  html.bms-auto-density-85:not(.bms-phone-v2) body.bms-opendesign-v8 .ifm-payment-table { max-height: max(360px, calc(117.6471dvh - 330px)); }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .ifm-payment-table thead th { z-index: 3; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .ifm-payment-table tfoot td { z-index: 3; background: var(--bms-surface-subtle, #f7f7f7); box-shadow: 0 -1px 0 var(--bms-border, #e5e7eb); }
}

/* Lệnh đặt xe (kiểm tra v8.0.0): bảng vừa khung để cột Thao tác dính phải không đè lên Dự trù chi phí / Vận chuyển. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .srm-transport-table .srm-transport-clip { max-width: 104px; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .srm-transport-table .srm-transport-goods-cell .srm-transport-clip { max-width: 136px; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .srm-transport-ledger .srm-transport-table thead th { min-width: 72px; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .srm-transport-ledger .srm-transport-table thead th:nth-child(10),
  html:not(.bms-phone-v2) body.bms-opendesign-v8 .srm-transport-ledger .srm-transport-table thead th:nth-child(11) { min-width: 96px; }
  html:not(.bms-phone-v2) body.bms-opendesign-v8:not(#\#):not(#\#) .srm-transport-table :where(th):is(th, td), html:not(.bms-phone-v2) body.bms-opendesign-v8:not(#\#):not(#\#) .srm-transport-table :where(td):is(th, td) { padding-inline: 8px; }
}

/* Chat nội bộ (kiểm tra v8.0.0): dòng hội thoại là dòng danh sách, không phải nút 40px — cao theo nội dung (avatar 40),
   tên/tin nhắn canh trái, giờ + số chưa đọc cột phải không đè nhau, dòng rộng hết khung danh sách. */
@media (min-width: 901px) {
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root :where(.chat-conversation):is(.chat-conversation, .chat-online-user), html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root :where(.chat-online-user):is(.chat-conversation, .chat-online-user) { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; width: 100%; height: auto; min-height: 60px; padding: 10px 12px; text-align: left; border-radius: 8px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root :is(.chat-conversation, .chat-online-user) > .chat-avatar-wrap { grid-row: 1 / 3; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root :is(.chat-conversation, .chat-online-user) > span:not(.chat-avatar-wrap):not(.sr-only) { grid-row: 1 / 3; display: grid; min-width: 0; gap: 2px; text-align: left; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root :is(.chat-conversation, .chat-online-user) :where(strong):is(strong, small), html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root :is(.chat-conversation, .chat-online-user) :where(small):is(strong, small) { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root .chat-conversation > time { grid-column: 3; grid-row: 1; align-self: end; justify-self: end; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root .chat-conversation > b { position: static; grid-column: 3; grid-row: 2; justify-self: end; align-self: start; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box; border-radius: 9px; }
  html:not(.bms-phone-v2) body:not(#\#):not(#\#) .internal-chat-root .chat-conversation > i { position: absolute; top: 6px; left: 42px; font-size: 8px; font-style: normal; }
}
