﻿* {
    box-sizing: border-box;
}

:root {
    --header-height: 64px;
    --sidebar-width: 250px;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --border: #d9dee5;
    --text: #1f2933;
    --muted: #68737d;
    --nav: #2f3338;
    --nav-item: #3b4046;
    --nav-active: #4b525a;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, "Microsoft JhengHei", sans-serif;
    color: var(--text);
    background: var(--bg);
}

body {
    min-height: 100vh;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    background: #24282d;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.header-title-group {
    display: flex;
    align-items: baseline;
    gap: 18px;
    min-width: 0;
}

.app-header h1 {
    margin: 0;
    font-size: 24px;
    white-space: nowrap;
}

.header-subtitle,
.project-name {
    font-size: 15px;
    color: #d5d9dd;
    white-space: nowrap;
}

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    padding: 18px 14px;
    overflow-y: auto;
    background: var(--nav);
    color: #fff;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item,
.purchase-group {
    width: 100%;
    margin: 0 0 9px;
    border-radius: 6px;
    background: var(--nav-item);
}

.nav-item {
    min-height: 42px;
    padding: 10px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nav-item > span:first-child,
.purchase-title,
.purchase-subitem > span:first-child {
    white-space: nowrap;
}

.nav-item.active {
    background: var(--nav-active);
    font-weight: 700;
}

.purchase-group {
    display: block !important;
    padding: 10px 11px 11px;
}

.purchase-title {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    font-weight: 700;
}

.purchase-submenu {
    display: block !important;
    width: 100%;
    padding-left: 14px;
}

.purchase-subitem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 34px;
    margin-top: 6px;
    padding: 7px 8px;
    border-radius: 5px;
    background: rgba(255,255,255,.06);
    font-size: 14px;
}

/* 新增的 sidebar active 樣式：P0 導航修正之後，「契約標單」與「填寫請購單」
   互相切換時同步高亮目前所在頁面，視覺上比照既有 .nav-item.active。 */
.purchase-subitem.active {
    background: var(--nav-active);
    font-weight: 700;
}

.badge {
    flex: 0 0 auto;
    padding: 2px 6px;
    border-radius: 999px;
    background: #ad3f2f;
    color: #fff;
    font-size: 11px;
    line-height: 1.4;
    white-space: nowrap;
}

.nav-disabled {
    color: #e1e4e7;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: calc(var(--header-height) + 24px) 28px 36px;
    min-height: 100vh;
}

.contract-toolbar,
.contract-table-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.contract-toolbar {
    padding: 18px 20px;
    margin-bottom: 18px;
}

.toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.btn {
    min-height: 38px;
    padding: 8px 15px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 14px;
    cursor: pointer;
}

.btn-primary {
    background: #374151;
    color: #fff;
}

.btn-secondary {
    background: #eef1f4;
    color: #68737d;
    border-color: #d3d8de;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .72;
}

.permission-note {
    font-size: 12px;
    color: #8a4b3a;
    background: #fff2ec;
    border: 1px solid #f0d0c5;
    padding: 4px 8px;
    border-radius: 999px;
}

.contract-meta {
    display: grid;
    grid-template-columns: 150px 220px minmax(260px, 1fr);
    gap: 12px;
}

.meta-item {
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #e2e6ea;
    border-radius: 7px;
    background: #fafbfc;
}

.meta-label {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
}

/* Batch A #3：Stage B 明細表下方的預計進場日期預設值說明 */
.po-required-date-hint {
    color: var(--muted);
    font-size: 13px;
    margin: 6px 0 16px;
}

.meta-item strong {
    display: block;
    font-size: 14px;
    overflow-wrap: anywhere;
}

.contract-table-card {
    padding: 20px;
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.contract-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

.contract-table .col-code {
    width: 190px;
}

.contract-table .col-name {
    width: auto;
}

.contract-table .col-unit {
    width: 90px;
}

.contract-table .col-qty {
    width: 120px;
}

.contract-table th,
.contract-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.contract-table th:last-child,
.contract-table td:last-child {
    border-right: 0;
}

.contract-table tbody tr:last-child td {
    border-bottom: 0;
}

.contract-table th {
    background: #f0f2f4;
    font-size: 13px;
    white-space: nowrap;
}

.contract-table td:nth-child(2) {
    white-space: normal;
    overflow-wrap: anywhere;
}

.contract-table td:nth-child(3),
.contract-table td:nth-child(4) {
    white-space: nowrap;
}

.empty-row td {
    height: 120px;
    text-align: center;
    vertical-align: middle;
    color: #8a949e;
    background: #fbfcfd;
}

@media (max-width: 1100px) {
    .contract-meta {
        grid-template-columns: 1fr 1fr;
    }

    .meta-file {
        grid-column: 1 / -1;
    }
}

/* 請購單 - 階段 A 選擇品項結果表格（視覺比照契約標單搜尋表格，獨立命名避免共用 .contract-table 的欄位序規則） */
.po-select-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

.po-select-table .col-check {
    width: 44px;
}

.po-select-table th,
.po-select-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    border-right: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.po-select-table th:last-child,
.po-select-table td:last-child {
    border-right: 0;
}

.po-select-table tbody tr:last-child td {
    border-bottom: 0;
}

.po-select-table th {
    background: #f0f2f4;
    font-size: 13px;
    white-space: nowrap;
}

.po-select-table td.col-check {
    text-align: center;
}

/* Batch A #1：放大可點擊範圍——只在這個儲存格裡真的有 checkbox（正式 item 列）
   時才加大 padding／給 pointer 游標，分類列的空白 col-check 不受影響。 */
.po-select-table td.col-check.has-checkbox {
    padding: 14px 12px;
    cursor: pointer;
}

/* Batch A #1：Stage A 正式 item checkbox 本體放大（原生預設約 13px 太小），
   只影響視覺大小與可點擊範圍，不改 selectedPurchaseItems 邏輯。 */
.po-item-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    vertical-align: middle;
}

