.pcba-control-active {
    overflow: hidden;
    background: #f4f6fb;
}

.pcba-cc-fin {
    display: grid;
    gap: 14px;
}

.pcba-cc-fin-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.pcba-cc-fin-kpi {
    display: grid;
    gap: 6px;
    min-height: 96px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
    box-shadow: 0 8px 24px rgba(29, 41, 57, 0.06);
}

.pcba-cc-fin-kpi span,
.pcba-cc-fin-kpi small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-fin-kpi strong {
    color: var(--pcba-cc-text);
    font-size: 21px;
    line-height: 1.1;
}

.pcba-cc-fin-kpi--received strong,
.pcba-cc-fin-kpi--profit strong {
    color: #15803d;
}

.pcba-cc-fin-kpi--debt strong {
    color: #b45309;
}

.pcba-cc-fin-kpi--cost strong {
    color: #b42318;
}

.pcba-cc-fin-alerts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.pcba-cc-fin-alert {
    display: grid;
    gap: 3px;
    border: 1px solid #dde6f0;
    border-left: 4px solid #8aa0b8;
    border-radius: 8px;
    padding: 10px 12px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.pcba-cc-fin-alert--danger {
    border-left-color: #dc2626;
    background: #fff7f7;
}

.pcba-cc-fin-alert--warn {
    border-left-color: #d97706;
    background: #fffbeb;
}

.pcba-cc-fin-alert--ok {
    border-left-color: #16a34a;
    background: #f0fdf4;
    cursor: default;
}

.pcba-cc-fin-alert strong {
    font-size: 13px;
}

.pcba-cc-fin-alert span {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 700;
}

.pcba-cc-fin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-fin-tabs button,
.pcba-cc-fin-quick button,
.pcba-cc-fin-drawer__actions button {
    min-height: 34px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 12px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-fin-tabs button.is-active,
.pcba-cc-fin-quick button.is-active,
.pcba-cc-fin-drawer__actions .pcba-cc-fin-primary {
    border-color: var(--pcba-cc-primary);
    background: var(--pcba-cc-primary);
    color: #ffffff;
}

.pcba-cc-fin-filters {
    display: grid;
    gap: 10px;
}

.pcba-cc-fin-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pcba-cc-fin-quick b {
    margin-left: 4px;
    opacity: 0.72;
}

.pcba-cc-fin-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.6fr) repeat(5, minmax(120px, 1fr));
    gap: 8px;
}

.pcba-cc-fin-filter-grid label {
    display: grid;
    gap: 4px;
    min-width: 0;
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 900;
}

.pcba-cc-fin-filter-grid input,
.pcba-cc-fin-filter-grid select {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 12px;
}

.pcba-cc-fin-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 12px;
    align-items: start;
}

.pcba-cc-fin-results,
.pcba-cc-fin-drawer {
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(29, 41, 57, 0.06);
}

.pcba-cc-fin-results__head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-fin-results__head h3 {
    margin: 0;
    font-size: 16px;
}

.pcba-cc-fin-results__head small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-fin-table-wrap {
    overflow-x: auto;
}

.pcba-cc-fin-table {
    width: 100%;
    min-width: 860px;
    border-collapse: collapse;
}

.pcba-cc-fin-table th,
.pcba-cc-fin-table td {
    border-bottom: 1px solid #edf1f6;
    padding: 10px 12px;
    vertical-align: top;
    font-size: 12px;
    text-align: left;
}

.pcba-cc-fin-table th {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-fin-project-link {
    display: grid;
    gap: 2px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--pcba-cc-text);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.pcba-cc-fin-project-link strong {
    color: #244f9e;
    font-size: 12px;
}

.pcba-cc-fin-project-link span {
    max-width: 240px;
    overflow: hidden;
    color: var(--pcba-cc-text);
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-fin-money {
    white-space: nowrap;
}

.pcba-cc-fin-money--in,
.pcba-cc-fin-money--profit {
    color: #15803d;
}

.pcba-cc-fin-money--debt {
    color: #b45309;
}

.pcba-cc-fin-money--cost,
.pcba-cc-fin-money--loss {
    color: #b42318;
}

.pcba-cc-fin-money--over {
    color: #2563eb;
}

.pcba-cc-fin-badge,
.pcba-cc-fin-source,
.pcba-cc-fin-margin,
.pcba-cc-fin-warning {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 900;
    line-height: 1.2;
}

.pcba-cc-fin-badge--paid,
.pcba-cc-fin-margin--profit {
    background: #dcfce7;
    color: #15803d;
}

.pcba-cc-fin-badge--partial {
    background: #fef3c7;
    color: #b45309;
}

.pcba-cc-fin-badge--unpaid,
.pcba-cc-fin-badge--needs_check,
.pcba-cc-fin-margin--loss {
    background: #fee2e2;
    color: #b42318;
}

.pcba-cc-fin-badge--overpaid {
    background: #dbeafe;
    color: #2563eb;
}

.pcba-cc-fin-badge--no_value,
.pcba-cc-fin-margin--neutral,
.pcba-cc-fin-source {
    background: #eef2f7;
    color: #475569;
}

.pcba-cc-fin-row-warnings {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.pcba-cc-fin-warning--danger {
    background: #fee2e2;
    color: #b42318;
}

.pcba-cc-fin-warning--warn {
    background: #fef3c7;
    color: #b45309;
}

.pcba-cc-fin-warning--info {
    background: #dbeafe;
    color: #2563eb;
}

.pcba-cc-fin-empty {
    padding: 14px;
    color: var(--pcba-cc-muted);
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-fin-cost-breakdown {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-fin-cost-breakdown > div {
    display: grid;
    gap: 7px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    padding: 10px;
    background: #fbfdff;
}

.pcba-cc-fin-cost-breakdown span,
.pcba-cc-fin-drawer__costs span {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    color: var(--pcba-cc-text);
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-fin-cost-breakdown em,
.pcba-cc-fin-drawer__costs em {
    color: var(--pcba-cc-muted);
    font-size: 10px;
    font-style: normal;
}

.pcba-cc-fin-cost-breakdown b {
    font-size: 15px;
}

.pcba-cc-fin-cost-breakdown i {
    display: block;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e7edf5;
}

.pcba-cc-fin-cost-breakdown u {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pcba-cc-primary);
    text-decoration: none;
}

.pcba-cc-fin-drawer {
    position: sticky;
    top: 12px;
    display: grid;
    gap: 12px;
    padding: 12px;
}

.pcba-cc-fin-drawer__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.pcba-cc-fin-drawer__head h3 {
    margin: 2px 0;
    font-size: 16px;
}

.pcba-cc-fin-drawer__head strong {
    color: #244f9e;
    font-size: 12px;
}

.pcba-cc-fin-drawer__head span {
    color: var(--pcba-cc-muted);
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-fin-drawer__head button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
}

.pcba-cc-fin-drawer__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pcba-cc-fin-drawer__metrics .pcba-cc-summary__item {
    min-width: 0;
    border-radius: 8px;
    padding: 9px;
}

.pcba-cc-fin-drawer__warnings,
.pcba-cc-fin-drawer section,
.pcba-cc-fin-drawer__costs {
    display: grid;
    gap: 8px;
}

.pcba-cc-fin-drawer h4 {
    margin: 0;
    font-size: 13px;
}

.pcba-cc-fin-ledger-mini {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pcba-cc-fin-ledger-mini li,
.pcba-cc-fin-drawer__costs > div {
    display: grid;
    gap: 3px;
    border: 1px solid #edf1f6;
    border-radius: 8px;
    padding: 8px;
    background: #fbfdff;
}

.pcba-cc-fin-ledger-mini span,
.pcba-cc-fin-ledger-mini small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-fin-ledger-mini .is-in {
    color: #15803d;
}

.pcba-cc-fin-ledger-mini .is-out {
    color: #b42318;
}

.pcba-cc-fin-drawer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

@media (max-width: 1180px) {
    .pcba-cc-fin-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcba-cc-fin-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcba-cc-fin-main {
        grid-template-columns: minmax(0, 1fr);
    }

    .pcba-cc-fin-drawer {
        position: static;
    }
}

@media (max-width: 720px) {
    .pcba-cc-fin-kpis,
    .pcba-cc-fin-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .pcba-cc-fin-table {
        min-width: 760px;
    }

    .pcba-cc-fin-drawer__metrics {
        grid-template-columns: minmax(0, 1fr);
    }
}

.pcba-control-active .site-header,
.pcba-control-active #masthead,
.pcba-control-active .site-footer,
.pcba-control-active #colophon,
.pcba-control-active .entry-header,
.pcba-control-active .entry-title,
.pcba-control-active .storefront-handheld-footer-bar,
.pcba-control-active .wp-bottom-menu,
.pcba-control-active .mobile-bottom-menu,
.pcba-control-active .mobile-bottom-nav,
.pcba-control-active .bottom-mobile-menu,
.pcba-control-active .bottom-navigation,
.pcba-control-active .sticky-mobile-menu,
.pcba-control-active .footer-bar,
.pcba-control-active .bottom-bar,
.pcba-control-active .fixed-bottom,
.pcba-control-active .woocommerce-store-notice,
.pcba-control-active .wp-block-template-part {
    display: none !important;
}

.pcba-control-active .site,
.pcba-control-active .site-content,
.pcba-control-active .content-area,
.pcba-control-active .entry-content,
.pcba-control-active .ast-container,
.pcba-control-active .wp-site-blocks {
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pcba-control-active .entry-content > * {
    max-width: none !important;
}

.pcba-control-center,
.pcba-control-center *,
.pcba-control-center *::before,
.pcba-control-center *::after {
    box-sizing: border-box;
}

.pcba-control-center {
    --pcba-cc-bg: #f4f6fb;
    --pcba-cc-panel: #ffffff;
    --pcba-cc-sidebar: #172033;
    --pcba-cc-sidebar-soft: #222d45;
    --pcba-cc-text: #1b2434;
    --pcba-cc-muted: #687386;
    --pcba-cc-line: #dfe5ef;
    --pcba-cc-primary: #1f7a8c;
    --pcba-cc-primary-soft: #e5f4f6;
    --pcba-cc-green: #1f9d6a;
    --pcba-cc-orange: #c77700;
    --pcba-cc-red: #cf3f48;
    --pcba-cc-blue: #316ccf;
    --pcba-cc-shadow: 0 16px 44px rgba(29, 41, 57, 0.12);
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
    width: 100%;
    background: var(--pcba-cc-bg);
    color: var(--pcba-cc-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
    transition: grid-template-columns 180ms ease;
}

.pcba-control-center.is-sidebar-collapsed {
    grid-template-columns: 60px minmax(0, 1fr);
}

.pcba-cc-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
    min-height: 0;
    padding: 10px;
    background: var(--pcba-cc-sidebar);
    color: #f8fafc;
    z-index: 30;
}

.pcba-cc-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pcba-cc-brand .pcba-cc-account {
    flex: 1 1 auto;
    min-width: 0;
}

.pcba-cc-account {
    position: relative;
    min-width: 0;
}

.pcba-cc-account summary {
    list-style: none;
}

.pcba-cc-account summary::-webkit-details-marker {
    display: none;
}

.pcba-cc-user--trigger {
    width: 100%;
    border: 0;
    border-radius: 8px;
    padding: 2px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.pcba-cc-user--trigger:hover,
.pcba-cc-account[open] .pcba-cc-user--trigger {
    background: rgba(255, 255, 255, 0.08);
}

.pcba-cc-account__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 60;
    display: grid;
    min-width: 150px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: #202b41;
    box-shadow: 0 14px 32px rgba(5, 12, 24, 0.28);
}

.pcba-cc-account__menu a {
    border-radius: 6px;
    padding: 8px 10px;
    color: #e8eef7;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.pcba-cc-account__menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.pcba-cc-account--guest .pcba-cc-user__body a {
    width: max-content;
    max-width: 130px;
    overflow: hidden;
    color: #72d2de;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-account--guest .pcba-cc-user__body a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.pcba-cc-collapse {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    margin-left: auto;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #d6deeb;
    cursor: pointer;
}

.pcba-cc-collapse:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
}

.pcba-cc-brand__mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #e7f6f8;
    color: var(--pcba-cc-primary);
    font-weight: 800;
}

.pcba-cc-brand__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pcba-cc-brand__text strong {
    font-size: 13px;
    line-height: 1.1;
}

.pcba-cc-brand__text small {
    color: #aeb9c9;
    font-size: 10px;
}

.pcba-cc-nav {
    display: grid;
    gap: 3px;
    align-content: start;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 14px;
    overflow-y: auto;
    padding-right: 2px;
}

.pcba-cc-nav__item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 30px;
    border: 0;
    border-radius: 8px;
    padding: 6px 8px;
    background: transparent;
    color: #d6deeb;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

.pcba-cc-nav__group {
    display: grid;
    gap: 3px;
}

.pcba-cc-nav__group .pcba-cc-nav__item {
    grid-template-columns: 24px minmax(0, 1fr) 16px;
}

.pcba-cc-nav__chevron {
    justify-self: end;
    opacity: 0.72;
    transition: transform 160ms ease;
}

.pcba-cc-nav__submenu {
    display: none;
    gap: 3px;
    padding-left: 32px;
}

.pcba-control-center.is-projects-nav-open [data-pcba-cc-nav-group="projects"] .pcba-cc-nav__submenu {
    display: grid;
}

.pcba-control-center.is-projects-nav-open [data-pcba-cc-nav-group="projects"] .pcba-cc-nav__chevron {
    transform: rotate(180deg);
}

.pcba-control-center.is-bom-nav-open [data-pcba-cc-nav-group="bom"] .pcba-cc-nav__submenu {
    display: grid;
}

.pcba-control-center.is-bom-nav-open [data-pcba-cc-nav-group="bom"] .pcba-cc-nav__chevron {
    transform: rotate(180deg);
}

.pcba-cc-nav__subitem {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
    min-height: 28px;
    border: 0;
    border-radius: 8px;
    padding: 5px 8px;
    background: rgba(114, 210, 222, 0.08);
    color: #9eeaf3;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.pcba-cc-nav__subitem:hover {
    background: rgba(114, 210, 222, 0.14);
    color: #ffffff;
}

.pcba-cc-nav__subitem.is-active {
    background: rgba(114, 210, 222, 0.2);
    color: #ffffff;
    box-shadow: inset 2px 0 0 #72d2de;
}

.pcba-cc-nav__subitem.is-action {
    color: #ffd166;
    background: rgba(255, 209, 102, 0.08);
}

.pcba-cc-nav__subitem.is-action:hover {
    background: rgba(255, 209, 102, 0.16);
}

.pcba-cc-nav__subitem .dashicons {
    width: 16px;
    height: 16px;
    font-size: 14px;
}

.pcba-cc-nav__item .pcba-cc-nav__text {
    color: #8f9bb0;
    font-size: 13px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-nav__item .dashicons {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    color: #8f9bb0;
    font-size: 16px;
    line-height: 1;
}

.pcba-cc-nav__item:hover,
.pcba-cc-nav__item.is-active {
    background: var(--pcba-cc-sidebar-soft);
    color: #ffffff;
}

.pcba-cc-nav__item.is-active .pcba-cc-nav__text,
.pcba-cc-nav__item.is-active .dashicons {
    color: #72d2de;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-sidebar {
    padding-left: 7px;
    padding-right: 7px;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-brand {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    gap: 8px;
    padding-left: 0;
    padding-right: 0;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-brand__text,
.pcba-control-center.is-sidebar-collapsed .pcba-cc-brand .pcba-cc-user__body,
.pcba-control-center.is-sidebar-collapsed .pcba-cc-nav__chevron,
.pcba-control-center.is-sidebar-collapsed .pcba-cc-nav__submenu,
.pcba-control-center.is-sidebar-collapsed .pcba-cc-nav__text {
    display: none;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-brand .pcba-cc-account {
    display: grid;
    width: 34px;
    min-width: 34px;
    max-width: 34px;
    flex: 0 0 34px;
    justify-items: center;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-brand .pcba-cc-user {
    width: 34px;
    height: 34px;
    justify-content: center;
    gap: 0;
    padding: 0;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-brand .pcba-cc-user__avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-brand .pcba-cc-account__menu {
    left: 44px;
    top: 0;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-collapse {
    position: static;
    margin: 0;
    padding: 0;
    justify-self: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.1);
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-nav {
    margin-top: 14px;
    padding-right: 0;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-nav__item {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 34px;
    padding: 6px 0;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-nav__item .dashicons {
    width: 20px;
    height: 20px;
    font-size: 17px;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-sidebar__foot {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-sidebar__foot .pcba-cc-user {
    justify-content: center;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-sidebar__foot .pcba-cc-user__body {
    display: none;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-sidebar__foot .pcba-cc-user__avatar {
    width: 34px;
    height: 34px;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-sidebar__foot .pcba-cc-refresh {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    font-size: 0;
}

.pcba-control-center.is-sidebar-collapsed .pcba-cc-sidebar__foot .pcba-cc-refresh::before {
    content: "\f463";
    font-family: dashicons;
    font-size: 16px;
    line-height: 1;
}

.pcba-cc-sidebar__foot {
    display: grid;
    gap: 10px;
    flex: 0 0 auto;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #aeb9c9;
    font-size: 12px;
}

.pcba-cc-sidebar__foot:empty {
    display: none;
}

.pcba-cc-sidebar__foot .pcba-cc-refresh {
    width: 100%;
    min-height: 30px;
    font-size: 12px;
}

.pcba-cc-sidebar__foot .pcba-cc-user {
    min-width: 0;
}

.pcba-cc-sidebar__foot strong {
    color: #ffffff;
    font-size: 12px;
}

.pcba-cc-main {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    min-width: 0;
    height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

.pcba-cc-topbar {
    display: none;
    grid-template-columns: auto minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 8px 24px;
    border-bottom: 1px solid var(--pcba-cc-line);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    z-index: 20;
}

.pcba-cc-menu {
    display: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    cursor: pointer;
    font-size: 0;
}

.pcba-cc-menu::before {
    content: "\f333";
    font-family: dashicons;
    font-size: 18px;
    line-height: 1;
}

.pcba-cc-title {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pcba-cc-title span {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.pcba-cc-title small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcba-cc-refresh {
    min-height: 32px;
    border: 1px solid var(--pcba-cc-primary);
    border-radius: 8px;
    padding: 0 18px;
    background: var(--pcba-cc-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.pcba-cc-user {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.pcba-cc-user__avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 50%;
    background: #e9eef7;
    color: var(--pcba-cc-blue);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    overflow: hidden;
    text-transform: uppercase;
}

.pcba-cc-user__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcba-cc-user__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pcba-cc-user__body strong,
.pcba-cc-user__body small {
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-user__body strong {
    font-size: 12px;
}

.pcba-cc-user__body small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
}

.pcba-cc-brand .pcba-cc-user__body small {
    color: #aeb9c9;
}

.pcba-cc-account--topbar .pcba-cc-account__menu {
    right: 0;
    left: auto;
    border-color: var(--pcba-cc-line);
    background: #ffffff;
    box-shadow: var(--pcba-cc-shadow);
}

.pcba-cc-account--topbar .pcba-cc-account__menu a {
    color: var(--pcba-cc-text);
}

.pcba-cc-account--topbar .pcba-cc-account__menu a:hover {
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
}

.pcba-cc-content {
    grid-row: 1;
    min-height: 0;
    overflow: auto;
    padding: 18px 18px max(104px, calc(18px + env(safe-area-inset-bottom)));
}

.pcba-cc-login {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 220px;
    border: 1px dashed var(--pcba-cc-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--pcba-cc-muted);
    text-align: center;
}

.pcba-cc-login strong {
    color: var(--pcba-cc-text);
    font-size: 18px;
}

.pcba-cc-login span {
    max-width: 420px;
    font-size: 13px;
}

.pcba-cc-login__button {
    display: inline-grid;
    place-items: center;
    min-height: 34px;
    border-radius: 8px;
    padding: 0 16px;
    background: var(--pcba-cc-primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.pcba-cc-login__button:hover {
    background: #166a7a;
    color: #ffffff;
}

.pcba-cc-view {
    display: grid;
    gap: 14px;
}

.pcba-cc-view__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.pcba-cc-view__head h2 {
    margin: 0;
    color: var(--pcba-cc-text);
    font-size: 18px;
    line-height: 1.18;
}

.pcba-cc-view__head p {
    margin: 5px 0 0;
    color: var(--pcba-cc-muted);
    font-size: 12px;
}

.pcba-cc-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 8px;
    padding: 0 10px;
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-kpis {
    display: grid;
    grid-template-columns: repeat(7, minmax(130px, 1fr));
    gap: 10px;
}

.pcba-cc-kpi,
.pcba-cc-panel {
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: var(--pcba-cc-panel);
    box-shadow: 0 1px 2px rgba(29, 41, 57, 0.04);
}

.pcba-cc-kpi {
    display: grid;
    gap: 7px;
    min-height: 82px;
    padding: 12px 14px;
}

.pcba-cc-kpi span {
    color: var(--pcba-cc-muted);
    font-size: 10px;
    font-weight: 700;
}

.pcba-cc-kpi strong {
    color: var(--pcba-cc-text);
    font-size: 21px;
    line-height: 1;
}

.pcba-cc-kpi small {
    color: var(--pcba-cc-muted);
    font-size: 10px;
}

.pcba-cc-kpi--green strong {
    color: var(--pcba-cc-green);
}

.pcba-cc-kpi--orange strong {
    color: var(--pcba-cc-orange);
}

.pcba-cc-kpi--red strong {
    color: var(--pcba-cc-red);
}

.pcba-cc-kpi--blue strong {
    color: var(--pcba-cc-blue);
}

.pcba-cc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
    gap: 14px;
    align-items: start;
}

.pcba-cc-grid--even {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pcba-cc-panel {
    min-width: 0;
    overflow: hidden;
}

.pcba-cc-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    padding: 9px 14px;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-panel__head h3 {
    margin: 0;
    color: var(--pcba-cc-text);
    font-size: 13px;
}

.pcba-cc-panel__head small {
    color: var(--pcba-cc-muted);
}

.pcba-cc-panel__body {
    padding: 12px 14px;
}

.pcba-cc-table-wrap {
    overflow-x: auto;
}

.pcba-cc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.pcba-cc-table th,
.pcba-cc-table td {
    border-bottom: 1px solid var(--pcba-cc-line);
    padding: 8px 9px;
    text-align: left;
    vertical-align: middle;
}

.pcba-cc-table th {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    text-transform: uppercase;
}

.pcba-cc-table td {
    color: var(--pcba-cc-text);
    font-size: 11px;
}

.pcba-cc-table tr:last-child td {
    border-bottom: 0;
}

.pcba-cc-project {
    display: grid;
    gap: 3px;
}

.pcba-cc-project strong {
    color: var(--pcba-cc-text);
    font-size: 11px;
}

.pcba-cc-project small {
    color: var(--pcba-cc-muted);
}

.pcba-cc-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 8px;
    padding: 0 8px;
    background: #edf2f7;
    color: #475467;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.pcba-cc-pill--done {
    background: #e6f6ee;
    color: var(--pcba-cc-green);
}

.pcba-cc-pill--risk {
    background: #fdecef;
    color: var(--pcba-cc-red);
}

.pcba-cc-pill--warn {
    background: #fff4df;
    color: var(--pcba-cc-orange);
}

.pcba-cc-primary-action {
    min-height: 34px;
    border: 1px solid var(--pcba-cc-primary);
    border-radius: 8px;
    padding: 0 14px;
    background: var(--pcba-cc-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.pcba-cc-pcb {
    position: relative;
}

.pcba-cc-pcb-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pcba-cc-pcb-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, .65fr));
    gap: 10px;
    min-width: 0;
}

.pcba-cc-pcb-toolbar input,
.pcba-cc-pcb-toolbar select {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 12px;
}

.pcba-cc-pcb-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pcba-cc-pcb-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--pcba-cc-muted);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-pcb-tabs button.is-active {
    border-color: var(--pcba-cc-primary);
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
}

.pcba-cc-pcb-table {
    min-width: 980px;
}

.pcba-cc-pcb-thumb {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--pcba-cc-muted);
    font-size: 10px;
    font-weight: 900;
}

.pcba-cc-pcb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcba-cc-pcb-name {
    display: grid;
    gap: 3px;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--pcba-cc-text);
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.pcba-cc-pcb-name strong {
    font-size: 12px;
}

.pcba-cc-pcb-name small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
}

.pcba-cc-pcb-rev {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 8px;
    padding: 0 8px;
    background: #eef6f8;
    color: var(--pcba-cc-primary);
    font-weight: 850;
}

.pcba-cc-pcb-available {
    color: var(--pcba-cc-text);
    font-size: 13px;
    font-weight: 950;
}

.pcba-cc-pcb-status {
    display: block;
    margin-top: 4px;
    color: var(--pcba-cc-muted);
    font-size: 10px;
    font-weight: 700;
}

.pcba-cc-icon-button {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.pcba-cc-pcb-action-menu {
    position: fixed;
    z-index: 10020;
    display: grid;
    width: 180px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--pcba-cc-shadow);
    overflow: hidden;
}

.pcba-cc-pcb-action-menu button {
    border: 0;
    border-bottom: 1px solid var(--pcba-cc-line);
    padding: 9px 11px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-size: 12px;
    font-weight: 750;
}

.pcba-cc-pcb-action-menu button:last-child {
    border-bottom: 0;
}

.pcba-cc-pcb-action-menu button:hover {
    background: #f8fbff;
}

.pcba-cc-pcb-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 10010;
    display: grid;
    grid-template-rows: auto auto 1fr;
    width: min(520px, 100vw);
    height: 100vh;
    height: 100dvh;
    border-left: 1px solid var(--pcba-cc-line);
    background: #ffffff;
    box-shadow: -18px 0 36px rgba(15, 23, 42, .14);
}

.pcba-cc-pcb-drawer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-pcb-drawer__head span,
.pcba-cc-pcb-drawer__head small {
    color: var(--pcba-cc-muted);
    font-size: 12px;
    font-weight: 750;
}

.pcba-cc-pcb-drawer__head h3 {
    margin: 3px 0;
    color: var(--pcba-cc-text);
    font-size: 18px;
}

.pcba-cc-pcb-drawer__head button {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--pcba-cc-muted);
    cursor: pointer;
    font-size: 20px;
}

.pcba-cc-pcb-drawer__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
    padding: 10px 14px;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-pcb-drawer__tabs button {
    flex: 0 0 auto;
    min-height: 28px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 9px;
    background: #ffffff;
    color: var(--pcba-cc-muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-pcb-drawer__tabs button.is-active {
    border-color: var(--pcba-cc-primary);
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
}

.pcba-cc-pcb-drawer__body {
    display: grid;
    gap: 12px;
    min-height: 0;
    overflow: auto;
    padding: 14px 14px max(14px, env(safe-area-inset-bottom));
}

.pcba-cc-pcb-overview,
.pcba-cc-pcb-specs,
.pcba-cc-pcb-drawer-kpis {
    display: grid;
    gap: 8px;
}

.pcba-cc-pcb-overview {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.pcba-cc-pcb-specs,
.pcba-cc-pcb-drawer-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pcba-cc-pcb-specs div {
    display: grid;
    gap: 4px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.pcba-cc-pcb-specs span {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 750;
}

.pcba-cc-pcb-specs strong {
    color: var(--pcba-cc-text);
    font-size: 12px;
}

.pcba-cc-pcb-drawer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pcba-cc-pcb-drawer-actions button,
.pcba-cc-modal__actions button {
    min-height: 32px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 11px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-pcb-drawer-actions button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.pcba-cc-pcb-form-grid h4 {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    color: var(--pcba-cc-text);
    font-size: 13px;
}

.pcba-cc-pcb-advanced {
    border: 1px dashed var(--pcba-cc-line);
    border-radius: 8px;
    padding: 10px;
}

.pcba-cc-pcb-advanced summary {
    cursor: pointer;
    color: var(--pcba-cc-text);
    font-size: 12px;
    font-weight: 850;
}

.pcba-cc-pcb-advanced div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.pcba-cc-pcb-mfg {
    display: grid;
    gap: 12px;
}

.pcba-cc-pcb-mfg h4 {
    margin: 0;
    color: var(--pcba-cc-text);
    font-size: 12px;
    letter-spacing: 0;
}

.pcba-cc-pcb-mfg-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.pcba-cc-pcb-mfg-card {
    display: grid;
    gap: 4px;
    min-width: 0;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.pcba-cc-pcb-mfg-card span,
.pcba-cc-pcb-mfg-card small {
    color: var(--pcba-cc-muted);
    font-size: 10px;
    font-weight: 800;
}

.pcba-cc-pcb-mfg-card strong {
    color: var(--pcba-cc-text);
    font-size: 13px;
}

.pcba-cc-pcb-mfg-card em {
    overflow-wrap: anywhere;
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-style: normal;
}

.pcba-cc-pcb-mfg-upload,
.pcba-cc-pcb-align-grid {
    display: grid;
    gap: 10px;
}

.pcba-cc-pcb-mfg-upload label,
.pcba-cc-pcb-align-grid label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.pcba-cc-pcb-mfg-upload label span,
.pcba-cc-pcb-align-grid label span {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-pcb-mfg-upload input {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 7px 9px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 12px;
}

.pcba-cc-pcb-mfg-file-current {
    display: grid;
    gap: 2px;
    min-width: 0;
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
}

.pcba-cc-pcb-mfg-file-current a,
.pcba-cc-pcb-mfg-file-current strong {
    overflow: hidden;
    color: var(--pcba-cc-primary);
    font-size: 12px;
    font-weight: 850;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-pcb-mfg-file-current em {
    color: var(--pcba-cc-muted);
    font-style: normal;
}

.pcba-cc-pcb-mfg-file-current.is-empty {
    color: var(--pcba-cc-muted);
}

.pcba-cc-pcb-mfg-upload button {
    justify-self: start;
    min-height: 34px;
    border: 1px solid var(--pcba-cc-primary);
    border-radius: 8px;
    padding: 0 14px;
    background: var(--pcba-cc-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
}

.pcba-cc-pcb-mfg-upload button:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.pcba-cc-pcb-align-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pcba-cc-pcb-assembly {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.pcba-cc-pcb-assembly__toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pcba-cc-pcb-assembly__toolbar button {
    min-height: 28px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--pcba-cc-muted);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-pcb-assembly__toolbar button.is-active {
    border-color: var(--pcba-cc-primary);
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
}

.pcba-cc-pcb-assembly__toolbar span {
    color: var(--pcba-cc-muted);
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-pcb-assembly__toolbar small {
    color: var(--pcba-cc-muted);
    font-size: 10px;
    font-weight: 750;
}

.pcba-cc-pcb-assembly__viewer {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #0b0f17;
}

.pcba-cc-pcb-assembly__viewer canvas {
    position: absolute;
    inset: 0;
}

.pcba-cc-pcb-assembly__viewer canvas[data-pcba-pcb-marker-canvas] {
    z-index: 90;
    cursor: crosshair;
}

.pcba-cc-pcb-assembly-table tr.is-selected td {
    background: #fff7ed;
}

.pcba-cc-pcb-assembly-diag {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    color: var(--pcba-cc-text);
    font-size: 12px;
    line-height: 1.45;
}

.pcba-cc-pcb-assembly-diag span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 8px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font-weight: 800;
}

.pcba-cc-pcb-assembly-diag small {
    display: block;
    flex-basis: 100%;
    color: var(--pcba-cc-muted);
    font-size: 12px;
    line-height: 1.7;
}

.pcba-cc-checkbox-line {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

.pcba-cc-checkbox-line input {
    width: auto !important;
    min-height: 0 !important;
}

.pcba-cc-pcb-history strong.is-in {
    color: var(--pcba-cc-green);
}

.pcba-cc-pcb-history strong.is-out {
    color: var(--pcba-cc-orange);
}

.pcba-cc-progress {
    display: grid;
    gap: 6px;
    min-width: 110px;
}

.pcba-cc-progress__bar {
    height: 7px;
    overflow: hidden;
    border-radius: 8px;
    background: #e9eef5;
}

.pcba-cc-progress__fill {
    display: block;
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: var(--pcba-cc-primary);
}

.pcba-cc-progress small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
}

.pcba-cc-project-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 10px 12px;
    background: var(--pcba-cc-panel);
}

.pcba-cc-project-search {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    min-height: 34px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--pcba-cc-muted);
}

.pcba-cc-project-search input {
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 13px;
}

.pcba-cc-project-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    justify-content: flex-end;
}

.pcba-cc-project-filter {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: #536681;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-project-filter small {
    color: var(--pcba-cc-muted);
    font-size: 10px;
    font-weight: 800;
}

.pcba-cc-project-filter.is-active {
    border-color: #b8dfe6;
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
}

.pcba-cc-step-filter {
    display: grid;
    gap: 10px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 12px;
    background: var(--pcba-cc-panel);
}

.pcba-cc-step-filter__grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(160px, 220px) minmax(160px, 220px);
    gap: 10px;
    align-items: end;
}

.pcba-cc-step-filter-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.pcba-cc-step-filter-field span {
    color: var(--pcba-cc-muted);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-step-filter-field select,
.pcba-cc-bulk-toolbar select {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 12px;
    font-weight: 750;
}

.pcba-cc-step-filter__summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 14px;
    color: var(--pcba-cc-muted);
    font-size: 12px;
}

.pcba-cc-step-filter__summary b,
.pcba-cc-step-filter__summary strong {
    color: var(--pcba-cc-text);
}

.pcba-cc-bulk-toolbar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    border: 1px solid #dbe7f3;
    border-radius: 8px;
    padding: 9px 10px;
    background: rgba(248, 251, 255, 0.96);
}

.pcba-cc-bulk-select-all,
.pcba-cc-project-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #40536f;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-bulk-toolbar > span {
    color: var(--pcba-cc-muted);
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-bulk-toolbar > span b {
    color: var(--pcba-cc-primary);
}

.pcba-cc-bulk-toolbar select {
    width: auto;
    min-width: 150px;
}

.pcba-cc-bulk-toolbar button {
    min-height: 34px;
    border: 1px solid var(--pcba-cc-primary);
    border-radius: 8px;
    padding: 0 13px;
    background: var(--pcba-cc-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-bulk-toolbar button:disabled,
.pcba-cc-bulk-toolbar select:disabled,
.pcba-cc-step-filter-field select:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.pcba-cc-bulk-hint {
    margin: 0;
    color: #5f6f86;
    font-size: 12px;
    line-height: 1.4;
}

.pcba-cc-project-panel .pcba-cc-panel__body {
    padding: 10px;
}

.pcba-cc-project-list {
    display: grid;
    gap: 10px;
}

.pcba-cc-project-row {
    overflow: hidden;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    transition: border-color 160ms ease, box-shadow 160ms ease, opacity 160ms ease, filter 160ms ease;
}

.pcba-cc-project-row.is-selected {
    border-color: #9fd3dc;
    box-shadow: 0 0 0 2px rgba(31, 122, 140, 0.1);
}

.pcba-cc-project-row.is-dimmed {
    opacity: 0.38;
    filter: grayscale(0.85);
}

.pcba-cc-project-row.is-dimmed:hover,
.pcba-cc-project-row.is-dimmed:focus-within {
    opacity: 0.72;
    filter: grayscale(0.45);
}

.pcba-cc-project-row__main {
    display: grid;
    grid-template-columns: auto minmax(230px, 300px) minmax(470px, 1fr) minmax(240px, 330px);
    gap: 16px;
    align-items: center;
    padding: 12px 14px;
}

.pcba-cc-project-select {
    align-self: start;
    justify-self: center;
    min-width: 24px;
    min-height: 42px;
}

.pcba-cc-project-select input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--pcba-cc-primary);
}

.pcba-cc-project-identity,
.pcba-cc-project-progress,
.pcba-cc-project-notes {
    min-width: 0;
}

.pcba-cc-project-identity {
    display: grid;
    gap: 8px;
}

.pcba-cc-project-identity__head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.pcba-cc-project-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #d8e7f2;
    border-radius: 50%;
    background: #e9f7fa;
    color: var(--pcba-cc-primary);
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    overflow: hidden;
    text-transform: uppercase;
}

.pcba-cc-project-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcba-cc-project-identity__text {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pcba-cc-project-code {
    color: #5e779f;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-project-identity strong {
    display: block;
    overflow: hidden;
    color: var(--pcba-cc-text);
    font-size: 14px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-project-identity small {
    display: block;
    overflow: hidden;
    color: var(--pcba-cc-muted);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-project-identity b {
    color: #3b4b63;
}

.pcba-cc-project-detail-btn {
    justify-self: start;
    min-height: 30px;
    margin-top: 4px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 10px;
    background: #f8fbff;
    color: var(--pcba-cc-blue);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-project-progress {
    display: grid;
    gap: 7px;
}

.pcba-cc-project-progress__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    color: #536681;
    font-size: 12px;
    font-weight: 700;
}

.pcba-cc-project-progress__head > span:first-child,
.pcba-cc-project-progress__head > span:first-child strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-project-progress__head strong,
.pcba-cc-project-progress__head b {
    color: var(--pcba-cc-text);
    font-weight: 900;
}

.pcba-cc-project-progress__stats {
    flex: 0 0 auto;
    display: flex;
    align-items: baseline;
    gap: 8px;
    white-space: nowrap;
}

.pcba-cc-project-progress__head b {
    flex: 0 0 auto;
}

.pcba-cc-project-progress__stats small {
    color: #61728d;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-project-bar {
    display: block;
    height: 7px;
    overflow: hidden;
    border-radius: 8px;
    background: #e9eef5;
}

.pcba-cc-project-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pcba-cc-blue), #24c0d4);
    transition: width 240ms ease;
}

.pcba-cc-project-flow {
    display: grid;
    grid-auto-columns: minmax(86px, 112px);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 6px 8px 4px;
    scrollbar-width: thin;
}

.pcba-cc-project-step-wrap {
    position: relative;
    min-width: 0;
}

.pcba-cc-project-flow::-webkit-scrollbar {
    height: 5px;
}

.pcba-cc-project-flow::-webkit-scrollbar-track {
    background: transparent;
}

.pcba-cc-project-flow::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.55);
}

.pcba-cc-project-step {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 0;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    justify-items: center;
    align-content: start;
    text-align: center;
    font: inherit;
    transition: transform 180ms ease;
}

.pcba-cc-project-step.is-editable,
.pcba-cc-project-step.is-system {
    cursor: pointer;
}

.pcba-cc-project-step.is-editable:hover,
.pcba-cc-project-step.is-system:hover,
.pcba-cc-project-step:focus-visible {
    outline: 0;
}

.pcba-cc-project-step.is-editable:hover .pcba-cc-project-step__label,
.pcba-cc-project-step.is-system:hover .pcba-cc-project-step__label,
.pcba-cc-project-step:focus-visible .pcba-cc-project-step__label {
    color: var(--pcba-cc-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pcba-cc-project-step.is-updating {
    cursor: wait;
    opacity: 0.78;
}

.pcba-cc-project-step.is-updating .pcba-cc-project-step__dot {
    border-color: var(--pcba-cc-primary);
    border-top-color: transparent;
    animation: pcba-cc-step-spin 720ms linear infinite;
}

.pcba-cc-project-step.is-updating .pcba-cc-project-step__label,
.pcba-cc-project-step.is-updating .pcba-cc-project-step__detail {
    color: var(--pcba-cc-primary);
}

@keyframes pcba-cc-step-spin {
    to {
        transform: rotate(360deg);
    }
}

.pcba-cc-step-filter-highlight {
    border-radius: 8px;
    background: rgba(31, 122, 140, 0.08);
    box-shadow: 0 0 0 2px rgba(31, 122, 140, 0.18);
}

.pcba-cc-step-status-menu {
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    z-index: 24;
    display: grid;
    width: max-content;
    min-width: 156px;
    max-width: 220px;
    transform: translateX(-50%);
    border: 1px solid #d6e1ee;
    border-radius: 8px;
    padding: 5px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.pcba-cc-step-status-menu button {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    border: 0;
    border-radius: 6px;
    padding: 0 9px;
    background: transparent;
    color: #425570;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}

.pcba-cc-step-status-menu button:hover,
.pcba-cc-step-status-menu button.is-active {
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
}

#pcba-cc-popover-root {
    position: relative;
    z-index: 9999;
}

.pcba-cc-floating-popover {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    max-width: calc(100vw - 20px);
}

.pcba-cc-floating-popover .pcba-cc-step-status-menu {
    position: static;
    top: auto;
    left: auto;
    z-index: auto;
    max-width: calc(100vw - 20px);
    transform: none;
}

.pcba-cc-floating-popover .pcba-cc-step-status-menu::before {
    content: "";
    position: absolute;
    left: 50%;
    width: 10px;
    height: 10px;
    border-left: 1px solid #d6e1ee;
    border-top: 1px solid #d6e1ee;
    background: #ffffff;
    transform: translateX(-50%) rotate(45deg);
}

.pcba-cc-floating-popover.is-placement-bottom .pcba-cc-step-status-menu::before {
    top: -5px;
}

.pcba-cc-floating-popover.is-placement-top .pcba-cc-step-status-menu::before {
    bottom: -5px;
    transform: translateX(-50%) rotate(225deg);
}

.pcba-cc-system-step-menu {
    gap: 4px;
}

.pcba-cc-system-step-menu strong {
    padding: 5px 9px 2px;
    color: var(--pcba-cc-text);
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-filter-link,
.pcba-cc-filter-clear {
    min-height: 30px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--pcba-cc-blue);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-filter-clear {
    color: var(--pcba-cc-muted);
}

.pcba-cc-filter-link:hover,
.pcba-cc-filter-clear:hover {
    border-color: #b9c8da;
    background: #f8fbff;
}

.pcba-cc-project-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 9px;
    left: 54%;
    z-index: 0;
    width: 82%;
    height: 2px;
    border-radius: 4px;
    background: #dfe6f1;
}

.pcba-cc-project-step__dot {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border: 2px solid #d1d9e5;
    border-radius: 50%;
    background: #ffffff;
    color: #9aaabd;
    font-size: 7px;
    font-weight: 900;
    line-height: 1;
    transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.pcba-cc-project-step__label {
    display: block;
    max-width: 100%;
    overflow: visible;
    color: #61728d;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
}

.pcba-cc-project-step__detail {
    display: block;
    max-width: 100%;
    overflow: visible;
    color: #7d8aa0;
    font-size: 9px;
    font-weight: 750;
    line-height: 1.15;
    text-overflow: clip;
    white-space: normal;
    word-break: break-word;
}

.pcba-cc-project-step__state {
    display: none;
}

.pcba-cc-project-step--done .pcba-cc-project-step__dot {
    border-color: var(--pcba-cc-green);
    background: var(--pcba-cc-green);
    color: #ffffff;
}

.pcba-cc-project-step--done:not(:last-child)::after {
    background: #bfe9d0;
}

.pcba-cc-project-step--done .pcba-cc-project-step__label {
    color: #207d56;
}

.pcba-cc-project-step--done .pcba-cc-project-step__state {
    background: #e6f6ee;
    color: var(--pcba-cc-green);
}

.pcba-cc-project-step--current .pcba-cc-project-step__dot {
    border-color: var(--pcba-cc-blue);
    background: var(--pcba-cc-blue);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(49, 108, 207, 0.12), 0 5px 12px rgba(49, 108, 207, 0.22);
    transform: scale(1.08);
}

.pcba-cc-project-step--issue .pcba-cc-project-step__dot {
    border-color: var(--pcba-cc-orange);
    background: var(--pcba-cc-orange);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(199, 119, 0, 0.12), 0 5px 12px rgba(199, 119, 0, 0.22);
    transform: scale(1.08);
}

.pcba-cc-project-step--partial .pcba-cc-project-step__dot {
    border-color: var(--pcba-cc-orange);
    background: var(--pcba-cc-orange);
    color: #ffffff;
    box-shadow: 0 0 0 3px rgba(199, 119, 0, 0.12), 0 5px 12px rgba(199, 119, 0, 0.2);
    transform: scale(1.06);
}

.pcba-cc-project-step--current .pcba-cc-project-step__dot::after,
.pcba-cc-project-step--issue .pcba-cc-project-step__dot::after,
.pcba-cc-project-step--partial .pcba-cc-project-step__dot::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1.5px solid rgba(49, 108, 207, 0.28);
    border-radius: 50%;
    animation: pcbaProjectPulse 1500ms ease-out infinite;
}

.pcba-cc-project-step--issue .pcba-cc-project-step__dot::after {
    border-color: rgba(199, 119, 0, 0.28);
}

.pcba-cc-project-step--partial .pcba-cc-project-step__dot::after {
    border-color: rgba(199, 119, 0, 0.28);
}

.pcba-cc-project-step--current .pcba-cc-project-step__label {
    color: var(--pcba-cc-blue);
    font-size: 10px;
    font-weight: 950;
}

.pcba-cc-project-step--current {
    transform: none;
}

.pcba-cc-project-step--issue .pcba-cc-project-step__label {
    color: var(--pcba-cc-orange);
    font-size: 10px;
    font-weight: 950;
}

.pcba-cc-project-step--issue {
    transform: none;
}

.pcba-cc-project-step--partial .pcba-cc-project-step__label,
.pcba-cc-project-step--partial .pcba-cc-project-step__detail {
    color: var(--pcba-cc-orange);
    font-weight: 900;
}

.pcba-cc-project-notes {
    display: grid;
    gap: 6px;
    border-radius: 12px;
    padding: 11px 12px;
    background: #f5f8fc;
}

.pcba-cc-project-notes span {
    color: #8090a8;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-project-notes p,
.pcba-cc-project-overview {
    margin: 0;
    color: #4d607c;
    font-size: 12px;
    line-height: 1.45;
}

.pcba-cc-project-notes p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.pcba-cc-project-notes.is-empty {
    background: #f7fafc;
}

.pcba-cc-project-notes.is-empty p {
    color: #8391a5;
}

.pcba-cc-project-notes button {
    justify-self: start;
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--pcba-cc-primary);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
}

.pcba-cc-project-details {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--pcba-cc-line);
    padding: 12px 14px 14px;
    background: #fbfcfe;
}

.pcba-cc-project-detail-groups {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 0.95fr);
    gap: 12px;
}

.pcba-cc-project-detail-group {
    display: grid;
    gap: 10px;
    border: 1px solid rgba(226, 234, 244, 0.95);
    border-radius: 15px;
    padding: 14px;
    background: #ffffff;
}

.pcba-cc-project-detail-group--progress {
    background: #f8fbff;
}

.pcba-cc-project-detail-group--finance {
    border-color: rgba(31, 122, 140, 0.18);
    background: #f4fbf7;
}

.pcba-cc-project-detail-group h4 {
    margin: 0;
    color: var(--pcba-cc-text);
    font-size: 14px;
    font-weight: 850;
}

.pcba-cc-project-detail-group dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.pcba-cc-project-detail-group dl > div {
    display: grid;
    grid-template-columns: minmax(86px, 0.8fr) minmax(0, 1.2fr);
    gap: 8px;
    align-items: baseline;
    min-width: 0;
}

.pcba-cc-project-detail-group dt,
.pcba-cc-project-detail-group dd {
    min-width: 0;
    margin: 0;
}

.pcba-cc-project-detail-group dt {
    color: #8493aa;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.pcba-cc-project-detail-group dd {
    overflow: hidden;
    color: #334762;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-project-detail-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 8px;
}

.pcba-cc-project-info {
    display: grid;
    gap: 3px;
    border: 1px solid #e4ebf4;
    border-radius: 8px;
    padding: 8px 9px;
    background: #ffffff;
}

.pcba-cc-project-info span {
    color: #8493aa;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-project-info strong {
    overflow: hidden;
    color: #334762;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-project-tabs-wrap {
    --pcba-tab-overview: #2f6fce;
    --pcba-tab-overview-soft: #eaf2ff;
    --pcba-tab-progress: #0ea5e9;
    --pcba-tab-progress-soft: #e7f6fe;
    --pcba-tab-finance: #159a68;
    --pcba-tab-finance-soft: #e8f7ef;
    --pcba-tab-bom: #7c5ccf;
    --pcba-tab-bom-soft: #f1edff;
    --pcba-tab-materials: #d97706;
    --pcba-tab-materials-soft: #fff3df;
    --pcba-tab-pcb: #2563eb;
    --pcba-tab-pcb-soft: #eaf1ff;
    --pcba-tab-production: #8b5cf6;
    --pcba-tab-production-soft: #f2edff;
    --pcba-tab-delivery: #0f9888;
    --pcba-tab-delivery-soft: #e5f8f5;
    --pcba-tab-documents: #526b86;
    --pcba-tab-documents-soft: #edf3f8;
    --pcba-tab-history: #64748b;
    --pcba-tab-history-soft: #f1f5f9;
    display: grid;
    gap: 7px;
    border-top: 1px solid rgba(219, 229, 241, 0.9);
    border-bottom: 1px solid rgba(219, 229, 241, 0.9);
    margin: 2px -14px 0;
    padding: 10px 14px 11px;
    background: linear-gradient(180deg, #f5f8fc 0%, #f8fbff 100%);
}

.pcba-cc-project-tabs-caption {
    color: #7a8aa0;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.pcba-cc-project-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 1px 2px 5px;
    scrollbar-color: #c8d4e3 transparent;
    scrollbar-width: thin;
    white-space: nowrap;
}

.pcba-cc-project-tabs::-webkit-scrollbar {
    height: 6px;
}

.pcba-cc-project-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.pcba-cc-project-tabs::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #c8d4e3;
}

.pcba-cc-project-tab {
    --pcba-project-tab-color: var(--pcba-tab-overview);
    --pcba-project-tab-soft: var(--pcba-tab-overview-soft);
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    min-height: 41px;
    border: 1px solid #dfe7f2;
    border-radius: 12px;
    padding: 8px 12px 8px 9px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    color: #526175;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease, color 170ms ease, background 170ms ease;
}

.pcba-cc-project-tab--overview {
    --pcba-project-tab-color: var(--pcba-tab-overview);
    --pcba-project-tab-soft: var(--pcba-tab-overview-soft);
}

.pcba-cc-project-tab--progress {
    --pcba-project-tab-color: var(--pcba-tab-progress);
    --pcba-project-tab-soft: var(--pcba-tab-progress-soft);
}

.pcba-cc-project-tab--finance {
    --pcba-project-tab-color: var(--pcba-tab-finance);
    --pcba-project-tab-soft: var(--pcba-tab-finance-soft);
}

.pcba-cc-project-tab--bom {
    --pcba-project-tab-color: var(--pcba-tab-bom);
    --pcba-project-tab-soft: var(--pcba-tab-bom-soft);
}

.pcba-cc-project-tab--materials {
    --pcba-project-tab-color: var(--pcba-tab-materials);
    --pcba-project-tab-soft: var(--pcba-tab-materials-soft);
}

.pcba-cc-project-tab--pcb {
    --pcba-project-tab-color: var(--pcba-tab-pcb);
    --pcba-project-tab-soft: var(--pcba-tab-pcb-soft);
}

.pcba-cc-project-tab--production {
    --pcba-project-tab-color: var(--pcba-tab-production);
    --pcba-project-tab-soft: var(--pcba-tab-production-soft);
}

.pcba-cc-project-tab--delivery {
    --pcba-project-tab-color: var(--pcba-tab-delivery);
    --pcba-project-tab-soft: var(--pcba-tab-delivery-soft);
}

.pcba-cc-project-tab--documents {
    --pcba-project-tab-color: var(--pcba-tab-documents);
    --pcba-project-tab-soft: var(--pcba-tab-documents-soft);
}

.pcba-cc-project-tab--history {
    --pcba-project-tab-color: var(--pcba-tab-history);
    --pcba-project-tab-soft: var(--pcba-tab-history-soft);
}

.pcba-cc-project-tab-icon {
    display: inline-grid;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 8px;
    background: var(--pcba-project-tab-soft);
    color: var(--pcba-project-tab-color);
}

.pcba-cc-project-tab-svg {
    display: block;
    width: 15px;
    height: 15px;
}

.pcba-cc-project-tab-label {
    overflow: hidden;
    max-width: 110px;
    text-overflow: ellipsis;
}

.pcba-cc-project-tab:hover {
    border-color: rgba(148, 163, 184, 0.58);
    box-shadow: 0 7px 16px rgba(15, 23, 42, 0.08);
    color: #26364a;
    transform: translateY(-1px);
}

.pcba-cc-project-tab:focus-visible {
    outline: 2px solid rgba(31, 122, 140, 0.28);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.12);
}

.pcba-cc-project-tab.is-active,
.pcba-cc-project-tab--active {
    border-color: rgba(31, 122, 140, 0.28);
    border-color: color-mix(in srgb, var(--pcba-project-tab-color) 34%, #ffffff);
    background: linear-gradient(180deg, #ffffff 0%, var(--pcba-project-tab-soft) 100%);
    box-shadow: 0 9px 20px rgba(15, 23, 42, 0.1);
    color: var(--pcba-project-tab-color);
    font-weight: 900;
}

.pcba-cc-project-tab.is-active .pcba-cc-project-tab-icon,
.pcba-cc-project-tab--active .pcba-cc-project-tab-icon {
    background: var(--pcba-project-tab-color);
    color: #ffffff;
}

.pcba-cc-project-tab-badge {
    display: inline-flex;
    align-items: center;
    min-height: 16px;
    border-radius: 999px;
    padding: 0 6px;
    background: #eef3f8;
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    line-height: 1;
}

.pcba-cc-project-tab.is-active .pcba-cc-project-tab-badge,
.pcba-cc-project-tab--active .pcba-cc-project-tab-badge {
    background: var(--pcba-project-tab-soft);
    color: var(--pcba-project-tab-color);
}

.pcba-cc-project-tab-list {
    display: grid;
    gap: 8px;
}

.pcba-cc-project-tab-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid var(--pcba-cc-line);
    padding-bottom: 8px;
}

.pcba-cc-project-tab-list > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.pcba-cc-project-tab-list strong {
    min-width: 0;
    overflow: hidden;
    color: var(--pcba-cc-text);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-project-tab-list small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
}

.pcba-cc-pill--stage-done {
    background: #e6f6ee;
    color: var(--pcba-cc-green);
}

.pcba-cc-pill--stage-current {
    background: #edf4ff;
    color: var(--pcba-cc-blue);
}

.pcba-cc-pill--stage-issue {
    background: #fff4df;
    color: var(--pcba-cc-orange);
}

.pcba-cc-pill--stage-partial {
    background: #fff4df;
    color: var(--pcba-cc-orange);
}

.pcba-cc-project-tab-list--steps > div {
    grid-template-columns: minmax(0, 1fr);
}

.pcba-cc-project-step-detail small {
    line-height: 1.45;
}

.pcba-cc-finance {
    display: grid;
    gap: 18px;
}

.pcba-cc-summary--finance {
    grid-template-columns: repeat(6, minmax(115px, 1fr));
}

.pcba-cc-finance-center {
    gap: 18px;
}

.pcba-cc-finance-overview {
    display: grid;
    gap: 16px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 18px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.pcba-cc-finance-overview__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.pcba-cc-finance-overview__head h3 {
    margin: 0;
    color: var(--pcba-cc-text);
    font-size: 18px;
    font-weight: 850;
    line-height: 1.25;
}

.pcba-cc-finance-overview__head small {
    color: #718096;
    font-size: 12px;
    line-height: 1.4;
}

.pcba-cc-finance-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(138px, 1fr));
    gap: 12px;
}

.pcba-cc-finance-kpi {
    position: relative;
    display: grid;
    gap: 7px;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 234, 244, 0.92);
    border-radius: 15px;
    padding: 14px 14px 13px 17px;
    background: #fbfdff;
}

.pcba-cc-finance-kpi::before {
    content: "";
    position: absolute;
    inset: 12px auto 12px 0;
    width: 3px;
    border-radius: 0 999px 999px 0;
    background: #475569;
}

.pcba-cc-finance-kpi__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.pcba-cc-finance-kpi__head i {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(71, 85, 105, 0.1);
    color: #475569;
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.pcba-cc-finance-kpi span {
    color: #7d8da4;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pcba-cc-finance-kpi strong {
    color: var(--pcba-cc-text);
    font-size: clamp(22px, 2vw, 30px);
    font-weight: 850;
    line-height: 1.12;
    word-break: break-word;
}

.pcba-cc-finance-kpi small {
    min-height: 16px;
    color: #718096;
    font-size: 11px;
    line-height: 1.35;
}

.pcba-cc-finance-kpi--value::before,
.pcba-cc-finance-kpi--value .pcba-cc-finance-kpi__head i {
    background-color: #1f4f6b;
}

.pcba-cc-finance-kpi--in strong,
.pcba-cc-finance-kpi--profit strong {
    color: #0f7a4f;
}

.pcba-cc-finance-kpi--in::before,
.pcba-cc-finance-kpi--profit::before,
.pcba-cc-finance-kpi--in .pcba-cc-finance-kpi__head i,
.pcba-cc-finance-kpi--profit .pcba-cc-finance-kpi__head i {
    background-color: #16a34a;
}

.pcba-cc-finance-kpi--debt strong {
    color: #b7791f;
}

.pcba-cc-finance-kpi--debt::before,
.pcba-cc-finance-kpi--debt .pcba-cc-finance-kpi__head i {
    background-color: #f59e0b;
}

.pcba-cc-finance-kpi--cost strong,
.pcba-cc-finance-kpi--loss strong {
    color: #b42318;
}

.pcba-cc-finance-kpi--cost::before,
.pcba-cc-finance-kpi--loss::before,
.pcba-cc-finance-kpi--cost .pcba-cc-finance-kpi__head i,
.pcba-cc-finance-kpi--loss .pcba-cc-finance-kpi__head i {
    background-color: #dc2626;
}

.pcba-cc-finance-kpi--value .pcba-cc-finance-kpi__head i,
.pcba-cc-finance-kpi--in .pcba-cc-finance-kpi__head i,
.pcba-cc-finance-kpi--profit .pcba-cc-finance-kpi__head i,
.pcba-cc-finance-kpi--debt .pcba-cc-finance-kpi__head i,
.pcba-cc-finance-kpi--cost .pcba-cc-finance-kpi__head i,
.pcba-cc-finance-kpi--loss .pcba-cc-finance-kpi__head i {
    color: #ffffff;
}

.pcba-cc-finance-panel {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(226, 234, 244, 0.95);
    border-radius: 16px;
    padding: 16px;
    background: #ffffff;
}

.pcba-cc-finance-panel--primary {
    border-radius: 14px;
    padding: 16px;
    background: #f8fbff;
    box-shadow: none;
}

.pcba-cc-finance-panel--income {
    background: #f4fbf7;
}

.pcba-cc-finance-panel--cashflow {
    grid-column: 1 / -1;
    background: #f7fafc;
}

.pcba-cc-finance-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 16px;
}

.pcba-cc-payment-meter__head,
.pcba-cc-payment-meter__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.pcba-cc-payment-meter__head strong {
    color: var(--pcba-cc-text);
    font-size: 14px;
    font-weight: 850;
}

.pcba-cc-payment-meter__head b {
    color: #0f7a4f;
    font-size: 14px;
    font-weight: 900;
}

.pcba-cc-payment-meter {
    display: block;
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #e6edf5;
}

.pcba-cc-payment-meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0ea5e9, #16a34a);
}

.pcba-cc-payment-meter__meta span {
    display: grid;
    gap: 3px;
    color: #718096;
    font-size: 12px;
    font-weight: 650;
}

.pcba-cc-payment-meter__meta b {
    color: var(--pcba-cc-text);
    font-size: 13px;
    font-weight: 850;
}

.pcba-cc-money-in {
    color: #0f7a4f;
    font-weight: 900;
    text-align: right;
}

.pcba-cc-cost-list,
.pcba-cc-cashflow {
    display: grid;
    gap: 0;
}

.pcba-cc-cost-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    padding: 12px 0;
}

.pcba-cc-cost-line:last-child,
.pcba-cc-cashflow__item:last-child {
    border-bottom: 0;
}

.pcba-cc-cost-line span,
.pcba-cc-cashflow__item div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.pcba-cc-cost-line strong,
.pcba-cc-cashflow__item strong {
    color: var(--pcba-cc-text);
    font-size: 13px;
    font-weight: 800;
}

.pcba-cc-cost-line small,
.pcba-cc-cashflow__item small {
    color: #8493aa;
    font-size: 11px;
    line-height: 1.35;
}

.pcba-cc-cost-line b {
    color: #334155;
    font-size: 13px;
    font-weight: 850;
    text-align: right;
}

.pcba-cc-badge {
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
}

.pcba-cc-badge--auto {
    background: #e0f2fe;
    color: #0369a1;
}

.pcba-cc-badge--manual {
    background: #f1f5f9;
    color: #475569;
}

.pcba-cc-cashflow__item {
    position: relative;
    display: grid;
    grid-template-columns: 92px 18px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 0 0 18px;
}

.pcba-cc-cashflow__item::after {
    content: "";
    position: absolute;
    top: 17px;
    bottom: 0;
    left: 101px;
    width: 1px;
    background: #dbe5ef;
}

.pcba-cc-cashflow__item:last-child::after {
    display: none;
}

.pcba-cc-cashflow__dot {
    position: relative;
    z-index: 1;
    display: block;
    width: 11px;
    height: 11px;
    margin-top: 3px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #64748b;
    box-shadow: 0 0 0 2px #cbd5e1;
}

.pcba-cc-cashflow__item time {
    color: #8493aa;
    font-size: 11px;
    font-weight: 850;
}

.pcba-cc-cashflow__item b {
    font-size: 14px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.pcba-cc-cashflow__item--in b {
    color: #0f7a4f;
}

.pcba-cc-cashflow__item--in .pcba-cc-cashflow__dot {
    background: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.2);
}

.pcba-cc-cashflow__item--out b {
    color: #b42318;
}

.pcba-cc-cashflow__item--out .pcba-cc-cashflow__dot {
    background: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.18);
}

.pcba-cc-finance-actions--primary {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 14px;
    padding: 10px 12px;
    background: #f8fafc;
}

.pcba-cc-finance-actions--primary strong {
    color: var(--pcba-cc-text);
    font-size: 14px;
    font-weight: 850;
}

.pcba-cc-finance-actions--primary span {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pcba-cc-finance-actions--primary .pcba-cc-finance-action-primary {
    border-color: var(--pcba-cc-primary);
    background: var(--pcba-cc-primary);
    color: #ffffff;
}

.pcba-cc-warning {
    border: 0;
    border-left: 3px solid #f59e0b;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff8e8;
    color: #8a5a00;
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-finance-actions {
    display: flex;
    justify-content: flex-end;
}

.pcba-cc-finance-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border: 1px solid #c9d7e7;
    border-radius: 9px;
    padding: 0 12px;
    background: #ffffff;
    color: #334762;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
}

.pcba-cc-finance-actions button:hover {
    border-color: var(--pcba-cc-primary);
    color: var(--pcba-cc-primary);
}

.pcba-cc-finance-link-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid #c9d7e7;
    border-radius: 8px;
    padding: 0 10px;
    background: #ffffff;
    color: var(--pcba-cc-primary);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.pcba-cc-finance-section,
.pcba-cc-cost-split > section {
    display: grid;
    gap: 10px;
    border: 1px solid #e4ebf4;
    border-radius: 8px;
    padding: 10px;
    background: #ffffff;
}

.pcba-cc-finance-section__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pcba-cc-finance-section__head > div:first-child {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
}

.pcba-cc-finance-section__head > div:first-child > i {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #e8f2ff;
    color: var(--pcba-cc-primary);
    font-size: 14px;
    font-style: normal;
    font-weight: 900;
}

.pcba-cc-finance-section__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.pcba-cc-finance-section__head h4,
.pcba-cc-cost-split h4 {
    margin: 0;
    color: #334762;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pcba-cc-finance-section__meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.pcba-cc-finance-section__head strong {
    color: var(--pcba-cc-text);
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.pcba-cc-empty-state {
    display: grid;
    justify-items: center;
    gap: 6px;
    border-radius: 12px;
    padding: 18px 14px;
    background: #f5f8fb;
    color: #718096;
    text-align: center;
}

.pcba-cc-empty-state--compact {
    min-height: 92px;
}

.pcba-cc-empty-state i {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: #e8eef7;
    color: #526579;
    font-size: 15px;
    font-style: normal;
    font-weight: 900;
}

.pcba-cc-empty-state strong {
    color: var(--pcba-cc-text);
    font-size: 13px;
    font-weight: 850;
}

.pcba-cc-empty-state small {
    max-width: 360px;
    color: #718096;
    font-size: 12px;
    line-height: 1.45;
}

.pcba-cc-inline-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr)) auto;
    gap: 8px;
    align-items: end;
}

.pcba-cc-inline-form label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pcba-cc-inline-form label span {
    color: #8493aa;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-inline-form input {
    width: 100%;
    min-height: 30px;
    border: 1px solid #dfe7f2;
    border-radius: 7px;
    padding: 0 8px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 12px;
}

.pcba-cc-inline-form button {
    min-height: 30px;
    border: 0;
    border-radius: 7px;
    padding: 0 10px;
    background: var(--pcba-cc-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.pcba-cc-inline-form__wide {
    grid-column: span 1;
}

.pcba-cc-cost-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pcba-cc-cost-split section > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.pcba-cc-table--compact th,
.pcba-cc-table--compact td {
    padding: 8px 9px;
    font-size: 11px;
}

.pcba-cc-finance-table {
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0;
}

.pcba-cc-finance-table th {
    border-bottom: 1px solid rgba(203, 213, 225, 0.85);
    background: rgba(241, 245, 249, 0.78);
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.pcba-cc-finance-table th:first-child {
    border-radius: 9px 0 0 9px;
}

.pcba-cc-finance-table th:last-child {
    border-radius: 0 9px 9px 0;
}

.pcba-cc-finance-table td {
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    color: #334155;
    font-size: 12px;
}

.pcba-cc-finance-table td:nth-child(4),
.pcba-cc-finance-table th:nth-child(4) {
    text-align: right;
}

.pcba-cc-project-detail-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    padding: 2px 0 12px;
}

.pcba-cc-project-detail-summary h3 {
    margin: 0 0 5px;
    color: var(--pcba-cc-text);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.25;
}

.pcba-cc-project-detail-summary p,
.pcba-cc-project-detail-summary__meta span,
.pcba-cc-project-detail-summary__meta small {
    margin: 0;
    color: #64748b;
    font-size: 12px;
    line-height: 1.45;
}

.pcba-cc-project-detail-summary__meta {
    display: grid;
    gap: 4px;
    min-width: min(420px, 48%);
    text-align: right;
}

.pcba-cc-project-detail-summary__meta span:first-child {
    color: #334155;
    font-weight: 800;
}

.pcba-cc-project-detail-summary__meta .pcba-cc-project-detail-btn {
    justify-self: end;
}

.pcba-cc-finance-summary {
    display: grid;
    gap: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 14px;
    padding: 16px;
    background: #ffffff;
}

.pcba-cc-finance-summary__head h3 {
    margin: 0;
    color: var(--pcba-cc-text);
    font-size: 17px;
    font-weight: 850;
    line-height: 1.25;
    text-transform: uppercase;
}

.pcba-cc-finance-summary__kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    gap: 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    padding-bottom: 14px;
}

.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi {
    border: 0;
    border-right: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: 0;
    padding: 0 14px;
    background: transparent;
}

.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi:first-child {
    padding-left: 0;
}

.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi:last-child {
    border-right: 0;
    padding-right: 0;
}

.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi::before,
.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi__head i,
.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi small {
    display: none;
}

.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi__head {
    display: block;
}

.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi span {
    color: #64748b;
    font-size: 10px;
    letter-spacing: 0.04em;
}

.pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi strong {
    font-size: clamp(20px, 1.8vw, 28px);
    line-height: 1.12;
}

.pcba-cc-quote-breakdown {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) 24px minmax(150px, 1fr) 24px minmax(170px, 1.1fr);
    gap: 8px;
    align-items: stretch;
    border: 1px solid #dbe5f1;
    border-radius: 12px;
    padding: 10px;
    background: #f8fbff;
}

.pcba-cc-quote-breakdown > div:not(.pcba-cc-quote-breakdown__fees) {
    display: grid;
    gap: 3px;
    min-width: 0;
    border-radius: 9px;
    padding: 9px 11px;
    background: #ffffff;
}

.pcba-cc-quote-breakdown > i {
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 18px;
    font-style: normal;
    font-weight: 900;
}

.pcba-cc-quote-breakdown span {
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.pcba-cc-quote-breakdown strong {
    color: #0f172a;
    font-size: 17px;
    font-weight: 900;
}

.pcba-cc-quote-breakdown small {
    color: #94a3b8;
    font-size: 10px;
}

.pcba-cc-quote-breakdown__fee strong {
    color: #b45309;
}

.pcba-cc-quote-breakdown__total {
    border: 1px solid #bfdbfe;
    background: #eff6ff !important;
}

.pcba-cc-quote-breakdown__total strong {
    color: #075985;
}

.pcba-cc-quote-breakdown__fees {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 2px 3px 0;
}

.pcba-cc-quote-breakdown__fees > span {
    text-transform: none;
}

.pcba-cc-quote-breakdown__fees em {
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 4px 8px;
    background: #fffbeb;
    color: #92400e;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
}

.pcba-cc-finance-warning {
    border: 1px solid #fed7aa;
    border-radius: 9px;
    padding: 8px 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 11px;
    font-weight: 750;
}

.pcba-cc-finance-paid {
    display: grid;
    gap: 9px;
}

.pcba-cc-finance-paid__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--pcba-cc-text);
    font-size: 13px;
}

.pcba-cc-finance-paid__head b {
    color: #0f7a4f;
}

.pcba-cc-finance-paid__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    color: #64748b;
    font-size: 12px;
}

.pcba-cc-finance-paid__meta b {
    color: #334155;
    font-weight: 850;
}

.pcba-cc-finance-actionbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.88);
    padding: 0 0 12px;
}

.pcba-cc-finance-actionbar strong {
    color: var(--pcba-cc-text);
    font-size: 14px;
    font-weight: 850;
}

.pcba-cc-finance-actionbar span {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pcba-cc-finance-actionbar button,
.pcba-cc-finance-column-head button,
.pcba-cc-ledger-empty button,
.pcba-cc-finance-inline-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 11px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}

.pcba-cc-finance-actionbar .pcba-cc-finance-action-primary,
.pcba-cc-finance-column-head .pcba-cc-finance-link-action,
.pcba-cc-ledger-empty .pcba-cc-finance-link-action {
    border-color: var(--pcba-cc-primary);
    background: var(--pcba-cc-primary);
    color: #ffffff;
}

.pcba-cc-finance-ledger-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
    gap: 22px;
    align-items: start;
}

.pcba-cc-finance-ledger,
.pcba-cc-finance-analysis {
    min-width: 0;
}

.pcba-cc-finance-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 34px;
    margin-bottom: 10px;
}

.pcba-cc-finance-column-head h4,
.pcba-cc-analysis-section h4 {
    margin: 0;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pcba-cc-transaction-list {
    display: grid;
    gap: 0;
}

.pcba-cc-transaction-item {
    display: grid;
    grid-template-columns: 88px 22px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    padding: 12px 0;
}

.pcba-cc-transaction-item:first-child {
    padding-top: 4px;
}

.pcba-cc-transaction-item:last-child {
    border-bottom: 0;
}

.pcba-cc-transaction-item time {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-transaction-item i {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}

.pcba-cc-transaction-item div {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.pcba-cc-transaction-item strong {
    overflow: hidden;
    color: var(--pcba-cc-text);
    font-size: 13px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-transaction-item small {
    color: #64748b;
    font-size: 11px;
    line-height: 1.35;
}

.pcba-cc-transaction-item b {
    color: #334155;
    font-size: 13px;
    font-weight: 900;
    text-align: right;
    white-space: nowrap;
}

.pcba-cc-transaction-item--in i {
    background: #dcfce7;
    color: #15803d;
}

.pcba-cc-transaction-item--in b {
    color: #0f7a4f;
}

.pcba-cc-transaction-item--out i {
    background: #ffedd5;
    color: #c2410c;
}

.pcba-cc-transaction-item--out b {
    color: #c2410c;
}

.pcba-cc-ledger-empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 64px;
    border-top: 1px solid rgba(226, 232, 240, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    color: #64748b;
    font-size: 12px;
}

.pcba-cc-finance-analysis {
    display: grid;
    gap: 16px;
}

.pcba-cc-analysis-section {
    display: grid;
    gap: 10px;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    padding-top: 12px;
}

.pcba-cc-analysis-list {
    display: grid;
    gap: 0;
}

.pcba-cc-analysis-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid rgba(241, 245, 249, 0.95);
    padding: 8px 0;
}

.pcba-cc-analysis-row:last-child {
    border-bottom: 0;
}

.pcba-cc-analysis-row > span {
    display: grid;
    gap: 3px;
    min-width: 0;
    color: #334155;
    font-size: 12px;
}

.pcba-cc-analysis-row > span > strong {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-analysis-row small:not(.pcba-cc-cost-share) {
    color: #64748b;
    font-size: 11px;
}

.pcba-cc-analysis-row i {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    font-style: normal;
}

.pcba-cc-analysis-row b {
    color: #334155;
    font-size: 12px;
    font-weight: 850;
    text-align: right;
    white-space: nowrap;
}

.pcba-cc-cost-share {
    grid-column: 1 / -1;
    display: block;
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f7;
}

.pcba-cc-cost-share span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #94a3b8;
}

.pcba-cc-analysis-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #cbd5e1;
    padding-top: 10px;
    color: var(--pcba-cc-text);
    font-size: 13px;
    font-weight: 900;
}

.pcba-cc-debt-summary p {
    margin: 0;
    border-radius: 8px;
    padding: 7px 9px;
    background: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

.pcba-cc-money-debt {
    color: #b7791f !important;
}

.pcba-cc-profit-analysis > strong {
    color: #0f7a4f;
    font-size: 26px;
    font-weight: 900;
    line-height: 1.1;
}

.pcba-cc-profit-analysis--loss > strong {
    color: #b42318;
}

.pcba-cc-profit-analysis > small {
    color: #64748b;
    font-size: 12px;
}

.pcba-cc-empty--compact {
    min-height: 70px;
}

@keyframes pcbaProjectPulse {
    0% {
        opacity: 0.85;
        transform: scale(0.75);
    }
    70% {
        opacity: 0;
        transform: scale(1.45);
    }
    100% {
        opacity: 0;
        transform: scale(1.45);
    }
}

.pcba-cc-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pcba-cc-list__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-list__item:last-child {
    border-bottom: 0;
}

.pcba-cc-list__item strong {
    display: block;
    color: var(--pcba-cc-text);
    font-size: 12px;
}

.pcba-cc-list__item small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
}

.pcba-cc-timeline {
    display: grid;
    gap: 10px;
}

.pcba-cc-timeline__row {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.pcba-cc-timeline__date {
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eef3f9;
    color: var(--pcba-cc-muted);
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-timeline__body {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
}

.pcba-cc-timeline__bar {
    height: 8px;
    border-radius: 8px;
    background: #e9eef5;
}

.pcba-cc-timeline__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pcba-cc-blue);
}

.pcba-cc-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}

.pcba-cc-summary__item {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
}

.pcba-cc-summary__item span {
    color: var(--pcba-cc-muted);
    font-size: 12px;
    font-weight: 700;
}

.pcba-cc-summary__item strong {
    font-size: 20px;
}

.pcba-cc-loading,
.pcba-cc-empty,
.pcba-cc-error {
    display: grid;
    place-items: center;
    min-height: 180px;
    border: 1px dashed var(--pcba-cc-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.65);
    color: var(--pcba-cc-muted);
    text-align: center;
}

.pcba-cc-error {
    color: var(--pcba-cc-red);
}

.pcba-cc-empty--compact {
    min-height: 70px;
    padding: 12px;
}

.pcba-cc-modal {
    position: fixed;
    inset: 0;
    z-index: 10030;
    display: grid;
    place-items: center;
    padding: 18px;
}

.pcba-cc-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.52);
}

.pcba-cc-modal__panel {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow: auto;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--pcba-cc-shadow);
}

.pcba-cc-modal__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--pcba-cc-line);
    padding: 14px 16px;
}

.pcba-cc-modal__head h3 {
    margin: 0;
    color: var(--pcba-cc-text);
    font-size: 16px;
}

.pcba-cc-modal__head p {
    margin: 4px 0 0;
    color: var(--pcba-cc-muted);
    font-size: 12px;
}

.pcba-cc-modal__head button {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--pcba-cc-muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}

.pcba-cc-modal__error {
    margin: 0 16px;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fdecef;
    color: var(--pcba-cc-red);
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-project-create__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 0 16px;
}

.pcba-cc-project-create__grid label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: var(--pcba-cc-text);
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-project-create__grid input,
.pcba-cc-project-create__grid select,
.pcba-cc-project-create__grid textarea {
    width: 100%;
    min-height: 36px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 13px;
}

.pcba-cc-project-create__grid textarea {
    resize: vertical;
}

.pcba-cc-project-create__wide {
    grid-column: 1 / -1;
}

.pcba-cc-project-create__workflow-preview {
    display: grid;
    gap: 8px;
    border: 1px dashed #cfd9e8;
    border-radius: 8px;
    padding: 10px;
    background: #f8fbff;
    color: var(--pcba-cc-muted);
    font-size: 12px;
}

.pcba-cc-project-create__workflow-preview strong {
    color: var(--pcba-cc-text);
    font-size: 12px;
}

.pcba-cc-project-create__workflow-preview div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pcba-cc-project-create__workflow-preview em {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 0 8px;
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
    font-style: normal;
    font-weight: 800;
}

.pcba-cc-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--pcba-cc-line);
    padding: 12px 16px 14px;
}

.pcba-cc-transaction-form {
    max-width: 620px;
}

.pcba-cc-transaction-types {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 16px 12px;
}

.pcba-cc-transaction-type {
    min-height: 34px;
    border: 1px solid #dbe5f0;
    border-radius: 8px;
    background: #ffffff;
    color: #40516a;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
}

.pcba-cc-transaction-type.is-active {
    border-color: var(--pcba-cc-primary);
    background: #e8f3ff;
    color: var(--pcba-cc-primary);
}

.pcba-cc-transaction-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0 16px 16px;
}

.pcba-cc-transaction-form__grid label {
    display: grid;
    gap: 5px;
}

.pcba-cc-transaction-form__grid label span {
    color: #7d8da4;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-transaction-form__grid input,
.pcba-cc-transaction-form__grid select {
    min-height: 34px;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    padding: 0 9px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 12px;
}

.pcba-cc-transaction-form__wide,
.pcba-cc-transaction-preview {
    grid-column: 1 / -1;
}

.pcba-cc-transaction-preview {
    display: grid;
    gap: 6px;
    border: 1px solid #e5edf6;
    border-radius: 8px;
    padding: 10px;
    background: #f8fafc;
    color: #40516a;
    font-size: 12px;
    font-weight: 750;
}

.pcba-cc-transaction-preview b {
    color: var(--pcba-cc-text);
}

.pcba-cc-transaction-preview em {
    color: #b7791f;
    font-style: normal;
    font-weight: 900;
}

.pcba-cc-evidence {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
}

.pcba-cc-evidence-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-evidence-head small {
    color: #7d8da4;
    font-size: 10px;
    text-transform: none;
}

.pcba-cc-evidence-dropzone {
    display: grid;
    place-items: center;
    min-height: 92px;
    border: 1px dashed #b9c9dc;
    border-radius: 10px;
    padding: 14px;
    background: #f8fbff;
    color: #40516a;
    cursor: pointer;
    text-align: center;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.pcba-cc-evidence-dropzone strong {
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-evidence-dropzone small {
    color: #64748b;
    font-size: 11px;
}

.pcba-cc-evidence-dropzone--dragging,
.pcba-cc-evidence-dropzone:focus-visible {
    border-color: var(--pcba-cc-primary);
    background: #e9f7f8;
    box-shadow: 0 0 0 3px rgba(31, 122, 140, 0.12);
    outline: 0;
}

.pcba-cc-evidence-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pcba-cc-evidence-item,
.pcba-cc-evidence-add {
    position: relative;
    display: grid;
    align-content: start;
    gap: 5px;
    width: 92px;
    min-height: 112px;
    border: 1px solid #dfe7f2;
    border-radius: 10px;
    padding: 7px;
    background: #ffffff;
}

.pcba-cc-evidence-item.has-error {
    border-color: #f3b4bb;
    background: #fff7f8;
}

.pcba-cc-evidence-preview {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border: 0;
    border-radius: 8px;
    padding: 0;
    background: #eef3f8;
    color: #526175;
    cursor: pointer;
}

.pcba-cc-evidence-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcba-cc-evidence-preview--file span {
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-evidence-name {
    overflow: hidden;
    color: #40516a;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-evidence-item small {
    color: var(--pcba-cc-red);
    font-size: 10px;
    line-height: 1.25;
}

.pcba-cc-evidence-remove {
    position: absolute;
    top: 3px;
    right: 3px;
    display: inline-grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #b42318;
    cursor: pointer;
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
}

.pcba-cc-evidence-add {
    place-items: center;
    min-height: 86px;
    border-style: dashed;
    color: var(--pcba-cc-primary);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
}

.pcba-cc-evidence-camera-open {
    border-color: #b8dfe6;
    background: #ecf8f8;
}

.pcba-cc-evidence-camera {
    display: grid;
    gap: 8px;
    border: 1px solid #dbe7f2;
    border-radius: 10px;
    padding: 10px;
    background: #f8fbff;
}

.pcba-cc-evidence-camera video {
    display: block;
    width: 100%;
    max-height: 280px;
    border-radius: 8px;
    background: #0f172a;
    object-fit: contain;
}

.pcba-cc-evidence-camera > small {
    color: var(--pcba-cc-red);
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-evidence-camera__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.pcba-cc-evidence-camera__actions button {
    min-height: 32px;
    border: 1px solid var(--pcba-cc-primary);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--pcba-cc-primary);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-evidence-camera__actions button + button {
    border-color: #dbe5f0;
    background: #ffffff;
    color: #40516a;
}

.pcba-cc-evidence-indicator {
    justify-self: start;
    border: 1px solid #cfe5e9;
    border-radius: 999px;
    padding: 3px 8px;
    background: #ecf8f8;
    color: var(--pcba-cc-primary);
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 900;
}

.pcba-cc-evidence-viewer {
    z-index: 95;
}

.pcba-cc-evidence-viewer__panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(920px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    border-radius: 10px;
    background: #0f172a;
    box-shadow: var(--pcba-cc-shadow);
}

.pcba-cc-evidence-viewer__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    color: #ffffff;
}

.pcba-cc-evidence-viewer__head strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-evidence-viewer__head span {
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-evidence-viewer__head button,
.pcba-cc-evidence-viewer__nav {
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 23, 42, 0.76);
    color: #ffffff;
    cursor: pointer;
}

.pcba-cc-evidence-viewer__head button {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 20px;
}

.pcba-cc-evidence-viewer__body {
    position: relative;
    display: grid;
    min-height: 280px;
    place-items: center;
    padding: 14px;
}

.pcba-cc-evidence-viewer__body img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 120px);
    object-fit: contain;
}

.pcba-cc-evidence-viewer__nav {
    position: absolute;
    top: 50%;
    width: 34px;
    height: 44px;
    border-radius: 8px;
    font-size: 26px;
    transform: translateY(-50%);
}

.pcba-cc-evidence-viewer__nav--prev {
    left: 12px;
}

.pcba-cc-evidence-viewer__nav--next {
    right: 12px;
}

.pcba-cc-evidence-viewer__file {
    display: grid;
    gap: 12px;
    justify-items: center;
    border-radius: 10px;
    padding: 28px;
    background: #ffffff;
    color: var(--pcba-cc-text);
}

.pcba-cc-evidence-viewer__file a {
    color: var(--pcba-cc-primary);
    font-weight: 900;
}

.pcba-cc-project-create__ghost,
.pcba-cc-project-create__primary {
    min-height: 34px;
    border-radius: 8px;
    padding: 0 14px;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-project-create__ghost {
    border: 1px solid var(--pcba-cc-line);
    background: #ffffff;
    color: var(--pcba-cc-muted);
}

.pcba-cc-project-create__primary {
    border: 1px solid var(--pcba-cc-primary);
    background: var(--pcba-cc-primary);
    color: #ffffff;
}

.pcba-cc-project-create__primary:disabled {
    cursor: progress;
    opacity: 0.7;
}

.pcba-cc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.48);
    z-index: 25;
}

@media (max-width: 1420px) {
    .pcba-cc-kpis {
        grid-template-columns: repeat(4, minmax(150px, 1fr));
    }

    .pcba-cc-finance-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pcba-cc-project-row__main {
        grid-template-columns: auto minmax(240px, 300px) minmax(0, 1fr);
    }

    .pcba-cc-project-notes {
        grid-column: 2 / -1;
    }

    .pcba-cc-project-detail-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .pcba-cc-finance-kpis,
    .pcba-cc-finance-summary__kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi {
        border-right: 0;
        border-bottom: 1px solid rgba(226, 232, 240, 0.82);
        padding: 10px 0;
    }

    .pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .pcba-cc-project-detail-groups {
        grid-template-columns: 1fr;
    }

    .pcba-cc-finance-ledger-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .pcba-control-center {
        grid-template-columns: 1fr;
    }

    .pcba-cc-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

    .pcba-control-center.is-menu-open .pcba-cc-sidebar {
        transform: translateX(0);
    }

    .pcba-cc-main {
        height: 100vh;
    }

    .pcba-cc-menu {
        display: inline-grid;
        place-items: center;
    }

    .pcba-cc-topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    .pcba-cc-search {
        display: none;
    }

    .pcba-cc-project-toolbar {
        grid-template-columns: 1fr;
    }

    .pcba-cc-project-filters {
        justify-content: flex-start;
    }

    .pcba-cc-step-filter__grid {
        grid-template-columns: 1fr;
    }

    .pcba-cc-project-row__main {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .pcba-cc-project-progress,
    .pcba-cc-project-notes {
        grid-column: 1 / -1;
    }

    .pcba-cc-project-notes {
        grid-column: 1 / -1;
    }

    .pcba-cc-project-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcba-cc-project-detail-summary,
    .pcba-cc-finance-actionbar,
    .pcba-cc-finance-column-head,
    .pcba-cc-ledger-empty {
        align-items: stretch;
        flex-direction: column;
    }

    .pcba-cc-project-detail-summary__meta {
        min-width: 0;
        text-align: left;
    }

    .pcba-cc-finance-overview {
        padding: 14px;
    }

    .pcba-cc-finance-layout {
        grid-template-columns: 1fr;
    }

    .pcba-cc-grid,
    .pcba-cc-grid--even {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .pcba-cc-content {
        padding: 14px;
    }

    .pcba-cc-topbar {
        padding: 10px 12px;
        gap: 10px;
    }

    .pcba-cc-title small {
        display: none;
    }

    .pcba-cc-refresh {
        padding: 0 10px;
    }

    .pcba-cc-kpis,
    .pcba-cc-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcba-cc-summary--finance,
    .pcba-cc-finance-kpis,
    .pcba-cc-finance-summary__kpis,
    .pcba-cc-finance-layout,
    .pcba-cc-finance-ledger-layout,
    .pcba-cc-cost-split,
    .pcba-cc-inline-form,
    .pcba-cc-cost-split section > div {
        grid-template-columns: 1fr;
    }

    .pcba-cc-transaction-form__grid,
    .pcba-cc-transaction-types,
    .pcba-cc-cost-line {
        grid-template-columns: 1fr;
    }

    .pcba-cc-cashflow__item {
        grid-template-columns: 76px 16px minmax(0, 1fr);
    }

    .pcba-cc-cashflow__item::after {
        left: 84px;
    }

    .pcba-cc-cashflow__item b {
        grid-column: 3;
        text-align: left;
    }

    .pcba-cc-transaction-item {
        grid-template-columns: 76px 22px minmax(0, 1fr);
    }

    .pcba-cc-transaction-item b {
        grid-column: 3;
        text-align: left;
    }

    .pcba-cc-finance-actions--primary,
    .pcba-cc-finance-actions--primary span,
    .pcba-cc-finance-actionbar span,
    .pcba-cc-finance-section__head,
    .pcba-cc-finance-section__meta,
    .pcba-cc-finance-overview__head {
        align-items: stretch;
        flex-direction: column;
    }

    .pcba-cc-finance-actions button,
    .pcba-cc-finance-actionbar button,
    .pcba-cc-finance-column-head button,
    .pcba-cc-finance-link-action {
        width: 100%;
        justify-content: center;
    }

    .pcba-cc-kpi {
        min-height: 100px;
        padding: 13px;
    }

    .pcba-cc-kpi strong {
        font-size: 23px;
    }

    .pcba-cc-project-detail-grid {
        grid-template-columns: 1fr;
    }

    .pcba-cc-project-tabs-wrap {
        gap: 6px;
        padding: 9px 12px 10px;
    }

    .pcba-cc-project-tabs {
        gap: 7px;
        padding-bottom: 6px;
    }

    .pcba-cc-project-tab {
        min-height: 38px;
        gap: 6px;
        padding: 7px 10px 7px 8px;
        font-size: 11px;
    }

    .pcba-cc-project-tab-label {
        max-width: 96px;
    }

    .pcba-cc-project-flow {
        grid-auto-columns: minmax(66px, 78px);
        grid-template-columns: none;
    }

    .pcba-cc-project-create__grid {
        grid-template-columns: 1fr;
    }

    .pcba-cc-view__head {
        align-items: flex-start;
        flex-direction: column;
    }

    .pcba-cc-pcb-toolbar,
    .pcba-cc-pcb-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcba-cc-pcb-mfg-cards {
        grid-template-columns: 1fr;
    }

    .pcba-cc-pcb-table {
        min-width: 620px;
    }

    .pcba-cc-pcb-table th:nth-child(4),
    .pcba-cc-pcb-table td:nth-child(4),
    .pcba-cc-pcb-table th:nth-child(5),
    .pcba-cc-pcb-table td:nth-child(5),
    .pcba-cc-pcb-table th:nth-child(7),
    .pcba-cc-pcb-table td:nth-child(7),
    .pcba-cc-pcb-table th:nth-child(8),
    .pcba-cc-pcb-table td:nth-child(8) {
        display: none;
    }
}

@media (max-width: 480px) {
    .pcba-cc-kpis,
    .pcba-cc-summary,
    .pcba-cc-finance-summary__kpis {
        grid-template-columns: 1fr;
    }

    .pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi {
        border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    }

    .pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi:last-child {
        border-bottom: 0;
    }

    .pcba-cc-pcb-toolbar,
    .pcba-cc-pcb-kpis,
    .pcba-cc-pcb-specs,
    .pcba-cc-pcb-drawer-kpis,
    .pcba-cc-pcb-advanced div,
    .pcba-cc-pcb-align-grid {
        grid-template-columns: 1fr;
    }

    .pcba-cc-pcb-overview {
        grid-template-columns: 1fr;
    }

    .pcba-cc-pcb-table {
        min-width: 520px;
    }
}

/* PCB manufacturing mapping + Interactive BOM viewer */
.pcba-cc-pcb-mapping {
    border: 1px dashed var(--pcba-cc-line);
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fbfd;
}

.pcba-cc-pcb-mapping summary {
    cursor: pointer;
    color: var(--pcba-cc-text);
    font-size: 12px;
    font-weight: 850;
}

.pcba-cc-pcb-mapping__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 10px;
}

.pcba-cc-pcb-mapping__grid label {
    display: grid;
    gap: 5px;
}

.pcba-cc-pcb-mapping__grid select,
.pcba-cc-pcb-assembly__toolbar input[type="search"] {
    width: 100%;
    min-height: 32px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 6px 9px;
    background: #ffffff;
    color: var(--pcba-cc-text);
    font: inherit;
    font-size: 11px;
}

.pcba-cc-pcb-mapping > small {
    display: block;
    margin-top: 8px;
    color: var(--pcba-cc-muted);
    font-size: 10px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.pcba-cc-pcb-assembly__toolbar input[type="search"] {
    flex: 1 1 180px;
    max-width: 280px;
}

.pcba-cc-pcb-assembly__workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .85fr);
    gap: 10px;
    min-height: 0;
}

.pcba-cc-pcb-assembly__board-wrap,
.pcba-cc-pcb-assembly__parts {
    min-width: 0;
}

.pcba-cc-pcb-assembly__viewer {
    height: 420px;
}

.pcba-cc-pcb-assembly__hint {
    margin-top: 6px;
    color: var(--pcba-cc-muted);
    font-size: 10px;
    line-height: 1.45;
}

.pcba-cc-pcb-assembly__parts {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #ffffff;
}

.pcba-cc-pcb-assembly__parts-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid var(--pcba-cc-line);
    padding: 9px 10px;
}

.pcba-cc-pcb-assembly__parts-head strong {
    color: var(--pcba-cc-text);
    font-size: 12px;
}

.pcba-cc-pcb-assembly__parts-head small {
    color: var(--pcba-cc-muted);
    font-size: 10px;
}

.pcba-cc-pcb-assembly__bom-list {
    min-height: 0;
    max-height: 420px;
    overflow: auto;
}

.pcba-cc-pcb-assembly-table {
    margin: 0;
}

.pcba-cc-pcb-assembly-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f4f8fb;
}

.pcba-cc-pcb-assembly-table tbody tr {
    cursor: pointer;
    transition: background-color .12s ease, box-shadow .12s ease;
}

.pcba-cc-pcb-assembly-table tr.is-hovered td {
    background: #eef8fb;
}

.pcba-cc-pcb-assembly-table tr.is-selected td {
    background: #fff1dc;
    box-shadow: inset 3px 0 0 #f97316;
}

.pcba-cc-pcb-side-badge {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    border-radius: 999px;
    padding: 0 7px;
    background: #edf5f8;
    color: #356072;
    font-size: 9px;
    font-weight: 850;
}

.pcba-cc-pcb-assembly__tooltip {
    position: absolute;
    z-index: 120;
    display: grid;
    gap: 2px;
    min-width: 110px;
    max-width: 180px;
    border: 1px solid rgba(255,255,255,.42);
    border-radius: 8px;
    padding: 7px 9px;
    background: rgba(15,23,42,.94);
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(15,23,42,.22);
    pointer-events: none;
}

.pcba-cc-pcb-assembly__tooltip strong {
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-pcb-assembly__tooltip span,
.pcba-cc-pcb-assembly__tooltip small {
    color: #dbeafe;
    font-size: 10px;
}

@media (max-width: 1180px) {
    .pcba-cc-pcb-assembly__workspace {
        grid-template-columns: 1fr;
    }
    .pcba-cc-pcb-assembly__viewer {
        height: 360px;
    }
    .pcba-cc-pcb-assembly__bom-list {
        max-height: 320px;
    }
}

@media (max-width: 680px) {
    .pcba-cc-pcb-mapping__grid {
        grid-template-columns: 1fr;
    }
    .pcba-cc-pcb-assembly__viewer {
        height: 300px;
    }
    .pcba-cc-pcb-assembly__toolbar input[type="search"] {
        flex-basis: 100%;
        max-width: none;
    }
}

/* Assembly viewer v3: resize, zoom, pan, large workspace */
.pcba-cc-pcb-drawer--assembly {
    width: min(1120px, 94vw);
}

.pcba-cc-pcb-drawer--assembly .pcba-cc-pcb-drawer__body {
    min-height: 0;
}

.pcba-cc-pcb-assembly__toolbar {
    position: relative;
    z-index: 3;
}

.pcba-cc-pcb-assembly__zoom-group {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    color: inherit !important;
}

.pcba-cc-pcb-assembly__toolbar .pcba-cc-pcb-assembly__zoom-value {
    min-width: 54px;
    padding-inline: 7px;
    color: var(--pcba-cc-text);
}

.pcba-cc-pcb-assembly__toolbar .pcba-cc-pcb-assembly__expand {
    margin-left: auto;
    border-color: var(--pcba-cc-primary);
    color: var(--pcba-cc-primary);
}

.pcba-cc-pcb-assembly__workspace {
    --pcba-assembly-split: 64%;
    display: grid;
    grid-template-columns: minmax(0, var(--pcba-assembly-split)) 8px minmax(260px, 1fr);
    gap: 0;
    min-height: 480px;
    height: clamp(500px, calc(100dvh - 300px), 740px);
    align-items: stretch;
}

.pcba-cc-pcb-assembly__board-wrap {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    min-height: 0;
    padding-right: 8px;
}

.pcba-cc-pcb-assembly__viewer {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 480px;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    cursor: grab;
    background: #0b0f17;
}

.pcba-cc-pcb-assembly__viewer.is-panning,
.pcba-cc-pcb-assembly__viewer.is-panning canvas[data-pcba-pcb-marker-canvas] {
    cursor: grabbing !important;
}

.pcba-cc-pcb-assembly__scene {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    will-change: transform;
}

.pcba-cc-pcb-assembly__scene canvas,
.pcba-cc-pcb-assembly__scene > canvas {
    position: absolute;
    inset: 0;
}

.pcba-cc-pcb-assembly__scene canvas[data-pcba-pcb-marker-canvas] {
    z-index: 90;
    cursor: grab;
}

.pcba-cc-pcb-assembly__splitter {
    position: relative;
    z-index: 4;
    width: 8px;
    min-width: 8px;
    cursor: col-resize;
    touch-action: none;
}

.pcba-cc-pcb-assembly__splitter::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 3px;
    width: 2px;
    border-radius: 999px;
    background: var(--pcba-cc-line);
    transition: background-color .15s ease, width .15s ease, left .15s ease;
}

.pcba-cc-pcb-assembly__splitter:hover::before,
.pcba-cc-is-resizing-assembly .pcba-cc-pcb-assembly__splitter::before {
    left: 2px;
    width: 4px;
    background: var(--pcba-cc-primary);
}

.pcba-cc-is-resizing-assembly,
.pcba-cc-is-resizing-assembly * {
    cursor: col-resize !important;
    user-select: none !important;
}

.pcba-cc-pcb-assembly__parts {
    height: 100%;
    min-height: 0;
    margin-left: 8px;
}

.pcba-cc-pcb-assembly__bom-list {
    max-height: none;
    height: 100%;
    overflow: auto;
}

.pcba-cc-pcb-assembly__hint {
    min-height: 28px;
    padding-top: 4px;
}

.pcba-cc-pcb-assembly-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5vh 2vw;
}

.pcba-cc-pcb-assembly-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .56);
    backdrop-filter: blur(2px);
}

.pcba-cc-pcb-assembly-modal__panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: 92vw;
    height: 90vh;
    min-width: 760px;
    min-height: 540px;
    max-width: 97vw;
    max-height: 95vh;
    resize: both;
    overflow: hidden;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 26px 80px rgba(15, 23, 42, .32);
}

.pcba-cc-pcb-assembly-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-pcb-assembly-modal__head > div {
    display: grid;
    gap: 2px;
}

.pcba-cc-pcb-assembly-modal__head strong {
    color: var(--pcba-cc-text);
    font-size: 14px;
}

.pcba-cc-pcb-assembly-modal__head small {
    color: var(--pcba-cc-muted);
    font-size: 11px;
}

.pcba-cc-pcb-assembly-modal__head button {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    background: #fff;
    color: var(--pcba-cc-muted);
    cursor: pointer;
    font-size: 20px;
}

.pcba-cc-pcb-assembly-modal > .pcba-cc-pcb-assembly-modal__panel > .pcba-cc-pcb-assembly__toolbar {
    padding: 8px 12px;
    border-bottom: 1px solid var(--pcba-cc-line);
    flex-wrap: nowrap;
}

.pcba-cc-pcb-assembly-modal .pcba-cc-pcb-assembly__expand {
    display: none;
}

.pcba-cc-pcb-assembly-modal__body {
    min-height: 0;
    overflow: hidden;
    padding: 10px 12px 12px;
}

.pcba-cc-pcb-assembly__workspace--modal {
    height: 100%;
    min-height: 0;
}

.pcba-cc-pcb-assembly__workspace--modal .pcba-cc-pcb-assembly__viewer {
    min-height: 0;
    height: 100%;
}

.pcba-cc-pcb-assembly__workspace--modal .pcba-cc-pcb-assembly__bom-list {
    max-height: none;
}

@media (max-width: 1180px) {
    .pcba-cc-pcb-drawer--assembly {
        width: min(900px, 96vw);
    }
    .pcba-cc-pcb-assembly__workspace:not(.pcba-cc-pcb-assembly__workspace--modal) {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 0;
    }
    .pcba-cc-pcb-assembly__workspace:not(.pcba-cc-pcb-assembly__workspace--modal) .pcba-cc-pcb-assembly__splitter {
        display: none;
    }
    .pcba-cc-pcb-assembly__workspace:not(.pcba-cc-pcb-assembly__workspace--modal) .pcba-cc-pcb-assembly__board-wrap {
        padding-right: 0;
    }
    .pcba-cc-pcb-assembly__workspace:not(.pcba-cc-pcb-assembly__workspace--modal) .pcba-cc-pcb-assembly__viewer {
        height: 480px;
        min-height: 420px;
    }
    .pcba-cc-pcb-assembly__workspace:not(.pcba-cc-pcb-assembly__workspace--modal) .pcba-cc-pcb-assembly__parts {
        height: 340px;
        margin: 10px 0 0;
    }
}

@media (max-width: 760px) {
    .pcba-cc-pcb-drawer--assembly {
        width: 100vw;
    }
    .pcba-cc-pcb-assembly-modal {
        padding: 1vh 1vw;
    }
    .pcba-cc-pcb-assembly-modal__panel {
        width: 98vw;
        height: 96vh;
        min-width: 0;
        min-height: 0;
        resize: none;
        border-radius: 10px;
    }
    .pcba-cc-pcb-assembly__workspace--modal {
        grid-template-columns: 1fr;
        overflow: auto;
    }
    .pcba-cc-pcb-assembly__workspace--modal .pcba-cc-pcb-assembly__splitter {
        display: none;
    }
    .pcba-cc-pcb-assembly__workspace--modal .pcba-cc-pcb-assembly__board-wrap {
        padding-right: 0;
        min-height: 52vh;
    }
    .pcba-cc-pcb-assembly__workspace--modal .pcba-cc-pcb-assembly__parts {
        height: 36vh;
        margin: 10px 0 0;
    }
    .pcba-cc-pcb-assembly-modal > .pcba-cc-pcb-assembly-modal__panel > .pcba-cc-pcb-assembly__toolbar {
        flex-wrap: wrap;
    }
}

.pcba-cc-doc-center {
    position: relative;
}

.pcba-cc-doc-kpis,
.pcba-cc-doc-filters,
.pcba-cc-doc-form__grid {
    display: grid;
    gap: 10px;
}

.pcba-cc-doc-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 14px;
}

.pcba-cc-doc-filters {
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(140px, 1fr));
    padding: 14px;
    border-bottom: 1px solid var(--pcba-cc-line);
}

.pcba-cc-doc-filters input,
.pcba-cc-doc-filters select,
.pcba-cc-doc-form input,
.pcba-cc-doc-form select,
.pcba-cc-doc-form textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: #1f2d3d;
    font: inherit;
    font-size: 13px;
}

.pcba-cc-doc-tabs,
.pcba-cc-doc-mode,
.pcba-cc-doc-detail-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pcba-cc-doc-tabs {
    padding: 12px 14px 0;
}

.pcba-cc-doc-tabs button,
.pcba-cc-doc-mode button,
.pcba-cc-doc-detail-tabs button {
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 8px 11px;
    background: #fff;
    color: #526175;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 850;
}

.pcba-cc-doc-tabs button.is-active,
.pcba-cc-doc-mode button.is-active,
.pcba-cc-doc-detail-tabs button.is-active {
    border-color: var(--pcba-cc-primary);
    background: #e9fbff;
    color: #117187;
}

.pcba-cc-doc-tabs b {
    margin-left: 4px;
}

.pcba-cc-doc-table td strong,
.pcba-cc-doc-table td small {
    display: block;
}

.pcba-cc-doc-table td small {
    margin-top: 3px;
    color: #74839a;
    font-size: 11px;
}

.pcba-cc-pill.is-ok {
    border-color: #bbf7d0;
    background: #dcfce7;
    color: #15803d;
}

.pcba-cc-pill.is-warning {
    border-color: #fde68a;
    background: #fef3c7;
    color: #a16207;
}

.pcba-cc-pill.is-muted {
    border-color: #e2e8f0;
    background: #f1f5f9;
    color: #64748b;
}

.pcba-cc-icon-btn {
    min-width: 40px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 7px 10px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    font-weight: 900;
}

.pcba-cc-side-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    width: min(650px, 100vw);
    height: 100vh;
    border-left: 1px solid #dbe5f1;
    background: #fff;
    box-shadow: -18px 0 36px rgba(15, 23, 42, 0.12);
}

.pcba-cc-side-drawer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #dbe5f1;
    padding: 18px 20px;
}

.pcba-cc-side-drawer__head small {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-side-drawer__head h3 {
    margin: 4px 0 0;
    color: #1f2937;
    font-size: 19px;
}

.pcba-cc-side-drawer__head button {
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    font-size: 22px;
    font-weight: 800;
}

.pcba-cc-side-drawer__body,
.pcba-cc-doc-form {
    display: grid;
    gap: 14px;
}

.pcba-cc-side-drawer__body {
    overflow: auto;
    padding: 18px 20px 24px;
}

.pcba-cc-doc-detail-tabs {
    border-bottom: 1px solid #dbe5f1;
    padding: 12px 20px;
}

.pcba-cc-doc-detail-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.pcba-cc-doc-detail-list div {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 10px;
}

.pcba-cc-doc-detail-list dt,
.pcba-cc-doc-detail-list dd {
    margin: 0;
}

.pcba-cc-doc-detail-list dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-doc-detail-list dd {
    min-width: 0;
    color: #1f2937;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.pcba-cc-doc-form label {
    display: grid;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.pcba-cc-doc-form__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pcba-cc-bom-center .pcba-cc-table td small {
    display: block;
    margin-top: 3px;
    color: #74839a;
    font-size: 11px;
}

.pcba-cc-bom-center .pcba-cc-summary__item {
    min-width: 0;
}

.pcba-cc-bom-center .pcba-cc-summary__item strong {
    overflow-wrap: anywhere;
    line-height: 1.25;
}

/* BOM control center: compact, sheet-like and color-coded. */
.pcba-cc-bom-center {
    gap: 10px;
}

.pcba-cc-bom-center .pcba-cc-view-head {
    display: flex;
    align-items: center;
    min-height: 42px;
    margin: 0;
}

.pcba-cc-bom-center .pcba-cc-view-head h2 {
    margin: 1px 0 0 !important;
    color: #172033;
    font-size: 24px !important;
    font-weight: 850;
    line-height: 1.12;
}

.pcba-cc-bom-eyebrow {
    display: block;
    color: #0f8296;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .09em;
    line-height: 1;
    text-transform: uppercase;
}

.pcba-cc-bom-summary {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 8px;
}

.pcba-cc-bom-summary .pcba-cc-summary__item {
    position: relative;
    gap: 2px;
    min-height: 60px;
    overflow: hidden;
    border-radius: 9px;
    padding: 9px 12px 9px 15px;
    box-shadow: none;
}

.pcba-cc-bom-summary .pcba-cc-summary__item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #38bdf8;
}

.pcba-cc-bom-summary .pcba-cc-summary__item:nth-child(2)::before {
    background: #8b5cf6;
}

.pcba-cc-bom-summary .pcba-cc-summary__item:nth-child(3)::before {
    background: #22c55e;
}

.pcba-cc-bom-summary .pcba-cc-summary__item span {
    font-size: 10px;
}

.pcba-cc-bom-summary .pcba-cc-summary__item strong {
    color: #0369a1;
    font-size: 19px;
}

.pcba-cc-bom-summary .pcba-cc-summary__item:nth-child(2) strong {
    color: #6d28d9;
}

.pcba-cc-bom-summary .pcba-cc-summary__item:nth-child(3) strong {
    color: #15803d;
}

.pcba-cc-bom-center > .pcba-cc-panel {
    border-radius: 10px;
}

.pcba-cc-bom-center .pcba-cc-doc-filters {
    grid-template-columns: minmax(260px, 520px) minmax(180px, 250px);
    gap: 8px;
    padding: 9px 12px;
    background: #f8fafc;
}

.pcba-cc-bom-center .pcba-cc-doc-filters input,
.pcba-cc-bom-center .pcba-cc-doc-filters select {
    min-height: 36px;
    border-radius: 7px;
    padding: 6px 10px;
    font-size: 12px;
}

.pcba-cc-bom-center > .pcba-cc-panel > .pcba-cc-panel__body {
    padding: 0;
}

.pcba-cc-bom-center .pcba-cc-table {
    min-width: 820px;
}

.pcba-cc-bom-center .pcba-cc-table th {
    height: 36px;
    padding: 7px 10px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .02em;
}

.pcba-cc-bom-center .pcba-cc-table td {
    height: 46px;
    padding: 7px 10px;
    font-size: 11px;
}

.pcba-cc-bom-center .pcba-cc-table tbody tr:hover td {
    background: #f8fbff;
}

.pcba-cc-bom-center .pcba-cc-pill {
    min-height: 21px;
    border-radius: 999px;
    padding: 0 8px;
    font-size: 10px;
}

.pcba-cc-bom-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 76px;
    min-height: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 0 10px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    white-space: nowrap;
}

.pcba-cc-bom-table-action:hover {
    border-color: #94a3b8;
    background: #f8fafc;
    color: #0f172a;
}

.pcba-cc-bom-table-action.is-picking {
    border-color: #67d4e3;
    background: #e9fbff;
    color: #0e7490;
}

.pcba-cc-bom-table-action.is-picking:hover {
    border-color: #22b8cf;
    background: #d9f7fc;
}

.pcba-cc-bom-table-action.is-complete {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}

.pcba-cc-bom-table-action.is-release {
    border-color: #c4b5fd;
    background: #f5f3ff;
    color: #6d28d9;
}

[data-pcba-cc-nav-group="bom"] .pcba-cc-nav__submenu {
    gap: 2px;
}

[data-pcba-cc-nav-group="bom"] .pcba-cc-nav__subitem {
    min-height: 29px;
    border-radius: 7px;
    padding: 4px 8px;
    background: transparent;
    color: #b6c2d4;
    font-size: 11.5px;
    font-weight: 750;
}

[data-pcba-bom-nav-tab="templates"] .dashicons { color: #38bdf8; }
[data-pcba-bom-nav-tab="working"] .dashicons { color: #a78bfa; }
[data-pcba-bom-nav-tab="picking"] .dashicons { color: #fbbf24; }
[data-pcba-bom-nav-tab="releases"] .dashicons { color: #4ade80; }

[data-pcba-cc-nav-group="bom"] .pcba-cc-nav__subitem:hover {
    background: rgba(255, 255, 255, .06);
}

[data-pcba-cc-nav-group="bom"] .pcba-cc-nav__subitem.is-active {
    background: rgba(56, 189, 248, .14);
    color: #f8fafc;
    box-shadow: inset 2px 0 0 #38bdf8;
}

[data-pcba-cc-nav-group="bom"] .pcba-cc-nav__subitem.is-action {
    color: #ffd166;
    background: rgba(255, 209, 102, .07);
}

[data-pcba-bom-nav-action="template"] {
    margin-top: 5px;
}

@media (max-width: 820px) {
    .pcba-cc-bom-summary,
    .pcba-cc-bom-center .pcba-cc-doc-filters {
        grid-template-columns: 1fr;
    }
}

.pcba-cc-bom-action-error {
    display: block;
    min-height: 0;
    margin: 12px 0 0;
    border-style: solid;
    border-color: #fecaca;
    padding: 10px 12px;
    background: #fff7f7;
    color: #dc2626;
    text-align: left;
}

.pcba-cc-bom-release-drawer {
    width: min(var(--pcba-bom-drawer-width, 980px), 96vw);
    min-width: min(560px, 96vw);
}

.pcba-cc-bom-drawer-resize {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -7px;
    z-index: 12;
    width: 14px;
    cursor: col-resize;
    touch-action: none;
}

.pcba-cc-bom-drawer-resize::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 6px;
    width: 2px;
    background: transparent;
    transition: background .15s ease, width .15s ease;
}

.pcba-cc-bom-drawer-resize span {
    position: absolute;
    top: 50%;
    left: 0;
    display: grid;
    place-items: center;
    width: 14px;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 7px 0 0 7px;
    background: #f8fafc;
    color: #64748b;
    font-size: 16px;
    transform: translateY(-50%);
}

.pcba-cc-bom-drawer-resize:hover::before,
.pcba-cc-is-resizing-bom-drawer .pcba-cc-bom-drawer-resize::before {
    width: 3px;
    background: #1a73e8;
}

.pcba-cc-is-resizing-bom-drawer,
.pcba-cc-is-resizing-bom-drawer * {
    cursor: col-resize !important;
    user-select: none !important;
}

.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head {
    align-items: center;
    padding: 12px 16px;
}

.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head h3 {
    margin-top: 2px;
    font-size: 17px;
}

.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head button {
    width: 34px;
    height: 34px;
    font-size: 19px;
}

.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__body {
    gap: 10px;
    padding: 12px 14px 18px;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis {
    gap: 8px;
    margin-bottom: 0;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis > div {
    min-height: 62px;
    border: 1px solid #dbe5f1;
    border-radius: 9px;
    padding: 9px 11px;
    background: #f8fafc;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis > div:nth-child(2) {
    border-color: #bae6fd;
    background: #f0f9ff;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis > div:nth-child(3) {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis > div:nth-child(4) {
    border-color: #fecaca;
    background: #fff7f7;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list div {
    display: block;
    min-width: 0;
    border: 0;
    border-right: 1px solid #e2e8f0;
    padding: 8px 10px;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list div:last-child {
    border-right: 0;
}

.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list dd {
    margin-top: 3px;
    font-weight: 750;
}

.pcba-cc-bom-release-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    min-height: 34px;
}

.pcba-cc-bom-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pcba-cc-bom-template-create {
    width: min(1180px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
}

.pcba-cc-bom-template-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 0 14px;
}

.pcba-cc-bom-template-meta label {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #475569;
    font-size: 10px;
    font-weight: 850;
}

.pcba-cc-bom-template-meta label.is-wide {
    grid-column: span 2;
}

.pcba-cc-bom-template-meta input,
.pcba-cc-bom-template-meta select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #dbe5f1;
    border-radius: 7px;
    padding: 6px 9px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-size: 12px;
}

.pcba-cc-bom-template-client-box {
    position: relative;
    min-width: 0;
}

.pcba-cc-bom-template-client-suggestions {
    position: absolute;
    z-index: 80;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow: auto;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    padding: 4px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.pcba-cc-bom-template-client-suggestions[hidden] {
    display: none;
}

.pcba-cc-bom-template-client-suggestions button {
    display: flex;
    width: 100%;
    min-height: 34px;
    align-items: center;
    border: 0;
    border-radius: 6px;
    padding: 7px 9px;
    background: transparent;
    color: #25344a;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    text-align: left;
}

.pcba-cc-bom-template-client-suggestions button:hover,
.pcba-cc-bom-template-client-suggestions button:focus-visible {
    outline: none;
    background: #eef8fb;
    color: #087990;
}

.pcba-cc-bom-template-client-empty {
    padding: 9px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
}

.pcba-cc-bom-template-grid-wrap {
    max-height: min(480px, 52vh);
    margin: 0 14px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    background: #fff;
}

.pcba-cc-bom-template-grid {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.pcba-cc-bom-template-grid th,
.pcba-cc-bom-template-grid td {
    height: 32px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 0;
    background: #fff;
}

.pcba-cc-bom-template-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    height: 34px;
    padding: 0 7px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 900;
    text-align: left;
}

.pcba-cc-bom-template-grid th:first-child,
.pcba-cc-bom-template-grid td:first-child {
    width: 34px;
    min-width: 34px;
    max-width: 34px;
}

/* Compact columns so the BOM sheet fits beside Assembly without horizontal scroll. */
.pcba-cc-bom-template-grid th:nth-child(2) { width: 34%; }
.pcba-cc-bom-template-grid th:nth-child(3) { width: 16%; }
.pcba-cc-bom-template-grid th:nth-child(4) { width: 10%; }
.pcba-cc-bom-template-grid th:nth-child(5) { width: 18%; }
.pcba-cc-bom-template-grid th:nth-child(6) { width: auto; }
.pcba-cc-bom-template-grid th:last-child,
.pcba-cc-bom-template-grid td:last-child {
    width: 30px;
    min-width: 30px;
    max-width: 30px;
}

.pcba-cc-bom-template-grid input {
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 31px;
    border: 0;
    border-radius: 0;
    padding: 4px 7px;
    background: transparent;
    color: #172033;
    font: inherit;
    font-size: 11px;
    outline: none;
}

.pcba-cc-bom-template-grid input:focus {
    box-shadow: inset 0 0 0 2px #2563eb;
}

.pcba-cc-bom-template-row-number {
    background: #f8fafc !important;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

.pcba-cc-bom-template-row-delete {
    width: 100%;
    height: 31px;
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
}

.pcba-cc-bom-template-row-delete:hover {
    background: #fff1f2;
    color: #dc2626;
}

.pcba-cc-bom-template-grid-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 14px;
    color: #64748b;
    font-size: 10px;
    font-weight: 750;
}

@media (max-width: 780px) {
    .pcba-cc-bom-template-meta {
        grid-template-columns: minmax(0, 1fr);
    }

    .pcba-cc-bom-template-meta label.is-wide {
        grid-column: auto;
    }
}

.pcba-cc-bom-compact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    border: 1px solid #dbe5f1;
    border-radius: 7px;
    padding: 4px 9px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    transition: border-color .15s ease, background .15s ease, color .15s ease;
}

.pcba-cc-bom-compact-btn b {
    color: #0284c7;
    font-size: 14px;
    line-height: 1;
}

.pcba-cc-bom-compact-btn:hover:not(:disabled) {
    border-color: #7dd3fc;
    background: #f0f9ff;
    color: #0369a1;
}

.pcba-cc-bom-compact-btn.is-primary {
    border-color: #86efac;
    background: #ecfdf5;
    color: #166534;
}

.pcba-cc-bom-compact-btn.is-primary b {
    color: #16a34a;
}

.pcba-cc-bom-compact-btn.is-primary:hover:not(:disabled) {
    border-color: #22c55e;
    background: #dcfce7;
    color: #14532d;
}

.pcba-cc-bom-compact-btn.is-warning {
    border-color: #fcd34d;
    background: #fffbeb;
    color: #92400e;
}

.pcba-cc-bom-compact-btn.is-warning b {
    color: #d97706;
}

.pcba-cc-bom-compact-btn.is-warning:hover:not(:disabled) {
    border-color: #f59e0b;
    background: #fef3c7;
    color: #78350f;
}

.pcba-cc-bom-compact-btn.is-danger {
    border-color: #fecaca;
    background: #fff7f7;
    color: #b42318;
}

.pcba-cc-bom-compact-btn.is-danger b {
    color: #b42318;
}

.pcba-cc-bom-compact-btn.is-danger:hover:not(:disabled) {
    border-color: #fca5a5;
    background: #fef2f2;
}

.pcba-cc-bom-compact-btn:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.pcba-cc-bom-linked-docs {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 4px 0;
    overflow-x: auto;
}

.pcba-cc-bom-linked-docs > small {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .035em;
}

.pcba-cc-bom-linked-docs > div {
    display: flex;
    gap: 5px;
}

.pcba-cc-bom-doc-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 24px;
    border: 1px solid #dbe5f1;
    border-radius: 999px;
    padding: 3px 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 10px;
    white-space: nowrap;
}

.pcba-cc-bom-doc-chip.is-stock {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.pcba-cc-bom-doc-chip.is-purchase {
    border-color: #fde68a;
    background: #fffbeb;
    color: #92400e;
}

.pcba-cc-bom-autosave {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 9px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}

.pcba-cc-bom-autosave i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.pcba-cc-bom-autosave.is-saved {
    background: #ecfdf5;
    color: #15803d;
}

.pcba-cc-bom-autosave.is-dirty,
.pcba-cc-bom-autosave.is-saving {
    background: #fffbeb;
    color: #b45309;
}

.pcba-cc-bom-autosave.is-saving i {
    animation: pcbaBomSavingPulse .8s ease-in-out infinite alternate;
}

.pcba-cc-bom-autosave.is-error {
    background: #fef2f2;
    color: #dc2626;
}

@keyframes pcbaBomSavingPulse {
    to { opacity: .25; transform: scale(.72); }
}

.pcba-cc-bom-picking-table {
    overflow: auto;
    max-height: none;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    background: #fff;
}

.pcba-cc-sheet-table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: auto;
}

.pcba-cc-sheet-table--release {
    min-width: 900px;
}

.pcba-cc-sheet-table th,
.pcba-cc-sheet-table td {
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 4px 6px;
}

.pcba-cc-sheet-table th:last-child,
.pcba-cc-sheet-table td:last-child {
    border-right: 0;
}

.pcba-cc-sheet-table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    height: 30px;
    padding: 5px 6px;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    letter-spacing: .02em;
    white-space: nowrap;
}

.pcba-cc-sheet-table th:first-child,
.pcba-cc-sheet-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 220px;
    max-width: none;
    background: #fff;
    box-shadow: 1px 0 0 #e2e8f0;
}

.pcba-cc-sheet-table thead th:first-child {
    z-index: 7;
    background: #f8fafc;
}

.pcba-cc-sheet-table td {
    height: 34px;
    font-size: 11px;
}

.pcba-cc-sheet-table .pcba-cc-sheet-cell.is-editable {
    min-width: 0;
    padding: 0;
    background: #fff;
}

.pcba-cc-sheet-table .pcba-cc-sheet-cell.is-editable:focus-within {
    position: relative;
    z-index: 4;
    box-shadow: inset 0 0 0 2px #1a73e8;
}

.pcba-cc-sheet-table input[type="number"],
.pcba-cc-sheet-table input[type="text"],
.pcba-cc-sheet-table select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 32px;
    border: 0;
    border-radius: 0;
    outline: 0;
    padding: 5px 6px;
    background: transparent;
    color: #1f2937;
    font: inherit;
    font-size: 11px;
}

.pcba-cc-sheet-table select {
    padding-right: 20px;
    cursor: pointer;
}

.pcba-cc-sheet-table .pcba-cc-sheet-cell small + input {
    min-height: 23px;
    padding-top: 2px;
    padding-bottom: 4px;
    font-weight: 800;
}

.pcba-cc-sheet-table .pcba-cc-sheet-cell > small:first-child {
    padding: 3px 6px 0;
    color: #94a3b8;
    font-size: 9px;
}

.pcba-cc-sheet-number {
    text-align: right !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.pcba-cc-sheet-component {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pcba-cc-sheet-component strong {
    min-width: 0;
    color: #1f2937;
    font-size: 11px;
    line-height: 1.22;
    overflow-wrap: break-word;
}

.pcba-cc-sheet-component > div {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 8px;
    min-height: 0;
}

.pcba-cc-sheet-component small {
    margin: 0 !important;
    color: #8291a6 !important;
    font-size: 9px !important;
    line-height: 1.15;
    white-space: nowrap;
}

.pcba-cc-sheet-component small:empty {
    display: none !important;
}

.pcba-cc-sheet-table .pcba-cc-col-component {
    width: 34%;
}

.pcba-cc-sheet-table .pcba-cc-col-sku {
    width: 112px;
    min-width: 96px;
}

.pcba-cc-sheet-table .pcba-cc-col-qty,
.pcba-cc-sheet-table .pcba-cc-col-shortage {
    width: 1%;
    min-width: 58px;
    white-space: nowrap;
}

.pcba-cc-sheet-table .pcba-cc-col-stock {
    width: 78px;
    min-width: 70px;
}

.pcba-cc-sheet-table .pcba-cc-col-status {
    width: 106px;
    min-width: 92px;
    white-space: nowrap;
}

.pcba-cc-sheet-table .pcba-cc-col-note {
    width: 16%;
    min-width: 110px;
}

.pcba-cc-sheet-number.is-reserved {
    color: #0369a1;
    background: #f0f9ff;
}

.pcba-cc-sheet-save-col {
    width: 34px;
    min-width: 34px !important;
    max-width: 34px;
    padding: 0 !important;
    text-align: center !important;
}

.pcba-cc-row-save-state {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ecfdf5;
    color: #16a34a;
    font-size: 11px;
    font-weight: 950;
}

.pcba-cc-row-save-state.is-dirty,
.pcba-cc-row-save-state.is-saving {
    background: #fef3c7;
    color: #b45309;
}

.pcba-cc-row-save-state.is-error {
    background: #fee2e2;
    color: #dc2626;
}

.pcba-cc-sheet-row.is-dirty .is-editable {
    background: #fffdf3;
}

.pcba-cc-sheet-row.is-saving .pcba-cc-row-save-state {
    animation: pcbaBomSavingPulse .7s ease-in-out infinite alternate;
}

.pcba-cc-sheet-row.is-save-error td {
    border-bottom-color: #fca5a5;
}

.pcba-cc-sheet-row.is-shortage td:not(.is-editable),
.pcba-cc-sheet-row.is-shortage td:first-child {
    background: #fff5f5;
}

.pcba-cc-sheet-row.is-purchase td:not(.is-editable),
.pcba-cc-sheet-row.is-purchase td:first-child {
    background: #fffaf0;
}

.pcba-cc-sheet-row.is-picking td:not(.is-editable),
.pcba-cc-sheet-row.is-picking td:first-child {
    background: #fffbeb;
}

.pcba-cc-sheet-row.is-ready td:not(.is-editable),
.pcba-cc-sheet-row.is-ready td:first-child {
    background: #f0fdf4;
}

.pcba-cc-sheet-row:hover td:not(.is-editable),
.pcba-cc-sheet-row:hover td:first-child {
    filter: brightness(.985);
}

.pcba-cc-bom-picking-table input[type="text"],
.pcba-cc-bom-picking-table select {
    min-height: 34px;
    width: 100%;
    min-width: 120px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 6px 8px;
    background: #fff;
    color: #1f2937;
    font: inherit;
    font-size: 12px;
}

.pcba-cc-bom-picking-table .pcba-cc-sheet-table input[type="text"],
.pcba-cc-bom-picking-table .pcba-cc-sheet-table input[type="number"],
.pcba-cc-bom-picking-table .pcba-cc-sheet-table select {
    border: 0;
    border-radius: 0;
    min-width: 0;
    min-height: 32px;
    padding: 5px 6px;
    background: transparent;
    font-size: 11px;
}

.pcba-cc-bom-warning {
    display: inline-block;
    margin-top: 4px;
    color: #b45309;
    font-size: 11px;
    font-weight: 850;
}

.pcba-cc-muted-text {
    color: #74839a;
    font-size: 12px;
    font-weight: 800;
}

@media (max-width: 820px) {
    .pcba-cc-doc-kpis,
    .pcba-cc-doc-filters,
    .pcba-cc-doc-form__grid {
        grid-template-columns: 1fr;
    }

    .pcba-cc-side-drawer {
        width: 100vw;
    }

    .pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list div:nth-child(2) {
        border-right: 0;
    }

    .pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list div:nth-child(-n+2) {
        border-bottom: 1px solid #e2e8f0;
    }

    .pcba-cc-bom-release-actions {
        align-items: flex-start;
    }
}

/* 0.8.2 - unified BOM project/release flow */
.pcba-cc-bom-table-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.pcba-cc-bom-table-actions .pcba-cc-bom-table-action {
    white-space: nowrap;
}

.pcba-cc-bom-process {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    margin: -2px 0 12px;
    padding: 9px 10px;
    border: 1px solid #dbe5ef;
    border-radius: 10px;
    background: #f8fbfd;
    scrollbar-width: thin;
}
.pcba-cc-bom-process__step {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    color: #61728d;
    font-size: 11px;
    font-weight: 850;
    white-space: nowrap;
}
.pcba-cc-bom-process__step.is-active {
    background: var(--pcba-cc-primary-soft);
    color: var(--pcba-cc-primary);
    box-shadow: inset 0 0 0 1px rgba(31, 122, 140, 0.2);
}
.pcba-cc-bom-process i {
    color: #9aaabd;
    font-style: normal;
    font-size: 12px;
}

.pcba-cc-bom-working-drawer {
    width: min(1120px, calc(100vw - 56px));
}
.pcba-cc-working-bom-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.pcba-cc-bom-working-note {
    padding: 9px 11px;
    border: 1px solid #d8e7ec;
    border-radius: 8px;
    background: #f2fbfc;
    color: #486277;
    font-size: 11px;
    font-weight: 700;
}
.pcba-cc-working-bom-grid {
    min-width: 940px;
}
.pcba-cc-working-bom-grid input {
    width: 100%;
    min-width: 74px;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 7px 8px;
}
.pcba-cc-working-bom-grid td:has(input) {
    padding: 0;
    background: #fff;
}


/* 0.8.4 - Picker-first BOM UI */
.pcba-cc-bom-picker-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-kpis > div:nth-child(2) {
    border-color: #dbe5f1;
    background: #f8fafc;
}

.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-kpis > div:nth-child(3) {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-kpis > div:nth-child(4) {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-kpis > div:nth-child(5) {
    border-color: #99f6e4;
    background: #f0fdfa;
}

.pcba-cc-sheet-table--release {
    min-width: 1040px;
}

.pcba-cc-sheet-table--release .pcba-cc-col-component {
    width: 28%;
    min-width: 260px;
}

.pcba-cc-sheet-table--release .pcba-cc-col-sku {
    width: 245px;
    min-width: 220px;
}

.pcba-cc-sheet-table--release .pcba-cc-col-stock {
    width: 96px;
    min-width: 90px;
    text-align: center !important;
}

.pcba-cc-sheet-table--release .pcba-cc-col-status {
    width: 126px;
    min-width: 116px;
}

.pcba-cc-bom-sku-editor {
    display: grid;
    gap: 4px;
    padding: 4px 5px 5px;
}

.pcba-cc-bom-sku-editor > small:first-child {
    padding: 0 !important;
    color: #94a3b8;
    font-size: 9px;
}

.pcba-cc-bom-sku-editor input {
    min-height: 28px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 6px !important;
    padding: 4px 7px !important;
    background: #fff !important;
    font-weight: 850;
}

.pcba-cc-bom-sku-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.pcba-cc-bom-stock-out,
.pcba-cc-bom-warning {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 9px;
    font-weight: 850;
}

.pcba-cc-bom-stock-out {
    background: #fee2e2;
    color: #b91c1c;
}

.pcba-cc-bom-warning {
    background: #fef3c7;
    color: #b45309;
}

.pcba-cc-bom-sku-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 1px;
}

.pcba-cc-bom-sku-chip {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas: "tag sku" "meta meta";
    align-items: center;
    gap: 1px 4px;
    min-width: 0;
    border: 1px solid #dbe5f1;
    border-radius: 7px;
    padding: 4px 6px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    text-align: left;
}

.pcba-cc-bom-sku-chip:hover {
    border-color: #60a5fa;
    background: #eff6ff;
}

.pcba-cc-bom-sku-chip small {
    grid-area: tag;
    padding: 0 !important;
    color: #64748b !important;
    font-size: 8px !important;
    font-weight: 800;
}

.pcba-cc-bom-sku-chip b {
    grid-area: sku;
    color: #0f172a;
    font-size: 9px;
}

.pcba-cc-bom-sku-chip span {
    grid-area: meta;
    color: #64748b;
    font-size: 8px;
    white-space: nowrap;
}

.pcba-cc-bom-sku-chip.is-stock {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.pcba-cc-bom-sku-chip.is-out {
    opacity: .72;
}

.pcba-cc-sheet-table--release [data-pcba-bom-row-stock] {
    background: #f8fafc;
}

.pcba-cc-sheet-table--release [data-pcba-bom-row-stock] strong {
    display: block;
    color: #166534;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.pcba-cc-sheet-table--release [data-pcba-bom-row-stock] strong.is-zero {
    color: #dc2626;
}

.pcba-cc-sheet-table--release [data-pcba-bom-row-stock] small {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 8px;
}

.pcba-cc-bom-picked-input {
    min-width: 58px !important;
    text-align: center;
    font-weight: 900 !important;
    font-variant-numeric: tabular-nums;
}

.pcba-cc-bom-picker-status {
    min-width: 110px !important;
    font-weight: 800 !important;
}

.pcba-cc-bom-system-hint {
    display: block;
    padding: 0 6px 4px;
    color: #94a3b8;
    font-size: 8px;
    white-space: nowrap;
}

.pcba-cc-sheet-row.is-shortage .pcba-cc-col-status select {
    color: #b91c1c;
    font-weight: 900;
}

.pcba-cc-sheet-row.is-purchase .pcba-cc-col-status select {
    color: #b45309;
    font-weight: 900;
}

.pcba-cc-sheet-row.is-picking .pcba-cc-col-status select {
    color: #1d4ed8;
    font-weight: 900;
}

.pcba-cc-sheet-row.is-ready .pcba-cc-col-status select {
    color: #15803d;
    font-weight: 900;
}

@media (max-width: 900px) {
    .pcba-cc-bom-picker-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}


.pcba-cc-bom-sku-chip.is-history {
    cursor: default;
    border-style: dashed;
    border-color: #c4b5fd;
    background: #faf5ff;
}

.pcba-cc-bom-sku-chip.is-current b {
    color: #6d28d9;
}

@media (max-width: 900px) {
    .pcba-cc-quote-breakdown {
        grid-template-columns: 1fr;
    }
    .pcba-cc-quote-breakdown > i {
        display: none;
    }
    .pcba-cc-quote-breakdown__fees {
        grid-column: 1;
    }
}


/* 0.8.6 project quote + unified project note form */
.pcba-cc-project-quote {
    display: grid;
    gap: 10px;
    border: 1px solid #d9e3ef;
    border-radius: 12px;
    padding: 12px;
    background: #f8fbff;
}
.pcba-cc-project-quote__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.pcba-cc-project-quote__head > div {
    display: grid;
    gap: 3px;
}
.pcba-cc-project-quote__head strong {
    color: #1f3655;
    font-size: 13px;
    font-weight: 900;
}
.pcba-cc-project-quote__head small {
    color: #718198;
    font-size: 11px;
}
.pcba-cc-project-quote__head button {
    border: 1px solid #bcd1e7;
    border-radius: 8px;
    background: #fff;
    color: #176f86;
    min-height: 32px;
    padding: 0 10px;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
}
.pcba-cc-project-quote-fees {
    display: grid;
    gap: 7px;
}
.pcba-cc-project-quote-fee-row {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(120px, .75fr) 34px;
    gap: 7px;
}
.pcba-cc-project-quote-fee-row input {
    width: 100%;
    min-height: 36px;
    border: 1px solid #cfdbea;
    border-radius: 8px;
    padding: 0 10px;
    background: #fff;
    font: inherit;
}
.pcba-cc-project-quote-fee-row button {
    border: 1px solid #f0c9c9;
    border-radius: 8px;
    background: #fff;
    color: #b42318;
    cursor: pointer;
    font-size: 18px;
    font-weight: 800;
}
.pcba-cc-project-quote__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px dashed #cbd9e8;
    padding-top: 10px;
    gap: 8px;
}
.pcba-cc-project-quote__summary span {
    display: grid;
    gap: 3px;
    color: #66778f;
    font-size: 10px;
    font-weight: 800;
}
.pcba-cc-project-quote__summary b {
    color: #1d3554;
    font-size: 13px;
    font-weight: 900;
}
.pcba-cc-project-quote__summary .is-total {
    border-left: 1px solid #dce6f1;
    padding-left: 10px;
}
.pcba-cc-project-quote__summary .is-total b {
    color: #087b60;
    font-size: 15px;
}
.pcba-cc-project-create label > small {
    margin-top: 4px;
    color: #7b8ba2;
    font-size: 10px;
    line-height: 1.35;
}
@media (max-width: 720px) {
    .pcba-cc-project-quote-fee-row { grid-template-columns: 1fr 110px 34px; }
    .pcba-cc-project-quote__summary { grid-template-columns: 1fr; }
    .pcba-cc-project-quote__summary .is-total { border-left: 0; padding-left: 0; }
}


/* 0.8.7 polish: Vietnamese labels + quote UI cleanup */
.pcba-cc-modal__head h3 {
    font-size: 18px;
    font-weight: 900;
}

.pcba-cc-modal__head button {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #5f6f86;
    font-size: 22px;
    font-weight: 900;
}

.pcba-cc-project-create__grid label > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #324760;
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-project-create__grid input,
.pcba-cc-project-create__grid select,
.pcba-cc-project-create__grid textarea,
.pcba-cc-project-quote-fee-row input,
.pcba-cc-project-quote-fee-row button {
    box-sizing: border-box;
}

.pcba-cc-project-create__grid input:focus,
.pcba-cc-project-create__grid select:focus,
.pcba-cc-project-create__grid textarea:focus,
.pcba-cc-project-quote-fee-row input:focus {
    border-color: #76b9df;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.10);
    outline: 0;
}

.pcba-cc-project-create__workflow-preview {
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f3f9ff 100%);
}

.pcba-cc-project-quote {
    border-color: #cfe2f6;
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f9ff 100%);
    overflow: hidden;
}

.pcba-cc-project-quote__head {
    align-items: flex-start;
}

.pcba-cc-project-quote__head strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #164b78;
    font-size: 14px;
}

.pcba-cc-project-quote__head small {
    line-height: 1.4;
}

.pcba-cc-project-quote__head button {
    border-color: #b9d7ef;
    border-radius: 10px;
    min-height: 36px;
    padding: 0 12px;
    background: #ffffff;
    color: #0d7290;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.pcba-cc-project-quote-fees {
    gap: 10px;
}

.pcba-cc-project-quote-fee-row {
    grid-template-columns: minmax(0, 1fr) minmax(140px, 180px) 44px;
    gap: 8px;
    align-items: end;
}

.pcba-cc-project-quote-fee-field {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.pcba-cc-project-quote-fee-field span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #57708b;
    font-size: 11px;
    font-weight: 900;
}

.pcba-cc-project-quote-fee-row input {
    min-width: 0;
    min-height: 38px;
    border-radius: 10px;
    padding: 0 11px;
}

.pcba-cc-project-quote-fee-remove {
    width: 44px;
    min-width: 44px;
    min-height: 38px;
    align-self: end;
    border: 1px solid #f1c7c7;
    border-radius: 10px;
    background: #fff5f5;
    color: #c0392b;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.pcba-cc-project-quote-fee-remove:hover {
    background: #feecec;
}

.pcba-cc-project-quote__summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border-top: 1px dashed #cfe0ef;
    padding-top: 12px;
}

.pcba-cc-project-quote__summary span {
    gap: 4px;
    border: 1px solid #dde8f2;
    border-radius: 12px;
    padding: 10px 12px;
    background: #ffffff;
    font-size: 11px;
}

.pcba-cc-project-quote__summary small,
.pcba-cc-project-quote__summary em {
    font-style: normal;
}

.pcba-cc-project-quote__summary small {
    color: #5d7591;
    font-size: 11px;
    font-weight: 900;
}

.pcba-cc-project-quote__summary em {
    color: #8a98ab;
    font-size: 10px;
    font-weight: 700;
}

.pcba-cc-project-quote__summary b {
    font-size: 16px;
}

.pcba-cc-project-quote__summary .is-base {
    background: #f8fbff;
}

.pcba-cc-project-quote__summary .is-fee {
    background: #fffaf2;
}

.pcba-cc-project-quote__summary .is-total {
    border-left: 1px solid #dde8f2;
    padding-left: 12px;
    background: linear-gradient(180deg, #f0fff8 0%, #ebfff5 100%);
}

@media (max-width: 860px) {
    .pcba-cc-project-quote__head {
        flex-direction: column;
        align-items: stretch;
    }
    .pcba-cc-project-quote__head button {
        align-self: flex-start;
    }
}

@media (max-width: 720px) {
    .pcba-cc-project-quote-fee-row {
        grid-template-columns: minmax(0, 1fr) 108px 44px;
    }
}


/* 0.8.8 finance global transaction update */
.pcba-cc-fin-tabs {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pcba-cc-fin-tabs__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pcba-cc-fin-tabs__action {
    border-color: #22a06b !important;
    background: #ecfdf3 !important;
    color: #18794e !important;
}

.pcba-cc-transaction-form {
    max-width: 760px;
}

.pcba-cc-transaction-project-picker {
    display: grid;
    gap: 10px;
    border: 1px solid #dbe7f3;
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, #fbfdff 0%, #f6fbff 100%);
}

.pcba-cc-transaction-project-picker__head {
    display: grid;
    gap: 3px;
}

.pcba-cc-transaction-project-picker__head strong {
    color: #1d3554;
    font-size: 14px;
}

.pcba-cc-transaction-project-picker__head small {
    color: #718198;
    font-size: 11px;
    line-height: 1.4;
}

.pcba-cc-transaction-project-picker__search {
    display: grid;
    gap: 5px;
}

.pcba-cc-transaction-project-picker__search span,
.pcba-cc-transaction-project-picker__selected span {
    color: #5a6f86;
    font-size: 11px;
    font-weight: 900;
}

.pcba-cc-transaction-project-picker__selected {
    display: grid;
    gap: 4px;
    border: 1px dashed #cfe0f1;
    border-radius: 10px;
    padding: 10px;
    background: #ffffff;
}

.pcba-cc-transaction-project-picker__selected b {
    color: #0f2740;
    font-size: 13px;
}

.pcba-cc-transaction-project-picker__list {
    display: grid;
    gap: 8px;
    max-height: 220px;
    overflow: auto;
}

.pcba-cc-transaction-project-option {
    display: grid;
    gap: 3px;
    text-align: left;
    border: 1px solid #d7e3ef;
    border-radius: 10px;
    padding: 10px 12px;
    background: #ffffff;
    color: #1f3147;
    cursor: pointer;
    font: inherit;
}

.pcba-cc-transaction-project-option strong {
    color: #0f5ea8;
    font-size: 13px;
}

.pcba-cc-transaction-project-option span {
    color: #1f3147;
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-transaction-project-option small {
    color: #718198;
    font-size: 11px;
}

.pcba-cc-transaction-project-option.is-active {
    border-color: #7eb4e5;
    background: #eef7ff;
    box-shadow: inset 0 0 0 1px rgba(14, 116, 199, 0.08);
}

.pcba-cc-transaction-project-empty {
    border: 1px dashed #d7e3ef;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
    color: #718198;
    font-size: 12px;
    text-align: center;
}

.pcba-cc-transaction-preview--empty {
    background: #fffaf0;
    border-color: #f6ddad;
    color: #8b5e14;
}

@media (max-width: 760px) {
    .pcba-cc-fin-tabs {
        align-items: stretch;
    }
    .pcba-cc-fin-tabs__action {
        width: 100%;
    }
}


/* 0.8.9 finance child tab for transaction update */
.pcba-cc-fin-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    border-bottom: 0;
}

.pcba-cc-fin-tab-card {
    display: grid;
    gap: 4px;
    align-content: start;
    min-height: 72px;
    border: 1px solid #d8e3ef;
    border-radius: 12px;
    padding: 12px 14px;
    background: #ffffff;
    color: #28405a;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.pcba-cc-fin-tab-card__icon {
    font-size: 18px;
    line-height: 1;
}

.pcba-cc-fin-tab-card strong {
    font-size: 13px;
    font-weight: 900;
    color: #17324d;
}

.pcba-cc-fin-tab-card small {
    color: #6f8298;
    font-size: 11px;
    line-height: 1.4;
}

.pcba-cc-fin-tab-card.is-active {
    border-color: var(--pcba-cc-primary);
    background: linear-gradient(180deg, #eef8ff 0%, #f7fbff 100%);
    box-shadow: inset 0 0 0 1px rgba(44, 123, 229, 0.08);
}

.pcba-cc-fin-update {
    display: grid;
    gap: 14px;
}

.pcba-cc-fin-update__hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.9fr);
    gap: 14px;
    border: 1px solid #dce7f3;
    border-radius: 14px;
    padding: 16px;
    background: linear-gradient(135deg, #fbfdff 0%, #f1f8ff 100%);
}

.pcba-cc-fin-update__intro {
    display: grid;
    gap: 8px;
}

.pcba-cc-fin-update__eyebrow {
    color: #0f75bd;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.pcba-cc-fin-update__intro h3 {
    margin: 0;
    color: #15324d;
    font-size: 20px;
    line-height: 1.2;
}

.pcba-cc-fin-update__intro p {
    margin: 0;
    color: #5f7289;
    font-size: 13px;
    line-height: 1.6;
}

.pcba-cc-fin-update__actions {
    display: grid;
    gap: 10px;
    align-content: center;
}

.pcba-cc-fin-update__primary {
    min-height: 42px;
    border: 1px solid #2aa46f;
    border-radius: 10px;
    background: #ecfdf3;
    color: #157347;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
}

.pcba-cc-fin-update__tips {
    display: grid;
    gap: 8px;
}

.pcba-cc-fin-update__tips span {
    border: 1px dashed #cde1f3;
    border-radius: 10px;
    padding: 8px 10px;
    background: rgba(255,255,255,0.8);
    color: #496078;
    font-size: 12px;
    font-weight: 800;
}

.pcba-cc-fin-update__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.pcba-cc-fin-update__cards article {
    border: 1px solid #e2eaf2;
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
}

.pcba-cc-fin-update__cards strong {
    display: block;
    margin-bottom: 6px;
    color: #183550;
    font-size: 13px;
}

.pcba-cc-fin-update__cards p {
    margin: 0;
    color: #6f8298;
    font-size: 12px;
    line-height: 1.5;
}

.pcba-cc-fin-update__projects {
    display: grid;
    gap: 10px;
    border: 1px solid #e2eaf2;
    border-radius: 12px;
    padding: 14px;
    background: #ffffff;
}

.pcba-cc-fin-update__projects-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.pcba-cc-fin-update__projects-head h4 {
    margin: 0;
    color: #183550;
    font-size: 14px;
}

.pcba-cc-fin-update__projects-head small {
    color: #6f8298;
    font-size: 11px;
}

.pcba-cc-fin-update__project-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.pcba-cc-fin-update__project {
    display: grid;
    gap: 4px;
    text-align: left;
    border: 1px solid #dbe6f2;
    border-radius: 12px;
    padding: 12px;
    background: #f9fbfd;
    color: #21364f;
    cursor: pointer;
    font: inherit;
}

.pcba-cc-fin-update__project strong {
    color: #0f67a8;
    font-size: 13px;
}

.pcba-cc-fin-update__project span {
    color: #21364f;
    font-size: 13px;
    font-weight: 850;
}

.pcba-cc-fin-update__project small,
.pcba-cc-fin-update__project em {
    color: #6d8096;
    font-size: 11px;
    font-style: normal;
}

.pcba-cc-fin-update__project:hover,
.pcba-cc-fin-update__project:focus-visible {
    border-color: #9bc4ea;
    background: #eef7ff;
}

@media (max-width: 1180px) {
    .pcba-cc-fin-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 880px) {
    .pcba-cc-fin-tabs,
    .pcba-cc-fin-update__cards,
    .pcba-cc-fin-update__project-list,
    .pcba-cc-fin-update__hero {
        grid-template-columns: 1fr;
    }
}


/* 0.9.0 direct finance update workspace: desktop + portrait phone */
.pcba-cc-fin-update--direct {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.pcba-cc-fin-update__mobile-title {
    display: none;
}

.pcba-cc-fin-update-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 14px;
    align-items: start;
}

.pcba-cc-fin-update-form {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.pcba-cc-fin-update-form__block {
    min-width: 0;
    border: 1px solid #dce7f2;
    border-radius: 14px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(28, 48, 76, 0.035);
}

.pcba-cc-fin-update-form__block.is-project {
    background: linear-gradient(180deg, #f9fcff 0%, #f3f9ff 100%);
}

.pcba-cc-fin-update-form__section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
}

.pcba-cc-fin-update-form__section-head > div {
    display: grid;
    gap: 3px;
}

.pcba-cc-fin-update-form__section-head strong {
    color: #183550;
    font-size: 13px;
    font-weight: 900;
}

.pcba-cc-fin-update-form__section-head small {
    color: #788aa0;
    font-size: 11px;
}

.pcba-cc-transaction-types--inline {
    padding: 0 0 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pcba-cc-transaction-types--inline .pcba-cc-transaction-type {
    min-height: 42px;
    font-size: 12px;
}

.pcba-cc-transaction-form__grid--inline {
    padding: 0;
}

.pcba-cc-transaction-form__grid--inline input,
.pcba-cc-transaction-form__grid--inline select {
    min-height: 42px;
    font-size: 14px;
}

.pcba-cc-transaction-form__grid--inline label span {
    color: #536b83;
    font-size: 11px;
    text-transform: none;
}

.pcba-cc-transaction-cost-presets {
    display: grid;
    gap: 7px;
}

.pcba-cc-transaction-cost-presets > span {
    color: #536b83;
    font-size: 11px;
    font-weight: 900;
}

.pcba-cc-transaction-cost-presets > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.pcba-cc-transaction-cost-presets button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 34px;
    border: 1px solid #d6e3ef;
    border-radius: 999px;
    padding: 0 10px;
    background: #ffffff;
    color: #38516c;
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 850;
}

.pcba-cc-transaction-cost-presets button i {
    font-style: normal;
}

.pcba-cc-transaction-cost-presets button.is-active {
    border-color: #70b99b;
    background: #effcf5;
    color: #16724d;
}

.pcba-cc-fin-update-form__actions {
    position: sticky;
    bottom: 8px;
    z-index: 8;
    display: grid;
    grid-template-columns: minmax(190px, 300px) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    border: 1px solid #dce7f2;
    border-radius: 13px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 28px rgba(31, 55, 82, 0.12);
    backdrop-filter: blur(10px);
}

.pcba-cc-fin-update-form__save {
    min-height: 44px;
    border: 1px solid #15945e;
    border-radius: 10px;
    background: linear-gradient(180deg, #23a76d 0%, #168b59 100%);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 900;
}

.pcba-cc-fin-update-form__save:disabled {
    border-color: #cbd5df;
    background: #e8edf2;
    color: #8a98a8;
    cursor: not-allowed;
}

.pcba-cc-fin-update-form__actions small {
    color: #6d8096;
    font-size: 11px;
}

.pcba-cc-fin-update-summary {
    position: sticky;
    top: 14px;
    display: grid;
    gap: 12px;
    border: 1px solid #dce7f2;
    border-radius: 14px;
    padding: 14px;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(28, 48, 76, 0.035);
}

.pcba-cc-fin-update-summary__project {
    display: grid;
    gap: 4px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edf2f6;
}

.pcba-cc-fin-update-summary__project > span {
    color: #7b8da1;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .06em;
}

.pcba-cc-fin-update-summary__project > strong {
    color: #0e68ac;
    font-size: 13px;
}

.pcba-cc-fin-update-summary__project h4 {
    margin: 0;
    color: #1d344d;
    font-size: 15px;
}

.pcba-cc-fin-update-summary__project small {
    color: #6d8096;
    font-size: 11px;
}

.pcba-cc-fin-update-summary__metrics {
    display: grid;
    gap: 8px;
}

.pcba-cc-fin-update-summary__metrics div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    border-radius: 9px;
    padding: 9px 10px;
    background: #f8fafc;
}

.pcba-cc-fin-update-summary__metrics span {
    color: #6a7d92;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-fin-update-summary__metrics b {
    color: #20384f;
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-fin-update-summary__metrics b.is-in { color: #09884e; }
.pcba-cc-fin-update-summary__metrics b.is-debt { color: #b86800; }
.pcba-cc-fin-update-summary__metrics b.is-cost { color: #b42318; }

.pcba-cc-fin-update-summary__hint {
    color: #708399;
    font-size: 10px;
    line-height: 1.45;
}

.pcba-cc-fin-update-summary.is-empty {
    min-height: 170px;
    place-content: center;
    text-align: center;
    color: #6d8096;
}

.pcba-cc-fin-update-summary.is-empty > span {
    font-size: 28px;
}

.pcba-cc-fin-update-summary.is-empty strong {
    color: #26415c;
    font-size: 14px;
}

.pcba-cc-fin-update-summary.is-empty p {
    margin: 0;
    font-size: 11px;
    line-height: 1.5;
}

/* Make project search touch-friendly without wasting portrait width. */
.pcba-cc-fin-update .pcba-cc-transaction-project-picker {
    padding: 0;
    border: 0;
    background: transparent;
}

.pcba-cc-fin-update .pcba-cc-transaction-project-picker__search input {
    min-height: 44px;
    font-size: 14px;
}

.pcba-cc-fin-update .pcba-cc-transaction-project-picker__list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 210px;
}

.pcba-cc-fin-update .pcba-cc-transaction-project-option {
    min-height: 66px;
}

/* Popup remains usable from project detail, and becomes full-screen on portrait phones. */
.pcba-cc-transaction-modal .pcba-cc-modal__panel {
    width: min(760px, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
}

@media (max-width: 880px) {
    .pcba-cc-fin-update-workspace {
        grid-template-columns: 1fr;
    }

    .pcba-cc-fin-update-summary {
        position: static;
        grid-row: 1;
    }

    .pcba-cc-fin-update-form {
        grid-row: 2;
    }
}

@media (max-width: 640px) {
    .pcba-cc-fin-tabs {
        display: flex;
        overflow-x: auto;
        gap: 8px;
        padding-bottom: 4px;
        scrollbar-width: thin;
        scroll-snap-type: x proximity;
    }

    .pcba-cc-fin-tab-card {
        flex: 0 0 145px;
        min-height: 66px;
        scroll-snap-align: start;
        padding: 10px 11px;
    }

    .pcba-cc-fin-tab-card small {
        display: none;
    }

    .pcba-cc-fin-update--direct {
        width: calc(100% + 12px);
        margin-left: -6px;
        margin-right: -6px;
    }

    .pcba-cc-fin-update__mobile-title {
        display: grid;
        gap: 2px;
        padding: 2px 6px 8px;
    }

    .pcba-cc-fin-update__mobile-title strong {
        color: #17344f;
        font-size: 14px;
    }

    .pcba-cc-fin-update__mobile-title span {
        color: #75889e;
        font-size: 10px;
    }

    .pcba-cc-fin-update-workspace {
        gap: 9px;
    }

    .pcba-cc-fin-update-form__block,
    .pcba-cc-fin-update-summary {
        border-radius: 12px;
        padding: 11px;
    }

    .pcba-cc-fin-update-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .pcba-cc-fin-update-summary__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pcba-cc-fin-update-summary__metrics div {
        display: grid;
        gap: 4px;
        align-content: start;
    }

    .pcba-cc-fin-update-summary__metrics b {
        font-size: 13px;
    }

    .pcba-cc-fin-update .pcba-cc-transaction-project-picker__list {
        grid-template-columns: 1fr;
        max-height: 180px;
    }

    .pcba-cc-transaction-types--inline {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .pcba-cc-transaction-types--inline .pcba-cc-transaction-type {
        min-height: 44px;
        padding: 0 5px;
        font-size: 11px;
    }

    .pcba-cc-transaction-form__grid--inline {
        grid-template-columns: 1fr;
        gap: 9px;
    }

    .pcba-cc-transaction-form__grid--inline input,
    .pcba-cc-transaction-form__grid--inline select {
        min-height: 46px;
        font-size: 16px;
    }

    .pcba-cc-transaction-cost-presets > div {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 3px;
        scroll-snap-type: x proximity;
    }

    .pcba-cc-transaction-cost-presets button {
        flex: 0 0 auto;
        min-height: 38px;
        scroll-snap-align: start;
    }

    .pcba-cc-fin-update-form__actions {
        bottom: 4px;
        grid-template-columns: 1fr;
        gap: 3px;
        border-radius: 12px;
        padding: 8px;
    }

    .pcba-cc-fin-update-form__save {
        width: 100%;
        min-height: 48px;
        font-size: 14px;
    }

    .pcba-cc-fin-update-form__actions small {
        text-align: center;
    }

    .pcba-cc-evidence-dropzone {
        min-height: 110px;
        padding: 14px 10px;
    }

    .pcba-cc-transaction-modal .pcba-cc-modal__panel {
        width: 100vw;
        max-width: none;
        height: 100dvh;
        max-height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
    }

    .pcba-cc-transaction-modal .pcba-cc-transaction-form__grid {
        grid-template-columns: 1fr;
        padding: 0 12px 96px;
    }

    .pcba-cc-transaction-modal .pcba-cc-modal__actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        background: rgba(255,255,255,.97);
        box-shadow: 0 -8px 22px rgba(23, 43, 65, .08);
    }

    .pcba-cc-transaction-modal input,
    .pcba-cc-transaction-modal select {
        min-height: 46px;
        font-size: 16px;
    }
}


/* 0.9.1 Finance sidebar submenu + compact quick transaction modal */
.pcba-control-center.is-finance-nav-open [data-pcba-cc-nav-group="finance"] .pcba-cc-nav__submenu {
    display: grid;
}

.pcba-control-center.is-finance-nav-open [data-pcba-cc-nav-group="finance"] .pcba-cc-nav__chevron {
    transform: rotate(180deg);
}

[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__submenu {
    gap: 2px;
}

[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__subitem {
    min-height: 29px;
    border-radius: 7px;
    padding: 4px 8px;
    background: transparent;
    color: #b6c2d4;
    font-size: 11.5px;
    font-weight: 750;
}

[data-pcba-fin-nav-tab="debt"] .dashicons { color: #34d399; }
[data-pcba-fin-nav-tab="cost"] .dashicons { color: #fb7185; }
[data-pcba-fin-nav-tab="profit"] .dashicons { color: #38bdf8; }
[data-pcba-fin-nav-tab="ledger"] .dashicons { color: #a78bfa; }

[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__subitem:hover {
    background: rgba(255, 255, 255, .06);
}

[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__subitem.is-active {
    background: rgba(52, 211, 153, .12);
    color: #f8fafc;
    box-shadow: inset 2px 0 0 #34d399;
}

[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__subitem.is-action {
    margin-top: 5px;
    color: #ffd166;
    background: rgba(255, 209, 102, .07);
}

[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__subitem.is-action .dashicons {
    color: #ffd166;
}

.pcba-cc-transaction-form--quick {
    width: min(680px, calc(100vw - 32px));
    max-width: 680px;
    max-height: min(88vh, 820px);
    border-radius: 14px;
}

.pcba-cc-transaction-form--quick .pcba-cc-transaction-form__grid {
    max-height: calc(88vh - 165px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.pcba-cc-transaction-form--quick .pcba-cc-transaction-project-picker__list {
    max-height: 150px;
}

@media (max-width: 700px) {
    .pcba-cc-transaction-form--quick {
        width: calc(100vw - 16px);
        max-width: none;
        max-height: calc(100dvh - 16px);
        margin: 8px;
        border-radius: 12px;
    }

    .pcba-cc-transaction-form--quick .pcba-cc-transaction-form__grid {
        grid-template-columns: 1fr;
        max-height: calc(100dvh - 175px);
        padding: 0 12px 14px;
    }

    .pcba-cc-transaction-form--quick .pcba-cc-transaction-types {
        padding: 0 12px 10px;
    }

    .pcba-cc-transaction-form--quick .pcba-cc-modal__head,
    .pcba-cc-transaction-form--quick .pcba-cc-modal__actions {
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* 0.9.2 project avatar manager */
.pcba-cc-project-avatar.is-clickable {
    position: relative;
    border: 1px solid #d8e7f2;
    padding: 0;
    cursor: pointer;
    font: inherit;
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.pcba-cc-project-avatar.is-clickable:hover,
.pcba-cc-project-avatar.is-clickable:focus-visible {
    border-color: #69aee3;
    box-shadow: 0 0 0 3px rgba(47, 137, 202, 0.12);
    outline: 0;
    transform: scale(1.04);
}

.pcba-cc-project-avatar__edit,
.pcba-cc-project-avatar__camera {
    position: absolute;
    right: -2px;
    bottom: -2px;
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #1582b8;
    color: #ffffff;
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
    line-height: 1;
}

.pcba-cc-project-avatar.is-empty {
    overflow: visible;
}

.pcba-cc-project-avatar.is-empty > span:first-child {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    overflow: hidden;
}

.pcba-cc-project-avatar-modal {
    z-index: 10020;
}

.pcba-cc-project-avatar-panel {
    width: min(720px, calc(100vw - 32px));
    max-height: min(88vh, 760px);
    overflow: auto;
}

.pcba-cc-project-avatar-body {
    display: grid;
    gap: 16px;
    padding: 0 16px 16px;
}

.pcba-cc-project-avatar-current {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    border: 1px solid #dfe9f3;
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(135deg, #fbfdff 0%, #f5faff 100%);
}

.pcba-cc-project-avatar-current__preview {
    width: 180px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid #d5e2ef;
    border-radius: 14px;
    background: #eef6fb;
}

.pcba-cc-project-avatar-current__preview > button {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.pcba-cc-project-avatar-current__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pcba-cc-project-avatar-current__preview button > span {
    position: absolute;
    right: 8px;
    bottom: 8px;
    border-radius: 999px;
    padding: 5px 8px;
    background: rgba(15, 23, 42, 0.78);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
}

.pcba-cc-project-avatar-current__empty {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    width: 100%;
    height: 100%;
    color: #5d748d;
}

.pcba-cc-project-avatar-current__empty strong {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dff1f6;
    color: #167c9a;
    font-size: 24px;
}

.pcba-cc-project-avatar-current__actions {
    display: grid;
    gap: 8px;
    align-content: center;
}

.pcba-cc-project-avatar-upload {
    display: inline-flex;
    width: fit-content;
    cursor: pointer;
}

.pcba-cc-project-avatar-upload > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border: 1px solid #69addd;
    border-radius: 10px;
    padding: 0 14px;
    background: #eef8ff;
    color: #116f9f;
    font-size: 12px;
    font-weight: 900;
}

.pcba-cc-project-avatar-current__actions small {
    color: #77899d;
    font-size: 11px;
}

.pcba-cc-project-avatar-gallery {
    display: grid;
    gap: 10px;
}

.pcba-cc-project-avatar-gallery__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.pcba-cc-project-avatar-gallery__head > div {
    display: grid;
    gap: 3px;
}

.pcba-cc-project-avatar-gallery__head strong {
    color: #213951;
    font-size: 13px;
}

.pcba-cc-project-avatar-gallery__head small,
.pcba-cc-project-avatar-gallery__head > span {
    color: #7b8ca0;
    font-size: 11px;
}

.pcba-cc-project-avatar-gallery__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.pcba-cc-project-avatar-history {
    display: grid;
    gap: 5px;
    border: 1px solid #dde7f1;
    border-radius: 12px;
    padding: 7px;
    background: #fff;
    color: #31475f;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.pcba-cc-project-avatar-history img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 9px;
    object-fit: cover;
    background: #eef4f8;
}

.pcba-cc-project-avatar-history span {
    color: #245477;
    font-size: 11px;
    font-weight: 900;
}

.pcba-cc-project-avatar-history small {
    color: #8796a8;
    font-size: 10px;
}

.pcba-cc-project-avatar-history.is-active {
    border-color: #36a36f;
    background: #effcf5;
    box-shadow: inset 0 0 0 1px rgba(54, 163, 111, 0.10);
}

.pcba-cc-project-avatar-gallery__empty {
    grid-column: 1 / -1;
    border: 1px dashed #d8e3ee;
    border-radius: 12px;
    padding: 18px;
    background: #fafcff;
    color: #7a8ba0;
    font-size: 12px;
    text-align: center;
}

.pcba-cc-project-avatar-saving {
    position: sticky;
    bottom: 0;
    border-top: 1px solid #dfe7ef;
    padding: 10px 16px;
    background: rgba(255,255,255,0.96);
    color: #14769a;
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.pcba-cc-project-avatar-zoom {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(5, 14, 28, 0.90);
}

.pcba-cc-project-avatar-zoom img {
    display: block;
    max-width: min(92vw, 1200px);
    max-height: 88vh;
    border-radius: 14px;
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0,0,0,0.35);
}

.pcba-cc-project-avatar-zoom > button {
    position: fixed;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #fff;
    cursor: pointer;
    font-size: 24px;
}

@media (max-width: 720px) {
    .pcba-cc-project-avatar-panel {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
    }
    .pcba-cc-project-avatar-body {
        padding: 0 10px 12px;
    }
    .pcba-cc-project-avatar-current {
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }
    .pcba-cc-project-avatar-current__preview {
        width: 112px;
    }
    .pcba-cc-project-avatar-gallery__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 7px;
    }
    .pcba-cc-project-avatar-upload,
    .pcba-cc-project-avatar-upload > span {
        width: 100%;
    }
}

@media (max-width: 460px) {
    .pcba-cc-project-avatar-current {
        grid-template-columns: 96px minmax(0, 1fr);
    }
    .pcba-cc-project-avatar-current__preview {
        width: 96px;
    }
    .pcba-cc-project-avatar-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* 0.9.3 avatar upload selection fix */
.pcba-cc-project-avatar-upload {
    position: relative;
    overflow: hidden;
}
.pcba-cc-project-avatar-upload input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.pcba-cc-project-avatar-upload.is-disabled {
    opacity: .65;
    cursor: wait;
}
.pcba-cc-project-avatar-upload.is-disabled input[type="file"] {
    cursor: wait;
}


/* 0.9.4 project-context transaction modal */
.pcba-cc-transaction-form--project-context {
    max-width: 620px;
}

.pcba-cc-transaction-project-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #cfe2f4;
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(180deg, #f8fcff 0%, #f1f8ff 100%);
}

.pcba-cc-transaction-project-context > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pcba-cc-transaction-project-context span {
    color: #6d8095;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-transaction-project-context strong {
    overflow: hidden;
    color: #153650;
    font-size: 13px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-transaction-project-context small {
    color: #708399;
    font-size: 11px;
}

.pcba-cc-transaction-project-context .pcba-cc-transaction-project-context__lock {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 6px 9px;
    background: #eaf8ef;
    color: #19734b;
    font-size: 10px;
    font-weight: 900;
    text-transform: none;
}

@media (max-width: 620px) {
    .pcba-cc-transaction-project-context {
        align-items: flex-start;
    }
    .pcba-cc-transaction-project-context strong {
        white-space: normal;
    }
}


/* 0.10.0 quote-parent / project-child hierarchy */
.pcba-cc-project-code em {
    color: #8a99ad;
    font-style: normal;
    font-size: 9px;
    font-weight: 800;
    text-transform: none;
}

.pcba-cc-project-create__grid select[name="quote_id"] {
    border-color: #a9cdec;
    background: #f8fcff;
    color: #174f78;
    font-weight: 800;
}

.pcba-cc-project-create__grid input[name="quote_code"] {
    border-color: #d8c3f2;
    background: #fcf9ff;
}

.pcba-cc-project-create__grid input[name="quote_code"]:disabled {
    background: #f3f6f9;
    color: #8b98a8;
}

@media (max-width: 1320px) {
    .pcba-cc-finance-summary__kpis {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
        gap: 1px;
    }
    .pcba-cc-finance-summary__kpis .pcba-cc-finance-kpi {
        border-bottom: 1px solid rgba(226,232,240,.82);
        padding: 10px 12px;
    }
}

/* 0.10.2 - chọn linh kiện mua thiếu + phân người mua cho phiếu DNM */
.pcba-cc-bom-purchase-modal {
    width: min(820px, 100%);
}

.pcba-cc-purchase-existing {
    margin: 0 16px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 9px 11px;
    background: #fffbeb;
    color: #92400e;
    font-size: 12px;
}

.pcba-cc-purchase-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 16px;
}

.pcba-cc-purchase-toolbar > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pcba-cc-purchase-toolbar button {
    min-height: 30px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 5px 9px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-size: 11px;
    font-weight: 750;
}

.pcba-cc-purchase-toolbar strong {
    color: #0f766e;
    font-size: 12px;
    white-space: nowrap;
}

.pcba-cc-purchase-table {
    margin: 0 16px;
    overflow: auto;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
}

.pcba-cc-purchase-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.pcba-cc-purchase-table th,
.pcba-cc-purchase-table td {
    border-bottom: 1px solid #edf2f7;
    padding: 9px 10px;
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
}

.pcba-cc-purchase-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fafc;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.pcba-cc-purchase-table tbody tr:last-child td {
    border-bottom: 0;
}

.pcba-cc-purchase-table tr.is-unselected {
    opacity: .48;
    background: #f8fafc;
}

.pcba-cc-purchase-table td strong,
.pcba-cc-purchase-table td small {
    display: block;
}

.pcba-cc-purchase-table td small {
    margin-top: 2px;
    color: #64748b;
}

.pcba-cc-purchase-check {
    width: 38px;
    text-align: center !important;
}

.pcba-cc-purchase-check input {
    width: 17px;
    height: 17px;
    margin: 0;
}

.pcba-cc-purchase-num {
    width: 90px;
    text-align: right !important;
}

.pcba-cc-purchase-qty {
    width: 125px;
}

.pcba-cc-purchase-qty input {
    width: 100%;
    min-height: 34px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 7px;
    padding: 5px 8px;
    background: #fff;
    text-align: right;
}

.pcba-cc-purchase-meta {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: 12px;
    padding: 0 16px;
}

.pcba-cc-purchase-meta label {
    display: grid;
    align-content: start;
    gap: 5px;
}

.pcba-cc-purchase-meta label > span {
    color: #334155;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-purchase-meta select,
.pcba-cc-purchase-meta textarea {
    width: 100%;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: var(--pcba-cc-text);
    font: inherit;
}

.pcba-cc-purchase-meta small {
    color: #64748b;
    font-size: 10px;
    line-height: 1.35;
}

@media (max-width: 640px) {
    .pcba-cc-bom-purchase-modal {
        width: 100%;
        max-height: calc(100vh - 16px);
    }

    .pcba-cc-purchase-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pcba-cc-purchase-meta {
        grid-template-columns: 1fr;
    }
}

/* 0.10.3 - Purchase Center + purchase modal above BOM drawer */
.pcba-control-center.is-purchase-nav-open [data-pcba-cc-nav-group="purchase"] .pcba-cc-nav__submenu {
    display: grid;
}

.pcba-control-center.is-purchase-nav-open [data-pcba-cc-nav-group="purchase"] .pcba-cc-nav__chevron {
    transform: rotate(180deg);
}

.pcba-cc-modal[data-pcba-bom-purchase-modal] {
    z-index: 100200;
}

.pcba-cc-modal[data-pcba-bom-purchase-modal] .pcba-cc-modal__backdrop {
    background: rgba(15, 23, 42, 0.66);
}

.pcba-cc-modal[data-pcba-bom-purchase-modal] .pcba-cc-bom-purchase-modal {
    width: min(900px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
}

.pcba-cc-purchase-view {
    display: grid;
    gap: 12px;
}

.pcba-cc-purchase-summary {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.pcba-cc-purchase-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 10px;
    background: #fff;
}

.pcba-cc-purchase-tabs button {
    min-height: 34px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 6px 11px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.pcba-cc-purchase-tabs button.is-active {
    border-color: #67c7cf;
    background: #e9fbfc;
    color: #0f7882;
}

.pcba-cc-purchase-filters {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, .35fr) auto;
    align-items: end;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--pcba-cc-line);
    border-radius: 10px;
    background: #fff;
}

.pcba-cc-purchase-filters label {
    display: grid;
    gap: 5px;
}

.pcba-cc-purchase-filters label > span {
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
    text-transform: uppercase;
}

.pcba-cc-purchase-filters input,
.pcba-cc-purchase-filters select,
.pcba-cc-purchase-table-main select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 6px 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-size: 11px;
}

.pcba-cc-purchase-filters button {
    min-height: 34px;
    border: 1px solid #b9dce2;
    border-radius: 8px;
    padding: 6px 12px;
    background: #effcfd;
    color: #0f7882;
    cursor: pointer;
    font-weight: 850;
}

.pcba-cc-purchase-table-main td strong,
.pcba-cc-purchase-table-main td small {
    display: block;
}

.pcba-cc-purchase-table-main td small {
    margin-top: 3px;
    color: #718096;
    font-size: 10px;
    line-height: 1.35;
}

.pcba-cc-purchase-code {
    color: #0f7882;
}

.pcba-cc-purchase-saving {
    display: block;
    margin-top: 4px;
    color: #b7791f;
    font-size: 10px;
}

.pcba-cc-purchase-note {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
    border: 1px solid #cce9ed;
    border-radius: 9px;
    padding: 10px 12px;
    background: #f2fcfd;
    color: #315b61;
    font-size: 11px;
}

.pcba-cc-purchase-note strong {
    color: #0f7882;
    font-size: 12px;
}

.pcba-cc-muted {
    color: #94a3b8;
}

@media (max-width: 980px) {
    .pcba-cc-purchase-summary {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }
    .pcba-cc-purchase-filters {
        grid-template-columns: 1fr 1fr;
    }
    .pcba-cc-purchase-filters button {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .pcba-cc-modal[data-pcba-bom-purchase-modal] {
        padding: 8px;
    }
    .pcba-cc-modal[data-pcba-bom-purchase-modal] .pcba-cc-bom-purchase-modal {
        width: 100%;
        max-height: calc(100vh - 16px);
    }
    .pcba-cc-purchase-summary,
    .pcba-cc-purchase-filters {
        grid-template-columns: 1fr;
    }
    .pcba-cc-purchase-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    .pcba-cc-purchase-tabs button {
        white-space: nowrap;
    }
}

/* 0.10.4 - Purchase workflow map: picker -> create DNM -> order -> receive -> stock */
[data-pcba-cc-nav-group="purchase"] .pcba-purchase-nav-create .dashicons { color: #22c55e; }
[data-pcba-cc-nav-group="purchase"] .pcba-purchase-nav-requested .dashicons { color: #2563eb; }
[data-pcba-cc-nav-group="purchase"] .pcba-purchase-nav-buying .dashicons { color: #f59e0b; }
[data-pcba-cc-nav-group="purchase"] .pcba-purchase-nav-waiting .dashicons { color: #8b5cf6; }
[data-pcba-cc-nav-group="purchase"] .pcba-purchase-nav-receiving .dashicons { color: #0891b2; }
[data-pcba-cc-nav-group="purchase"] .pcba-purchase-nav-completed .dashicons { color: #16a34a; }
[data-pcba-cc-nav-group="purchase"] .pcba-purchase-nav-vendors .dashicons { color: #ec4899; }

.pcba-cc-purchase-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.pcba-cc-purchase-head .pcba-cc-view-head { margin: 0; }

.pcba-cc-purchase-create-button {
    flex: 0 0 auto;
    min-height: 38px;
    border: 1px solid #16a34a;
    border-radius: 9px;
    padding: 7px 14px;
    background: #16a34a;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(22,163,74,.18);
}

.pcba-cc-purchase-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr));
    gap: 10px;
}

.pcba-cc-purchase-kpi {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 74px;
    border: 1px solid #dbe5f1;
    border-radius: 11px;
    padding: 11px 13px;
    background: #fff;
    text-align: left;
    cursor: pointer;
}

.pcba-cc-purchase-kpi > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 900;
}

.pcba-cc-purchase-kpi div { display: grid; gap: 3px; }
.pcba-cc-purchase-kpi small { color: #64748b; font-size: 10px; font-weight: 850; text-transform: uppercase; }
.pcba-cc-purchase-kpi strong { color: #0f172a; font-size: 20px; line-height: 1; }
.pcba-cc-purchase-kpi.is-shortage > span { background: #fff1f2; color: #dc2626; }
.pcba-cc-purchase-kpi.is-requested > span { background: #eff6ff; color: #2563eb; }
.pcba-cc-purchase-kpi.is-buying > span { background: #fff7ed; color: #d97706; }
.pcba-cc-purchase-kpi.is-ordered > span { background: #f5f3ff; color: #7c3aed; }
.pcba-cc-purchase-kpi.is-receiving > span { background: #ecfeff; color: #0891b2; }

.pcba-cc-purchase-tabs button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pcba-cc-purchase-tabs button b { font-size: 14px; }
.pcba-cc-purchase-tabs button.is-requested b { color: #2563eb; }
.pcba-cc-purchase-tabs button.is-buying b { color: #d97706; }
.pcba-cc-purchase-tabs button.is-waiting b { color: #7c3aed; }
.pcba-cc-purchase-tabs button.is-receiving b { color: #0891b2; }
.pcba-cc-purchase-tabs button.is-completed b { color: #16a34a; }
.pcba-cc-purchase-tabs button.is-vendors b { color: #db2777; }

.pcba-cc-purchase-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pcba-cc-purchase-quick-filters button,
.pcba-cc-purchase-create-filter-buttons button {
    border: 1px solid #dbe5f1;
    border-radius: 999px;
    padding: 6px 11px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    font-weight: 850;
    cursor: pointer;
}
.pcba-cc-purchase-quick-filters button.is-active,
.pcba-cc-purchase-create-filter-buttons button.is-active {
    border-color: #67c7cf;
    background: #e9fbfc;
    color: #0f7882;
}

.pcba-cc-purchase-code-button,
.pcba-cc-purchase-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: #087f8c;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    text-align: left;
}
.pcba-cc-purchase-code-button { display: inline-flex; align-items: center; gap: 6px; }
.pcba-cc-purchase-code-button:hover,
.pcba-cc-purchase-link:hover { text-decoration: underline; }

.pcba-cc-purchase-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}
.pcba-cc-purchase-status.is-requested { background: #eff6ff; color: #1d4ed8; }
.pcba-cc-purchase-status.is-buying { background: #fff7ed; color: #c2410c; }
.pcba-cc-purchase-status.is-ordered { background: #f5f3ff; color: #6d28d9; }
.pcba-cc-purchase-status.is-receiving { background: #ecfeff; color: #0e7490; }
.pcba-cc-purchase-status.is-completed { background: #ecfdf5; color: #15803d; }
.pcba-cc-purchase-status.is-cancelled { background: #f1f5f9; color: #64748b; }

.pcba-cc-purchase-deadline {
    display: block;
    width: fit-content;
    margin-top: 5px;
    border-radius: 999px;
    padding: 3px 7px;
    background: #f8fafc;
    color: #64748b;
    font-size: 9px;
    font-weight: 850;
}
.pcba-cc-purchase-deadline.is-urgent { background: #fff1f2; color: #dc2626; }
.pcba-cc-purchase-deadline.is-soon { background: #fff7ed; color: #c2410c; }
.pcba-cc-purchase-deadline.is-overdue { background: #fee2e2; color: #b91c1c; }
.pcba-cc-purchase-deadline.is-none { background: #f1f5f9; color: #94a3b8; }

.pcba-cc-purchase-detail-modal,
.pcba-cc-purchase-create-modal { z-index: 100300; }
.pcba-cc-purchase-detail-panel,
.pcba-cc-purchase-create-panel {
    width: min(1280px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    overflow: auto;
}

.pcba-cc-purchase-detail-meta {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr .8fr;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5edf5;
    background: #f8fafc;
}
.pcba-cc-purchase-detail-meta > div,
.pcba-cc-purchase-detail-meta label { display: grid; gap: 5px; }
.pcba-cc-purchase-detail-meta span { color: #64748b; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.pcba-cc-purchase-detail-meta select {
    min-height: 34px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 5px 8px;
    background: #fff;
}

.pcba-cc-purchase-flow {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    overflow-x: auto;
    border-bottom: 1px solid #e5edf5;
}
.pcba-cc-purchase-flow span {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 5px 9px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 10px;
    font-weight: 850;
}
.pcba-cc-purchase-flow span.is-done { background: #dcfce7; color: #15803d; }
.pcba-cc-purchase-flow i { color: #94a3b8; font-style: normal; }

.pcba-cc-purchase-detail-table,
.pcba-cc-purchase-create-table {
    max-height: 54vh;
    overflow: auto;
}
.pcba-cc-purchase-detail-table table,
.pcba-cc-purchase-create-table table { min-width: 1050px; }
.pcba-cc-purchase-detail-table input,
.pcba-cc-purchase-create-table input {
    width: 100%;
    min-width: 86px;
    min-height: 32px;
    border: 1px solid #dbe5f1;
    border-radius: 7px;
    padding: 5px 7px;
    background: #fff;
    font: inherit;
    font-size: 10px;
}
.pcba-cc-purchase-row-actions { display: flex; gap: 5px; margin-top: 6px; }
.pcba-cc-purchase-row-actions button {
    border: 1px solid #f59e0b;
    border-radius: 7px;
    padding: 5px 7px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}
.pcba-cc-purchase-row-actions button.is-receive { border-color: #22c55e; background: #ecfdf5; color: #15803d; }
.pcba-cc-purchase-row-actions button:disabled { opacity: .45; cursor: not-allowed; }
.pcba-cc-purchase-detail-note {
    margin: 10px 16px 0;
    border: 1px solid #bae6fd;
    border-radius: 9px;
    padding: 9px 11px;
    background: #f0f9ff;
    color: #075985;
    font-size: 10px;
}

.pcba-cc-purchase-create-tools {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, .55fr);
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5edf5;
}
.pcba-cc-purchase-create-filter-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.pcba-cc-purchase-create-tools > input {
    min-height: 36px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 6px 10px;
}
.pcba-cc-purchase-create-meta {
    display: grid;
    grid-template-columns: 1fr 1.4fr auto;
    align-items: end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid #e5edf5;
    background: #f8fafc;
}
.pcba-cc-purchase-create-meta label { display: grid; gap: 5px; }
.pcba-cc-purchase-create-meta label > span { color: #64748b; font-size: 9px; font-weight: 900; text-transform: uppercase; }
.pcba-cc-purchase-create-meta select,
.pcba-cc-purchase-create-meta input {
    min-height: 36px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 6px 9px;
    background: #fff;
}
.pcba-cc-purchase-create-selected { color: #475569; font-size: 11px; white-space: nowrap; }
.pcba-cc-purchase-create-selected strong { color: #0f7882; font-size: 16px; }
.is-danger-text { color: #dc2626 !important; }

.pcba-cc-bom-purchase-state {
    display: block;
    margin-top: 5px;
    border-radius: 7px;
    padding: 4px 6px;
    font-size: 9px;
    line-height: 1.35;
    font-weight: 850;
}
.pcba-cc-bom-purchase-state.is-shortage { background: #fff1f2; color: #be123c; }
.pcba-cc-bom-purchase-state.is-requested { background: #eff6ff; color: #1d4ed8; }
.pcba-cc-bom-purchase-state.is-ordered { background: #fff7ed; color: #c2410c; }
.pcba-cc-bom-purchase-state.is-receiving { background: #ecfeff; color: #0e7490; }
.pcba-cc-bom-purchase-state.is-received { background: #ecfdf5; color: #15803d; }

@media (max-width: 980px) {
    .pcba-cc-purchase-kpis { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
    .pcba-cc-purchase-detail-meta { grid-template-columns: 1fr 1fr; }
    .pcba-cc-purchase-create-tools,
    .pcba-cc-purchase-create-meta { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .pcba-cc-purchase-head { align-items: stretch; flex-direction: column; }
    .pcba-cc-purchase-create-button { width: 100%; }
    .pcba-cc-purchase-kpis { grid-template-columns: 1fr 1fr; }
    .pcba-cc-purchase-detail-panel,
    .pcba-cc-purchase-create-panel { width: 100%; max-height: calc(100vh - 12px); }
    .pcba-cc-purchase-detail-meta { grid-template-columns: 1fr; }
}
.pcba-cc-purchase-start-btn {
    width: fit-content;
    margin-top: 5px;
    border: 1px solid #f59e0b;
    border-radius: 7px;
    padding: 4px 7px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}
.pcba-cc-bom-doc-chip.is-clickable { cursor: pointer; font: inherit; font-size: 10px; }
.pcba-cc-bom-doc-chip.is-clickable:hover { filter: brightness(.97); box-shadow: 0 2px 8px rgba(15,23,42,.08); }

/* 0.10.5 - Buyer filter, editable purchase notes, legacy DNM proposal handling */
.pcba-cc-purchase-table-main {
    min-width: 1180px;
}

.pcba-cc-purchase-note-cell {
    min-width: 210px;
}

.pcba-cc-purchase-note-cell textarea {
    width: 100%;
    min-width: 190px;
    min-height: 54px;
    resize: vertical;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 7px 8px;
    background: #fffdf5;
    color: #334155;
    font: inherit;
    font-size: 10px;
    line-height: 1.4;
}

.pcba-cc-purchase-note-cell textarea:focus,
.pcba-cc-purchase-detail-request-note textarea:focus {
    outline: none;
    border-color: #67c7cf;
    box-shadow: 0 0 0 2px rgba(103,199,207,.15);
}

.pcba-cc-purchase-detail-request-note {
    padding: 10px 16px;
    border-bottom: 1px solid #e5edf5;
    background: #fffef7;
}

.pcba-cc-purchase-detail-request-note label {
    display: grid;
    gap: 5px;
}

.pcba-cc-purchase-detail-request-note label > span {
    color: #64748b;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.pcba-cc-purchase-detail-request-note textarea {
    width: 100%;
    min-height: 58px;
    resize: vertical;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    padding: 8px 10px;
    background: #fff;
    color: #334155;
    font: inherit;
    font-size: 11px;
}

.pcba-cc-purchase-detail-request-note small {
    color: #94a3b8;
    font-size: 9px;
}


/* 0.10.6 - Purchase sheet editing, bulk update and clipboard workflow */
.pcba-cc-purchase-sheet-toolbar {
    position: sticky;
    top: 0;
    z-index: 7;
    display: grid;
    grid-template-columns: auto minmax(520px, 1fr) auto;
    align-items: end;
    gap: 10px;
    padding: 9px 12px;
    border-bottom: 1px solid #dbe5f1;
    background: rgba(248,250,252,.98);
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.pcba-cc-purchase-sheet-toolbar button {
    min-height: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    padding: 5px 9px;
    background: #fff;
    color: #334155;
    font-size: 9px;
    font-weight: 900;
    cursor: pointer;
}
.pcba-cc-purchase-sheet-toolbar button:hover { border-color: #67c7cf; background: #f0fdfa; }
.pcba-cc-purchase-sheet-toolbar button.is-primary { border-color: #0f9aa7; background: #0f9aa7; color: #fff; }
.pcba-cc-purchase-sheet-toolbar__select,
.pcba-cc-purchase-sheet-toolbar__sheet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pcba-cc-purchase-sheet-toolbar__select span { color: #0f7882; font-size: 10px; font-weight: 900; white-space: nowrap; }
.pcba-cc-purchase-sheet-toolbar__sheet { justify-content: flex-end; }
.pcba-cc-purchase-sheet-toolbar__sheet small { flex-basis: 100%; color: #64748b; font-size: 8px; text-align: right; }
.pcba-cc-purchase-sheet-toolbar__bulk { display: grid; grid-template-columns: minmax(140px,1fr) 145px 165px auto; gap: 6px; }
.pcba-cc-purchase-sheet-toolbar__bulk label { display: grid; gap: 3px; color: #64748b; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.pcba-cc-purchase-sheet-toolbar__bulk input,
.pcba-cc-purchase-sheet-toolbar__bulk select {
    width: 100%; min-height: 32px; border: 1px solid #cbd5e1; border-radius: 7px; padding: 5px 7px; background: #fff; color: #0f172a; font-size: 10px;
}
.pcba-cc-purchase-sheet { border-collapse: separate; border-spacing: 0; }
.pcba-cc-purchase-sheet thead th { position: sticky; top: 0; z-index: 3; background: #f8fafc; box-shadow: inset 0 -1px #dbe5f1; }
.pcba-cc-purchase-sheet th.is-check,
.pcba-cc-purchase-sheet td.is-check { width: 38px; min-width: 38px; text-align: center; }
.pcba-cc-purchase-sheet td { vertical-align: middle; }
.pcba-cc-purchase-sheet tr:has([data-pcba-purchase-row-select]:checked) td { background: #f0fdfa; }
.pcba-cc-purchase-sheet tr.is-dirty td { box-shadow: inset 0 1px rgba(14,165,233,.12), inset 0 -1px rgba(14,165,233,.12); }
.pcba-cc-purchase-sheet input[data-pcba-purchase-item-field] {
    border-radius: 4px; min-height: 31px; padding: 4px 6px; transition: border-color .12s, box-shadow .12s, background .12s;
}
.pcba-cc-purchase-sheet input[data-pcba-purchase-item-field]:focus {
    position: relative; z-index: 4; outline: none; border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(14,165,233,.18); background: #fff;
}
.pcba-cc-purchase-sheet input.is-pasted { background: #eff6ff; }
.pcba-cc-purchase-row-status {
    width: 100%; min-width: 125px; min-height: 30px; border: 1px solid #dbe5f1; border-radius: 7px; padding: 4px 6px; font-size: 9px; font-weight: 900; background: #fff;
}
.pcba-cc-purchase-row-status.is-requested { color: #1d4ed8; background: #eff6ff; }
.pcba-cc-purchase-row-status.is-buying { color: #c2410c; background: #fff7ed; }
.pcba-cc-purchase-row-status.is-ordered { color: #6d28d9; background: #f5f3ff; }
.pcba-cc-purchase-row-status.is-receiving { color: #0e7490; background: #ecfeff; }
.pcba-cc-purchase-row-status.is-completed { color: #15803d; background: #ecfdf5; }
.pcba-cc-purchase-locked-hint { display: block; margin-top: 4px; color: #64748b; font-size: 8px; line-height: 1.3; }

@media (max-width: 1180px) {
    .pcba-cc-purchase-sheet-toolbar { grid-template-columns: 1fr; }
    .pcba-cc-purchase-sheet-toolbar__sheet { justify-content: flex-start; }
    .pcba-cc-purchase-sheet-toolbar__sheet small { text-align: left; }
}
@media (max-width: 760px) {
    .pcba-cc-purchase-sheet-toolbar__bulk { grid-template-columns: 1fr 1fr; }
}

.pcba-cc-purchase-overbuy{display:block;margin-top:4px;font-size:11px;font-weight:700;color:#b45309;white-space:nowrap;}

/* 0.10.8 - BOM picker manual check + on-demand SKU suggestions */
.pcba-cc-bom-sku-inputrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 5px;
    align-items: center;
}

.pcba-cc-bom-sku-inputrow .pcba-cc-bom-sku-search {
    width: 32px;
    min-width: 32px;
    height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafc;
    color: #0f766e;
    font-size: 18px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.pcba-cc-bom-sku-inputrow .pcba-cc-bom-sku-search:hover,
.pcba-cc-bom-sku-inputrow .pcba-cc-bom-sku-search.is-open {
    border-color: #22b8cf;
    background: #ecfeff;
    color: #0e7490;
}

.pcba-cc-bom-sku-suggestions[hidden] {
    display: none !important;
}

.pcba-cc-bom-sku-suggestions {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 3px;
    padding: 7px;
    border: 1px solid #bae6fd;
    border-radius: 9px;
    background: #f8fdff;
    overflow: visible;
    z-index: 8;
}

.pcba-cc-bom-sku-suggestions__head {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 1px 2px 4px;
}

.pcba-cc-bom-sku-suggestions__head b {
    font-size: 10px;
    color: #0f172a;
}

.pcba-cc-bom-sku-suggestions__head small {
    padding: 0 !important;
    font-size: 8px !important;
    color: #64748b !important;
}

.pcba-cc-bom-sku-suggestion-empty {
    grid-column: 1 / -1;
    padding: 8px;
    border-radius: 7px;
    background: #fff;
    color: #64748b;
    font-size: 9px;
}

.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "badges" "sku" "meta";
    gap: 3px;
    min-width: 0;
    padding: 6px 7px;
    overflow: visible;
}

.pcba-cc-bom-sku-chip__badges {
    grid-area: badges !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 3px;
    white-space: normal !important;
}

.pcba-cc-bom-sku-chip__badges small {
    display: inline-flex;
    width: fit-content;
    border-radius: 999px;
    padding: 2px 5px !important;
    font-size: 8px !important;
    line-height: 1.2;
}

.pcba-cc-bom-sku-chip__badges .is-match {
    background: #e0f2fe;
    color: #0369a1 !important;
}

.pcba-cc-bom-sku-chip__badges .is-history {
    background: #ede9fe;
    color: #6d28d9 !important;
}

.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip > b {
    grid-area: sku;
    font-size: 10px;
}

.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip > span:not(.pcba-cc-bom-sku-chip__badges):not(.pcba-cc-bom-sku-preview) {
    grid-area: meta;
    font-size: 8px;
}

.pcba-cc-bom-sku-preview {
    display: none !important;
    position: absolute;
    left: calc(100% + 7px);
    top: 0;
    width: 260px;
    min-height: 78px;
    padding: 9px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .18);
    z-index: 40;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 9px;
    color: #0f172a !important;
    white-space: normal !important;
    pointer-events: none;
}

.pcba-cc-bom-sku-chip:hover .pcba-cc-bom-sku-preview {
    display: grid !important;
}

.pcba-cc-bom-sku-preview img,
.pcba-cc-bom-sku-preview__placeholder {
    width: 62px;
    height: 62px;
    border-radius: 8px;
    object-fit: cover;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.pcba-cc-bom-sku-preview__placeholder {
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 24px;
}

.pcba-cc-bom-sku-preview > span:last-child {
    display: grid;
    align-content: start;
    gap: 3px;
}

.pcba-cc-bom-sku-preview b {
    font-size: 11px;
    line-height: 1.3;
}

.pcba-cc-bom-sku-preview small {
    padding: 0 !important;
    color: #64748b !important;
    font-size: 9px !important;
    line-height: 1.3;
}

.pcba-cc-bom-sku-chip:disabled {
    cursor: default;
    opacity: .9;
}

@media (max-width: 900px) {
    .pcba-cc-bom-sku-suggestions {
        grid-template-columns: 1fr;
    }
    .pcba-cc-bom-sku-preview {
        left: auto;
        right: 0;
        top: calc(100% + 5px);
        width: min(260px, 80vw);
    }
}

.pcba-cc-bom-sku-preview,
.pcba-cc-bom-sku-preview > span:last-child {
    grid-area: auto !important;
    white-space: normal !important;
}


/* 0.11.0 - compact BOM picker + aligned SKU search + clear floating product preview */
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head {
    min-height: 46px;
    padding: 7px 12px;
}
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head small {
    font-size: 9px;
    line-height: 1;
}
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head h3 {
    margin-top: 1px;
    font-size: 15px;
    line-height: 1.15;
}
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head button {
    width: 30px;
    height: 30px;
    font-size: 17px;
}
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__body {
    gap: 6px;
    padding: 7px 10px 10px;
}
.pcba-cc-bom-picker-kpis {
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 5px !important;
}
.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis > div {
    min-height: 44px;
    border-radius: 7px;
    padding: 5px 8px;
}
.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis > div span {
    font-size: 8px;
    line-height: 1.05;
}
.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis > div strong {
    margin-top: 1px;
    font-size: 17px;
    line-height: 1.05;
}
.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list {
    border-radius: 7px;
}
.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list div {
    padding: 5px 8px;
}
.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list dt {
    font-size: 8px;
    line-height: 1;
}
.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list dd {
    margin-top: 2px;
    font-size: 11px;
    line-height: 1.15;
}
.pcba-cc-bom-release-actions {
    min-height: 29px;
    gap: 4px 8px;
}
.pcba-cc-bom-action-group {
    gap: 4px;
}
.pcba-cc-bom-release-drawer .pcba-cc-bom-compact-btn {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 10px;
}
.pcba-cc-bom-release-drawer .pcba-cc-bom-autosave {
    min-height: 24px;
    padding: 3px 7px;
    font-size: 9px;
}
.pcba-cc-bom-picking-table {
    max-height: calc(100vh - 235px);
}

.pcba-cc-bom-sku-editor {
    position: relative;
    display: grid;
    gap: 3px;
    padding: 3px 5px 4px;
}
.pcba-cc-bom-sku-editor > small:first-child {
    line-height: 1.05;
}
.pcba-cc-bom-sku-inputrow {
    display: flex !important;
    align-items: stretch;
    gap: 4px;
    width: 100%;
}
.pcba-cc-bom-sku-inputrow > input {
    flex: 1 1 auto;
    width: 0 !important;
    min-width: 0 !important;
    height: 29px !important;
    min-height: 29px !important;
}
.pcba-cc-bom-sku-inputrow .pcba-cc-bom-sku-search {
    display: inline-grid !important;
    place-items: center;
    flex: 0 0 30px !important;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 29px !important;
    min-height: 29px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    background: #f8fafc !important;
    color: #087f8c !important;
    line-height: 1 !important;
    overflow: hidden;
    box-sizing: border-box;
}
.pcba-cc-bom-sku-inputrow .pcba-cc-bom-sku-search .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 16px;
}
.pcba-cc-bom-sku-inputrow .pcba-cc-bom-sku-search:hover,
.pcba-cc-bom-sku-inputrow .pcba-cc-bom-sku-search.is-open {
    border-color: #22b8cf !important;
    background: #ecfeff !important;
}

.pcba-cc-bom-sku-suggestions[hidden] { display: none !important; }
.pcba-cc-bom-sku-suggestions {
    position: fixed !important;
    left: 0;
    top: 0;
    z-index: 100050 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 5px;
    width: min(390px, calc(100vw - 24px));
    max-width: 390px;
    max-height: min(390px, calc(100vh - 24px));
    margin: 0 !important;
    padding: 7px;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    border: 1px solid #9edbe5;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .24);
}
.pcba-cc-bom-sku-suggestions__head {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 2px;
    padding: 2px 3px 5px;
    border-bottom: 1px solid #e2e8f0;
}
.pcba-cc-bom-sku-suggestions__head b {
    font-size: 11px;
}
.pcba-cc-bom-sku-suggestions__head small {
    font-size: 8px !important;
    line-height: 1.25;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas: "badges badges" "sku meta" "preview preview" !important;
    gap: 3px 8px !important;
    width: 100%;
    min-height: 48px;
    padding: 6px 8px !important;
    overflow: hidden !important;
    border-radius: 7px;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip > b {
    grid-area: sku !important;
    align-self: center;
    font-size: 11px;
    line-height: 1.2;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip > span:not(.pcba-cc-bom-sku-chip__badges):not(.pcba-cc-bom-sku-preview) {
    grid-area: meta !important;
    align-self: center;
    color: #64748b;
    font-size: 8px;
    text-align: right;
    white-space: nowrap;
}
.pcba-cc-bom-sku-chip__badges {
    grid-area: badges !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 3px;
}
.pcba-cc-bom-sku-preview {
    grid-area: preview !important;
    display: none !important;
    grid-template-columns: 54px minmax(0, 1fr) !important;
    gap: 9px !important;
    width: 100% !important;
    min-height: 64px !important;
    margin-top: 3px;
    padding: 8px !important;
    border: 1px solid #dbe5f1 !important;
    border-radius: 7px !important;
    background: #f8fafc !important;
    box-shadow: none !important;
    color: #0f172a !important;
    white-space: normal !important;
    pointer-events: none;
}
.pcba-cc-bom-sku-chip:hover .pcba-cc-bom-sku-preview,
.pcba-cc-bom-sku-chip:focus-visible .pcba-cc-bom-sku-preview {
    display: grid !important;
}
.pcba-cc-bom-sku-preview img,
.pcba-cc-bom-sku-preview__placeholder {
    width: 54px !important;
    height: 54px !important;
    border-radius: 6px;
    object-fit: cover;
}
.pcba-cc-bom-sku-preview__placeholder {
    display: grid;
    place-items: center;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #94a3b8;
    font-size: 20px;
}
.pcba-cc-bom-sku-preview > span:last-child {
    display: grid !important;
    align-content: start;
    gap: 2px;
    min-width: 0;
}
.pcba-cc-bom-sku-preview b {
    color: #0f172a !important;
    font-size: 11px !important;
    line-height: 1.25;
    white-space: normal !important;
}
.pcba-cc-bom-sku-preview small {
    padding: 0 !important;
    color: #64748b !important;
    font-size: 9px !important;
    line-height: 1.25;
    white-space: normal !important;
}
.pcba-cc-bom-sku-preview small strong {
    color: #334155;
    font-weight: 850;
}
.pcba-cc-bom-sku-chip.is-history .pcba-cc-bom-sku-preview {
    border-color: #ddd6fe !important;
    background: #faf5ff !important;
}

@media (max-width: 900px) {
    .pcba-cc-bom-picker-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
    .pcba-cc-bom-picking-table {
        max-height: calc(100vh - 285px);
    }
}
@media (max-width: 600px) {
    .pcba-cc-bom-picker-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .pcba-cc-bom-sku-suggestions {
        width: min(340px, calc(100vw - 12px));
    }
}


/* 0.11.1 - SKU suggestion hover preview: keep preview inside popup instead of inheriting old absolute positioning. */
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip {
    overflow: visible !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview {
    position: static !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 68px !important;
    margin: 4px 0 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip:hover,
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip:focus-visible {
    z-index: 3;
    background: #f8fdff;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip:hover .pcba-cc-bom-sku-preview,
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip:focus-visible .pcba-cc-bom-sku-preview {
    display: grid !important;
}
.pcba-cc-bom-sku-preview img {
    display: block !important;
    width: 58px !important;
    height: 58px !important;
    object-fit: cover !important;
}
.pcba-cc-bom-sku-preview__placeholder {
    display: grid !important;
    place-items: center !important;
    width: 58px !important;
    height: 58px !important;
    padding: 4px;
    text-align: center;
}
.pcba-cc-bom-sku-preview__placeholder b {
    font-size: 8px !important;
    line-height: 1.15 !important;
    color: #94a3b8 !important;
}
.pcba-cc-bom-sku-preview > span:last-child > b {
    display: block !important;
    overflow: hidden;
    color: #0f172a !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
    text-overflow: ellipsis;
}
.pcba-cc-bom-sku-preview > span:last-child small {
    display: block !important;
    color: #475569 !important;
    font-size: 9px !important;
    line-height: 1.3 !important;
}


/* 0.11.2 - clean SKU hover card: horizontal title and reset inherited chip span grid styles. */
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview {
    display: none !important;
    position: static !important;
    grid-area: preview !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 5px 0 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
    border: 1px solid #d9e5ef !important;
    border-radius: 8px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: #0f172a !important;
    text-align: left !important;
    white-space: normal !important;
    pointer-events: none !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip:hover .pcba-cc-bom-sku-preview,
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-chip:focus-visible .pcba-cc-bom-sku-preview {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__title {
    display: block !important;
    grid-area: auto !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 1px 6px !important;
    overflow: hidden !important;
    border-bottom: 1px solid #eef2f7 !important;
    color: #0f172a !important;
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1.35 !important;
    text-align: left !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__content {
    display: flex !important;
    grid-area: auto !important;
    align-items: flex-start !important;
    gap: 9px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: inherit !important;
    font-size: inherit !important;
    white-space: normal !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__image,
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__placeholder {
    display: flex !important;
    grid-area: auto !important;
    flex: 0 0 58px !important;
    width: 58px !important;
    height: 58px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 7px !important;
    background: #f8fafc !important;
    object-fit: cover !important;
    white-space: normal !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__placeholder {
    align-items: center !important;
    justify-content: center !important;
    color: #94a3b8 !important;
    text-align: center !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__placeholder b {
    display: block !important;
    grid-area: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #94a3b8 !important;
    font-size: 8px !important;
    line-height: 1.15 !important;
    white-space: normal !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__body {
    display: flex !important;
    grid-area: auto !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #475569 !important;
    font-size: 9px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__body small {
    display: block !important;
    grid-area: auto !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #475569 !important;
    font-size: 9px !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    text-align: left !important;
    white-space: normal !important;
}
.pcba-cc-bom-sku-suggestions .pcba-cc-bom-sku-preview__body small strong {
    color: #334155 !important;
    font-weight: 800 !important;
}

/* 0.11.3 - safe BOM SX delete can cascade unreceived purchase requests; received/stocked documents remain protected. */


/* 0.11.5 - xóa riêng từng phiếu DNM */
.pcba-cc-purchase-delete-btn {
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #b91c1c;
  border-radius: 9px;
  min-height: 34px;
  padding: 7px 12px;
  font-weight: 800;
  cursor: pointer;
}
.pcba-cc-purchase-delete-btn:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #fca5a5;
}
.pcba-cc-purchase-delete-btn:disabled { opacity: .55; cursor: not-allowed; }
.pcba-cc-purchase-delete-btn.is-compact {
  display: block;
  margin-top: 6px;
  min-height: 28px;
  padding: 4px 8px;
  font-size: 12px;
}
.pcba-cc-purchase-detail-actions {
  justify-content: space-between;
}

/* ===== 0.11.6 · Phân quyền nhân viên ===== */
.pcba-control-center [hidden] {
    display: none !important;
}

.pcba-cc-nav__item--permissions {
    margin-top: 8px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.pcba-cc-perm-layout {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    min-height: 620px;
    border: 1px solid var(--pcba-cc-border, #dce4ee);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.pcba-cc-perm-users {
    padding: 12px;
    background: #f7f9fc;
    border-right: 1px solid #e2e8f0;
    overflow: auto;
}

.pcba-cc-perm-users__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 4px 4px 12px;
}

.pcba-cc-perm-users__head strong { font-size: 14px; color: #132238; }
.pcba-cc-perm-users__head small { color: #738197; }

.pcba-cc-perm-user {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin: 0 0 6px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #23334a;
    text-align: left;
    cursor: pointer;
}

.pcba-cc-perm-user:hover { background: #eef5fb; }
.pcba-cc-perm-user.is-active { background: #e7f8fb; border-color: #79d3df; box-shadow: inset 3px 0 #13a5b8; }
.pcba-cc-perm-user img,
.pcba-cc-perm-user__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    background: #dce8f5;
    color: #34506e;
    font-weight: 800;
}
.pcba-cc-perm-user > span:last-child { min-width: 0; display: grid; gap: 2px; }
.pcba-cc-perm-user strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcba-cc-perm-user small { color: #76859a; font-size: 11px; }

.pcba-cc-perm-right { min-width: 0; padding: 16px 18px 18px; overflow: auto; }
.pcba-cc-perm-empty {
    min-height: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #76859a;
    text-align: center;
}
.pcba-cc-perm-empty .dashicons { width: 52px; height: 52px; font-size: 52px; color: #b1bdcc; margin-bottom: 12px; }
.pcba-cc-perm-empty strong { color: #34445a; font-size: 18px; }
.pcba-cc-perm-empty p { max-width: 480px; }

.pcba-cc-perm-editor__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.pcba-cc-perm-editor__head h3 { margin: 0; font-size: 20px; color: #132238; }
.pcba-cc-perm-editor__head p { margin: 3px 0 0; color: #718096; }
.pcba-cc-perm-notice {
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #f1ce79;
    border-radius: 9px;
    background: #fff9e8;
    color: #735717;
    font-size: 12px;
}

.pcba-cc-perm-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
    padding: 9px;
    margin-bottom: 12px;
    border: 1px solid #e1e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.pcba-cc-perm-toolbar span { color: #76859a; font-size: 11px; margin-left: 4px; }
.pcba-cc-perm-toolbar button {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #d6e0eb;
    border-radius: 7px;
    background: #fff;
    color: #31445b;
    font-weight: 700;
    font-size: 11px;
    cursor: pointer;
}
.pcba-cc-perm-toolbar button:hover { border-color: #65c6d3; color: #087d8d; }

.pcba-cc-perm-tree {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.pcba-cc-perm-node {
    border: 1px solid #dde5ee;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}
.pcba-cc-perm-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 7px 10px;
    color: #314158;
    cursor: pointer;
    user-select: none;
}
.pcba-cc-perm-check:hover { background: #f5fafc; }
.pcba-cc-perm-check input { width: 17px; height: 17px; margin: 0; accent-color: #12a5b7; }
.pcba-cc-perm-check--parent { background: #f6f9fc; border-bottom: 1px solid #edf1f5; }
.pcba-cc-perm-check--parent .dashicons { color: #138da0; font-size: 18px; width: 18px; height: 18px; }
.pcba-cc-perm-check--parent strong { font-size: 13px; }
.pcba-cc-perm-children { padding: 5px 8px 8px 26px; }
.pcba-cc-perm-children .pcba-cc-perm-check { min-height: 30px; padding: 4px 6px; font-size: 12px; }

.pcba-cc-perm-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #dce5ed;
    border-radius: 10px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 -5px 18px rgba(20,36,56,.06);
}
.pcba-cc-perm-actions small { color: #68788c; }
.pcba-cc-perm-success {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #e9f9ef;
    color: #16713a;
    border: 1px solid #bde8ca;
    font-weight: 700;
}

@media (max-width: 980px) {
    .pcba-cc-perm-layout { grid-template-columns: 1fr; }
    .pcba-cc-perm-users { border-right: 0; border-bottom: 1px solid #e2e8f0; max-height: 260px; }
    .pcba-cc-perm-tree { grid-template-columns: 1fr; }
}


/* 0.11.8 BOM template view/edit */
.pcba-cc-bom-template-title {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pcba-cc-bom-template-title:hover strong {
  color: #0891b2;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/* 0.12.0 - quy trình chuẩn: giao hàng + thanh toán song song, gate hoàn thành */
.pcba-cc-project-final-gate{display:flex;align-items:center;gap:6px;min-width:max-content;margin-left:2px}
.pcba-cc-project-final-gate__split,.pcba-cc-project-final-gate__join{font-size:16px;font-weight:800;color:#64748b;line-height:1}
.pcba-cc-project-final-gate__branches{display:grid;grid-template-columns:1fr;gap:4px;padding:3px;border:1px dashed #cbd5e1;border-radius:10px;background:#f8fafc}
.pcba-cc-project-final-gate__branches .pcba-cc-project-step-wrap{margin:0}.pcba-cc-project-final-gate__branches .pcba-cc-project-step{min-height:34px;padding:4px 8px}
.pcba-cc-project-final-gate__finish{display:flex;flex-direction:column;justify-content:center;min-width:106px;min-height:48px;padding:6px 10px;border:1px solid #f59e0b;border-radius:10px;background:#fff7ed;color:#9a3412}
.pcba-cc-project-final-gate__finish.is-done{border-color:#22c55e;background:#ecfdf5;color:#166534}.pcba-cc-project-final-gate__finish b{font-size:12px;line-height:1.2}.pcba-cc-project-final-gate__finish small{margin-top:2px;font-size:10px;opacity:.82;white-space:nowrap}
.pcba-cc-standard-gate{display:grid;grid-template-columns:minmax(170px,.9fr) minmax(360px,2.4fr) minmax(130px,.8fr);gap:12px;align-items:center;margin:10px 0 12px;padding:10px 12px;border:1px solid #dbe4ef;border-radius:12px;background:#f8fafc}
.pcba-cc-standard-gate.is-complete{border-color:#86efac;background:#f0fdf4}.pcba-cc-standard-gate__title{display:flex;flex-direction:column;gap:2px}.pcba-cc-standard-gate__title strong{font-size:13px;color:#0f172a}.pcba-cc-standard-gate__title small{font-size:10px;color:#64748b;line-height:1.3}
.pcba-cc-standard-gate__items{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.pcba-cc-standard-gate__items>span{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:6px;padding:7px 8px;border-radius:9px;border:1px solid #e2e8f0;background:#fff}.pcba-cc-standard-gate__items>span.is-done{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.pcba-cc-standard-gate__items>span.is-pending{color:#475569}.pcba-cc-standard-gate__items i{font-style:normal}.pcba-cc-standard-gate__items b{font-size:11px}.pcba-cc-standard-gate__items em{font-style:normal;font-size:10px;font-weight:700}
.pcba-cc-standard-gate__result{display:flex;flex-direction:column;gap:2px;padding:7px 9px;border-radius:9px;background:#fff7ed;color:#9a3412;border:1px solid #fed7aa}.pcba-cc-standard-gate.is-complete .pcba-cc-standard-gate__result{background:#dcfce7;border-color:#86efac;color:#166534}.pcba-cc-standard-gate__result b{font-size:12px}.pcba-cc-standard-gate__result small{font-size:10px}
@media(max-width:900px){.pcba-cc-standard-gate{grid-template-columns:1fr}.pcba-cc-standard-gate__items{grid-template-columns:1fr}.pcba-cc-project-final-gate__finish{min-width:96px}}

/* PCB purchase center */
.pcba-control-center.is-pcb-nav-open [data-pcba-cc-nav-group="pcb"] .pcba-cc-nav__submenu{display:flex;}
.pcba-control-center.is-pcb-nav-open [data-pcba-cc-nav-group="pcb"] .pcba-cc-nav__chevron{transform:rotate(180deg);}
[data-pcba-cc-nav-group="pcb"] .pcba-cc-nav__submenu{display:none;flex-direction:column;gap:4px;}
.pcba-cc-pcb-purchase-kpis{grid-template-columns:repeat(5,minmax(130px,1fr));}
.pcba-cc-pcb-order-code{border:0;background:transparent;padding:0;text-align:left;cursor:pointer;color:inherit;display:flex;flex-direction:column;gap:3px;}
.pcba-cc-pcb-order-code strong{color:#087c91;font-weight:800;}
.pcba-cc-pcb-order-code small,.pcba-cc-pcb-order-preview small{display:block;color:#75839a;}
.pcba-cc-pcb-order-status{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:800;background:#eef4f8;color:#415469;}
.pcba-cc-pcb-order-status.is-requested{background:#edf5ff;color:#1767b2;}
.pcba-cc-pcb-order-status.is-buying{background:#fff2dc;color:#a96000;}
.pcba-cc-pcb-order-status.is-waiting{background:#f2edff;color:#6b43bd;}
.pcba-cc-pcb-order-status.is-receiving{background:#e7f8fa;color:#087c91;}
.pcba-cc-pcb-order-status.is-complete{background:#e8f8ee;color:#168246;}
.pcba-cc-pcb-order-create-panel,.pcba-cc-pcb-order-detail-panel{width:min(1480px,calc(100vw - 34px));max-width:none;max-height:94vh;overflow:auto;}
.pcba-cc-pcb-order-create-meta,.pcba-cc-pcb-order-detail-meta{display:grid;grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) minmax(220px,1.4fr) minmax(180px,.8fr);gap:12px;padding:14px 18px;background:#f8fbfd;border-bottom:1px solid #e2eaf0;}
.pcba-cc-pcb-order-create-meta label,.pcba-cc-pcb-order-detail-meta label{display:flex;flex-direction:column;gap:6px;}
.pcba-cc-pcb-order-create-meta label>span,.pcba-cc-pcb-order-detail-meta label>span,.pcba-cc-pcb-order-detail-meta>div>span{font-size:11px;font-weight:800;color:#67758a;text-transform:uppercase;}
.pcba-cc-pcb-order-create-meta input,.pcba-cc-pcb-order-create-meta select,.pcba-cc-pcb-order-detail-meta input,.pcba-cc-pcb-order-detail-meta select{min-height:38px;border:1px solid #ccd9e4;border-radius:9px;padding:7px 10px;background:#fff;}
.pcba-cc-pcb-order-create-table,.pcba-cc-pcb-order-detail-table{max-height:58vh;overflow:auto;}
.pcba-cc-pcb-order-create-table input[type="number"],.pcba-cc-pcb-order-detail-table input{width:110px;max-width:100%;border:1px solid #d0dce6;border-radius:8px;padding:7px 8px;background:#fff;}
.pcba-cc-gerber-actions{display:flex;align-items:center;gap:6px;white-space:nowrap;}
.pcba-cc-gerber-actions button,.pcba-cc-gerber-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:30px;padding:4px 8px;border:1px solid #bcd5e0;border-radius:8px;background:#fff;color:#087c91;text-decoration:none;font-size:12px;font-weight:700;cursor:pointer;}
.pcba-cc-gerber-actions button:disabled{opacity:.45;cursor:not-allowed;}
.pcba-cc-pcb-demand-grid{display:grid;grid-template-columns:1fr;gap:14px;}
.pcba-cc-demand-shortage{color:#d52b1e;}
.pcba-cc-demand-ok{color:#138347;}
.pcba-cc-pcb-order-preview{line-height:1.55;color:#37465a;}
.pcba-cc-pcb-release-demand{margin:10px 0 12px;padding:10px 12px;border:1px solid #cfe1ea;border-radius:10px;background:#f7fbfd;display:grid;grid-template-columns:minmax(180px,1.2fr) repeat(5,minmax(90px,.7fr)) minmax(180px,1fr);gap:8px;align-items:center;}
.pcba-cc-pcb-release-demand>div{display:flex;flex-direction:column;gap:2px;}
.pcba-cc-pcb-release-demand span{font-size:10px;text-transform:uppercase;font-weight:800;color:#7a8799;}
.pcba-cc-pcb-release-demand strong{font-size:13px;color:#1e2d40;}
.pcba-cc-pcb-release-demand .is-short{color:#d52b1e;}
@media (max-width:1100px){
  .pcba-cc-pcb-purchase-kpis{grid-template-columns:repeat(2,minmax(130px,1fr));}
  .pcba-cc-pcb-order-create-meta,.pcba-cc-pcb-order-detail-meta{grid-template-columns:1fr 1fr;}
  .pcba-cc-pcb-release-demand{grid-template-columns:1fr 1fr 1fr;}
}

/* 0.14.0 - Unified purchasing: components + PCB */
.pcba-cc-purchase-type-filters{
  display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:8px 0 6px;
}
.pcba-cc-purchase-type-filters button{
  border:1px solid #dbe4f0;background:#fff;border-radius:999px;padding:6px 12px;font-size:12px;font-weight:700;color:#475569;cursor:pointer;
}
.pcba-cc-purchase-type-filters button.is-active{
  background:#0f172a;color:#fff;border-color:#0f172a;
}
.pcba-cc-purchase-kind{
  display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800;white-space:nowrap;
}
.pcba-cc-purchase-kind.is-component{background:#eff6ff;color:#1d4ed8;border:1px solid #bfdbfe;}
.pcba-cc-purchase-kind.is-pcb{background:#f5f3ff;color:#6d28d9;border:1px solid #ddd6fe;}
.pcba-cc-purchase-open-mini{
  margin-top:5px;border:1px solid #cbd5e1;background:#fff;border-radius:7px;padding:3px 8px;font-size:11px;font-weight:700;cursor:pointer;
}
.pcba-cc-purchase-create-type-tabs{
  display:flex;gap:8px;padding:8px 16px;border-bottom:1px solid #e2e8f0;background:#f8fafc;
}
.pcba-cc-purchase-create-type-tabs button{
  flex:1;max-width:180px;border:1px solid #cbd5e1;background:#fff;border-radius:9px;padding:8px 12px;font-weight:800;color:#475569;cursor:pointer;
}
.pcba-cc-purchase-create-type-tabs button.is-active{
  background:#0f766e;border-color:#0f766e;color:#fff;
}
.pcba-cc-purchase-unified td small{display:block;margin-top:3px;color:#64748b;line-height:1.3;}
.pcba-cc-purchase-unified td{vertical-align:top;}
.pcba-cc-purchase-unified .pcba-cc-purchase-note-cell textarea{min-width:160px;}
.pcba-purchase-nav-summary .dashicons{color:#0f766e;}
@media (max-width: 900px){
  .pcba-cc-purchase-type-filters{overflow-x:auto;flex-wrap:nowrap;padding-bottom:2px;}
  .pcba-cc-purchase-type-filters button{white-space:nowrap;}
}

/* v0.15.0 - Project material costing: BOM + PCB */
.pcba-cc-project-tab--costing .pcba-cc-project-tab-icon{background:#fff7ed;color:#c2410c}
.pcba-cc-project-tab--costing.is-active{border-color:#fdba74;background:#fff7ed;color:#9a3412}
.pcba-cc-material-cost{display:grid;gap:12px}
.pcba-cc-material-cost-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #e2e8f0;border-radius:14px;background:#fff}
.pcba-cc-material-cost-head>div{display:grid;gap:2px;min-width:0}
.pcba-cc-material-cost-head span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#64748b}
.pcba-cc-material-cost-head strong{font-size:16px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcba-cc-material-cost-head small{font-size:12px;color:#64748b}
.pcba-cc-material-cost-head button{border:1px solid #cbd5e1;background:#f8fafc;color:#334155;border-radius:9px;padding:8px 11px;font-weight:700;cursor:pointer;white-space:nowrap}
.pcba-cc-material-cost-head button:hover{background:#f1f5f9;border-color:#94a3b8}
.pcba-cc-material-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.pcba-cc-material-kpis>div{display:grid;gap:3px;padding:11px 12px;border:1px solid #e2e8f0;border-radius:12px;background:#fff;min-width:0}
.pcba-cc-material-kpis>div.is-total{background:#f0fdf4;border-color:#bbf7d0}
.pcba-cc-material-kpis span{font-size:11px;font-weight:750;color:#64748b}
.pcba-cc-material-kpis strong{font-size:18px;color:#0f172a;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcba-cc-material-kpis .is-total strong{color:#166534}
.pcba-cc-material-kpis small{font-size:11px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcba-cc-material-cost-warning{display:flex;align-items:center;gap:7px;padding:9px 11px;border-radius:10px;border:1px solid #fed7aa;background:#fff7ed;color:#9a3412;font-size:12px}
.pcba-cc-material-cost-warning.is-ok{border-color:#bbf7d0;background:#f0fdf4;color:#166534}
.pcba-cc-material-cost-warning span{color:#64748b}
.pcba-cc-material-rule{padding:8px 10px;border-radius:9px;background:#f8fafc;border:1px dashed #cbd5e1;color:#64748b;font-size:11px}
.pcba-cc-material-rule strong{color:#334155}
.pcba-cc-material-section{display:grid;gap:7px}
.pcba-cc-material-section__title{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:0 2px}
.pcba-cc-material-section__title h4{margin:0;color:#0f172a;font-size:14px}
.pcba-cc-material-section__title span{font-size:11px;color:#64748b;font-weight:700}
.pcba-cc-material-table .pcba-cc-table{min-width:760px}
.pcba-cc-material-table td:first-child strong,.pcba-cc-material-table td:first-child small{display:block}
.pcba-cc-material-table td:first-child small{margin-top:2px;color:#64748b;font-size:11px;max-width:320px;white-space:normal}
.pcba-cc-material-table tr.is-price-missing{background:#fff7ed}
.pcba-cc-material-source{display:grid;gap:1px;min-width:110px}
.pcba-cc-material-source strong{font-size:11px;color:#475569}
.pcba-cc-material-source small{font-size:10px;color:#94a3b8}
.pcba-cc-material-source.is-actual strong{color:#166534}
.pcba-cc-material-source.is-missing strong,.pcba-cc-material-no-price{color:#c2410c;font-weight:750}
@media (max-width:1100px){.pcba-cc-material-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.pcba-cc-material-cost-head{align-items:flex-start}.pcba-cc-material-cost-head button{padding:7px 8px}.pcba-cc-material-kpis{grid-template-columns:1fr 1fr}.pcba-cc-material-kpis strong{font-size:15px}.pcba-cc-material-cost-warning{align-items:flex-start;flex-wrap:wrap}}


/* 0.15.1 - Project BOM PCB override */
.pcba-cc-working-bom-pcb{display:grid;grid-template-columns:minmax(280px,1.7fr) 150px minmax(150px,.65fr) auto;gap:10px;align-items:end;padding:12px;margin:10px 0;border:1px solid #cfe4ee;border-radius:12px;background:#f7fcfe}.pcba-cc-working-bom-pcb__title{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:12px}.pcba-cc-working-bom-pcb__title span{font-weight:800;color:#0b5366}.pcba-cc-working-bom-pcb__title small{color:#718096}.pcba-cc-working-bom-pcb label{display:flex;flex-direction:column;gap:5px}.pcba-cc-working-bom-pcb label>span,.pcba-cc-working-bom-pcb__need>span{font-size:11px;font-weight:800;text-transform:uppercase;color:#64748b}.pcba-cc-working-bom-pcb select,.pcba-cc-working-bom-pcb input{height:38px;border:1px solid #cbdbe5;border-radius:8px;background:#fff;padding:0 10px}.pcba-cc-working-bom-pcb__need{min-height:38px;display:flex;flex-direction:column;justify-content:center}.pcba-cc-working-bom-pcb__need strong{font-size:16px;color:#0f766e}.pcba-cc-working-bom-pcb__need small{font-size:11px;color:#64748b}.pcba-cc-working-bom-pcb__actions{display:flex;align-items:center;justify-content:flex-end;gap:6px}.pcba-cc-working-bom-pcb__actions button{height:38px;border:1px solid #8bd3e5;border-radius:8px;background:#ecfeff;color:#08758a;font-weight:700;padding:0 12px;cursor:pointer}@media(max-width:900px){.pcba-cc-working-bom-pcb{grid-template-columns:1fr 130px}.pcba-cc-working-bom-pcb__need,.pcba-cc-working-bom-pcb__actions{grid-column:auto}}@media(max-width:620px){.pcba-cc-working-bom-pcb{grid-template-columns:1fr}.pcba-cc-working-bom-pcb__title{align-items:flex-start;flex-direction:column}.pcba-cc-working-bom-pcb__actions{justify-content:flex-start}}

/* v0.15.4 - make project PCB linkage visible from BOM du an list */
.pcba-cc-working-bom-pcb-cell{display:flex;flex-direction:column;align-items:flex-start;gap:4px;min-width:190px}.pcba-cc-working-bom-pcb-cell>strong{color:#0f172a;font-size:13px}.pcba-cc-working-bom-pcb-source{display:inline-flex!important;width:auto!important;margin:0!important;padding:2px 7px;border-radius:999px;background:#f1f5f9;color:#64748b;font-size:10px!important;font-weight:800}.pcba-cc-working-bom-pcb-source.is-template{background:#eff6ff;color:#1d4ed8}.pcba-cc-working-bom-pcb-source.is-project{background:#ecfdf5;color:#047857}.pcba-cc-working-bom-pcb-edit{border:0;background:transparent;color:#08758a;padding:2px 0;font-weight:800;font-size:11px;cursor:pointer;text-decoration:underline;text-underline-offset:2px}.pcba-cc-working-bom-pcb-edit:hover{color:#0e7490}.pcba-cc-working-bom-pcb{border-width:2px;border-color:#8bd3e5;background:linear-gradient(180deg,#f0fdff 0%,#f8feff 100%)}.pcba-cc-working-bom-pcb__title span{font-size:14px}.pcba-cc-working-bom-pcb__title small{font-weight:700}.pcba-cc-working-bom-list td:nth-child(2){min-width:210px}

/* v0.15.6 - purchase row autosave feedback without rebuilding/jumping the modal */
.pcba-cc-purchase-row-save-state {
    display: block;
    min-height: 14px;
    margin-top: 4px;
    color: #64748b;
    font-size: 9px;
    font-weight: 800;
}
.pcba-cc-purchase-row-save-state:empty { min-height: 0; margin-top: 0; }
.pcba-cc-purchase-row-save-state.is-saving { color: #0284c7; }
.pcba-cc-purchase-row-save-state.is-saved { color: #15803d; }
.pcba-cc-purchase-row-save-state.is-error { color: #dc2626; }

/* v0.15.7 - one checked selection batch = one DNM, with source shown per line */
.pcba-cc-purchase-source {
  margin-top: 4px;
  font-weight: 600;
  opacity: .78;
}
.pcba-cc-purchase-create-selected small {
  display: inline-block;
  margin-top: 4px;
}

/* v0.16.0 - quick access to the latest production BOM from Project. */
.pcba-cc-project-step-quick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 3px auto 0;
    padding: 2px 7px;
    border: 1px solid #b9d8ff;
    border-radius: 999px;
    background: #eef7ff;
    color: #1463b8;
    font-size: 8px;
    font-weight: 800;
    line-height: 1.25;
    cursor: pointer;
    white-space: nowrap;
}

.pcba-cc-project-step-quick:hover,
.pcba-cc-project-step-quick:focus-visible {
    border-color: #78b6f4;
    background: #e2f1ff;
    outline: 0;
}

.pcba-cc-project-pbsx-shortcut {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid #b8d9f5;
    border-radius: 12px;
    background: #f4faff;
}

.pcba-cc-project-pbsx-shortcut > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pcba-cc-project-pbsx-shortcut span,
.pcba-cc-project-pbsx-shortcut small {
    color: #66758b;
    font-size: 11px;
}

.pcba-cc-project-pbsx-shortcut strong {
    color: #173252;
    font-size: 13px;
}

.pcba-cc-project-pbsx-shortcut button {
    flex: 0 0 auto;
    border: 1px solid #7bb8ea;
    border-radius: 8px;
    padding: 7px 10px;
    background: #ffffff;
    color: #0c67a8;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.pcba-cc-project-pbsx-shortcut button:hover,
.pcba-cc-project-pbsx-shortcut button:focus-visible {
    background: #eaf6ff;
    outline: 0;
}

.pcba-cc-project-pbsx-shortcut.is-empty {
    border-style: dashed;
    background: #fafcff;
}

.pcba-cc-project-pbsx-shortcut.is-compact {
    padding: 9px 12px;
}

.pcba-cc-bom-release-list th:nth-child(3),
.pcba-cc-bom-release-list td:nth-child(3) {
    min-width: 190px;
}

.pcba-cc-bom-release-list th:nth-child(4),
.pcba-cc-bom-release-list td:nth-child(4) {
    min-width: 150px;
}

@media (max-width: 760px) {
    .pcba-cc-project-pbsx-shortcut {
        align-items: stretch;
        flex-direction: column;
    }
    .pcba-cc-project-pbsx-shortcut button {
        width: 100%;
    }
}

/* v0.16.1 - Assembly đối chiếu theo Phiếu BOM SX */
.pcba-cc-assembly-sx-banner {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 10px;
    border: 1px solid #b7e4d8;
    border-radius: 12px;
    background: #f3fbf8;
}
.pcba-cc-assembly-sx-banner > div:first-child {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.pcba-cc-assembly-sx-banner > div:first-child > span {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    color: #0f766e;
}
.pcba-cc-assembly-sx-banner > div:first-child > strong {
    font-size: 15px;
    color: #0f172a;
}
.pcba-cc-assembly-sx-banner > div:first-child > small {
    color: #64748b;
}
.pcba-cc-assembly-sx-kpis {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.pcba-cc-assembly-sx-kpis b,
.pcba-cc-assembly-sx-kpis span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #d7e6e1;
    font-size: 12px;
    white-space: nowrap;
}
.pcba-cc-assembly-sx-kpis b { color: #047857; }
.pcba-cc-assembly-sx-banner > button {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    cursor: pointer;
}
.pcba-cc-assembly-sx-warning {
    margin: -2px 0 10px;
    padding: 8px 10px;
    border: 1px solid #fed7aa;
    border-radius: 9px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 12px;
}
.pcba-cc-pcb-assembly-table tr.is-sx-enough td { background: #f4fbf6; }
.pcba-cc-pcb-assembly-table tr.is-sx-shortage td { background: #fff5f5; }
.pcba-cc-pcb-assembly-table tr.is-sx-waiting td { background: #f8fbff; }
.pcba-cc-pcb-assembly-table tr.is-sx-outside td { background: #fffaf0; }
.pcba-cc-pcb-assembly-table tr.is-selected td { box-shadow: inset 0 0 0 1px #2563eb; }
.pcba-cc-pcb-assembly-table td > small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    line-height: 1.3;
}
.pcba-cc-assembly-sx-replacement {
    color: #b45309 !important;
    font-weight: 700;
}
.pcba-cc-assembly-sx-status {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.pcba-cc-assembly-sx-status.is-enough { background: #dcfce7; color: #166534; }
.pcba-cc-assembly-sx-status.is-shortage { background: #fee2e2; color: #b91c1c; }
.pcba-cc-assembly-sx-status.is-waiting { background: #dbeafe; color: #1d4ed8; }
.pcba-cc-assembly-sx-status.is-outside { background: #ffedd5; color: #9a3412; }

@media (max-width: 900px) {
    .pcba-cc-assembly-sx-banner {
        grid-template-columns: 1fr;
    }
    .pcba-cc-assembly-sx-kpis {
        justify-content: flex-start;
    }
}
.pcba-cc-pcb-mfg-note {
    margin: 8px 0 12px;
    padding: 9px 11px;
    border: 1px solid #dbe7f3;
    border-radius: 9px;
    background: #f8fbff;
    color: #475569;
    font-size: 12px;
    line-height: 1.45;
}
.pcba-cc-pcb-mfg-note strong { color: #0f172a; }
.pcba-cc-assembly-sx-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: flex-end;
}
.pcba-cc-assembly-sx-actions button {
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

/* v0.16.3 - PCB name/client labels + compact BOM grid */
.pcba-cc-bom-template-create {
    width: min(1680px, calc(100vw - 24px));
}

.pcba-cc-bom-template-pcb-field {
    min-width: 0;
}

.pcba-cc-bom-template-pcb-field select {
    min-width: 0;
    width: 100%;
    text-overflow: ellipsis;
}

.pcba-cc-bom-template-pcb-context {
    display: flex;
    min-width: 0;
    margin-top: 4px;
    gap: 6px;
    align-items: center;
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.25;
}

.pcba-cc-bom-template-pcb-context b {
    max-width: 62%;
    overflow: hidden;
    color: #334155;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-bom-template-pcb-context span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-bom-template-workspace {
    display: grid;
    grid-template-columns: minmax(620px, 1.35fr) minmax(460px, .9fr);
    gap: 12px;
    min-height: 0;
    padding: 0 14px;
}

.pcba-cc-bom-template-sheet,
.pcba-cc-bom-template-assembly {
    min-width: 0;
}

.pcba-cc-bom-template-workspace .pcba-cc-bom-template-grid-wrap {
    margin: 0;
    max-height: min(600px, 61vh);
}

.pcba-cc-bom-template-workspace .pcba-cc-bom-template-grid-tools {
    padding: 7px 0 0;
}

.pcba-cc-bom-template-grid tr.is-selected td {
    background: #f0f9ff;
}

.pcba-cc-bom-template-row-number button {
    display: flex;
    width: 100%;
    height: 31px;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
}

.pcba-cc-bom-template-row-number button:hover {
    background: #e0f2fe;
    color: #0369a1;
}

.pcba-cc-bom-template-assembly {
    display: grid;
    grid-template-rows: auto auto auto minmax(300px, 1fr) auto minmax(150px, 240px);
    gap: 7px;
    min-height: 0;
    border: 1px solid #dbe5f1;
    border-radius: 10px;
    padding: 9px;
    background: #f8fafc;
}

.pcba-cc-bom-template-assembly__empty {
    align-self: center;
    padding: 34px 22px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #fff;
    color: #64748b;
    text-align: center;
}

.pcba-cc-bom-template-assembly__empty strong {
    display: block;
    margin-bottom: 6px;
    color: #172033;
    font-size: 14px;
}

.pcba-cc-bom-template-assembly__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.pcba-cc-bom-template-assembly__head > div:first-child {
    display: grid;
    gap: 2px;
}

.pcba-cc-bom-template-assembly__head span {
    color: #0f8aa0;
    font-size: 9px;
    font-weight: 950;
    letter-spacing: .08em;
}

.pcba-cc-bom-template-assembly__head strong {
    color: #172033;
    font-size: 12px;
}

.pcba-cc-bom-template-assembly__head small,
.pcba-cc-bom-template-assembly__hint {
    color: #64748b;
    font-size: 9px;
    font-weight: 700;
}

.pcba-cc-bom-template-map-kpis {
    display: flex;
    gap: 5px;
    align-items: center;
    white-space: nowrap;
}

.pcba-cc-bom-template-map-kpis b,
.pcba-cc-bom-template-map-kpis em {
    border-radius: 999px;
    padding: 4px 7px;
    font-size: 9px;
    font-style: normal;
    font-weight: 900;
}

.pcba-cc-bom-template-map-kpis b {
    background: #dcfce7;
    color: #15803d;
}

.pcba-cc-bom-template-map-kpis em {
    background: #fff7ed;
    color: #c2410c;
}

.pcba-cc-bom-template-assembly__toolbar {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pcba-cc-bom-template-assembly__toolbar button {
    min-height: 27px;
    border: 1px solid #cbd8e8;
    border-radius: 6px;
    padding: 3px 8px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    font-weight: 850;
}

.pcba-cc-bom-template-assembly__toolbar button.is-active {
    border-color: #0f8aa0;
    background: #ecfeff;
    color: #0f7183;
}

.pcba-cc-bom-template-assembly__viewer {
    min-height: 300px;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #0b0f17;
}

.pcba-cc-bom-template-assembly__loading {
    position: absolute;
    z-index: 4;
    right: 28px;
    margin-top: 42px;
    border-radius: 999px;
    padding: 5px 9px;
    background: rgba(15, 23, 42, .82);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
}

.pcba-cc-bom-template-placement-wrap {
    min-height: 0;
    overflow: auto;
    border: 1px solid #dbe5f1;
    border-radius: 7px;
    background: #fff;
}

.pcba-cc-bom-template-placement-table {
    min-width: 500px;
}

.pcba-cc-bom-template-placement-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    font-size: 9px;
}

.pcba-cc-bom-template-placement-table td {
    padding: 3px 4px;
}

.pcba-cc-bom-template-placement-table tr.is-selected td {
    background: #eff6ff;
}

.pcba-cc-bom-template-placement-table tr.is-missing td {
    background-image: linear-gradient(to right, rgba(245,158,11,.035), rgba(245,158,11,.035));
}

.pcba-cc-bom-template-placement-table input,
.pcba-cc-bom-template-placement-table select {
    width: 100%;
    min-height: 27px;
    border: 1px solid #dbe5f1;
    border-radius: 5px;
    padding: 3px 5px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-size: 10px;
}

.pcba-cc-bom-template-placement-table input:focus,
.pcba-cc-bom-template-placement-table select:focus {
    border-color: #0ea5e9;
    outline: none;
    box-shadow: 0 0 0 2px rgba(14,165,233,.10);
}

.pcba-cc-bom-template-ref-button {
    display: grid;
    width: 100%;
    border: 0;
    padding: 2px 4px;
    background: transparent;
    cursor: pointer;
    text-align: left;
}

.pcba-cc-bom-template-ref-button strong {
    color: #0f172a;
    font-size: 10px;
}

.pcba-cc-bom-template-ref-button small {
    max-width: 120px;
    overflow: hidden;
    color: #64748b;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-bom-template-map-state {
    display: inline-flex;
    width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 950;
}

.pcba-cc-bom-template-map-state.is-ok {
    background: #dcfce7;
    color: #15803d;
}

.pcba-cc-bom-template-map-state.is-missing {
    background: #ffedd5;
    color: #c2410c;
}

@media (max-width: 1180px) {
    .pcba-cc-bom-template-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .pcba-cc-bom-template-assembly {
        min-height: 620px;
    }
}


.pcba-cc-bom-template-import-zone {
    display: grid;
    gap: 5px;
    min-width: 0;
}
/* v0.16.6 - Selected BOM row multi-Ref highlight + Gerber-aligned Assembly overlay */
.pcba-cc-bom-template-importbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    padding: 6px;
    border: 1px solid #dbe5f1;
    border-radius: 8px;
    background: #fff;
}

.pcba-cc-bom-template-importbar > small {
    flex: 1 1 180px;
    min-width: 120px;
    color: #64748b;
    font-size: 9px;
    font-weight: 750;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pcba-cc-bom-template-import-file {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.pcba-cc-bom-template-import-file input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.pcba-cc-bom-template-import-file span,
.pcba-cc-bom-template-importbar > button {
    min-height: 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd8e8;
    border-radius: 6px;
    padding: 3px 8px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
    white-space: nowrap;
}

.pcba-cc-bom-template-import-file span {
    border-color: #7dd3fc;
    background: #ecfeff;
    color: #0e7490;
}

.pcba-cc-bom-template-importbar > button.is-active {
    border-color: #0ea5e9;
    background: #e0f2fe;
    color: #0369a1;
}

.pcba-cc-bom-template-importbar > button:disabled {
    opacity: .45;
    cursor: default;
}

.pcba-cc-bom-template-auto-next {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 27px;
    padding: 0 5px;
    color: #475569;
    font-size: 9px;
    font-weight: 800;
    white-space: nowrap;
}

.pcba-cc-bom-template-auto-next input {
    margin: 0;
}

.pcba-cc-bom-template-import-error,
.pcba-cc-bom-template-import-note {
    border-radius: 7px;
    padding: 6px 8px;
    font-size: 9px;
    font-weight: 750;
}

.pcba-cc-bom-template-import-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
}

.pcba-cc-bom-template-import-note {
    border: 1px solid #bae6fd;
    background: #f0f9ff;
    color: #0369a1;
}

.pcba-cc-bom-template-import-mapping {
    display: grid;
    gap: 6px;
    padding: 7px;
    border: 1px dashed #94a3b8;
    border-radius: 8px;
    background: #f8fafc;
}

.pcba-cc-bom-template-import-mapping__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(90px, 1fr));
    gap: 5px;
}

.pcba-cc-bom-template-import-mapping label {
    display: grid;
    gap: 3px;
    color: #64748b;
    font-size: 8px;
    font-weight: 850;
}

.pcba-cc-bom-template-import-mapping select {
    width: 100%;
    min-width: 0;
    min-height: 26px;
    border: 1px solid #dbe5f1;
    border-radius: 5px;
    background: #fff;
    color: #172033;
    font: inherit;
    font-size: 9px;
}

.pcba-cc-bom-template-import-mapping__actions {
    display: flex;
    justify-content: flex-end;
}

.pcba-cc-bom-template-import-mapping__actions button {
    min-height: 27px;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    padding: 3px 9px;
    background: #ecfeff;
    color: #0369a1;
    cursor: pointer;
    font: inherit;
    font-size: 9px;
    font-weight: 850;
}

.pcba-cc-bom-template-placement-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.pcba-cc-bom-template-nudge {
    display: inline-flex;
    gap: 2px;
}

.pcba-cc-bom-template-nudge button {
    min-width: 23px;
    height: 23px;
    border: 1px solid #dbe5f1;
    border-radius: 4px;
    padding: 0 3px;
    background: #fff;
    color: #475569;
    cursor: pointer;
    font-size: 9px;
    font-weight: 900;
}

.pcba-cc-bom-template-nudge button:hover {
    border-color: #7dd3fc;
    background: #f0f9ff;
    color: #0369a1;
}

.pcba-cc-bom-template-placement-table th:last-child,
.pcba-cc-bom-template-placement-table td:last-child {
    width: 150px;
}

.pcba-cc-bom-template-assembly__viewer[data-pcba-pcb-assembly-viewer-kind="bom-template"] canvas[data-pcba-pcb-marker-canvas] {
    touch-action: none;
}

@media (max-width: 1280px) {
    .pcba-cc-bom-template-import-mapping__grid {
        grid-template-columns: repeat(2, minmax(100px, 1fr));
    }
    .pcba-cc-bom-template-nudge button:nth-child(2),
    .pcba-cc-bom-template-nudge button:nth-child(3) {
        display: none;
    }
}


/* v0.16.12 - Project documents + selectable manufacturing package */
.pcba-cc-project-documents{display:grid;gap:12px}.pcba-cc-project-doc-uploadbox{border:1px dashed #b8c7dd;border-radius:12px;background:#f8fbff;padding:12px}.pcba-cc-project-doc-uploadbox__head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start;margin-bottom:9px}.pcba-cc-project-doc-uploadbox__head strong,.pcba-cc-project-doc-uploadbox__head small{display:block}.pcba-cc-project-doc-uploadbox__head small{margin-top:3px;color:#66758a}.pcba-cc-project-doc-uploadbox__head button{border:1px solid #cbd7e7;background:#fff;border-radius:8px;padding:7px 10px;font-weight:700}.pcba-cc-project-doc-uploadbox__form{display:grid;grid-template-columns:minmax(150px,190px) minmax(220px,1fr) auto;gap:8px;align-items:center}.pcba-cc-project-doc-uploadbox__form select,.pcba-cc-project-doc-uploadbox__form input[type=text],.pcba-cc-mfg-upload__form select,.pcba-cc-mfg-upload__form input[type=text]{height:38px;border:1px solid #cbd7e7;border-radius:8px;background:#fff;padding:0 10px;min-width:0}.pcba-cc-project-doc-file{position:relative;display:inline-flex;align-items:center;justify-content:center;height:38px;padding:0 14px;border:1px solid #2d7ff9;border-radius:8px;background:#eef6ff;color:#1459a6;font-weight:800;cursor:pointer;white-space:nowrap}.pcba-cc-project-doc-file input{position:absolute;inset:0;opacity:0;cursor:pointer}.pcba-cc-project-doc-file.is-disabled{opacity:.65;cursor:wait}.pcba-cc-project-doc-list{border:1px solid #dce5f1;border-radius:12px;overflow:hidden;background:#fff}.pcba-cc-project-doc-row{display:grid;grid-template-columns:34px minmax(220px,1fr) minmax(180px,260px) auto;gap:10px;align-items:center;padding:10px 12px;border-bottom:1px solid #edf1f6}.pcba-cc-project-doc-row:last-child{border-bottom:0}.pcba-cc-project-doc-row__icon{font-size:19px}.pcba-cc-project-doc-row__main strong,.pcba-cc-project-doc-row__main small,.pcba-cc-project-doc-row__meta,.pcba-cc-project-doc-row__meta small{display:block}.pcba-cc-project-doc-row__main small,.pcba-cc-project-doc-row__meta small{color:#768398;margin-top:2px;font-size:11px}.pcba-cc-project-doc-row>a{border:1px solid #d2dce9;border-radius:7px;padding:5px 9px;text-decoration:none;font-weight:700;background:#fff}
.pcba-cc-mfg-modal{z-index:100060}.pcba-cc-mfg-panel{width:min(1020px,94vw);max-height:92vh;overflow:hidden;display:flex;flex-direction:column}.pcba-cc-mfg-body{overflow:auto;padding:14px;display:grid;gap:14px}.pcba-cc-mfg-error{margin:10px 14px 0}.pcba-cc-mfg-section{border:1px solid #dbe4ef;border-radius:12px;background:#fff;overflow:hidden}.pcba-cc-mfg-section__head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;background:#f7f9fc;border-bottom:1px solid #e7edf5}.pcba-cc-mfg-section__head strong,.pcba-cc-mfg-section__head small{display:block}.pcba-cc-mfg-section__head small{color:#6f7d91;margin-top:2px}.pcba-cc-mfg-section__head button{border:1px solid #ccd7e5;background:#fff;border-radius:7px;padding:5px 9px;font-weight:700}.pcba-cc-mfg-generated-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px}.pcba-cc-mfg-file-row{display:grid;grid-template-columns:18px 34px minmax(0,1fr);gap:8px;align-items:center;border:1px solid #e1e8f1;border-radius:9px;padding:9px;cursor:pointer}.pcba-cc-mfg-file-row:hover,.pcba-cc-mfg-doc-row:hover{background:#f8fbff}.pcba-cc-mfg-file-row.has-warning{border-color:#f0c17a;background:#fffaf1}.pcba-cc-mfg-file-row__icon{font-size:19px}.pcba-cc-mfg-file-row strong,.pcba-cc-mfg-file-row small{display:block}.pcba-cc-mfg-file-row small{color:#758197;margin-top:2px}.pcba-cc-mfg-doc-list{max-height:270px;overflow:auto}.pcba-cc-mfg-doc-row{display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:9px;align-items:center;padding:9px 12px;border-bottom:1px solid #edf1f5;cursor:pointer}.pcba-cc-mfg-doc-row:last-child{border-bottom:0}.pcba-cc-mfg-doc-row.is-old-package{background:#fafafa}.pcba-cc-mfg-doc-row__main strong,.pcba-cc-mfg-doc-row__main small{display:block}.pcba-cc-mfg-doc-row__main small{color:#758197;margin-top:2px}.pcba-cc-mfg-doc-row>a{font-weight:700;text-decoration:none}.pcba-cc-mfg-upload{border:1px dashed #9fc2ed;border-radius:12px;background:#f5faff;padding:12px}.pcba-cc-mfg-upload>div:first-child strong,.pcba-cc-mfg-upload>div:first-child small{display:block}.pcba-cc-mfg-upload>div:first-child small{color:#6f7d91;margin-top:2px}.pcba-cc-mfg-upload__form{display:grid;grid-template-columns:minmax(150px,190px) minmax(220px,1fr) auto;gap:8px;margin-top:9px}.pcba-cc-mfg-footer{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:11px 14px;border-top:1px solid #e0e7f0;background:#fff}.pcba-cc-mfg-footer>span{color:#65758a;font-size:12px}.pcba-cc-mfg-footer>div{display:flex;gap:8px}.pcba-cc-mfg-footer button{min-height:36px;border-radius:8px;border:1px solid #ccd7e5;background:#fff;padding:0 13px;font-weight:800}
@media(max-width:780px){.pcba-cc-project-doc-uploadbox__form,.pcba-cc-mfg-upload__form{grid-template-columns:1fr}.pcba-cc-project-doc-row{grid-template-columns:30px minmax(0,1fr) auto}.pcba-cc-project-doc-row__meta{grid-column:2/4}.pcba-cc-mfg-generated-grid{grid-template-columns:1fr}.pcba-cc-mfg-footer{align-items:flex-start;flex-direction:column}.pcba-cc-mfg-footer>div{width:100%;justify-content:flex-end}}


/* v0.16.13 - Always-visible upload chooser */
.pcba-cc-project-doc-uploadbox__form,
.pcba-cc-mfg-upload__form{
  grid-template-columns:minmax(150px,190px) minmax(0,1fr);
}
.pcba-cc-project-doc-uploadbox__form .pcba-cc-project-doc-file--wide,
.pcba-cc-mfg-upload__form .pcba-cc-project-doc-file--wide{
  grid-column:1 / -1;
  width:100%;
  min-width:0;
  box-sizing:border-box;
  min-height:42px;
}
.pcba-cc-project-doc-file--wide input[type=file]{
  width:100%;
  height:100%;
  z-index:2;
}
.pcba-cc-project-doc-file--wide span{
  position:relative;
  z-index:1;
  pointer-events:none;
}
@media(max-width:1100px){
  .pcba-cc-project-doc-uploadbox__form,
  .pcba-cc-mfg-upload__form{grid-template-columns:1fr;}
  .pcba-cc-project-doc-uploadbox__form .pcba-cc-project-doc-file--wide,
  .pcba-cc-mfg-upload__form .pcba-cc-project-doc-file--wide{grid-column:1;}
}

/* v0.16.14 - Project document row download actions (incl. Interactive BOM HTML). */
.pcba-cc-project-doc-row__actions{display:inline-flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}
.pcba-cc-project-doc-row__actions>a{border:1px solid #d2dce9;border-radius:7px;padding:5px 9px;text-decoration:none;font-weight:700;background:#fff;white-space:nowrap}
.pcba-cc-project-doc-row__actions>a:hover{border-color:#9db5d4;background:#f6f9fd}
@media(max-width:780px){.pcba-cc-project-doc-row__actions{grid-column:3;grid-row:1/3;align-self:center}}

/* v0.16.19 - Multi-delivery printed warehouse issue voucher */
.pcba-cc-modal[data-pcba-stock-issue-modal]{z-index:100080}
.pcba-cc-stock-issue-modal{width:min(1080px,94vw);max-height:92vh;overflow:hidden;display:flex;flex-direction:column}
.pcba-cc-stock-issue-meta{display:grid;grid-template-columns:180px 140px minmax(260px,1fr);gap:10px;padding:14px 16px 8px}
.pcba-cc-stock-issue-meta label{display:grid;gap:5px}.pcba-cc-stock-issue-meta label>span{font-size:11px;font-weight:800;color:#66758a;text-transform:uppercase}
.pcba-cc-stock-issue-meta input{height:38px;border:1px solid #cbd7e7;border-radius:8px;padding:0 10px;background:#fff;min-width:0}
.pcba-cc-stock-issue-note{margin:0 16px 10px;padding:9px 11px;border:1px solid #b9d7f5;border-radius:9px;background:#f3f9ff;color:#315b82;font-size:12px}
.pcba-cc-stock-issue-table{margin:0 16px;overflow:auto;border:1px solid #dbe4ef;border-radius:10px;max-height:52vh;background:#fff}
.pcba-cc-stock-issue-table table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:12px}
.pcba-cc-stock-issue-table th,.pcba-cc-stock-issue-table td{border-bottom:1px solid #e5ebf2;border-right:1px solid #eef2f6;padding:7px 8px;vertical-align:middle}
.pcba-cc-stock-issue-table th{position:sticky;top:0;z-index:1;background:#f6f9fc;text-align:center;color:#4b5d72;font-size:11px}
.pcba-cc-stock-issue-table th:nth-child(1){width:48px}.pcba-cc-stock-issue-table th:nth-child(2){width:31%}.pcba-cc-stock-issue-table th:nth-child(3){width:120px}.pcba-cc-stock-issue-table th:nth-child(4),.pcba-cc-stock-issue-table th:nth-child(5),.pcba-cc-stock-issue-table th:nth-child(6),.pcba-cc-stock-issue-table th:nth-child(7){width:110px}
.pcba-cc-stock-issue-table td.num{text-align:right}.pcba-cc-stock-issue-table tr.is-complete td{background:#f1f3f5;color:#7b8795}
.pcba-cc-stock-issue-table input[type=number]{width:100%;height:34px;border:1px solid #b9c8da;border-radius:7px;padding:0 8px;text-align:right;font-weight:800;background:#fff}
.pcba-cc-stock-issue-table input[type=number]:disabled{background:#eceff2;color:#9aa5b1}
.pcba-cc-stock-issue-foot{display:flex;justify-content:space-between;gap:14px;align-items:center;padding:10px 16px;color:#53657a}.pcba-cc-stock-issue-foot strong{color:#0f5f9c}.pcba-cc-stock-issue-foot small{text-align:right}
@media(max-width:780px){.pcba-cc-stock-issue-meta{grid-template-columns:1fr 1fr}.pcba-cc-stock-issue-meta .wide{grid-column:1/-1}.pcba-cc-stock-issue-foot{align-items:flex-start;flex-direction:column}.pcba-cc-stock-issue-foot small{text-align:left}}

/* v0.16.22 - compact Phiếu BOM SX header + inline PCB/Assembly + password delete in list */
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head{
  min-height:38px!important;padding:5px 10px!important;
}
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head small{font-size:8px!important;line-height:1!important}
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head h3{font-size:14px!important;line-height:1.05!important;margin-top:0!important}
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__head button{width:28px!important;height:28px!important}
.pcba-cc-bom-release-drawer .pcba-cc-side-drawer__body{gap:4px!important;padding:5px 8px 8px!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-kpis{gap:4px!important}
.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis>div{min-height:34px!important;padding:3px 7px!important;border-radius:6px!important}
.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis>div span{font-size:7.5px!important}
.pcba-cc-bom-release-drawer .pcba-cc-doc-kpis>div strong{font-size:14px!important;line-height:1!important}
.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list{grid-template-columns:repeat(6,minmax(0,1fr))!important}
.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list div{padding:4px 7px!important;min-height:36px!important}
.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list dt{font-size:7.5px!important}
.pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list dd{font-size:10.5px!important;line-height:1.08!important;margin-top:1px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcba-cc-bom-release-drawer .pcba-cc-pcb-release-demand{margin:3px 0!important;padding:5px 8px!important;gap:5px!important;border-radius:7px!important;grid-template-columns:minmax(155px,1.15fr) repeat(5,minmax(68px,.6fr)) minmax(210px,1.15fr)!important}
.pcba-cc-bom-release-drawer .pcba-cc-pcb-release-demand>div{gap:1px!important}
.pcba-cc-bom-release-drawer .pcba-cc-pcb-release-demand span{font-size:7.5px!important;line-height:1!important}
.pcba-cc-bom-release-drawer .pcba-cc-pcb-release-demand strong{font-size:10.5px!important;line-height:1.12!important}
.pcba-cc-bom-release-drawer .pcba-cc-pcb-release-demand .pcba-cc-gerber-actions{margin-top:2px;gap:4px!important}
.pcba-cc-bom-release-drawer .pcba-cc-pcb-release-demand .pcba-cc-gerber-actions button,
.pcba-cc-bom-release-drawer .pcba-cc-pcb-release-demand .pcba-cc-gerber-actions a{min-height:23px!important;padding:2px 6px!important;font-size:9px!important;border-radius:6px!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-release-actions{min-height:25px!important;margin:0!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-compact-btn{min-height:25px!important;padding:3px 7px!important;font-size:9.5px!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-linked-docs{margin:0!important;padding-block:3px!important}
.pcba-cc-bom-picking-table{max-height:calc(100vh - 190px)!important}

.pcba-cc-bom-list-actions{display:flex;align-items:center;gap:5px;white-space:nowrap}
.pcba-cc-bom-table-delete{display:inline-grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid #fecaca;border-radius:7px;background:#fff;color:#b91c1c;cursor:pointer;font-size:13px}
.pcba-cc-bom-table-delete:hover{background:#fff1f2;border-color:#fda4af}

.pcba-cc-bom-inline-pcb{border:1px solid #bcdbe7;border-radius:9px;background:#f8fcfe;overflow:hidden;margin:2px 0 3px}
.pcba-cc-bom-inline-pcb__head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 8px;border-bottom:1px solid #d8e8ef;background:#eef9fc}
.pcba-cc-bom-inline-pcb__head>div{display:flex;align-items:baseline;gap:8px;min-width:0}
.pcba-cc-bom-inline-pcb__head strong{font-size:11px;color:#075e75}
.pcba-cc-bom-inline-pcb__head small{font-size:9px;color:#64748b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcba-cc-bom-inline-pcb__head button{width:24px;height:24px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;color:#64748b;cursor:pointer;font-size:16px;line-height:1}
.pcba-cc-bom-inline-pcb__body{padding:5px;background:#fff}
.pcba-cc-bom-inline-pcb .pcba-cc-pcb-assembly__toolbar{padding:4px!important;gap:4px!important}
.pcba-cc-bom-inline-pcb .pcba-cc-pcb-assembly__toolbar button,
.pcba-cc-bom-inline-pcb .pcba-cc-pcb-assembly__toolbar input{min-height:25px!important;height:25px!important;font-size:9px!important}
.pcba-cc-bom-inline-pcb .pcba-cc-pcb-assembly__workspace{height:340px!important;min-height:300px!important}
.pcba-cc-bom-inline-pcb .pcba-cc-pcb-assembly__viewer{min-height:300px!important}
.pcba-cc-bom-inline-pcb .pcba-cc-pcb-assembly__hint{min-height:20px!important;font-size:9px!important;padding-top:2px!important}
.pcba-cc-bom-inline-pcb .pcba-cc-assembly-sx-actions{display:none!important}
.pcba-cc-bom-inline-pcb .pcba-cc-pcb-assembly-diag{margin-top:4px!important;padding:4px 6px!important}
.pcba-cc-bom-inline-pcb.is-gerber .pcba-cc-pcb-assembly__parts,
.pcba-cc-bom-inline-pcb.is-gerber .pcba-cc-pcb-assembly__splitter,
.pcba-cc-bom-inline-pcb.is-gerber .pcba-cc-assembly-sx-banner,
.pcba-cc-bom-inline-pcb.is-gerber .pcba-cc-assembly-sx-warning,
.pcba-cc-bom-inline-pcb.is-gerber .pcba-cc-pcb-assembly-diag{display:none!important}
.pcba-cc-bom-inline-pcb.is-gerber .pcba-cc-pcb-assembly__workspace{grid-template-columns:1fr!important;height:320px!important;min-height:280px!important}
.pcba-cc-bom-inline-pcb.is-gerber .pcba-cc-pcb-assembly__board-wrap{padding-right:0!important}
.pcba-cc-bom-inline-pcb.is-gerber canvas[data-pcba-pcb-marker-canvas]{visibility:hidden!important;pointer-events:none!important}

@media(max-width:1100px){
  .pcba-cc-bom-release-drawer .pcba-cc-doc-detail-list{grid-template-columns:repeat(3,minmax(0,1fr))!important}
  .pcba-cc-bom-release-drawer .pcba-cc-pcb-release-demand{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}

/* =========================================================
 * 0.16.23 - Sidebar trực quan theo phân hệ
 * Mỗi phân hệ có màu nhận diện riêng; icon luôn có màu,
 * trạng thái hover/active dùng nền tint + vạch màu bên trái.
 * ======================================================= */
.pcba-cc-nav__item {
    --pcba-nav-accent: #72d2de;
    --pcba-nav-soft: rgba(114, 210, 222, 0.11);
    --pcba-nav-soft-strong: rgba(114, 210, 222, 0.18);
    position: relative;
    border: 1px solid transparent;
    transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.pcba-cc-nav__item .dashicons:not(.pcba-cc-nav__chevron) {
    width: 23px;
    height: 23px;
    border-radius: 7px;
    background: var(--pcba-nav-soft);
    color: var(--pcba-nav-accent);
    font-size: 15px;
    transition: transform 150ms ease, background-color 150ms ease, color 150ms ease;
}

.pcba-cc-nav__item .pcba-cc-nav__text {
    color: #aeb9ca;
    transition: color 150ms ease;
}

.pcba-cc-nav__item .pcba-cc-nav__chevron {
    color: var(--pcba-nav-accent);
}

.pcba-cc-nav__item:hover {
    background: var(--pcba-nav-soft);
    border-color: rgba(255, 255, 255, 0.055);
    box-shadow: inset 3px 0 0 var(--pcba-nav-accent);
}

.pcba-cc-nav__item:hover .pcba-cc-nav__text {
    color: #f8fafc;
}

.pcba-cc-nav__item:hover .dashicons:not(.pcba-cc-nav__chevron) {
    background: var(--pcba-nav-soft-strong);
    transform: translateY(-1px);
}

.pcba-cc-nav__item.is-active {
    background: var(--pcba-nav-soft-strong);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: inset 3px 0 0 var(--pcba-nav-accent);
}

.pcba-cc-nav__item.is-active .pcba-cc-nav__text,
.pcba-cc-nav__item.is-active .dashicons,
.pcba-cc-nav__item.is-active .pcba-cc-nav__chevron {
    color: var(--pcba-nav-accent);
}

/* Màu nhận diện từng phân hệ */
.pcba-cc-nav__item[data-pcba-cc-view="dashboard"] {
    --pcba-nav-accent: #60a5fa;
    --pcba-nav-soft: rgba(96, 165, 250, 0.10);
    --pcba-nav-soft-strong: rgba(96, 165, 250, 0.19);
}

[data-pcba-cc-nav-group="projects"] > .pcba-cc-nav__item {
    --pcba-nav-accent: #818cf8;
    --pcba-nav-soft: rgba(129, 140, 248, 0.10);
    --pcba-nav-soft-strong: rgba(129, 140, 248, 0.19);
}

.pcba-cc-nav__item[data-pcba-cc-view="gantt"] {
    --pcba-nav-accent: #c084fc;
    --pcba-nav-soft: rgba(192, 132, 252, 0.10);
    --pcba-nav-soft-strong: rgba(192, 132, 252, 0.19);
}

[data-pcba-cc-nav-group="bom"] > .pcba-cc-nav__item {
    --pcba-nav-accent: #22d3ee;
    --pcba-nav-soft: rgba(34, 211, 238, 0.10);
    --pcba-nav-soft-strong: rgba(34, 211, 238, 0.19);
}

[data-pcba-cc-nav-group="purchase"] > .pcba-cc-nav__item {
    --pcba-nav-accent: #f59e0b;
    --pcba-nav-soft: rgba(245, 158, 11, 0.10);
    --pcba-nav-soft-strong: rgba(245, 158, 11, 0.19);
}

.pcba-cc-nav__item[data-pcba-cc-view="stock"] {
    --pcba-nav-accent: #34d399;
    --pcba-nav-soft: rgba(52, 211, 153, 0.10);
    --pcba-nav-soft-strong: rgba(52, 211, 153, 0.19);
}

[data-pcba-cc-nav-group="pcb"] > .pcba-cc-nav__item {
    --pcba-nav-accent: #38bdf8;
    --pcba-nav-soft: rgba(56, 189, 248, 0.10);
    --pcba-nav-soft-strong: rgba(56, 189, 248, 0.19);
}

.pcba-cc-nav__item[data-pcba-cc-view="sx"] {
    --pcba-nav-accent: #f472b6;
    --pcba-nav-soft: rgba(244, 114, 182, 0.10);
    --pcba-nav-soft-strong: rgba(244, 114, 182, 0.19);
}

[data-pcba-cc-nav-group="finance"] > .pcba-cc-nav__item {
    --pcba-nav-accent: #fbbf24;
    --pcba-nav-soft: rgba(251, 191, 36, 0.10);
    --pcba-nav-soft-strong: rgba(251, 191, 36, 0.19);
}

.pcba-cc-nav__item[data-pcba-cc-view="documents"] {
    --pcba-nav-accent: #2dd4bf;
    --pcba-nav-soft: rgba(45, 212, 191, 0.10);
    --pcba-nav-soft-strong: rgba(45, 212, 191, 0.19);
}

.pcba-cc-nav__item[data-pcba-cc-view="history"] {
    --pcba-nav-accent: #a78bfa;
    --pcba-nav-soft: rgba(167, 139, 250, 0.10);
    --pcba-nav-soft-strong: rgba(167, 139, 250, 0.19);
}

.pcba-cc-nav__item--permissions {
    --pcba-nav-accent: #fb7185;
    --pcba-nav-soft: rgba(251, 113, 133, 0.10);
    --pcba-nav-soft-strong: rgba(251, 113, 133, 0.19);
}

/* Submenu dùng cùng màu nhận diện của nhóm, nhưng vẫn giữ màu nghiệp vụ riêng khi đã có. */
[data-pcba-cc-nav-group="projects"] .pcba-cc-nav__subitem {
    color: #c7d2fe;
    background: rgba(129, 140, 248, 0.08);
}
[data-pcba-cc-nav-group="projects"] .pcba-cc-nav__subitem:hover,
[data-pcba-cc-nav-group="projects"] .pcba-cc-nav__subitem.is-active {
    background: rgba(129, 140, 248, 0.16);
    box-shadow: inset 2px 0 0 #818cf8;
}

[data-pcba-cc-nav-group="bom"] .pcba-cc-nav__subitem:not(.is-action) {
    color: #a5f3fc;
    background: rgba(34, 211, 238, 0.075);
}
[data-pcba-cc-nav-group="bom"] .pcba-cc-nav__subitem:not(.is-action):hover,
[data-pcba-cc-nav-group="bom"] .pcba-cc-nav__subitem:not(.is-action).is-active {
    background: rgba(34, 211, 238, 0.15);
    box-shadow: inset 2px 0 0 #22d3ee;
}

[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__subitem:not(.is-action) {
    color: #fde68a;
    background: rgba(251, 191, 36, 0.075);
}
[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__subitem:not(.is-action):hover,
[data-pcba-cc-nav-group="finance"] .pcba-cc-nav__subitem:not(.is-action).is-active {
    background: rgba(251, 191, 36, 0.15);
    box-shadow: inset 2px 0 0 #fbbf24;
}

/* Khi menu thu gọn, giữ icon màu để vẫn nhận biết nhanh từng phân hệ. */
.pcba-control-center.is-sidebar-collapsed .pcba-cc-nav__item {
    padding-left: 5px;
    padding-right: 5px;
}
.pcba-control-center.is-sidebar-collapsed .pcba-cc-nav__item .dashicons:not(.pcba-cc-nav__chevron) {
    width: 27px;
    height: 27px;
    border-radius: 8px;
}

/* v0.16.24 - over quantity warnings for Soạn hàng / Phiếu xuất kho */
.pcba-cc-bom-overqty{display:block;margin-top:4px;color:#b65a00;font-size:10px;font-weight:800;white-space:nowrap}
.pcba-cc-stock-issue-overwarn{margin:0 16px 10px;padding:9px 11px;border:1px solid #f5b84b;border-radius:9px;background:#fff8e7;color:#8a4b00;font-size:12px;font-weight:700}
.pcba-cc-stock-issue-table tr.is-overqty td{background:#fff8e7}
.pcba-cc-stock-issue-table tr.is-overqty td[data-pcba-stock-issue-remaining]{color:#b45309;font-weight:800}

/* v0.16.25 - PCB/BOM anomaly checker inside Soan hang */
.pcba-cc-bom-compact-btn.is-check{border-color:#7dd3fc!important;background:#f0f9ff!important;color:#075985!important}
.pcba-cc-bom-compact-btn.is-check:hover{background:#e0f2fe!important}
.pcba-cc-bom-inline-pcb.is-check{border-color:#93c5fd;background:#f8fbff}
.pcba-cc-bom-inline-pcb.is-check .pcba-cc-bom-inline-pcb__head{background:#eff6ff;border-bottom-color:#bfdbfe}
.pcba-cc-bom-inline-pcb.is-check .pcba-cc-bom-inline-pcb__head strong{color:#1d4ed8}
.pcba-cc-pcb-bom-check-banner{border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:7px;margin-bottom:5px;display:grid;gap:6px}
.pcba-cc-pcb-bom-check-title{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.pcba-cc-pcb-bom-check-title>div{display:grid;gap:1px;min-width:0}
.pcba-cc-pcb-bom-check-title span{font-size:8px;font-weight:800;letter-spacing:.05em;color:#475569}
.pcba-cc-pcb-bom-check-title strong{font-size:11px;color:#0f172a}
.pcba-cc-pcb-bom-check-title small{font-size:8.5px;color:#64748b;white-space:normal}
.pcba-cc-pcb-bom-check-title>b{padding:4px 7px;border-radius:999px;font-size:9px;white-space:nowrap}
.pcba-cc-pcb-bom-check-title>b.is-ok{background:#dcfce7;color:#166534}
.pcba-cc-pcb-bom-check-title>b.has-issue{background:#fee2e2;color:#b91c1c}
.pcba-cc-pcb-bom-check-kpis{display:flex;flex-wrap:wrap;gap:4px}
.pcba-cc-pcb-bom-check-kpis span{display:inline-flex;align-items:center;gap:3px;border:1px solid #e2e8f0;border-radius:6px;padding:3px 6px;background:#f8fafc;font-size:8.5px;color:#475569}
.pcba-cc-pcb-bom-check-kpis .is-ok{background:#f0fdf4;border-color:#bbf7d0;color:#166534}
.pcba-cc-pcb-bom-check-kpis .is-missing{background:#fef2f2;border-color:#fecaca;color:#b91c1c}
.pcba-cc-pcb-bom-check-kpis .is-outside{background:#fff7ed;border-color:#fed7aa;color:#c2410c}
.pcba-cc-pcb-bom-check-kpis .is-duplicate{background:#faf5ff;border-color:#e9d5ff;color:#7e22ce}
.pcba-cc-pcb-bom-check-kpis .is-qty{background:#fefce8;border-color:#fde68a;color:#a16207}
.pcba-cc-pcb-bom-check-filters{display:flex;align-items:center;flex-wrap:wrap;gap:4px;padding-top:1px}
.pcba-cc-pcb-bom-check-filters button{height:24px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;padding:0 7px;font-size:8.5px;font-weight:700;cursor:pointer;color:#475569}
.pcba-cc-pcb-bom-check-filters button.is-active{background:#0f172a;color:#fff;border-color:#0f172a}
.pcba-cc-pcb-bom-check-filters label{margin-left:auto;display:flex;align-items:center;gap:4px;font-size:8.5px;color:#64748b;white-space:nowrap}
.pcba-cc-pcb-bom-check-issues{display:grid;gap:3px;padding:5px;border-radius:6px;background:#f8fafc;border:1px dashed #cbd5e1}
.pcba-cc-pcb-bom-check-issues>div{display:flex;align-items:center;flex-wrap:wrap;gap:3px;font-size:8.5px}
.pcba-cc-pcb-bom-check-issues strong{margin-right:2px;color:#334155}
.pcba-cc-pcb-bom-check-issues button{border:0;border-radius:5px;padding:2px 5px;font-size:8px;font-weight:800;cursor:pointer}
.pcba-cc-pcb-bom-check-issues button.is-missing{background:#fee2e2;color:#b91c1c}
.pcba-cc-pcb-bom-check-issues button.is-outside{background:#ffedd5;color:#c2410c}
.pcba-cc-pcb-bom-check-issues button.is-duplicate{background:#f3e8ff;color:#7e22ce}
.pcba-cc-pcb-bom-check-note{font-size:8px!important;color:#64748b!important}
.pcba-cc-bom-check-badges{display:flex!important;flex-wrap:wrap;gap:3px;margin-top:3px}
.pcba-cc-bom-check-badge{display:inline-flex!important;align-items:center;min-height:17px;padding:1px 5px;border-radius:999px;font-size:7.8px!important;font-weight:800;line-height:1.15}
.pcba-cc-bom-check-badge.is-ok{background:#dcfce7;color:#166534}
.pcba-cc-bom-check-badge.is-missing{background:#fee2e2;color:#b91c1c}
.pcba-cc-bom-check-badge.is-duplicate{background:#f3e8ff;color:#7e22ce}
.pcba-cc-bom-check-badge.is-qty{background:#fef3c7;color:#92400e}
.pcba-cc-bom-picking-table tr.is-pcb-check-missing>td{background:#fff1f2!important}
.pcba-cc-bom-picking-table tr.is-pcb-check-missing>td:first-child{box-shadow:inset 4px 0 0 #ef4444}
.pcba-cc-bom-picking-table tr.is-pcb-check-duplicate>td{background:#faf5ff!important}
.pcba-cc-bom-picking-table tr.is-pcb-check-duplicate>td:first-child{box-shadow:inset 4px 0 0 #9333ea}
.pcba-cc-bom-picking-table tr.is-pcb-check-qty>td{background:#fffbeb!important}
.pcba-cc-bom-picking-table tr.is-pcb-check-qty>td:first-child{box-shadow:inset 4px 0 0 #eab308}
.pcba-cc-bom-picking-table tr.is-pcb-check-ok>td:first-child{box-shadow:inset 3px 0 0 #22c55e}
.pcba-cc-bom-picking-table tr.is-pcb-check-selected>td{outline:1px solid #ef4444;outline-offset:-1px}
.pcba-cc-bom-picking-table tr.is-pcb-check-hovered>td{box-shadow:inset 0 0 0 1px #fb923c!important}
.pcba-cc-pcb-assembly-table tr.is-sx-duplicate td{background:#faf5ff}
.pcba-cc-pcb-assembly-table tr.is-sx-qty td{background:#fffbeb}
.pcba-cc-pcb-assembly-table tr.is-sx-ignored td{background:#f8fafc;color:#64748b}
.pcba-cc-assembly-sx-status.is-duplicate{background:#f3e8ff;color:#7e22ce}
.pcba-cc-assembly-sx-status.is-qty{background:#fef3c7;color:#92400e}
.pcba-cc-assembly-sx-status.is-ignored{background:#e2e8f0;color:#475569}
@media(max-width:900px){.pcba-cc-pcb-bom-check-title{flex-direction:column}.pcba-cc-pcb-bom-check-filters label{margin-left:0;width:100%}}

/* v0.16.26 - Công việc / Báo cáo */
.pcba-cc-nav__item[data-pcba-cc-view="work"] {
    --pcba-nav-accent: #22c55e;
    --pcba-nav-soft: rgba(34, 197, 94, 0.10);
    --pcba-nav-soft-strong: rgba(34, 197, 94, 0.19);
}

.pcba-cc-work-view { display: grid; gap: 14px; }
.pcba-cc-work-tabs { display:flex; gap:8px; flex-wrap:wrap; }
.pcba-cc-work-tabs > button,
.pcba-cc-work-filter,
.pcba-cc-work-actions button,
.pcba-cc-work-latest button,
.pcba-cc-work-history__head button,
.pcba-cc-work-form-actions button {
    border:1px solid #d2dbe7; background:#fff; color:#334155; border-radius:9px;
    padding:8px 11px; font-size:12px; font-weight:750; cursor:pointer;
}
.pcba-cc-work-tabs > button.is-active,
.pcba-cc-work-filter.is-active { background:#eaf3ff; border-color:#93baf0; color:#1d63b7; }
.pcba-cc-work-kpis { display:grid; grid-template-columns:repeat(5,minmax(130px,1fr)); gap:10px; }
.pcba-cc-work-panel { overflow:hidden; }
.pcba-cc-work-toolbar { display:flex; gap:10px; align-items:center; justify-content:space-between; padding:10px 14px; background:#fbfcfe; border-bottom:1px solid #e7edf4; }
.pcba-cc-work-toolbar > div { display:flex; gap:6px; flex-wrap:wrap; }
.pcba-cc-work-toolbar input { min-width:300px; flex:1; max-width:520px; height:38px; border:1px solid #cfd9e6; border-radius:8px; padding:0 10px; background:#fff; }
.pcba-cc-work-list { display:flex; flex-direction:column; }
.pcba-cc-work-item { border-bottom:1px solid #edf1f5; background:#fff; }
.pcba-cc-work-item:last-child { border-bottom:0; }
.pcba-cc-work-item.is-overdue { box-shadow:inset 4px 0 #ef4444; background:#fffafa; }
.pcba-cc-work-item.is-today { box-shadow:inset 4px 0 #f59e0b; }
.pcba-cc-work-item.is-soon { box-shadow:inset 4px 0 #60a5fa; }
.pcba-cc-work-item__main { display:grid; grid-template-columns:38px minmax(260px,1fr) 185px 175px; gap:11px; align-items:center; padding:12px 14px; }
.pcba-cc-work-item__main:hover { background:#f8fbff; }
.pcba-cc-work-icon { width:34px; height:34px; display:grid; place-items:center; border-radius:9px; font-size:16px; background:#edf2f7; }
.pcba-cc-work-icon--buy { background:#fff0d7; }
.pcba-cc-work-icon--pcb { background:#ddf4ff; }
.pcba-cc-work-icon--pick { background:#e2f7ed; }
.pcba-cc-work-icon--test { background:#e4f7ea; }
.pcba-cc-work-icon--sx { background:#ffe4ef; }
.pcba-cc-work-icon--custom { background:#eee8ff; }
.pcba-cc-work-icon--project { background:#eaf2ff; }
.pcba-cc-work-title strong { display:block; color:#172033; font-size:13px; }
.pcba-cc-work-title small { display:block; color:#718096; font-size:11px; margin-top:3px; line-height:1.35; }
.pcba-cc-work-due { text-align:right; }
.pcba-cc-work-due b { display:block; font-size:12px; color:#334155; }
.pcba-cc-work-due small { display:block; color:#7b8798; font-size:11px; margin-top:3px; }
.pcba-cc-work-item.is-overdue .pcba-cc-work-due b { color:#c83b32; }
.pcba-cc-work-item.is-today .pcba-cc-work-due b { color:#9a6b00; }
.pcba-cc-work-actions { display:flex; justify-content:flex-end; gap:6px; }
.pcba-cc-work-actions button { padding:7px 9px; }
.pcba-cc-work-actions button.is-primary { background:#1976d2; color:#fff; border-color:#1976d2; }
.pcba-cc-work-latest { padding:8px 14px 9px 63px; border-top:1px solid #edf1f5; background:#f8fafc; color:#5d6d80; font-size:11.5px; line-height:1.45; }
.pcba-cc-work-latest b { color:#2d3a4f; }
.pcba-cc-work-latest button { padding:4px 7px; margin-left:5px; font-size:11px; }
.pcba-cc-work-blocker { color:#b83a31; font-weight:700; }
.pcba-cc-work-report-inline { padding:14px 16px 16px 63px; border-top:1px solid #dfe7f0; background:#fbfcfe; }
.pcba-cc-work-report-form { max-width:900px; }
.pcba-cc-work-field { display:block; margin-bottom:10px; }
.pcba-cc-work-field > span { display:flex; justify-content:space-between; gap:8px; margin-bottom:5px; color:#64748b; font-size:11.5px; font-weight:800; }
.pcba-cc-work-field > span small { font-size:10.5px; font-weight:600; color:#8b98aa; }
.pcba-cc-work-field input,
.pcba-cc-work-field textarea,
.pcba-cc-work-field select { width:100%; min-height:38px; border:1px solid #cbd7e5; border-radius:8px; padding:9px 10px; background:#fff; color:#1f2937; font:inherit; font-size:12px; }
.pcba-cc-work-field textarea { min-height:72px; resize:vertical; }
.pcba-cc-work-form-grid { display:grid; grid-template-columns:1fr 230px; gap:10px; }
.pcba-cc-work-form-actions { display:flex; justify-content:flex-end; gap:8px; align-items:center; }
.pcba-cc-work-custom { border:1px solid #cfe7d9; border-radius:12px; background:#f7fcf9; padding:14px; }
.pcba-cc-work-custom__head { display:flex; justify-content:space-between; gap:10px; margin-bottom:10px; }
.pcba-cc-work-custom__head strong { color:#126d49; }
.pcba-cc-work-custom__head small { color:#718096; }
.pcba-cc-work-message { padding:10px 12px; border:1px solid #bfe4cf; background:#effaf4; color:#126a48; border-radius:10px; font-size:12px; }
.pcba-cc-work-history { display:flex; flex-direction:column; }
.pcba-cc-work-history__item { padding:13px 15px; border-bottom:1px solid #edf1f5; }
.pcba-cc-work-history__item:last-child { border-bottom:0; }
.pcba-cc-work-history__head { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; }
.pcba-cc-work-history__head strong { display:block; font-size:13px; }
.pcba-cc-work-history__head small { display:block; margin-top:3px; color:#718096; font-size:11px; }
.pcba-cc-work-history__row { display:grid; grid-template-columns:90px 1fr; gap:9px; margin-top:7px; font-size:12px; line-height:1.45; }
.pcba-cc-work-history__row > span { color:#718096; font-weight:800; }
.pcba-cc-work-history__evidence { margin:8px 0 0 99px; display:flex; gap:6px; flex-wrap:wrap; }
.pcba-cc-work-history__evidence a { text-decoration:none; border:1px solid #d7e0eb; border-radius:7px; padding:5px 8px; background:#fafcff; font-size:11px; color:#335273; }
.pcba-cc-work-quick { padding:14px; max-width:920px; }
.pcba-cc-work-manager { display:flex; flex-direction:column; }
.pcba-cc-work-manager-user { border-bottom:1px solid #edf1f5; }
.pcba-cc-work-manager-user:last-child { border-bottom:0; }
.pcba-cc-work-manager-user__head { width:100%; display:grid; grid-template-columns:34px minmax(220px,1fr) auto 24px; gap:10px; align-items:center; padding:12px 14px; border:0; background:#fff; cursor:pointer; text-align:left; }
.pcba-cc-work-manager-user__head:hover { background:#f8fbff; }
.pcba-cc-work-manager-avatar { width:32px; height:32px; display:grid; place-items:center; border-radius:50%; background:#edf2f7; font-weight:850; }
.pcba-cc-work-manager-user__head strong { display:block; font-size:13px; }
.pcba-cc-work-manager-user__head small { display:block; color:#718096; font-size:11px; margin-top:3px; }
.pcba-cc-work-manager-badges { display:flex; gap:5px; flex-wrap:wrap; justify-content:flex-end; }
.pcba-cc-work-manager-badges em { font-style:normal; padding:4px 7px; border-radius:999px; font-size:10.5px; font-weight:800; background:#edf1f5; color:#65758a; }
.pcba-cc-work-manager-badges em.is-risk { background:#ffe9e7; color:#b83c32; }
.pcba-cc-work-manager-badges em.is-warn { background:#fff4d8; color:#8f6700; }
.pcba-cc-work-manager-badges em.is-ok { background:#e8f8ef; color:#147a52; }
.pcba-cc-work-manager-user__body { display:grid; grid-template-columns:1fr 1fr; gap:14px; padding:12px 14px 14px 58px; background:#fbfcfe; border-top:1px solid #edf1f5; }
.pcba-cc-work-manager-user__body h4 { margin:0 0 8px; font-size:12px; color:#475569; }
.pcba-cc-work-manager-task { display:grid; grid-template-columns:1fr 120px 160px; gap:8px; padding:8px 9px; margin-bottom:6px; background:#fff; border:1px solid #e2e8f0; border-radius:8px; font-size:11px; }
.pcba-cc-work-manager-task b { font-size:11.5px; }
.pcba-cc-work-manager-task span { color:#718096; }
.pcba-cc-work-manager-task small { text-align:right; color:#64748b; }
.pcba-cc-work-manager-task small.is-risk { color:#c43b31; font-weight:800; }
.pcba-cc-work-manager-report { padding:8px 9px; margin-bottom:6px; background:#fff; border:1px solid #e2e8f0; border-radius:8px; }
.pcba-cc-work-manager-report > div { display:flex; justify-content:space-between; gap:8px; }
.pcba-cc-work-manager-report b { font-size:11.5px; }
.pcba-cc-work-manager-report small { color:#718096; font-size:10.5px; }
.pcba-cc-work-manager-report p { margin:5px 0 0; font-size:11px; line-height:1.4; color:#4b5563; }

@media (max-width: 1100px) {
  .pcba-cc-work-kpis { grid-template-columns:repeat(2,minmax(130px,1fr)); }
  .pcba-cc-work-item__main { grid-template-columns:38px 1fr; }
  .pcba-cc-work-due { text-align:left; padding-left:49px; grid-column:1 / -1; }
  .pcba-cc-work-actions { justify-content:flex-start; padding-left:49px; grid-column:1 / -1; }
  .pcba-cc-work-latest,.pcba-cc-work-report-inline { padding-left:14px; }
  .pcba-cc-work-toolbar { align-items:stretch; flex-direction:column; }
  .pcba-cc-work-toolbar input { max-width:none; width:100%; }
  .pcba-cc-work-manager-user__body { grid-template-columns:1fr; padding-left:14px; }
}
@media (max-width: 680px) {
  .pcba-cc-work-kpis { grid-template-columns:1fr 1fr; }
  .pcba-cc-work-form-grid { grid-template-columns:1fr; }
  .pcba-cc-work-manager-user__head { grid-template-columns:34px 1fr 24px; }
  .pcba-cc-work-manager-badges { grid-column:2 / -1; justify-content:flex-start; }
  .pcba-cc-work-manager-task { grid-template-columns:1fr; }
  .pcba-cc-work-manager-task small { text-align:left; }
}

/* v0.16.26 - workflow create preview: duration + default assignee */
.pcba-cc-project-create__workflow-preview em {
    gap: 6px;
}
.pcba-cc-project-create__workflow-preview em small {
    font-size: 10px;
    font-weight: 700;
    opacity: .72;
    padding-left: 6px;
    border-left: 1px solid currentColor;
}
.pcba-cc-work-manager-date { display:flex; gap:7px; align-items:center; color:#64748b; font-size:11px; font-weight:800; }
.pcba-cc-work-manager-date input { min-height:34px; border:1px solid #cbd7e5; border-radius:8px; padding:6px 8px; background:#fff; color:#1f2937; }

/* v0.16.27 - Tách báo cáo Nhân viên / Đối tác */
.pcba-cc-work-manager-date-panel { margin-bottom:12px; }
.pcba-cc-work-manager-section { margin-top:12px; }
.pcba-cc-work-manager-section--staff { border-top:3px solid #3b82f6; }
.pcba-cc-work-manager-section--partner { border-top:3px solid #8b5cf6; }
.pcba-cc-work-manager-count { display:inline-flex; align-items:center; padding:5px 9px; border-radius:999px; background:#eef2f7; color:#526174; font-size:11px; font-weight:800; white-space:nowrap; }
.pcba-cc-work-manager-badges em.is-staff { background:#eaf2ff; color:#2863ad; }
.pcba-cc-work-manager-badges em.is-partner { background:#f0e9ff; color:#7041b7; }

/* v0.16.28 - trực quan trạng thái Soạn hàng + nhận hàng từ Mua hàng */
.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-status{
  width:100%!important;min-width:126px!important;height:31px!important;padding:3px 28px 3px 9px!important;
  border-radius:9px!important;border:1px solid #cbd5e1!important;font-size:10.5px!important;font-weight:900!important;
  line-height:1.1!important;box-shadow:0 1px 2px rgba(15,23,42,.06);cursor:pointer;background:#fff;
}
.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-status.is-waiting{background:#eff6ff!important;border-color:#93c5fd!important;color:#1d4ed8!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-status.is-shortage{background:#fff1f2!important;border-color:#fda4af!important;color:#be123c!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-picker-status.is-enough{background:#ecfdf5!important;border-color:#86efac!important;color:#15803d!important}
.pcba-cc-bom-release-drawer .pcba-cc-col-status{min-width:178px!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-purchase-state{margin-top:4px!important;padding:4px 7px!important;font-size:9.5px!important;border:1px solid currentColor!important;border-color:color-mix(in srgb,currentColor 20%,transparent)!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-system-hint{padding:3px 2px 0!important;font-size:8.5px!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-compact-btn.is-receive{background:#ecfeff!important;border-color:#67e8f9!important;color:#0e7490!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-compact-btn.is-receive:hover:not(:disabled){background:#cffafe!important}
.pcba-cc-bom-release-drawer .pcba-cc-bom-compact-btn.is-receive em{margin-left:4px;padding:1px 5px;border-radius:999px;background:#0e7490;color:#fff;font-size:8px;font-style:normal;font-weight:900}

.pcba-cc-purchase-receive-modal{width:min(1120px,calc(100vw - 28px))!important;max-height:calc(100vh - 34px)!important}
.pcba-cc-purchase-receive-help{display:flex;gap:10px;align-items:center;margin:10px 14px;padding:9px 11px;border:1px solid #bae6fd;border-radius:9px;background:#f0f9ff;color:#0c4a6e;font-size:11px}
.pcba-cc-purchase-receive-help span{color:#475569}
.pcba-cc-purchase-receive-table{margin:0 14px;overflow:auto;border:1px solid #dbe5f1;border-radius:9px;max-height:48vh}
.pcba-cc-purchase-receive-table table{width:100%;border-collapse:collapse;font-size:10.5px}
.pcba-cc-purchase-receive-table th{position:sticky;top:0;z-index:2;background:#f8fafc;color:#64748b;text-transform:uppercase;font-size:8.5px;letter-spacing:.02em;text-align:left;padding:8px;border-bottom:1px solid #dbe5f1;white-space:nowrap}
.pcba-cc-purchase-receive-table td{padding:8px;border-bottom:1px solid #edf2f7;vertical-align:middle}
.pcba-cc-purchase-receive-table td.num{text-align:right;font-variant-numeric:tabular-nums}
.pcba-cc-purchase-receive-table td strong{display:block;font-size:10.5px}.pcba-cc-purchase-receive-table td small{display:block;margin-top:2px;color:#7b8aa0;font-size:8.5px}
.pcba-cc-purchase-receive-table input[type=number]{width:100px;height:32px;border:1px solid #93c5fd;border-radius:7px;padding:0 7px;text-align:right;font-weight:900;color:#0f5f9c;background:#fff}
.pcba-cc-purchase-receive-foot{display:grid;grid-template-columns:minmax(260px,1fr) auto;gap:12px;align-items:end;padding:10px 14px 4px}
.pcba-cc-purchase-receive-foot label{display:grid;gap:4px}.pcba-cc-purchase-receive-foot label span{font-size:9px;font-weight:900;color:#64748b;text-transform:uppercase}.pcba-cc-purchase-receive-foot input{height:34px;border:1px solid #cbd5e1;border-radius:7px;padding:0 9px}.pcba-cc-purchase-receive-foot strong{color:#0e7490;font-size:12px;white-space:nowrap}
.pcba-cc-project-create__primary.is-receive{background:#fff!important;border:1px solid #67e8f9!important;color:#0e7490!important}
.pcba-cc-bom-receipt-history{display:flex;align-items:center;gap:5px;flex-wrap:wrap;margin:2px 0 3px;padding:3px 6px;border:1px solid #dbeafe;border-radius:7px;background:#f8fbff}
.pcba-cc-bom-receipt-history>span{font-size:7.5px;font-weight:900;color:#64748b;margin-right:2px}
.pcba-cc-bom-receipt-chip{display:inline-flex;align-items:center;gap:4px;min-height:22px;padding:2px 6px;border:1px solid #a5f3fc;border-radius:999px;background:#ecfeff;color:#0e7490;cursor:default}
.pcba-cc-bom-receipt-chip b{font-size:8.5px}.pcba-cc-bom-receipt-chip span{font-size:8px;color:#475569}
@media(max-width:800px){.pcba-cc-purchase-receive-help{align-items:flex-start;flex-direction:column}.pcba-cc-purchase-receive-foot{grid-template-columns:1fr}.pcba-cc-purchase-receive-foot strong{white-space:normal}}

/* v0.16.29 - Mở việc bằng Project mini ngay trong Công việc / Báo cáo */
.pcba-cc-work-project-overlay{
  position:fixed;inset:0;z-index:19990;border:0;background:rgba(15,23,42,.24);cursor:default;
}
.pcba-cc-work-project-drawer{
  position:fixed;z-index:20000;top:0;right:0;width:min(68vw,1180px);min-width:720px;height:100vh;
  display:flex;flex-direction:column;background:#f5f8fc;border-left:1px solid #cbd5e1;
  box-shadow:-18px 0 44px rgba(15,23,42,.20);animation:pcbaWorkProjectIn .18s ease-out;
}
.pcba-cc-work-project-drawer.is-full{width:calc(100vw - 48px);max-width:none;min-width:0}
@keyframes pcbaWorkProjectIn{from{transform:translateX(28px);opacity:.6}to{transform:translateX(0);opacity:1}}
.pcba-cc-work-project-drawer__head{
  flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:12px 14px;
  background:#fff;border-bottom:1px solid #dbe4ef;
}
.pcba-cc-work-project-drawer__head>div:first-child{min-width:0}
.pcba-cc-work-project-drawer__head span{display:block;color:#67809b;font-size:8.5px;font-weight:900;letter-spacing:.05em}
.pcba-cc-work-project-drawer__head h3{margin:3px 0 2px;color:#172033;font-size:16px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcba-cc-work-project-drawer__head small{display:block;color:#718096;font-size:10px;line-height:1.35}
.pcba-cc-work-project-drawer__actions{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.pcba-cc-work-project-drawer__actions button,
.pcba-cc-work-manager-task button{
  border:1px solid #cdd8e5;background:#fff;color:#334155;border-radius:8px;padding:6px 8px;font-size:10.5px;font-weight:850;cursor:pointer
}
.pcba-cc-work-project-drawer__actions button:hover,.pcba-cc-work-manager-task button:hover{background:#eef6ff;border-color:#93baf0;color:#1d63b7}
.pcba-cc-work-project-drawer__body{flex:1;min-height:0;overflow:auto;padding:12px}
.pcba-cc-work-project-loading{padding:24px;color:#64748b;font-size:12px}
.pcba-cc-work-project-focus{
  display:grid;grid-template-columns:minmax(280px,1.4fr) minmax(210px,.7fr);gap:10px;margin-bottom:10px;padding:10px 12px;
  border:1px solid #a8c9f4;border-radius:11px;background:linear-gradient(135deg,#f7fbff,#eef6ff)
}
.pcba-cc-work-project-focus__title>span{display:block;color:#4774a8;font-size:8px;font-weight:950;letter-spacing:.06em}
.pcba-cc-work-project-focus__title>strong{display:block;margin-top:3px;color:#153c6a;font-size:13px}
.pcba-cc-work-project-focus__title>small{display:block;margin-top:3px;color:#5e7188;font-size:9.5px;line-height:1.4}
.pcba-cc-work-project-focus__progress{display:flex;flex-direction:column;justify-content:center;gap:5px;color:#52677e;font-size:9.5px}
.pcba-cc-work-project-focus__progress span{display:flex;justify-content:space-between;gap:8px}.pcba-cc-work-project-focus__progress b{color:#1d63b7}
.pcba-cc-work-project-focus__progress i{display:block;height:7px;border-radius:999px;background:#dce9f8;overflow:hidden}.pcba-cc-work-project-focus__progress em{display:block;height:100%;border-radius:999px;background:#3b82f6}
.pcba-cc-work-project-focus__latest{grid-column:1/-1;padding-top:7px;border-top:1px solid #d7e7fa;color:#53667d;font-size:9.5px;line-height:1.4}
.pcba-cc-work-project-single{background:#fff;border:1px solid #dbe4ef;border-radius:12px;overflow:hidden}
.pcba-cc-work-project-single__overview{display:grid;grid-template-columns:minmax(300px,1fr) auto;gap:14px;align-items:center;padding:10px 12px;border-bottom:1px solid #e5ebf2;background:#fff}
.pcba-cc-work-project-single__overview>div:first-child{display:flex;align-items:center;gap:9px;min-width:0}
.pcba-cc-work-project-single__overview .pcba-cc-project-avatar{width:38px;height:38px;min-width:38px}
.pcba-cc-work-project-single__overview span{min-width:0}.pcba-cc-work-project-single__overview span>b{display:block;color:#2563a8;font-size:9px}.pcba-cc-work-project-single__overview span>strong{display:block;color:#172033;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pcba-cc-work-project-single__overview span>small{display:block;margin-top:2px;color:#718096;font-size:9.5px}
.pcba-cc-work-project-single__overview>div:last-child{text-align:right}.pcba-cc-work-project-single__overview>div:last-child span{display:block;color:#718096;font-size:8.5px;text-transform:uppercase;font-weight:850}.pcba-cc-work-project-single__overview>div:last-child b{display:block;margin-top:2px;color:#213148;font-size:11px}
.pcba-cc-work-project-timeline{padding:8px 12px;border-bottom:1px solid #e5ebf2;background:#fbfcfe;overflow:auto}
.pcba-cc-work-project-drawer .pcba-cc-project-details{border:0!important;border-radius:0!important;margin:0!important;box-shadow:none!important}
.pcba-cc-work-project-drawer .pcba-cc-project-detail-summary{margin:0!important;border-left:0!important;border-right:0!important;border-radius:0!important}
.pcba-cc-work-project-drawer .pcba-cc-project-tabs-wrap{position:sticky;top:0;z-index:8;background:#fff;padding-top:7px}
.pcba-cc-work-project-drawer .pcba-cc-project-tab-panel{min-height:140px}
.pcba-cc-work-manager-task{grid-template-columns:minmax(180px,1fr) 100px 145px 74px!important;align-items:center}
.pcba-cc-work-manager-task>em{font-style:normal;color:#94a3b8;font-size:9px;text-align:right}
@media(max-width:1100px){.pcba-cc-work-project-drawer{width:82vw;min-width:620px}.pcba-cc-work-project-focus{grid-template-columns:1fr}.pcba-cc-work-project-focus__latest{grid-column:auto}}
@media(max-width:760px){.pcba-cc-work-project-drawer,.pcba-cc-work-project-drawer.is-full{width:100vw;min-width:0}.pcba-cc-work-project-drawer__head{padding:10px}.pcba-cc-work-project-drawer__actions button:first-child{display:none}.pcba-cc-work-project-drawer__body{padding:8px}.pcba-cc-work-project-single__overview{grid-template-columns:1fr}.pcba-cc-work-project-single__overview>div:last-child{text-align:left}.pcba-cc-work-manager-task{grid-template-columns:1fr!important}.pcba-cc-work-manager-task small,.pcba-cc-work-manager-task>em{text-align:left!important}}

/* v0.16.30 - bắt buộc người phụ trách cho mọi bước quy trình / Project */
.pcba-cc-workflow-assignee-warning{
  margin:7px 0 5px;padding:7px 9px;border:1px solid #fecaca;border-radius:8px;background:#fff1f2;color:#b42318;font-size:10px;font-weight:850;
}
.pcba-cc-workflow-assignee-ok{
  margin:7px 0 5px;padding:6px 9px;border:1px solid #bbf7d0;border-radius:8px;background:#f0fdf4;color:#15803d;font-size:10px;font-weight:850;
}
.pcba-cc-project-create__workflow-preview em.is-missing-assignee{
  border-color:#fca5a5!important;background:#fff1f2!important;color:#b42318!important;
}
.pcba-cc-work-unassigned{margin-top:12px;border-top:3px solid #ef4444!important}
.pcba-cc-work-unassigned.is-clear{border-top-color:#22c55e!important}
.pcba-cc-work-unassigned-head-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.pcba-cc-work-unassigned-head-actions button{
  border:1px solid #f59e0b;background:#fff7ed;color:#9a5b0b;border-radius:8px;padding:7px 9px;font-size:10.5px;font-weight:850;cursor:pointer
}
.pcba-cc-work-unassigned-head-actions button:hover:not(:disabled){background:#ffedd5}
.pcba-cc-work-unassigned-head-actions button:disabled{opacity:.58;cursor:wait}
.pcba-cc-work-manager-count.is-risk{background:#fee2e2;color:#b91c1c}
.pcba-cc-work-manager-count.is-ok{background:#dcfce7;color:#15803d}
.pcba-cc-work-unassigned-list{padding:0}
.pcba-cc-work-unassigned-row{
  display:grid;grid-template-columns:minmax(260px,1.35fr) 120px minmax(210px,.8fr) 88px;gap:9px;align-items:center;padding:10px 13px;border-bottom:1px solid #edf1f5;background:#fff
}
.pcba-cc-work-unassigned-row:last-child{border-bottom:0}
.pcba-cc-work-unassigned-row:hover{background:#fffafa}
.pcba-cc-work-unassigned-main{min-width:0}
.pcba-cc-work-unassigned-main>strong{display:block;color:#172033;font-size:11.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcba-cc-work-unassigned-main>small{display:block;margin-top:2px;color:#718096;font-size:9.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pcba-cc-work-unassigned-main .pcba-cc-work-unassigned-suggest{margin-top:4px;color:#64748b;font-size:9px;white-space:normal}
.pcba-cc-work-unassigned-main .pcba-cc-work-unassigned-suggest b{color:#2563eb}
.pcba-cc-work-unassigned-main .pcba-cc-work-unassigned-suggest.is-risk{color:#b42318;font-weight:800}
.pcba-cc-work-unassigned-status{justify-self:start;padding:4px 7px;border-radius:999px;background:#fff1f2;color:#be123c;font-size:9px;font-weight:850;white-space:nowrap}
.pcba-cc-work-unassigned-status.is-done{background:#f1f5f9;color:#64748b}
.pcba-cc-work-unassigned-row select{width:100%;min-height:34px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:5px 8px;color:#243247;font-size:10.5px}
.pcba-cc-work-unassigned-row .pcba-cc-project-create__primary{min-height:34px;padding:6px 8px;font-size:10px;white-space:nowrap}
@media(max-width:980px){
  .pcba-cc-work-unassigned-row{grid-template-columns:1fr 120px}.pcba-cc-work-unassigned-row select{grid-column:1/2}.pcba-cc-work-unassigned-row .pcba-cc-project-create__primary{grid-column:2/3}
}
@media(max-width:620px){
  .pcba-cc-work-unassigned-row{grid-template-columns:1fr}.pcba-cc-work-unassigned-row select,.pcba-cc-work-unassigned-row .pcba-cc-project-create__primary{grid-column:auto}.pcba-cc-work-unassigned-status{justify-self:start}
}


/* v0.16.31 - Tách Chưa phân công + chuẩn hóa Giao hàng */
.pcba-cc-work-tab-count{
  display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:18px;margin-left:6px;padding:0 6px;
  border-radius:999px;background:#fee2e2;color:#b91c1c;font-size:9px;font-weight:900;line-height:1
}
.pcba-cc-work-tabs>button.is-active .pcba-cc-work-tab-count{background:#fff;color:#b91c1c}
.pcba-cc-work-kpi-link{
  width:100%;margin:0;text-align:left;font:inherit;cursor:pointer;appearance:none;-webkit-appearance:none
}
.pcba-cc-work-kpi-link:hover{border-color:#93baf0;box-shadow:0 2px 8px rgba(37,99,235,.10)}
.pcba-cc-work-kpi-link:focus-visible{outline:2px solid #60a5fa;outline-offset:2px}

.pcba-cc-work-unassigned{margin-top:0}
.pcba-cc-work-unassigned-filters{
  display:grid;grid-template-columns:minmax(240px,1.35fr) minmax(150px,.7fr) minmax(145px,.65fr) minmax(210px,1fr) auto;
  gap:8px;padding:10px 13px;border-bottom:1px solid #e7edf4;background:#fbfcfe
}
.pcba-cc-work-unassigned-filters input,
.pcba-cc-work-unassigned-filters select,
.pcba-cc-work-unassigned-bulk select{
  width:100%;min-height:36px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:6px 9px;color:#243247;font:inherit;font-size:10.5px
}
.pcba-cc-work-unassigned-filters button,
.pcba-cc-work-unassigned-bulk button{
  min-height:36px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#334155;padding:6px 10px;font:inherit;font-size:10.5px;font-weight:850;cursor:pointer;white-space:nowrap
}
.pcba-cc-work-unassigned-bulk{
  display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 13px;border-bottom:1px solid #e7edf4;background:#f8fbff
}
.pcba-cc-work-unassigned-bulk>div{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.pcba-cc-work-unassigned-bulk>div:last-child{margin-left:auto}
.pcba-cc-work-unassigned-bulk span{color:#64748b;font-size:10.5px}
.pcba-cc-work-unassigned-bulk .pcba-cc-project-create__primary{background:#168296;color:#fff;border-color:#168296}
.pcba-cc-work-unassigned-row{
  grid-template-columns:28px minmax(260px,1.35fr) 120px minmax(210px,.8fr) 88px
}
.pcba-cc-work-unassigned-row.is-overdue{box-shadow:inset 3px 0 #ef4444}
.pcba-cc-work-unassigned-check{display:grid;place-items:center;margin:0}
.pcba-cc-work-unassigned-check input{width:16px;height:16px;margin:0;accent-color:#168296;cursor:pointer}
@media(max-width:1100px){
  .pcba-cc-work-unassigned-filters{grid-template-columns:1fr 1fr}
  .pcba-cc-work-unassigned-filters>button{grid-column:span 2}
  .pcba-cc-work-unassigned-bulk{align-items:flex-start;flex-direction:column}
  .pcba-cc-work-unassigned-bulk>div:last-child{margin-left:0;width:100%}
  .pcba-cc-work-unassigned-bulk>div:last-child select{flex:1}
}
@media(max-width:980px){
  .pcba-cc-work-unassigned-row{grid-template-columns:28px 1fr 120px}
  .pcba-cc-work-unassigned-row .pcba-cc-work-unassigned-status{grid-column:2/3}
  .pcba-cc-work-unassigned-row select{grid-column:2/3}
  .pcba-cc-work-unassigned-row .pcba-cc-project-create__primary{grid-column:3/4;grid-row:2}
}
@media(max-width:620px){
  .pcba-cc-work-unassigned-filters{grid-template-columns:1fr}
  .pcba-cc-work-unassigned-filters>button{grid-column:auto}
  .pcba-cc-work-unassigned-row{grid-template-columns:28px 1fr}
  .pcba-cc-work-unassigned-row .pcba-cc-work-unassigned-status,
  .pcba-cc-work-unassigned-row select,
  .pcba-cc-work-unassigned-row .pcba-cc-project-create__primary{grid-column:2/3;grid-row:auto}
}

.pcba-cc-delivery-table .pcba-cc-delivery-print{
  border:1px solid #b8c7d8;border-radius:7px;background:#fff;color:#24556b;padding:6px 9px;font:inherit;font-size:10.5px;font-weight:850;cursor:pointer;white-space:nowrap
}
.pcba-cc-delivery-table .pcba-cc-delivery-print:hover{background:#edf8fa;border-color:#5aa7b2}
.pcba-cc-delivery-source{margin:12px 0 0;padding:10px 12px;border-radius:8px;font-size:11px;line-height:1.45}
.pcba-cc-alert--info.pcba-cc-delivery-source{border:1px solid #bfdbfe;background:#eff6ff;color:#1e4f8d}
.pcba-cc-alert--warning.pcba-cc-delivery-source{border:1px solid #fed7aa;background:#fff7ed;color:#9a5b0b}
.pcba-cc-alert--success.pcba-cc-delivery-source{border:1px solid #bbf7d0;background:#f0fdf4;color:#15803d}
.pcba-cc-delivery-form{margin-top:12px}
.pcba-cc-delivery-form-actions{display:flex;gap:7px;align-items:end}
.pcba-cc-delivery-form-actions button{min-height:30px}
.pcba-cc-delivery-form-actions button.is-secondary{background:#fff;color:#166477;border:1px solid #8bc7cf}
.pcba-cc-delivery-form-actions button.is-secondary:hover{background:#edf8fa}
@media(max-width:900px){
  .pcba-cc-delivery-form{grid-template-columns:1fr 1fr}
  .pcba-cc-delivery-form-actions{grid-column:1/-1}
}

/* v0.16.32 - Phiếu SX/Giao hàng: lọc, ưu tiên chưa hoàn thành, ảnh thu nhỏ, xem/tạo GH, in tem */
.pcba-cc-sx-kpis{margin-bottom:10px}
.pcba-cc-sx-toolbar{
  display:grid;grid-template-columns:minmax(260px,1.15fr) minmax(420px,2fr) minmax(190px,.7fr);gap:10px;align-items:end;
  margin-bottom:12px;padding:10px 12px;border:1px solid #dbe4ef;border-radius:10px;background:#fff
}
.pcba-cc-sx-search{position:relative;display:block}
.pcba-cc-sx-search .dashicons{position:absolute;left:9px;top:50%;transform:translateY(-50%);color:#7890a8;font-size:16px;width:16px;height:16px}
.pcba-cc-sx-search input{width:100%;height:38px;border:1px solid #cbd5e1;border-radius:8px;padding:0 10px 0 31px;background:#fff;color:#223047;font-size:11px}
.pcba-cc-sx-filters{display:flex;gap:6px;flex-wrap:wrap}
.pcba-cc-sx-filter{display:inline-flex;align-items:center;gap:6px;min-height:36px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#475569;padding:6px 9px;font:inherit;font-size:10.5px;font-weight:850;cursor:pointer}
.pcba-cc-sx-filter small{display:inline-grid;place-items:center;min-width:20px;height:18px;padding:0 5px;border-radius:999px;background:#eef2f7;color:#64748b;font-size:8.5px;font-weight:900}
.pcba-cc-sx-filter.is-active{border-color:#48a7b7;background:#ecfeff;color:#0f7485;box-shadow:0 1px 3px rgba(15,116,133,.08)}
.pcba-cc-sx-filter.is-active small{background:#168296;color:#fff}
.pcba-cc-sx-sort{display:grid;gap:4px}.pcba-cc-sx-sort>span{font-size:8.5px;font-weight:900;color:#64748b;text-transform:uppercase;letter-spacing:.03em}
.pcba-cc-sx-sort select{width:100%;height:38px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;padding:0 9px;color:#334155;font-size:10.5px;font-weight:750}
.pcba-cc-sx-table-wrap{overflow:auto}
.pcba-cc-sx-table{min-width:1160px}
.pcba-cc-sx-table th{white-space:nowrap}
.pcba-cc-sx-table td{vertical-align:middle}
.pcba-cc-sx-row.is-unfinished{background:#fff}.pcba-cc-sx-row.is-unfinished:hover{background:#fbfdff}
.pcba-cc-sx-row.is-done{background:#fbfcfd;color:#65758a}.pcba-cc-sx-row.is-done:hover{background:#f7fafc}
.pcba-cc-sx-thumb{display:grid;place-items:center;width:46px;height:46px;border:1px solid #dbe4ef;border-radius:8px;overflow:hidden;background:#f8fafc;color:#52708d;font-size:15px;font-weight:900}
.pcba-cc-sx-thumb img{width:100%;height:100%;object-fit:cover;display:block}.pcba-cc-sx-thumb.is-empty{background:linear-gradient(135deg,#f2f7fc,#eaf1f8)}
.pcba-cc-sx-code{display:block;color:#172033}.pcba-cc-sx-table td>small{display:block;margin-top:2px;color:#7b8a9f;font-size:8.5px}
.pcba-cc-sx-remaining{color:#c2413a}
.pcba-cc-sx-status{display:inline-flex;align-items:center;padding:4px 7px;border-radius:999px;font-size:9px;font-weight:900;white-space:nowrap}
.pcba-cc-sx-status.is-pending{background:#fff1f2;color:#be123c}.pcba-cc-sx-status.is-partial{background:#fff7ed;color:#b45309}.pcba-cc-sx-status.is-done{background:#ecfdf5;color:#15803d}.pcba-cc-sx-status.is-warn{background:#fef3c7;color:#92400e}
.pcba-cc-sx-progress{margin-top:5px;min-width:145px}.pcba-cc-sx-progress .pcba-cc-progress{margin:0}
.pcba-cc-sx-actions{display:flex;gap:5px;align-items:center;white-space:nowrap}
.pcba-cc-sx-actions button{min-height:31px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#334155;padding:5px 8px;font:inherit;font-size:9.5px;font-weight:900;cursor:pointer}
.pcba-cc-sx-actions button:hover{background:#f1f7fb;border-color:#94b8d3}.pcba-cc-sx-actions button.is-primary{background:#168296;border-color:#168296;color:#fff}.pcba-cc-sx-actions button.is-primary:hover{background:#0f7283}.pcba-cc-sx-actions button.is-muted{color:#64748b;background:#f8fafc}
.pcba-cc-sx-delivery-panel{width:min(1180px,calc(100vw - 30px));max-height:calc(100vh - 34px);display:flex;flex-direction:column}
.pcba-cc-sx-delivery-body{padding:12px 14px 16px;overflow:auto;min-height:260px}.pcba-cc-sx-delivery-loading{padding:45px 20px;text-align:center;color:#64748b}
.pcba-cc-delivery-label-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 8px;padding:8px 10px;border:1px solid #dbeafe;border-radius:8px;background:#f8fbff}
.pcba-cc-delivery-label-tools>div:first-child strong{display:block;color:#24445f;font-size:10.5px}.pcba-cc-delivery-label-tools>div:first-child small{display:block;margin-top:2px;color:#718096;font-size:8.5px}
.pcba-cc-delivery-label-tools>div:last-child{display:flex;gap:6px;align-items:center}.pcba-cc-delivery-label-tools button,.pcba-cc-delivery-label-one{border:1px solid #93c5fd;border-radius:7px;background:#eff6ff;color:#1d4f91;padding:6px 8px;font:inherit;font-size:9.5px;font-weight:900;cursor:pointer;white-space:nowrap}.pcba-cc-delivery-label-tools button.is-secondary{border-color:#c4b5fd;background:#f5f3ff;color:#6d4cb3}.pcba-cc-delivery-label-tools button:disabled{opacity:.45;cursor:not-allowed}
.pcba-cc-delivery-label-check{width:36px;text-align:center!important}.pcba-cc-delivery-label-check input{width:15px;height:15px;margin:0;accent-color:#168296;cursor:pointer}
.pcba-cc-delivery-row-actions{display:flex;gap:5px;align-items:center}
.pcba-cc-gh-label-panel{width:min(985px,calc(100vw - 36px));max-height:calc(100vh - 24px);display:flex;flex-direction:column;background:#f8fafc}
.pcba-cc-gh-label-modal-actions{display:flex;gap:8px;align-items:center}.pcba-cc-gh-label-modal-actions button{border:0;border-radius:9px;background:#ef4444;color:#fff;padding:8px 12px;font:inherit;font-size:12px;font-weight:900;cursor:pointer}.pcba-cc-gh-label-modal-actions button.is-primary{background:#2563eb}
.pcba-cc-gh-label-preview{flex:1;overflow:auto;padding:12px;display:flex;gap:14px;align-items:flex-start;flex-wrap:wrap;background:#1118270d}
.pcba-cc-gh-label{width:436px;height:614px;max-width:100%;padding:10px;border:1px dashed #9fb4d0;border-radius:9px;background:#fff;color:#171d2b;overflow:hidden}
.pcba-cc-gh-label__top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.pcba-cc-gh-label__top span{display:block;color:#5d697c;font-size:20px}.pcba-cc-gh-label__top strong{display:block;font-size:28px;line-height:1.08}.pcba-cc-gh-qr{width:145px;height:145px;flex:0 0 145px;display:block}
.pcba-cc-gh-label__line{display:flex;gap:7px;align-items:baseline;margin-top:8px;font-size:27px;line-height:1.12}.pcba-cc-gh-label__line span{font-weight:400}.pcba-cc-gh-label__line strong{font-weight:850;overflow-wrap:anywhere}
@media(max-width:1050px){.pcba-cc-sx-toolbar{grid-template-columns:1fr 1fr}.pcba-cc-sx-filters{grid-column:1/-1;grid-row:2}.pcba-cc-sx-sort{grid-column:2;grid-row:1}.pcba-cc-delivery-label-tools{align-items:flex-start;flex-direction:column}}
@media(max-width:700px){.pcba-cc-sx-toolbar{grid-template-columns:1fr}.pcba-cc-sx-sort,.pcba-cc-sx-filters{grid-column:auto;grid-row:auto}.pcba-cc-gh-label-preview{padding:8px}.pcba-cc-gh-label{width:100%;height:auto;min-height:540px}.pcba-cc-gh-label__line{font-size:21px}.pcba-cc-gh-label__top strong{font-size:23px}.pcba-cc-gh-qr{width:118px;height:118px;flex-basis:118px}}

/* v0.16.35 - Bill mua hàng, tạm ứng/chi hộ, truy nguồn Bill và so sánh lợi nhuận */
.pcba-cc-purchase-fin-kpis{display:grid;grid-template-columns:repeat(5,minmax(145px,1fr));gap:8px;margin-bottom:12px}.pcba-cc-purchase-fin-kpis>div{border:1px solid #dbe5ef;border-radius:9px;background:#f8fbff;padding:10px 11px}.pcba-cc-purchase-fin-kpis span{display:block;color:#6b7c90;font-size:9px;font-weight:850;text-transform:uppercase}.pcba-cc-purchase-fin-kpis strong{display:block;margin-top:4px;color:#18324b;font-size:15px}.pcba-cc-purchase-fin-kpis strong.is-danger{color:#c83d3d}.pcba-cc-purchase-fin-kpis strong.is-warn{color:#aa6900}
.pcba-cc-purchase-bill-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 10px}.pcba-cc-purchase-bill-toolbar strong{display:block;font-size:12px;color:#20364f}.pcba-cc-purchase-bill-toolbar small{display:block;margin-top:3px;color:#718096;font-size:9px}
.pcba-cc-purchase-bill-modal{width:min(1180px,calc(100vw - 28px));max-height:calc(100vh - 30px);overflow:auto}.pcba-cc-bill-form-grid{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:9px;padding:12px 14px}.pcba-cc-bill-form-grid.is-fees{background:#f8fafc;border-top:1px solid #e5ebf2;border-bottom:1px solid #e5ebf2}.pcba-cc-bill-form-grid label,.pcba-cc-cash-entry label{display:flex;flex-direction:column;gap:4px}.pcba-cc-bill-form-grid label>span,.pcba-cc-cash-entry label>span{font-size:9px;font-weight:850;color:#5d6b7d}.pcba-cc-bill-form-grid input,.pcba-cc-bill-form-grid select,.pcba-cc-cash-entry input,.pcba-cc-cash-entry select{min-height:34px;border:1px solid #ccd7e4;border-radius:7px;background:#fff;padding:6px 8px;font:inherit;font-size:10px}.pcba-cc-bill-check{flex-direction:row!important;align-items:center!important;align-self:end;min-height:34px}.pcba-cc-bill-check input{min-height:auto;width:15px;height:15px}.pcba-cc-bill-line-head{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 14px;border-top:1px solid #e5ebf2}.pcba-cc-bill-line-head strong{display:block;font-size:11px}.pcba-cc-bill-line-head small{display:block;color:#718096;font-size:9px}.pcba-cc-bill-line-head>span{border-radius:999px;background:#e8f2ff;color:#245ca5;padding:4px 8px;font-size:9px;font-weight:900}.pcba-cc-bill-candidate-table{max-height:330px;overflow:auto}.pcba-cc-bill-candidate-table input[type=number]{width:105px;min-height:31px;border:1px solid #ccd7e4;border-radius:6px;padding:4px 6px}.pcba-cc-bill-funding{margin:10px 14px;border:1px solid #d8e5f3;border-radius:9px;overflow:hidden}.pcba-cc-bill-funding-head{padding:9px 11px;background:#eef6ff}.pcba-cc-bill-funding-head strong{display:block;font-size:11px}.pcba-cc-bill-funding-head small{color:#698099;font-size:9px}.pcba-cc-bill-preview{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:10px 14px;padding:9px 11px;border-radius:8px;background:#f4f8fc;border:1px solid #dde6ef;font-size:10px}.pcba-cc-bill-preview span b{margin-left:3px}.pcba-cc-bill-preview>strong{margin-left:auto;color:#8a5d09}
.pcba-cc-cash-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(260px,.7fr);gap:12px}.pcba-cc-cash-entry{border:1px solid #dbe5ef;border-radius:9px;padding:12px;background:#fbfdff}.pcba-cc-cash-entry h4{margin:0 0 10px;font-size:12px}.pcba-cc-cash-entry form{display:grid;gap:8px}.pcba-cc-cash-balance{display:inline-flex;border-radius:999px;padding:4px 7px;font-size:9px;font-weight:900}.pcba-cc-cash-balance.is-held{background:#fff3df;color:#9d6100}.pcba-cc-cash-balance.is-owed{background:#ffeaea;color:#bf3636}.pcba-cc-cash-balance.is-clear{background:#e9f8ef;color:#137b50}
.pcba-cc-bom-bill-sources{margin-top:5px;border:1px solid #d7e5f3;border-radius:7px;background:#f8fbff}.pcba-cc-bom-bill-sources summary{cursor:pointer;padding:5px 7px;color:#1d5d8f;font-size:8.5px;font-weight:900}.pcba-cc-bom-bill-sources>div{padding:0 7px 6px}.pcba-cc-bom-bill-source-row{display:grid;grid-template-columns:1fr auto auto;gap:5px;padding:4px 0;border-top:1px dashed #dbe6ef;font-size:8px}.pcba-cc-bom-bill-source-row small{grid-column:1/-1;color:#7d8997}.pcba-cc-bom-bill-source-row span:nth-child(2),.pcba-cc-bom-bill-source-row span:nth-child(3){white-space:nowrap}
.pcba-cc-fin-profit-compare th,.pcba-cc-fin-profit-compare td{white-space:nowrap}.pcba-cc-fin-profit-compare td:first-child{white-space:normal;min-width:180px}.pcba-cc-fin-purchase-impact{display:inline-flex;border-radius:999px;padding:4px 7px;font-weight:900}.pcba-cc-fin-purchase-impact.is-bad{background:#ffe9e9;color:#c23737}.pcba-cc-fin-purchase-impact.is-good{background:#e8f7ed;color:#147a4e}.pcba-cc-fin-purchase-impact.is-neutral{background:#edf2f7;color:#657487}.pcba-cc-fin-purchase-compare{display:grid;grid-template-columns:1fr 1fr;gap:7px}.pcba-cc-fin-purchase-compare>div{display:flex;justify-content:space-between;gap:12px;padding:8px;border:1px solid #e1e8ef;border-radius:7px;background:#fafcff;font-size:10px}.pcba-cc-fin-purchase-compare b.is-bad{color:#c43a3a}.pcba-cc-fin-purchase-compare b.is-good{color:#118052}
@media(max-width:1050px){.pcba-cc-purchase-fin-kpis{grid-template-columns:repeat(2,1fr)}.pcba-cc-bill-form-grid{grid-template-columns:repeat(2,1fr)}.pcba-cc-cash-layout{grid-template-columns:1fr}}
@media(max-width:650px){.pcba-cc-purchase-fin-kpis,.pcba-cc-bill-form-grid{grid-template-columns:1fr}.pcba-cc-fin-purchase-compare{grid-template-columns:1fr}.pcba-cc-purchase-bill-toolbar{align-items:flex-start;flex-direction:column}}
.pcba-cc-bill-variance{font-weight:900!important;color:#64748b!important}.pcba-cc-bill-variance.is-bad{color:#c43a3a!important}.pcba-cc-bill-variance.is-good{color:#118052!important}
.pcba-cc-bill-actions{display:flex;gap:5px;align-items:center;flex-wrap:wrap}.pcba-cc-bill-actions button{white-space:nowrap}

/* v0.16.36 - Fix circular project workflow/completion calculation (Maximum call stack size exceeded) */

/* v0.16.38 - Soạn hàng → DNMH selection + true PMH layer */
.pcba-cc-bom-picking-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 12px;margin:10px 0;border:1px solid #dbe5ef;border-radius:10px;background:#f8fbff}
.pcba-cc-bom-picking-filters,.pcba-cc-bom-picking-selection{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pcba-cc-bom-picking-filters button,.pcba-cc-bom-picking-selection button{border:1px solid #cbd7e5;background:#fff;border-radius:8px;padding:7px 10px;font-weight:800;cursor:pointer}
.pcba-cc-bom-picking-filters button.is-active{background:#eaf2ff;border-color:#8ab4f8;color:#1f5fbd}
.pcba-cc-bom-picking-selection button.is-primary{background:#147f8f;border-color:#147f8f;color:#fff}
.pcba-cc-bom-picking-selection button:disabled{opacity:.45;cursor:not-allowed}
.pcba-cc-col-select{width:36px;min-width:36px;text-align:center}
.pcba-cc-sheet-row.is-complete-dim{opacity:.48;filter:saturate(.72);transition:opacity .14s ease,filter .14s ease}
.pcba-cc-sheet-row.is-complete-dim:hover,.pcba-cc-sheet-row.is-complete-dim:focus-within{opacity:.92;filter:none}
.pcba-cc-dnmh-info{margin:10px 14px;padding:10px 12px;border:1px solid #bcd5f4;background:#f3f8ff;border-radius:9px;color:#36506d;font-size:12px;line-height:1.5}
.pcba-cc-pmh-create-panel{width:min(1220px,96vw);max-height:92vh;overflow:auto}
.pcba-cc-pmh-meta{display:grid;grid-template-columns:repeat(5,minmax(150px,1fr));gap:10px;padding:12px 14px;border-bottom:1px solid #e4eaf1;background:#fbfcfe}
.pcba-cc-pmh-meta label{display:flex;flex-direction:column;gap:5px;font-size:12px;font-weight:800;color:#5c697a}
.pcba-cc-pmh-meta label.is-wide{grid-column:span 2}
.pcba-cc-pmh-meta input,.pcba-cc-pmh-meta select{height:38px;border:1px solid #cbd7e5;border-radius:8px;background:#fff;padding:0 9px}
.pcba-cc-pmh-search{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #e5ebf2}
.pcba-cc-pmh-search input{flex:1;max-width:520px;height:38px;border:1px solid #cbd7e5;border-radius:8px;padding:0 10px}
.pcba-cc-pmh-table{overflow:auto;max-height:55vh}
.pcba-cc-pmh-table td small,.pcba-cc-pmh-list td small{display:block;color:#718096;margin-top:3px}
.pcba-cc-pmh-table input[type=number]{width:105px;min-width:90px}
.pcba-cc-pmh-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 0 12px}
.pcba-cc-pmh-toolbar b,.pcba-cc-pmh-toolbar small{display:block}.pcba-cc-pmh-toolbar small{color:#718096;margin-top:3px}
.pcba-cc-pmh-list select{min-width:140px;border:1px solid #cbd7e5;border-radius:7px;padding:6px;background:#fff}
@media(max-width:980px){.pcba-cc-pmh-meta{grid-template-columns:1fr 1fr}.pcba-cc-pmh-meta label.is-wide{grid-column:span 2}.pcba-cc-bom-picking-toolbar{align-items:stretch}.pcba-cc-bom-picking-selection{justify-content:space-between}}
/* v0.16.38: DNMH -> PMH workflow */
.pcba-cc-pmh-source{display:block;margin-top:4px;color:#2563eb;font-weight:700}
.pcba-cc-pmh-table [data-pcba-purchase-order-variance].is-good{color:#15803d;font-weight:800}
.pcba-cc-pmh-table [data-pcba-purchase-order-variance].is-bad{color:#dc2626;font-weight:800}
.pcba-cc-pmh-table td>strong+small{display:block;margin-top:3px}
.pcba-cc-purchase-sheet input:disabled,.pcba-cc-purchase-sheet select:disabled{background:#f4f6f8;color:#758195;cursor:not-allowed}

/* v0.16.39 - compact DNMH checkbox + neutral completed rows */
.pcba-cc-bom-picking-table th.pcba-cc-col-select,
.pcba-cc-bom-picking-table td.pcba-cc-col-select{
    width:28px!important;
    min-width:28px!important;
    max-width:28px!important;
    padding-left:3px!important;
    padding-right:3px!important;
    text-align:center!important;
}
.pcba-cc-bom-picking-table .pcba-cc-col-select input[type="checkbox"]{
    margin:0!important;
    width:14px;
    height:14px;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim{
    opacity:.58;
    filter:grayscale(.82);
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim>td{
    background:#f3f5f7!important;
    color:#8793a3!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim input,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim select{
    background:#f5f6f8!important;
    color:#8e99a8!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim:hover,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim:focus-within{
    opacity:.88;
    filter:grayscale(.45);
}

/* v0.16.40 - PMH-centric receiving */
.pcba-cc-pmh-orders-table td{vertical-align:middle}
.pcba-cc-pmh-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.pcba-cc-pmh-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:900;background:#eef2f7;color:#475569}
.pcba-cc-pmh-status.is-receiving{background:#fff7ed;color:#c2410c}
.pcba-cc-pmh-status.is-received,.pcba-cc-pmh-status.is-completed{background:#ecfdf5;color:#047857}
.pcba-cc-pmh-status.is-cancelled{background:#f1f5f9;color:#64748b}
.pcba-cc-pmh-received-ok{display:inline-flex;align-items:center;gap:4px;color:#047857;font-weight:900;font-size:11px;white-space:nowrap}
.pcba-cc-pmh-receive-panel{width:min(1180px,calc(100vw - 28px))!important;max-height:calc(100vh - 34px)!important;overflow:auto}
.pcba-cc-pmh-receipt-history{margin:10px 14px 4px;padding:10px 12px;border:1px solid #dbe5f1;border-radius:9px;background:#fbfdff}
.pcba-cc-pmh-receipt-history>b{display:block;margin-bottom:7px;font-size:10px;color:#64748b;text-transform:uppercase;letter-spacing:.03em}
.pcba-cc-pmh-receipt-history>div{display:flex;gap:7px;flex-wrap:wrap}
.pcba-cc-pmh-receipt-history span{display:flex;flex-direction:column;gap:2px;padding:6px 8px;border:1px solid #d8e3ef;border-radius:8px;background:#fff}
.pcba-cc-pmh-receipt-history span strong{font-size:10px;color:#0f5f9c}
.pcba-cc-pmh-receipt-history span small{font-size:8.5px;color:#718096}


/* v0.16.41 - Compact Google-Sheet-style picking table + stronger row separation */
.pcba-cc-bom-picking-table{
    border-color:#c7d1dd!important;
    border-radius:7px!important;
    background:#fff!important;
}
.pcba-cc-bom-picking-table .pcba-cc-sheet-table--release{
    border-collapse:separate!important;
    border-spacing:0!important;
}
.pcba-cc-bom-picking-table .pcba-cc-sheet-table--release thead th{
    height:32px!important;
    padding:4px 6px!important;
    background:#eef2f6!important;
    border-right:1px solid #bcc7d4!important;
    border-bottom:2px solid #adb9c7!important;
    color:#56677d!important;
    font-size:10px!important;
    font-weight:850!important;
}
.pcba-cc-bom-picking-table .pcba-cc-sheet-table--release tbody td{
    min-height:44px!important;
    padding:4px 6px!important;
    border-right:1px solid #c7d1dd!important;
    border-bottom:2px solid #c1cbd7!important;
    vertical-align:middle!important;
}
.pcba-cc-bom-picking-table .pcba-cc-sheet-table--release th:last-child,
.pcba-cc-bom-picking-table .pcba-cc-sheet-table--release td:last-child{
    border-right:0!important;
}
.pcba-cc-bom-picking-table .pcba-cc-col-select{
    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;
    padding-left:2px!important;
    padding-right:2px!important;
}
.pcba-cc-bom-picking-table .pcba-cc-col-select input[type="checkbox"]{
    width:14px!important;
    height:14px!important;
    margin:0!important;
}
.pcba-cc-bom-picking-toolbar{
    margin:8px 0!important;
    padding:7px 9px!important;
    border-color:#cbd5e1!important;
    border-radius:7px!important;
    background:#f8fafc!important;
}
.pcba-cc-bom-picking-filters button,
.pcba-cc-bom-picking-selection button{
    min-height:30px!important;
    padding:5px 10px!important;
    border-radius:6px!important;
    font-size:12px!important;
}
.pcba-cc-bom-picking-table .pcba-cc-bom-sku-editor{
    gap:2px!important;
    padding:2px 3px 3px!important;
}
.pcba-cc-bom-picking-table .pcba-cc-bom-sku-editor>small:first-child{
    font-size:9px!important;
    line-height:1.1!important;
}
.pcba-cc-bom-picking-table .pcba-cc-bom-sku-inputrow>input{
    height:28px!important;
    min-height:28px!important;
    padding:3px 6px!important;
    border-radius:5px!important;
    font-size:11px!important;
}
.pcba-cc-bom-picking-table .pcba-cc-bom-sku-inputrow .pcba-cc-bom-sku-search{
    width:28px!important;
    min-width:28px!important;
    height:28px!important;
    border-radius:5px!important;
}
.pcba-cc-bom-picking-table .pcba-cc-bom-picked-input,
.pcba-cc-bom-picking-table .pcba-cc-col-note input,
.pcba-cc-bom-picking-table .pcba-cc-bom-picker-status{
    min-height:28px!important;
    height:28px!important;
    padding:3px 6px!important;
    border-radius:5px!important;
    font-size:11px!important;
}
.pcba-cc-bom-picking-table .pcba-cc-bom-picker-status{
    border:1px solid #cbd5e1!important;
    background:#fff!important;
}
.pcba-cc-bom-picking-table .pcba-cc-bom-stock-out,
.pcba-cc-bom-picking-table .pcba-cc-bom-warning{
    padding:1px 5px!important;
    font-size:9px!important;
}
/* Completed rows become a neutral dark-gray band so action rows stand out. */
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim{
    opacity:1!important;
    filter:grayscale(.70)!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim>td{
    background:#dfe3e8!important;
    color:#747d88!important;
    border-bottom-color:#aeb9c5!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim .pcba-cc-sheet-component strong,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim .pcba-cc-sheet-number strong{
    color:#737c86!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim input,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim select,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim [data-pcba-bom-row-stock]{
    background:#e9ecef!important;
    color:#7f8893!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim:hover>td,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-complete-dim:focus-within>td{
    background:#d5dbe1!important;
}
/* Strong left status marker + brighter attention rows. */
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-shortage>td{
    background:#fff4f4!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-shortage>td:first-child{
    box-shadow:inset 4px 0 0 #e5484d!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-waiting>td{
    background:#fff!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-waiting>td:first-child{
    box-shadow:inset 4px 0 0 #4c8df6!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-purchase>td,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-picking>td{
    background:#fffaf0!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-purchase>td:first-child,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-picking>td:first-child{
    box-shadow:inset 4px 0 0 #e0a42b!important;
}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-shortage:hover>td{background:#ffeaea!important}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-waiting:hover>td{background:#f3f8ff!important}
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-purchase:hover>td,
.pcba-cc-bom-picking-table tr.pcba-cc-sheet-row.is-picking:hover>td{background:#fff4da!important}
.pcba-cc-bom-picking-table .pcba-cc-sheet-row.is-shortage .pcba-cc-bom-picker-status{
    background:#fff0f1!important;border-color:#ff9ca0!important;color:#c92f37!important
}
.pcba-cc-bom-picking-table .pcba-cc-sheet-row.is-waiting .pcba-cc-bom-picker-status{
    background:#eef5ff!important;border-color:#9cbff5!important;color:#1d60c4!important
}
.pcba-cc-bom-picking-table .pcba-cc-sheet-row.is-ready .pcba-cc-bom-picker-status{
    background:#e1e7e4!important;border-color:#b9c6bf!important;color:#617d6d!important
}

/* v0.16.42 - Compact Google-Sheet-style Purchase Center */
.pcba-cc-purchase-view{
    gap:8px!important;
}
.pcba-cc-purchase-head{
    gap:8px!important;
    padding-bottom:0!important;
}
.pcba-cc-purchase-create-button{
    min-height:31px!important;
    height:31px;
    border-radius:6px!important;
    padding:4px 10px!important;
    font-size:11px!important;
    box-shadow:none!important;
}
.pcba-cc-purchase-create-button.is-compact{
    min-height:27px!important;
    height:27px!important;
    padding:3px 7px!important;
    border-radius:5px!important;
    font-size:10px!important;
}
.pcba-cc-purchase-kpis{
    grid-template-columns:repeat(6,minmax(105px,1fr))!important;
    gap:5px!important;
}
.pcba-cc-purchase-kpi{
    min-height:50px!important;
    gap:7px!important;
    border-color:#c7d1dd!important;
    border-radius:6px!important;
    padding:6px 8px!important;
    box-shadow:none!important;
}
.pcba-cc-purchase-kpi:hover{
    border-color:#9fb0c3!important;
    background:#f8fafc!important;
}
.pcba-cc-purchase-kpi>span{
    width:26px!important;
    height:26px!important;
    border-radius:5px!important;
    font-size:14px!important;
}
.pcba-cc-purchase-kpi div{gap:1px!important}
.pcba-cc-purchase-kpi small{
    font-size:8.5px!important;
    line-height:1.15!important;
}
.pcba-cc-purchase-kpi strong{
    font-size:16px!important;
    line-height:1!important;
}
.pcba-cc-purchase-tabs{
    gap:4px!important;
    padding:5px!important;
    border-color:#c7d1dd!important;
    border-radius:7px!important;
    background:#f8fafc!important;
}
.pcba-cc-purchase-tabs button{
    min-height:29px!important;
    height:29px;
    gap:4px!important;
    border-color:#cbd5e1!important;
    border-radius:5px!important;
    padding:4px 8px!important;
    background:#fff!important;
    font-size:10.5px!important;
}
.pcba-cc-purchase-tabs button b{font-size:12px!important}
.pcba-cc-purchase-tabs button.is-active{
    border-color:#78aef5!important;
    background:#eaf3ff!important;
    color:#175db7!important;
    box-shadow:inset 0 -2px 0 #4c8df6!important;
}
.pcba-cc-purchase-type-filters,
.pcba-cc-purchase-quick-filters{
    gap:4px!important;
}
.pcba-cc-purchase-type-filters button,
.pcba-cc-purchase-quick-filters button,
.pcba-cc-purchase-create-filter-buttons button{
    min-height:27px!important;
    padding:3px 8px!important;
    border-radius:5px!important;
    border-color:#cbd5e1!important;
    font-size:10px!important;
}
.pcba-cc-purchase-filters{
    grid-template-columns:minmax(220px,1fr) minmax(160px,.3fr) auto!important;
    gap:6px!important;
    padding:6px 8px!important;
    border-color:#c7d1dd!important;
    border-radius:7px!important;
    background:#f8fafc!important;
}
.pcba-cc-purchase-filters label{gap:2px!important}
.pcba-cc-purchase-filters label>span{font-size:8.5px!important}
.pcba-cc-purchase-filters input,
.pcba-cc-purchase-filters select,
.pcba-cc-purchase-table-main select,
.pcba-cc-pmh-list select{
    min-height:28px!important;
    height:28px!important;
    border-radius:5px!important;
    padding:3px 6px!important;
    font-size:10.5px!important;
}
.pcba-cc-purchase-filters button{
    min-height:28px!important;
    height:28px!important;
    border-radius:5px!important;
    padding:3px 9px!important;
    font-size:10.5px!important;
}
.pcba-cc-purchase-unified-panel{
    border-color:#c7d1dd!important;
    border-radius:7px!important;
    overflow:hidden!important;
}
.pcba-cc-purchase-unified-panel>.pcba-cc-panel__head{
    min-height:38px!important;
    padding:6px 9px!important;
    border-bottom:1px solid #c7d1dd!important;
    background:#f8fafc!important;
}
.pcba-cc-purchase-unified-panel>.pcba-cc-panel__head h3{
    font-size:13px!important;
    margin:0!important;
}
.pcba-cc-purchase-unified-panel>.pcba-cc-panel__head small{
    font-size:9px!important;
}
.pcba-cc-purchase-unified-panel>.pcba-cc-panel__body{
    padding:0!important;
}
.pcba-cc-purchase-view .pcba-cc-table-wrap{
    border-radius:0!important;
    border:0!important;
}
.pcba-cc-purchase-view .pcba-cc-table,
.pcba-cc-purchase-view .pcba-cc-purchase-receive-table table{
    border-collapse:separate!important;
    border-spacing:0!important;
}
.pcba-cc-purchase-view .pcba-cc-table thead th,
.pcba-cc-purchase-view .pcba-cc-purchase-receive-table thead th{
    position:sticky!important;
    top:0;
    z-index:3;
    height:32px!important;
    padding:4px 6px!important;
    background:#eef2f6!important;
    border-right:1px solid #bcc7d4!important;
    border-bottom:2px solid #adb9c7!important;
    color:#56677d!important;
    font-size:9.5px!important;
    font-weight:850!important;
}
.pcba-cc-purchase-view .pcba-cc-table tbody td,
.pcba-cc-purchase-view .pcba-cc-purchase-receive-table tbody td{
    padding:4px 6px!important;
    border-right:1px solid #c7d1dd!important;
    border-bottom:2px solid #c1cbd7!important;
    vertical-align:middle!important;
    font-size:10.5px!important;
}
.pcba-cc-purchase-view .pcba-cc-table th:last-child,
.pcba-cc-purchase-view .pcba-cc-table td:last-child,
.pcba-cc-purchase-view .pcba-cc-purchase-receive-table th:last-child,
.pcba-cc-purchase-view .pcba-cc-purchase-receive-table td:last-child{
    border-right:0!important;
}
.pcba-cc-purchase-view .pcba-cc-table td strong{
    font-size:10.5px!important;
    line-height:1.2!important;
}
.pcba-cc-purchase-view .pcba-cc-table td small{
    margin-top:2px!important;
    font-size:8.8px!important;
    line-height:1.2!important;
}
.pcba-cc-purchase-view .pcba-cc-purchase-note-cell textarea{
    min-height:30px!important;
    height:30px!important;
    border-radius:5px!important;
    padding:3px 6px!important;
    font-size:10px!important;
    resize:vertical;
}
.pcba-cc-purchase-status,
.pcba-cc-pmh-status,
.pcba-cc-pcb-order-status{
    min-height:23px!important;
    border-radius:4px!important;
    padding:3px 6px!important;
    font-size:9.5px!important;
    line-height:1.1!important;
}
.pcba-cc-purchase-deadline{
    margin-top:3px!important;
    border-radius:4px!important;
    padding:2px 5px!important;
    font-size:8px!important;
}
.pcba-cc-purchase-open-mini,
.pcba-cc-purchase-delete-btn.is-compact{
    min-height:24px!important;
    padding:2px 6px!important;
    border-radius:4px!important;
    font-size:9px!important;
}
.pcba-cc-pmh-toolbar{
    padding:6px 8px!important;
    border-bottom:1px solid #c7d1dd!important;
    background:#fbfcfe!important;
}
.pcba-cc-pmh-toolbar b{font-size:11px!important}
.pcba-cc-pmh-toolbar small{margin-top:1px!important;font-size:9px!important}
.pcba-cc-pmh-actions{gap:4px!important}
.pcba-cc-pmh-received-ok{font-size:9.5px!important}

/* Clear status band like the picking sheet. */
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row>td:first-child{
    box-shadow:inset 4px 0 0 #94a3b8;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-requested>td:first-child,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-draft>td:first-child{
    box-shadow:inset 4px 0 0 #4c8df6;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-buying>td:first-child,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-ordered>td:first-child,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-waiting>td:first-child{
    box-shadow:inset 4px 0 0 #e0a42b;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-receiving>td:first-child{
    box-shadow:inset 4px 0 0 #0891b2;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-requested>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-draft>td{
    background:#fff!important;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-buying>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-ordered>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-waiting>td{
    background:#fffaf0!important;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-receiving>td{
    background:#f2fcff!important;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-completed>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-received>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-complete>td{
    background:#dfe3e8!important;
    color:#747d88!important;
    border-bottom-color:#aeb9c5!important;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-completed,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-received,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-complete{
    filter:grayscale(.62);
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-cancelled>td{
    background:#e8ebef!important;
    color:#87909b!important;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row:hover>td{
    filter:none!important;
    background:#f3f8ff!important;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-buying:hover>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-ordered:hover>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-waiting:hover>td{
    background:#fff4da!important;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-receiving:hover>td{
    background:#e8f9fd!important;
}
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-completed:hover>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-status-received:hover>td,
.pcba-cc-purchase-view tr.pcba-cc-purchase-list-row.is-complete:hover>td{
    background:#d5dbe1!important;
}

/* Receive sheet compact too. */
.pcba-cc-pmh-receive-panel .pcba-cc-purchase-receive-help{
    margin:7px 10px!important;
    padding:7px 9px!important;
    border-radius:6px!important;
    font-size:9.5px!important;
}
.pcba-cc-pmh-receive-panel .pcba-cc-purchase-receive-table{
    margin:0 10px!important;
    border-color:#c7d1dd!important;
    border-radius:6px!important;
}
.pcba-cc-pmh-receive-panel .pcba-cc-purchase-receive-table input{
    min-height:27px!important;
    height:27px!important;
    border-radius:4px!important;
    padding:3px 5px!important;
}
.pcba-cc-pmh-receive-panel .pcba-cc-purchase-receive-foot{
    padding:7px 10px!important;
}
.pcba-cc-pmh-receipt-history{
    margin:7px 10px 3px!important;
    padding:7px 9px!important;
    border-radius:6px!important;
}
.pcba-cc-pmh-receipt-history span{
    padding:4px 6px!important;
    border-radius:5px!important;
}

@media(max-width:1250px){
    .pcba-cc-purchase-kpis{grid-template-columns:repeat(3,minmax(120px,1fr))!important}
}
@media(max-width:760px){
    .pcba-cc-purchase-kpis{grid-template-columns:repeat(2,minmax(110px,1fr))!important}
    .pcba-cc-purchase-filters{grid-template-columns:1fr!important}
}


/* v0.16.43 - Compact DNMH detail header / purchase workflow top area */
.pcba-cc-purchase-detail-panel > .pcba-cc-modal__head{
    padding:8px 10px!important;
    gap:9px!important;
    background:#fff;
}
.pcba-cc-purchase-detail-panel > .pcba-cc-modal__head small{
    font-size:8.5px!important;
    line-height:1.2;
    color:#64748b;
    font-weight:850;
}
.pcba-cc-purchase-detail-panel > .pcba-cc-modal__head h3{
    margin:1px 0 0!important;
    font-size:15px!important;
    line-height:1.15!important;
}
.pcba-cc-purchase-detail-panel > .pcba-cc-modal__head p{
    margin:2px 0 0!important;
    font-size:9.5px!important;
    line-height:1.25!important;
}
.pcba-cc-purchase-detail-panel > .pcba-cc-modal__head button{
    width:28px!important;
    height:28px!important;
    min-width:28px!important;
    border-radius:6px!important;
    font-size:18px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-meta{
    grid-template-columns:1fr 1fr 1fr .8fr!important;
    gap:6px!important;
    padding:6px 10px!important;
    background:#f6f8fb!important;
    border-bottom:1px solid #cbd5e1!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-meta>div,
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-meta label{
    gap:2px!important;
    min-width:0;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-meta span{
    font-size:8px!important;
    letter-spacing:.02em;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-meta strong{
    font-size:11px!important;
    line-height:1.25;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-meta select{
    min-height:29px!important;
    height:29px!important;
    border-radius:5px!important;
    padding:2px 7px!important;
    font-size:10.5px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-deadline{
    margin-top:1px!important;
    padding:2px 6px!important;
    font-size:8px!important;
    border-radius:5px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-status{
    min-height:23px;
    padding:3px 7px!important;
    border-radius:5px!important;
    font-size:9px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-start-btn{
    margin-top:2px!important;
    min-height:24px;
    padding:3px 7px!important;
    border-radius:5px!important;
    font-size:8.5px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-request-note{
    padding:6px 10px!important;
    background:#fffdf5!important;
    border-bottom:1px solid #d9e1ea!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-request-note label{
    gap:3px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-request-note label>span{
    font-size:8px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-request-note textarea{
    min-height:38px!important;
    height:38px;
    padding:5px 7px!important;
    border-radius:5px!important;
    font-size:10px!important;
    line-height:1.25!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-request-note small{
    font-size:8px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-dnmh-info{
    margin:6px 10px!important;
    padding:6px 8px!important;
    border-radius:6px!important;
    font-size:9.5px!important;
    line-height:1.35!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-flow{
    gap:5px!important;
    padding:5px 10px!important;
    background:#fbfcfe;
    border-top:1px solid #e2e8f0;
    border-bottom:1px solid #cbd5e1!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-flow span{
    padding:3px 7px!important;
    border-radius:5px!important;
    font-size:8.5px!important;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-flow i{
    font-size:11px;
}
.pcba-cc-purchase-detail-panel .pcba-cc-purchase-sheet-toolbar{
    padding-top:6px!important;
    padding-bottom:6px!important;
}
@media(max-width:720px){
    .pcba-cc-purchase-detail-panel .pcba-cc-purchase-detail-meta{
        grid-template-columns:1fr 1fr!important;
    }
}


/* v0.16.45 - purchase workflow normalization */
.pcba-cc-dnmh-actionbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 10px;border-top:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1;background:#f8fafc}.pcba-cc-dnmh-actionbar>div{display:flex;gap:6px;align-items:center}.pcba-cc-dnmh-actionbar button{min-height:30px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;font-weight:700;padding:0 9px}.pcba-cc-dnmh-progress-table td,.pcba-cc-dnmh-progress-table th{border-right:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1}.pcba-cc-dnmh-progress-table .num{text-align:center}.pcba-cc-dnmh-progress-row.is-received{background:#e2e6ea;color:#6f7782}.pcba-cc-dnmh-progress-row.is-received td{background:#e2e6ea}.pcba-cc-dnmh-progress-row.is-receiving{background:#f2f8ff}.pcba-cc-dnmh-progress-row.is-ordered,.pcba-cc-dnmh-progress-row.is-partial{background:#fffaf0}.pcba-cc-dnmh-progress-row.is-requested{background:#fff}.pcba-cc-dnmh-pmh-links{display:grid;gap:4px}.pcba-cc-dnmh-pmh-links>span{display:block;border:1px solid #d7e0eb;border-radius:5px;padding:4px 6px;background:#fff}.pcba-cc-dnmh-pmh-links small{display:block;color:#6b7788;font-size:10px}.pcba-cc-dnmh-no-pmh{color:#7b8797}.pcba-cc-dnmh-legacy{display:block;color:#9a6713;background:#fff7df;border:1px solid #ecd38a;border-radius:5px;padding:4px 6px;font-size:10px}.pcba-cc-dnmh-line-status{display:inline-flex;padding:3px 7px;border-radius:5px;font-size:10px;font-weight:800}.pcba-cc-dnmh-line-status.is-received{background:#d7e3dc;color:#587563}.pcba-cc-dnmh-line-status.is-receiving{background:#e7f2ff;color:#245fa6}.pcba-cc-dnmh-line-status.is-ordered,.pcba-cc-dnmh-line-status.is-partial{background:#fff0c9;color:#8f6215}.pcba-cc-dnmh-line-status.is-requested{background:#eef2f7;color:#5d6876}.pcba-cc-dnmh-line-status.is-legacy{background:#fff1d6;color:#916111}.is-good-text{color:#178a57}.pcba-cc-pmh-code-button{border:0;background:transparent;padding:0;cursor:pointer;color:#164f97;text-align:left}.pcba-cc-pmh-detail-panel{width:min(1320px,97vw)!important}.pcba-cc-pmh-detail-table input{height:30px;min-width:90px}.pcba-cc-pmh-detail-table .num{text-align:center}.pcba-cc-pmh-detail-meta{grid-template-columns:repeat(5,minmax(150px,1fr))}.pcba-cc-pmh-detail-meta .is-wide{grid-column:span 2}.pcba-cc-pmh-detail-table tr:has(input:disabled){background:#f5f6f8}.pcba-cc-bill-candidate-table tr[hidden]{display:none!important}.pcba-cc-pmh-actions{display:flex;flex-wrap:wrap;gap:4px}.pcba-cc-pmh-actions .is-compact{min-height:27px;padding:0 7px}.pcba-cc-purchase-kpi small{line-height:1.1}
@media(max-width:980px){.pcba-cc-pmh-detail-meta{grid-template-columns:1fr 1fr}.pcba-cc-pmh-detail-meta .is-wide{grid-column:1/-1}.pcba-cc-dnmh-actionbar{align-items:stretch;flex-direction:column}}
.pcba-cc-dnmh-summary{display:grid;grid-template-columns:repeat(5,minmax(110px,1fr));gap:6px;padding:7px 10px;background:#fff;border-bottom:1px solid #d5dde7}.pcba-cc-dnmh-summary span{border:1px solid #d8e0ea;border-radius:5px;padding:5px 7px;background:#f8fafc}.pcba-cc-dnmh-summary small{display:block;font-size:9px;color:#718096;text-transform:uppercase;font-weight:700}.pcba-cc-dnmh-summary b{font-size:14px}.pcba-cc-dnmh-summary .is-danger{background:#fff4f4}.pcba-cc-dnmh-summary .is-order{background:#fff9eb}.pcba-cc-dnmh-summary .is-receive{background:#eef6ff}.pcba-cc-dnmh-summary .is-done{background:#e5e9ed;color:#69727d}@media(max-width:900px){.pcba-cc-dnmh-summary{grid-template-columns:repeat(2,1fr)}}
/* v0.16.45 - purchase audit: PMH/Bill vendor source */
.pcba-cc-vendor-price-table tr.is-legacy td{background:#eef0f3!important;color:#747d88}.pcba-cc-vendor-price-table td,.pcba-cc-vendor-price-table th{border-right:1px solid #cbd5e1!important;border-bottom:1px solid #cbd5e1!important}.pcba-cc-vendor-price-table small{display:block;font-size:9.5px;color:#7b8797;margin-top:2px}.pcba-cc-pmh-detail-table td small{display:block;font-size:9.5px;color:#7b8797;margin-top:2px}.pcba-cc-pmh-detail-table td:nth-child(6){min-width:86px}.pcba-cc-purchase-bill-modal .pcba-cc-bill-candidate-table td,.pcba-cc-purchase-bill-modal .pcba-cc-bill-candidate-table th{border-right:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1}

/* v0.16.46 - Clean DNMH detail: DNMH only tracks demand/progress; PMH owns ordering. */
.pcba-cc-dnmh-next-action{display:flex;align-items:center;gap:8px;margin-left:auto}.pcba-cc-dnmh-next-action small{color:#607086;font-size:10px}.pcba-cc-dnmh-actionbar button:disabled{opacity:.42;cursor:not-allowed}.pcba-cc-dnmh-pmh-open{border:0;background:transparent;padding:0;color:#155aa8;font-weight:800;font-size:11px;cursor:pointer;text-align:left}.pcba-cc-dnmh-pmh-open:hover{text-decoration:underline}.pcba-cc-dnmh-progress-row.is-received{opacity:.66}.pcba-cc-dnmh-progress-row.is-received:hover{opacity:.92}.pcba-cc-dnmh-progress-table th{background:#eef2f6!important;border-bottom:2px solid #b9c5d3!important}.pcba-cc-dnmh-progress-table td{border-bottom:2px solid #cbd5e1!important}.pcba-cc-dnmh-progress-row.is-requested td:first-child{border-left:4px solid #4c8df6}.pcba-cc-dnmh-progress-row.is-ordered td:first-child,.pcba-cc-dnmh-progress-row.is-partial td:first-child{border-left:4px solid #e0a42b}.pcba-cc-dnmh-progress-row.is-receiving td:first-child{border-left:4px solid #2f7fd1}.pcba-cc-dnmh-progress-row.is-received td:first-child{border-left:4px solid #aeb7c2}.pcba-cc-dnmh-progress-table .is-check{width:42px;text-align:center}.pcba-cc-dnmh-progress-table .is-check input{width:15px;height:15px}.pcba-cc-dnmh-progress-table td>small{display:block;margin-top:3px;color:#718096;font-size:10px}@media(max-width:980px){.pcba-cc-dnmh-next-action{margin-left:0;justify-content:space-between;width:100%;flex-wrap:wrap}}

/* v0.16.47 - PMH receiving allocation + SX handoff confirmation */
.pcba-cc-pmh-receive-panel.is-allocation{width:min(1380px,96vw);max-height:94vh;overflow:auto}
.pcba-cc-purchase-receive-help.is-new-flow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;border:1px solid #b9d8ff;background:#f5f9ff;padding:8px 10px;margin:8px 10px;border-radius:7px;font-size:11px}
.pcba-cc-purchase-receive-help.is-new-flow>span{flex:1;min-width:320px}
.pcba-cc-receive-line{margin:10px;border:1px solid #cbd6e4;border-radius:8px;overflow:hidden;background:#fff}
.pcba-cc-receive-line.is-invalid-allocation{border-color:#e95a5f;box-shadow:0 0 0 2px rgba(233,90,95,.08)}
.pcba-cc-receive-line__head{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:8px 10px;background:#f8fafc;border-bottom:1px solid #d6e0ea}
.pcba-cc-receive-line__head>div:first-child{min-width:220px}
.pcba-cc-receive-line__head strong{display:block;font-size:12px}
.pcba-cc-receive-line__head small{display:block;color:#76859a;font-size:10px;margin-top:2px}
.pcba-cc-receive-line__stats{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:10px}
.pcba-cc-receive-line__stats span{padding:4px 7px;border:1px solid #d5deea;border-radius:5px;background:#fff}
.pcba-cc-receive-line__stats label{display:flex;align-items:center;gap:5px;font-weight:700}
.pcba-cc-receive-line__stats input{width:88px;height:28px;border:1px solid #c8d4e2;border-radius:5px;padding:0 7px;text-align:center;font-weight:700}
.pcba-cc-receive-alloc-table{overflow:auto}
.pcba-cc-receive-alloc-table table{width:100%;border-collapse:collapse;table-layout:fixed}
.pcba-cc-receive-alloc-table th,.pcba-cc-receive-alloc-table td{border-right:1px solid #d4dde8;border-bottom:1px solid #d4dde8;padding:6px 7px;font-size:10px;vertical-align:middle}
.pcba-cc-receive-alloc-table th{background:#eef2f6;text-transform:uppercase;color:#596a7f;font-size:9px}
.pcba-cc-receive-alloc-table td:last-child,.pcba-cc-receive-alloc-table th:last-child{border-right:0}
.pcba-cc-receive-alloc-table td small{display:block;color:#7e8b9c;margin-top:2px}
.pcba-cc-receive-alloc-table input{width:90px;height:28px;border:1px solid #c8d4e2;border-radius:5px;padding:0 7px;text-align:center;font-weight:700}
.pcba-cc-receive-source-badge,.pcba-cc-muted-label{display:inline-block;padding:2px 6px;border-radius:999px;font-size:9px;font-weight:800;margin-right:4px}
.pcba-cc-receive-source-badge{background:#e9f7ef;color:#18764d}.pcba-cc-muted-label{background:#f0f2f5;color:#788596}
.pcba-cc-receive-line__summary{display:flex;justify-content:flex-end;gap:16px;padding:6px 10px;background:#fbfcfe;font-size:10px;border-top:1px solid #e1e7ee}
.pcba-cc-purchase-receive-foot.is-summary{display:flex;gap:12px;align-items:flex-end;justify-content:space-between;padding:9px 10px;border-top:1px solid #d5deea;background:#fbfcfe}
.pcba-cc-purchase-receive-foot.is-summary label{flex:1}
.pcba-cc-receive-totals{display:flex;gap:6px;flex-wrap:wrap}
.pcba-cc-receive-totals span{border:1px solid #cad6e5;background:#fff;border-radius:6px;padding:7px 9px;font-size:10px}.pcba-cc-receive-totals b{font-size:12px}
.pcba-cc-bom-handoff-list{display:grid;gap:4px;margin:4px 0}
.pcba-cc-bom-handoff-pending{border:1px solid #cbbdf7;background:#f7f4ff;border-radius:5px;padding:5px 6px;color:#6049a6;font-size:10px;line-height:1.3}
.pcba-cc-bom-handoff-pending>span{display:block;margin-bottom:4px}
.pcba-cc-bom-handoff-pending>div{display:flex;gap:4px;flex-wrap:wrap}
.pcba-cc-handoff-btn{height:24px;padding:0 6px;border:1px solid #c8d3e1;border-radius:4px;background:#fff;color:#45556a;font-size:9px;font-weight:800;cursor:pointer}
.pcba-cc-handoff-btn.is-confirm{border-color:#9fd4b8;background:#effaf4;color:#176c47}.pcba-cc-handoff-btn.is-reject{border-color:#efb1b1;background:#fff2f2;color:#b73535}
@media(max-width:900px){.pcba-cc-receive-line__head{align-items:flex-start;flex-direction:column}.pcba-cc-purchase-receive-foot.is-summary{align-items:stretch;flex-direction:column}.pcba-cc-receive-totals{justify-content:flex-start}}
.pcba-cc-pmh-handoff-wait{display:block;margin-top:4px;padding:3px 6px;border-radius:5px;background:#f3efff;color:#654db1;font-size:9px;font-weight:800;white-space:nowrap}