.po-select-table td.col-name {
    white-space: normal;
    overflow-wrap: anywhere;
}

.po-select-table td.col-unit,
.po-select-table td.col-qty {
    white-space: nowrap;
}

/* 請購單 - 階段 A 右側「已選擇品項」面板的取消欄 */
.po-select-table .col-action {
    width: 64px;
}

.po-select-table td.col-action {
    text-align: center;
    white-space: nowrap;
}

/* 請購單 - 階段 A 桌機優先雙欄佈局：左側搜尋/Tree，右側已選擇品項面板。
   這裡改成「穩定工作區高度」：整個 layout 給一個固定高度（以 1920x1080 桌機視窗
   為基準抓的可用高度），不會因為左側搜尋結果變多、Tree 展開很多品項而跟著長高；
   左右兩欄的內部各自分區 overflow-y:auto，只在區塊內部捲動。 */
.purchase-select-layout {
    display: grid;
    grid-template-columns: minmax(0, 62%) minmax(0, 38%);
    gap: 20px;
    align-items: stretch;
    height: calc(100vh - 250px);
    min-height: 480px;
}

.purchase-select-main {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 搜尋控制列固定高度，不跟著伸縮 */
.purchase-select-main > .contract-search-tools {
    flex: 0 0 auto;
}

/* 搜尋結果清單（由 JS 動態插入的 #purchase-search-results-host）本身已用行內樣式
   設定 max-height:320px + overflow-y:auto，這裡只需要讓它在 flex 直向排列中維持
   自己的高度，不要被拉伸，也不要把 Tree 區擠不見。 */
#purchase-search-results-host {
    flex: 0 0 auto;
}

/* Contract Tree 區：給穩定、可捲動的高度，展開再多兄弟/子分類/正式品項都只在這個
   區塊內垂直捲動，不會把整個頁面往下撐長，右側 panel 高度也不受影響。 */
.purchase-tree-wrap {
    flex: 1 1 auto;
    min-height: 160px;
    overflow-y: auto;
}

.purchase-tree-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

/* panel 本身改為直向 flex：標題／筆數固定在上，已選清單區用 flex:1 撐滿
   grid 撐出的高度並可內部 scroll，「開始填寫」自然被推到最下方。 */
.purchase-select-panel {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: calc(var(--header-height) + 20px);
    min-width: 0;
    min-height: 0;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.purchase-select-panel h3 {
    margin: 0 0 6px;
    font-size: 16px;
    flex: 0 0 auto;
}

.purchase-select-panel > strong {
    display: block;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
    flex: 0 0 auto;
}

.purchase-selected-list-wrap {
    flex: 1 1 auto;
    min-height: 120px;
    overflow-y: auto;
}

.purchase-selected-list-wrap .po-select-table {
    min-width: 0;
}

.purchase-selected-list-wrap .btn {
    min-height: 30px;
    padding: 4px 10px;
    font-size: 12px;
}

.purchase-select-panel-actions {
    flex: 0 0 auto;
    margin-top: 12px;
}

.purchase-select-panel-actions .btn {
    width: 100%;
}

@media (max-width: 1100px) {
    .purchase-select-layout {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }

    .purchase-select-main {
        height: auto;
    }

    .purchase-tree-wrap {
        max-height: 55vh;
    }

    .purchase-select-panel {
        position: static;
        height: auto;
    }

    .purchase-selected-list-wrap {
        flex: 1 1 auto;
        max-height: 55vh;
    }
}

/* 搜尋列尺寸統一：請購頁（.po-search-tools）與契約標單頁（.contract-search-tools）
   共用同一組尺寸規則，input 高度統一約 38px、寬度一致，搜尋/清除按鈕透過既有
   .btn { min-height: 38px } 自然對齊同高。只改 CSS 選取器範圍，不新增任何 class，
   不動 HTML 結構、不動搜尋功能本身。 */
.po-search-tools,
.contract-search-tools {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

#purchase-item-search-input,
#contract-search-input {
    min-width: 360px;
    height: 38px;
    padding: 0 10px;
}

/* 請購單 - 階段 B 正式填寫表單，外觀比照 Excel 母版「請購單」 */
.po-form {
    background: #ffffff;
    border: 1px solid #4a4a4a;
    border-radius: 4px;
    overflow: hidden;
}

.po-form-header {
    border-bottom: 2px solid #4a4a4a;
}

.po-form-company {
    padding: 10px;
    border-bottom: 1px solid #4a4a4a;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.po-form-title {
    padding: 8px;
    border-bottom: 1px solid #4a4a4a;
    text-align: center;
    font-size: 17px;
    font-weight: 700;
}

.po-form-row {
    display: flex;
    border-bottom: 1px solid #4a4a4a;
}

.po-form-row:last-child {
    border-bottom: none;
}

.po-form-cell {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border-right: 1px solid #4a4a4a;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.po-form-cell:last-child {
    border-right: none;
}

.po-form-cell input[type="date"] {
    padding: 3px 6px;
    border: 1px solid #c7ccd1;
    border-radius: 4px;
    font: inherit;
}

/* 新增的工地地址／請購單號／收件人資訊：改為可編輯欄位但外觀盡量融入 Excel 請購單，
   不做成大型 Web Form，預設一條細邊框，focus 時才明顯提示。 */
.po-form-cell .po-inline-input {
    flex: 1 1 160px;
    min-width: 90px;
    padding: 3px 6px;
    border: 1px solid #c7ccd1;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    color: inherit;
}

.po-form-cell .po-inline-input:hover {
    border-color: #9fb3d6;
}

.po-form-cell .po-inline-input:focus {
    outline: 2px solid #2f6fed;
    outline-offset: -1px;
    background: #eef4ff;
    border-color: #2f6fed;
}

/* 新增的日期欄位可點提示（請購日期、每列進場需求日期共用）：
   放大並改成藍色系的 calendar icon，讓使用者一眼就知道可以點；
   實際「點輸入框任何地方都能開啟日曆」的行為由 app.js 的 showPicker() 提供，
   這裡純粹是視覺提示，不影響 date input 原本的表格外觀。 */
.po-form input[type="date"] {
    cursor: pointer;
}

.po-form input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 3px;
    margin-left: 4px;
    border-radius: 4px;
    opacity: 1;
    filter: invert(38%) sepia(93%) saturate(1352%) hue-rotate(202deg) brightness(94%) contrast(93%);
    transition: background-color .15s ease;
}

.po-form input[type="date"]:hover::-webkit-calendar-picker-indicator,
.po-form input[type="date"]:focus::-webkit-calendar-picker-indicator {
    background-color: rgba(47, 111, 237, .14);
}

.po-form-table-wrap {
    border: none;
    border-radius: 0;
}

.po-table {
    width: 100%;
    min-width: 1420px;
    border-collapse: collapse;
    table-layout: fixed;
    background: #fff;
}

.po-table th,
.po-table td {
    border: 1px solid #4a4a4a;
    padding: 6px 8px;
    text-align: center;
    vertical-align: middle;
    font-size: 13px;
}

.po-table thead th {
    background: #f4f5f6;
    font-weight: 700;
    line-height: 1.35;
}

.po-table td.po-cell-name {
    text-align: left;
    overflow-wrap: anywhere;
}

.po-table td.po-cell-aux {
    color: #8a949e;
}

.po-table tbody tr {
    height: 46px;
}

.po-table input {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    font: inherit;
    text-align: inherit;
    padding: 4px;
}

.po-table input:focus {
    outline: 2px solid #2f6fed;
    outline-offset: -2px;
    background: #eef4ff;
}

.po-table input[type="number"] {
    text-align: center;
}

/* 新增的可編輯欄位辨識（本次請購數量／進場需求日期／出貨廠商／備註說明／廠牌）：
   cell padding 縮到最小讓 input 幾乎填滿整個 cell 的寬高，點 cell 內大部分區域都能
   直接 focus 到 input；同時給一個非常輕微的底色與邊框，跟唯讀欄位（維持原本 6px 8px
   padding、無底色的純文字）明顯區分開來，但不會破壞整張表格的 Excel 外觀。 */
.po-table td.po-cell-editable {
    padding: 2px;
    background: #fbfcff;
}

.po-table td.po-cell-editable:hover {
    background: #f2f6ff;
}

.po-table td.po-cell-editable input {
    /* 表格儲存格內的子元素用 height:100% 在部分瀏覽器無法正確解析（常見的 CSS 表格排版
       限制），這裡改用固定 px（配合 .po-table tbody tr 的 46px 列高與這裡 2px 的
       cell padding）讓 input 確實撐滿可用高度，而不是縮成瀏覽器預設的輸入框高度。 */
    height: 42px;
    border: 1px solid #dbe4f3;
    border-radius: 3px;
    background: #fff;
}

.po-table td.po-cell-editable input:hover {
    border-color: #b9c9ea;
}

.po-col-no { width: 50px; }
.po-col-code { width: 110px; }
.po-col-name { width: 240px; }
.po-col-brand { width: 90px; }
.po-col-unit { width: 60px; }
.po-col-qty { width: 95px; }
.po-col-date { width: 130px; }
.po-col-supplier { width: 110px; }
.po-col-note { width: 150px; }

/* 新增的超量請購紅色警示：只在真的超量（remainingQuantity < 0）的列加上淺紅底色，
   結餘欄位文字改紅色粗體，數字本身照實顯示負值，不改成 0、不擋輸入。這裡是「整列」
   的警示色，跟 Stage A 搜尋命中反黃（只反黃命中文字，不整列變色）是兩件不同的事。 */
.po-table tbody tr.po-row-over-purchase {
    background: #fdecea;
}

.po-table tbody tr.po-row-over-purchase td.po-cell-editable {
    background: #fbe4e2;
}

.po-table tbody tr.po-row-over-purchase td.po-cell-editable:hover {
    background: #f8d7d4;
}

.po-table td.po-cell-over-purchase {
    color: #c0392b;
    font-weight: 700;
}

/* 新增的超量請購確認視窗：按「檢查請購內容」時，若有超量列會跳出這個確認視窗，
   列出品項／目前可請購量／本次請購量／超出量，「返回修改」單純關閉視窗，
   「確認超量請購」才會把 currentPurchaseOrder.overPurchaseConfirmed 設為 true。 */
.po-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.po-modal {
    width: min(720px, 92vw);
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, .25);
}

.po-modal-title {
    margin: 0 0 8px;
    font-size: 17px;
    color: #c0392b;
}

.po-modal-desc {
    margin: 0 0 14px;
    font-size: 14px;
    color: #4b5563;
}

.po-overpurchase-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 18px;
    font-size: 13px;
}

.po-overpurchase-table th,
.po-overpurchase-table td {
    border: 1px solid #e5e9ef;
    padding: 8px 10px;
    text-align: center;
}

.po-overpurchase-table th {
    background: #f5f6f8;
}

.po-overpurchase-excess {
    color: #c0392b;
    font-weight: 700;
}

.po-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}


/* ===== 數量管制總表 UI v1（不影響請購單 FIX 7 匯出） ===== */
.quantity-control-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    padding: 18px 20px 20px;
}

.quantity-control-header,
.quantity-control-search-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.quantity-control-header {
    align-items: flex-start;
    margin-bottom: 14px;
}

.quantity-control-header h2 {
    margin: 0 0 5px;
    font-size: 20px;
}

.quantity-control-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.quantity-control-tree-actions,
.quantity-control-search-tools,
.quantity-control-search-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-control-search-row {
    padding: 12px 0 14px;
    border-top: 1px solid #edf0f2;
}

.quantity-control-search-tools {
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: wrap;
}

.quantity-control-search-nav {
    margin-left: 4px;
    padding-left: 10px;
    border-left: 1px solid #e1e5ea;
}

#quantity-control-search-input {
    width: min(560px, 100%);
    min-height: 38px;
    padding: 8px 11px;
    border: 1px solid #cfd6dd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

#quantity-control-search-input:focus {
    border-color: #69747f;
    box-shadow: 0 0 0 2px rgba(55, 65, 81, .08);
}

.btn-compact {
    min-height: 34px;
    padding: 6px 10px;
}

#quantity-control-search-count {
    min-width: 72px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
}

.quantity-control-table-wrap {
    width: 100%;
    max-height: calc(100vh - 250px);
    overflow: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
}

.quantity-control-table {
    width: 100%;
    min-width: 1380px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: #fff;
}

.quantity-control-table .qc-col-code { width: 150px; }
.quantity-control-table .qc-col-name { width: 360px; }
.quantity-control-table .qc-col-unit { width: 70px; }
.quantity-control-table .qc-col-number { width: 120px; }
.quantity-control-table .qc-col-status { width: 150px; }

.quantity-control-table th,
.quantity-control-table td {
    min-height: 42px;
    padding: 9px 10px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    font-size: 13px;
}

.quantity-control-table th:last-child,
.quantity-control-table td:last-child { border-right: 0; }
.quantity-control-table tbody tr:last-child td { border-bottom: 0; }

.quantity-control-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #eef1f4;
    font-weight: 700;
    white-space: nowrap;
    text-align: center;
}

.quantity-control-table td:first-child,
.quantity-control-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}

.quantity-control-table td:nth-child(2),
.quantity-control-table th:nth-child(2) {
    position: sticky;
    left: 150px;
    z-index: 2;
    background: #fff;
}

.quantity-control-table thead th:first-child,
.quantity-control-table thead th:nth-child(2) {
    z-index: 5;
    background: #eef1f4;
}

.quantity-control-table .qc-category-row td {
    background: #f7f8fa;
    font-weight: 700;
    color: #46515c;
}

.quantity-control-table .qc-category-row td:first-child,
.quantity-control-table .qc-category-row td:nth-child(2) {
    background: #f7f8fa;
}

.qc-tree-toggle {
    width: 24px;
    height: 24px;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
    font-size: 12px;
}

.qc-tree-toggle:hover { background: #e9edf1; }
.qc-number-cell { text-align: right; font-variant-numeric: tabular-nums; }
.qc-negative { color: #b42318; font-weight: 700; }
.quantity-control-table .qc-search-focused td { background: #fff8dd; }
.quantity-control-table .qc-search-focused td:first-child,
.quantity-control-table .qc-search-focused td:nth-child(2) { background: #fff8dd; }

#nav-quantity-control { cursor: pointer; }

@media (max-width: 1100px) {
    .quantity-control-header,
    .quantity-control-search-row {
        align-items: stretch;
        flex-direction: column;
    }

    .quantity-control-tree-actions,
    .quantity-control-search-nav {
        justify-content: flex-start;
    }

    .quantity-control-search-nav {
        margin-left: 0;
        padding-left: 0;
        border-left: 0;
    }
}

/* === STEP 3-C DRAWING QUANTITY UI STYLES START === */
.drawing-workspace{padding:4px 0 28px}
.drawing-page-head{display:flex;justify-content:space-between;gap:24px;margin-bottom:18px}
.drawing-page-head h2{margin:4px 0 8px;font-size:28px}
.drawing-page-head p{margin:0;color:#667085;line-height:1.6}
.drawing-eyebrow{font-size:12px;font-weight:800;letter-spacing:.12em;color:#667085}
.drawing-status-pill{display:inline-flex;align-items:center;gap:8px;padding:9px 13px;border:1px solid #d0d5dd;border-radius:999px;background:#fff;color:#475467;font-size:13px;font-weight:700}
.drawing-status-dot{width:8px;height:8px;border-radius:50%;background:#98a2b3}
.drawing-status-pill.is-ok .drawing-status-dot{background:#12b76a}
.drawing-status-pill.is-warning .drawing-status-dot{background:#f79009}
.drawing-status-pill.is-busy .drawing-status-dot{background:#2e90fa}

.drawing-card{margin-bottom:16px;padding:18px;border:1px solid #e4e7ec;border-radius:14px;background:#fff}
.drawing-card-head{display:flex;justify-content:space-between;gap:20px;margin-bottom:16px}
.drawing-card-head h3{margin:0 0 5px;font-size:18px}
.drawing-card-head p{margin:0;color:#667085;font-size:13px;line-height:1.55}
.drawing-tag{display:inline-flex;padding:5px 8px;border-radius:6px;background:#f2f4f7;color:#475467;font-size:11px;font-weight:800}
.drawing-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.drawing-form-grid-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.drawing-field{display:flex;flex-direction:column;gap:7px}
.drawing-field-wide{grid-column:1/-1}
.drawing-field>span{color:#344054;font-size:13px;font-weight:700}
.drawing-field input{width:100%;box-sizing:border-box;border:1px solid #d0d5dd;border-radius:8px;background:#fff;padding:10px 11px;font:inherit}
.drawing-file-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
.drawing-auto-rule{margin-top:14px;padding:10px 12px;border:1px solid #dbe3ef;border-radius:9px;background:#f8fafc;color:#475467;font-size:12px}
.drawing-action-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:16px}
.drawing-helper-text{color:#667085;font-size:12px}

.drawing-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.drawing-summary-card{padding:16px;border:1px solid #e4e7ec;border-radius:12px;background:#fff}
.drawing-summary-card span,.drawing-summary-card small{display:block;color:#667085}
.drawing-summary-card strong{display:block;margin:7px 0 3px;font-size:24px;color:#101828}
.drawing-detected-card{margin-bottom:16px;padding:11px 13px;border:1px solid #b2ddff;border-radius:10px;background:#eff8ff;color:#175cd3;font-size:12px}
.drawing-preview-tools{display:flex;align-items:center;gap:10px}
.drawing-preview-check{display:inline-flex;align-items:center;gap:6px;color:#475467;font-size:12px}

.drawing-table-wrap{overflow:auto;max-height:620px;border:1px solid #eaecf0;border-radius:10px}
.drawing-table{width:100%;border-collapse:collapse;min-width:1160px}
.drawing-table th,.drawing-table td{padding:10px 11px;border-bottom:1px solid #eaecf0;text-align:left}
.drawing-table th{position:sticky;top:0;z-index:1;background:#f9fafb;color:#475467;font-size:12px;font-weight:800}
.drawing-table td{font-size:12px;color:#344054}
.drawing-number-cell{text-align:right!important;font-variant-numeric:tabular-nums}
.drawing-empty-row td{padding:38px 18px;text-align:center}
.drawing-empty-row strong,.drawing-empty-row span{display:block}
.drawing-commercial-warning{background:#fff7ed}
.drawing-match-warning{box-shadow:inset 4px 0 0 #f79009}
.drawing-noncommit-note{margin-top:12px;color:#667085;font-size:12px}
.drawing-layer-chip-list{display:flex;flex-wrap:wrap;gap:8px}
.drawing-layer-chip{padding:7px 10px;border:1px solid #d0d5dd;border-radius:999px;background:#f9fafb;color:#344054;font-size:12px;font-weight:700}
.drawing-layer-empty{color:#98a2b3;font-size:13px}

@media(max-width:1100px){.drawing-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.drawing-form-grid-three{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.drawing-form-grid,.drawing-form-grid-three,.drawing-summary-grid{grid-template-columns:1fr}.drawing-page-head{flex-direction:column}}
/* === STEP 3-C DRAWING QUANTITY UI STYLES END === */


/* === STEP 3-D DRAWING CONFIRM IMPORT STYLES === */
.drawing-current-revision-badge {
    margin: -4px 0 14px;
    padding: 9px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: #f9fafb;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
}
#drawing-confirm-import-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}
/* === END STEP 3-D DRAWING CONFIRM IMPORT STYLES === */
/* STEP 3-D.2 - keep parser status node, hide visual pill */
#drawing-import-state-pill {
    display: none !important;
}

/* === STEP 3-D.3 MANUAL UNMATCHED RESOLUTION STYLES === */
.drawing-manual-resolution {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 190px;
}
.drawing-manual-resolution-select,
.drawing-manual-map-search,
.drawing-manual-map-candidates {
    width: 100%;
    min-height: 30px;
    border: 1px solid #cfd5df;
    border-radius: 6px;
    background: #fff;
    color: #252b36;
    font: inherit;
}
.drawing-manual-resolution-detail,
.drawing-manual-map-hint {
    font-size: 11px;
    line-height: 1.4;
    color: #667085;
}
.drawing-manual-map-panel {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto;
    gap: 5px;
    padding-top: 4px;
}
.drawing-manual-map-candidates,
.drawing-manual-map-hint {
    grid-column: 1 / -1;
}
.drawing-manual-mini-button {
    min-height: 30px;
    padding: 0 9px;
    border: 1px solid #b8c0cc;
    border-radius: 6px;
    background: #f7f8fa;
    cursor: pointer;
}
.drawing-manual-mini-button:disabled {
    opacity: .5;
    cursor: not-allowed;
}
.drawing-manual-ignored {
    opacity: .55;
}
/* === END STEP 3-D.3 MANUAL UNMATCHED RESOLUTION STYLES === */


/* === STEP 4-D2 Purchase History Edit / Soft Delete === */
.purchase-history-card {
    background: #fff;
    border: 1px solid #c7ccd3;
    border-radius: 4px;
    padding: 16px;
}

.purchase-history-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.purchase-history-header h2 {
    margin: 0 0 6px;
}

.purchase-history-header p {
    margin: 0;
    color: #5b6470;
}

.purchase-history-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

#purchase-history-status {
    color: #59636f;
    font-size: 13px;
}

.purchase-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.purchase-history-table th,
.purchase-history-table td {
    border: 1px solid #c7ccd3;
    padding: 8px 10px;
    text-align: left;
    vertical-align: middle;
}

.purchase-history-table th {
    background: #f0f2f4;
    font-weight: 700;
}

.purchase-history-row {
    cursor: pointer;
}

.purchase-history-row:hover,
.purchase-history-row:focus {
    background: #eef4fb;
    outline: none;
}

.purchase-history-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 10px 14px;
    margin-bottom: 16px;
}

.purchase-history-meta-item {
    border: 1px solid #d5d9de;
    background: #f8f9fa;
    padding: 9px 10px;
}

.purchase-history-meta-item span {
    display: block;
    color: #66707c;
    font-size: 12px;
    margin-bottom: 3px;
}

.purchase-history-meta-item strong {
    display: block;
    word-break: break-word;
}

.purchase-history-error {
    color: #b42318;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .purchase-history-meta {
        grid-template-columns: 1fr 1fr;
    }
}


.purchase-history-table-wrap-wide {
    overflow-x: auto;
}

.purchase-history-operation-cell {
    white-space: nowrap;
}

.purchase-history-mini-button {
    min-width: 54px;
    margin-right: 6px;
    padding: 5px 8px;
    font-size: 12px;
}

.btn-danger,
.purchase-history-delete-button {
    background: #b42318;
    border-color: #b42318;
    color: #fff;
}

.btn-danger:hover,
.purchase-history-delete-button:hover {
    background: #912018;
    border-color: #912018;
}

.purchase-history-meta-item input,
.purchase-history-meta-item textarea,
.purchase-history-table input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #aeb6c0;
    border-radius: 3px;
    padding: 6px 7px;
    font: inherit;
    background: #fff;
}

.purchase-history-meta-item textarea {
    min-height: 58px;
    resize: vertical;
}

.purchase-history-editing .purchase-history-meta-item {
    background: #fffdf5;
}

.purchase-history-save-status {
    margin: 10px 0 0;
    font-size: 13px;
}

.purchase-history-save-status.error {
    color: #b42318;
    font-weight: 700;
}

.purchase-history-save-status.success {
    color: #137333;
    font-weight: 700;
}


/* STEP 4-E2 - status filter + purchase item dialogs */
.quantity-control-status-filter {
    min-height: 38px;
    min-width: 190px;
    padding: 7px 34px 7px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
}
.quantity-control-status-filter:focus {
    outline: none;
    border-color: #69747f;
    box-shadow: 0 0 0 2px rgba(55,65,81,.08);
}
.qc-purchase-new-item-row td { background: #fffdf5; }
.qc-purchase-new-item-row td:nth-child(2) { font-weight: 700; }
.purchase-item-dialog-backdrop {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px; background: rgba(15,23,42,.42);
}
.purchase-item-dialog {
    width: min(760px, 96vw); max-height: 88vh; overflow: auto;
    background: #fff; border-radius: 12px; box-shadow: 0 24px 70px rgba(15,23,42,.28);
    padding: 22px;
}
.purchase-item-dialog h3 { margin: 0 0 6px; }
.purchase-item-dialog .dialog-note { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.purchase-item-dialog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.purchase-item-dialog-field { display: flex; flex-direction: column; gap: 5px; }
.purchase-item-dialog-field.is-wide { grid-column: 1 / -1; }
.purchase-item-dialog-field label { font-size: 12px; font-weight: 700; color: #475467; }
.purchase-item-dialog-field input,
.purchase-item-dialog-field select { min-height: 38px; border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; }
.purchase-item-dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.purchase-existing-results { margin-top: 12px; border: 1px solid var(--border); border-radius: 8px; overflow: auto; max-height: 360px; }
.purchase-existing-result { width: 100%; display: grid; grid-template-columns: 150px 1fr 70px; gap: 10px; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: #fff; text-align: left; cursor: pointer; }
.purchase-existing-result:last-child { border-bottom: 0; }
.purchase-existing-result:hover { background: #f8fafc; }
.purchase-existing-result strong { font-size: 13px; }
.purchase-existing-result span { font-size: 13px; color: #475467; }
@media (max-width: 760px) { .purchase-item-dialog-grid { grid-template-columns: 1fr; } .purchase-item-dialog-field.is-wide { grid-column: auto; } }


/* STEP 4-E3 - 統一新增品項：標單葉節點 / 父層新增項目共用同一視窗 */
.quantity-control-status-filter-label {
    font-size: 13px;
    font-weight: 700;
    color: #475467;
    white-space: nowrap;
    align-self: center;
    margin-left: 4px;
}
.purchase-item-dialog-unified { width: min(1100px, 96vw); }
.purchase-unified-search-row { display: flex; gap: 8px; margin: 12px 0; }
.purchase-unified-search-row input { flex: 1; min-height: 38px; border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; }
.purchase-unified-body { display: grid; grid-template-columns: minmax(430px, 1.15fr) minmax(320px, .85fr); gap: 14px; min-height: 460px; }
.purchase-unified-tree-panel, .purchase-unified-detail-panel { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: hidden; }
.purchase-unified-tree { max-height: 58vh; overflow: auto; padding: 6px; }
.purchase-unified-tree-row { display: grid; grid-template-columns: 24px 24px minmax(120px, 170px) 1fr 70px; align-items: center; gap: 5px; min-height: 32px; border-bottom: 1px solid #eef1f4; font-size: 13px; }
.purchase-unified-tree-row:hover { background: #f8fafc; }
.purchase-unified-tree-row.is-category { font-weight: 700; }
.purchase-unified-toggle { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.purchase-unified-toggle-spacer { width: 22px; }
.purchase-unified-code { white-space: nowrap; }
.purchase-unified-name { min-width: 0; }
.purchase-unified-unit { text-align: center; color: #667085; }
.purchase-unified-detail-panel { padding: 14px; overflow: auto; }
.purchase-unified-selection-title { font-weight: 700; margin-bottom: 12px; line-height: 1.45; }
.purchase-unified-existing-summary { padding: 12px; border: 1px solid var(--border); border-radius: 7px; background: #f8fafc; line-height: 1.5; }
.purchase-unified-new-fields { margin-top: 8px; }
.purchase-unified-empty { padding: 18px; color: var(--muted); text-align: center; }
.purchase-selected-new-item td { background: #fffdf5; }
@media (max-width: 900px) {
    .purchase-unified-body { grid-template-columns: 1fr; }
    .purchase-unified-tree { max-height: 42vh; }
}

/* === STEP 4-F3C3B INTERACTIVE CURSOR STANDARD START === */

/* 真正可操作的控制元件，一律顯示手指。 */
.nav-item:not(.nav-disabled),
.purchase-subitem,
button:not(:disabled),
select:not(:disabled),
input[type="checkbox"]:not(:disabled),
input[type="radio"]:not(:disabled),
.qc-tree-toggle,
[role="button"]:not([aria-disabled="true"]) {
    cursor: pointer;
}

/* 尚未建置 / disabled，一律顯示不可操作。 */
.nav-item.nav-disabled,
button:disabled,
select:disabled,
input[type="checkbox"]:disabled,
input[type="radio"]:disabled,
[aria-disabled="true"] {
    cursor: not-allowed;
}

/* 非契約總表空白狀態正式樣式。 */
.non-contract-quantity-control-placeholder {
    padding: 28px 16px;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
}

/* === STEP 4-F3C3B INTERACTIVE CURSOR STANDARD END === */
/* === STEP 4-G1 INSPECTION IDENTITY WINDOWS === */
.inspection-upload-section { width: 100%; }
.inspection-page-header { margin-bottom: 16px; }
.inspection-page-header h2 { margin: 0 0 6px; }
.inspection-page-header p { margin: 0; color: #64748b; }

.inspection-upload-card,
.inspection-history-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 16px;
}

.inspection-upload-grid {
    display: grid;
    grid-template-columns: minmax(190px,1fr) minmax(170px,.7fr) minmax(260px,1.4fr);
    gap: 14px;
    align-items: end;
}

.inspection-upload-grid label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.inspection-upload-grid input { min-height: 38px; }
.inspection-note-field { grid-column: 1 / -1; }

.inspection-upload-actions,
.inspection-history-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.inspection-history-header { justify-content: space-between; }
.inspection-upload-status { color: #64748b; font-size: 13px; }
.inspection-table-wrap { overflow-x: auto; }

.inspection-history-table {
    width: 100%;
    border-collapse: collapse;
}

.inspection-history-table th,
.inspection-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .inspection-upload-grid { grid-template-columns: 1fr; }
    .inspection-note-field { grid-column: auto; }
}


/* === STEP 4-G1A INSPECTION NUMBER SEGMENTS START === */
.inspection-number-field {
    margin-bottom: 16px;
}

.inspection-field-label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.inspection-number-editor {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.inspection-segment {
    min-height: 38px;
    text-align: center;
    font-weight: 600;
    box-sizing: border-box;
}

.inspection-segment.fixed { width: 48px; }
.inspection-segment.separator { width: 36px; background: #f8fafc; color: #64748b; }
.inspection-segment.code { width: 105px; }
.inspection-segment.subcode { width: 82px; }
.inspection-segment.kind { width: 74px; }
.inspection-segment.submission { width: 94px; }
.inspection-segment.roc-date { width: 118px; }
.inspection-segment.serial { width: 76px; }

.inspection-number-preview-row {
    display: grid;
    grid-template-columns: 92px minmax(280px, 520px);
    gap: 8px;
    align-items: center;
    margin-top: 9px;
}

.inspection-number-preview-row span {
    font-size: 13px;
    color: #64748b;
}

.inspection-number-preview-row input {
    min-height: 38px;
    font-weight: 700;
    letter-spacing: .3px;
    background: #f8fafc;
}

.inspection-field-help {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 12px;
    font-weight: 400;
}

.inspection-upload-grid-g1a {
    grid-template-columns: minmax(190px,.8fr) minmax(260px,1.2fr);
}

.inspection-upload-grid-g1a .inspection-note-field {
    grid-column: 1 / -1;
}

@media (max-width: 1000px) {
    .inspection-number-editor { align-items: stretch; }
    .inspection-number-preview-row { grid-template-columns: 1fr; }
    .inspection-upload-grid-g1a { grid-template-columns: 1fr; }
    .inspection-upload-grid-g1a .inspection-note-field { grid-column: auto; }
}
/* === STEP 4-G1A INSPECTION NUMBER SEGMENTS END === */
/* === FRONTEND SLIM PASS: pending + account workspace canonical styles === */
#quantity-control-new-item-panel-v1e2 {
    margin: 10px 0;
    border: 1px solid rgba(180, 83, 9, 0.22);
    border-radius: 10px;
    background: rgba(255, 251, 245, 0.32);
    overflow: hidden;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-header {
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:9px 11px; background:rgba(255,247,237,0.36);
    border-bottom:1px solid rgba(251,146,60,0.16); cursor:pointer; user-select:none;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-title-wrap {
    display:flex; align-items:center; gap:10px; min-width:0;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-badge {
    display:inline-flex; align-items:center; justify-content:center;
    min-width:28px; height:23px; padding:0 8px; border-radius:999px;
    background:rgba(194,65,12,0.82); color:#fff; font-size:11px; font-weight:800;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-title {
    color:#7c3a12; font-size:14px; font-weight:800;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-note {
    color:rgba(124,58,18,0.72); font-size:11px; font-weight:600;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-toggle {
    border:1px solid rgba(194,65,12,0.35);
    background:rgba(255,255,255,0.78);
    color:#8a3d12;
    border-radius:6px;
    padding:4px 8px;
    font-size:11px;
    font-weight:700;
    cursor:pointer;
}
#quantity-control-new-item-panel-v1e2.is-collapsed .qc-new-item-body {
    display:none;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-body {
    overflow-x:auto;
}
#quantity-control-new-item-panel-v1e2 table {
    width:100%;
    min-width:980px;
    border-collapse:collapse;
    background:#fff;
}
#quantity-control-new-item-panel-v1e2 th {
    padding:9px 10px;
    background:rgba(255,250,244,0.45);
    color:#74401f;
    border-bottom:1px solid rgba(251,146,60,0.14);
    font-size:12px;
    font-weight:800;
    text-align:center;
    white-space:nowrap;
}
#quantity-control-new-item-panel-v1e2 td {
    padding:9px 10px;
    border-bottom:1px solid rgba(251,146,60,0.10);
    font-size:13px;
    vertical-align:middle;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-code {
    color:#b45309;
    font-weight:800;
    white-space:nowrap;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-name {
    color:#431407;
    font-weight:700;
    min-width:280px;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-number {
    text-align:right;
    font-variant-numeric:tabular-nums;
    font-weight:800;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-material {
    color:#9a4a18;
    background:rgba(255,247,237,0.28);
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-status {
    text-align:center;
}
#quantity-control-new-item-panel-v1e2 .qc-new-item-status span {
    display:inline-block;
    padding:4px 8px;
    border-radius:999px;
    background:rgba(194,65,12,0.76);
    color:#fff;
    font-weight:900;
    font-size:12px;
    white-space:nowrap;
}

#account-mapping-section-v1e21 {
    display:none;
    padding:18px;
}
#account-mapping-section-v1e21.is-visible {
    display:block;
}
#account-mapping-section-v1e21 .account-workspace-card {
    background:#fff;
    border:1px solid #d7dde5;
    border-radius:10px;
    padding:18px;
}
#account-mapping-section-v1e21 .account-workspace-title {
    font-size:20px;
    font-weight:800;
    margin-bottom:6px;
}
#account-mapping-section-v1e21 .account-workspace-subtitle {
    color:#667085;
    margin-bottom:18px;
}
#account-mapping-section-v1e21 .account-workspace-summary {
    display:inline-flex;
    align-items:center;
    gap:8px;
    padding:8px 12px;
    border-radius:8px;
    background:rgba(255,237,213,0.50);
    border:1px solid rgba(217,119,6,0.50);
    color:#9a3412;
    font-weight:800;
}
/* === FRONTEND SLIM PASS END === */
