:root {
    --bc-bg: #f5f6f8;
    --bc-surface: #ffffff;
    --bc-ribbon: #faf9f8;
    --bc-border: #e1dfdd;
    --bc-border-soft: #edebe9;
    --bc-text: #323130;
    --bc-text-muted: #605e5c;
    --bc-primary: #0f6cbd;
    --bc-hover: #eff6fc;
    --bc-selected: #dbeafe;
    --bc-input-border: #c8c6c4;
    --bc-disabled: #f3f2f1;
}

html,
body {
    margin: 0;
    background: var(--bc-bg);
    color: var(--bc-text);
    font-family: "Segoe UI Variable Text", "Segoe UI", sans-serif;
    font-size: 13px;
}

.bc-shell {
    min-height: 100vh;
    background: var(--bc-bg);
}

.bc-topbar {
    height: 34px;
    background: #f3f2f1;
    border-bottom: 1px solid var(--bc-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 18px;
}

/* Entity bar (all _Layout pages): entity name top-left links home, as in BC; the per-page .bc-topbar is superseded. */
.bc-entitybar {
    height: 34px;
    background: #f3f2f1;
    border-bottom: 1px solid var(--bc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
}
.bc-entitybar-name { color: var(--bc-text); font-weight: 600; font-size: 13px; text-decoration: none; }
.bc-entitybar-name:hover { text-decoration: underline; }
.bc-topbar { display: none; }

.bc-app {
    font-weight: 600;
}

.bc-company {
    color: var(--bc-text-muted);
}

.bc-company-switcher {
    display: flex;
    align-items: center;
}

.bc-company-switcher select {
    border: none;
    background: transparent;
    color: var(--bc-text-muted);
    font-size: 12px;
    font-family: inherit;
    padding: 0 2px;
    cursor: pointer;
}

.bc-company-switcher select:hover,
.bc-company-switcher select:focus {
    color: var(--bc-text);
}

.bc-ribbon {
    background: white;
    border-bottom: 1px solid var(--bc-border);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}

.bc-ribbon-tabs {
    border-top: 1px solid var(--bc-border);
    border-bottom: 1px solid var(--bc-border);
    display: flex;
    gap: 18px;
    min-height: 38px;
    overflow-x: auto;
    padding: 0 20px;
}

.bc-ribbon-tabs button {
    background: transparent;
    border: 0;
    color: var(--bc-text);
    cursor: pointer;
    font-size: 14px;
    padding: 0;
    position: relative;
    white-space: nowrap;
}

.bc-ribbon-tabs button::after {
    background: transparent;
    bottom: 6px;
    content: "";
    height: 3px;
    left: 0;
    position: absolute;
    right: 0;
}

.bc-ribbon-tabs button.is-active {
    color: #008c95;
}

.bc-ribbon-tabs button.is-active::after {
    background: #008c95;
}

.bc-ribbon-tabs button[data-ribbon-tab="more-options"] {
    border-left: 1px solid #9aa6b2;
    color: #5d6978;
    padding-left: 20px;
}

.bc-ribbon-panels {
    min-height: 44px;
    position: relative;
}

.bc-ribbon-panel {
    align-items: center;
    display: none;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 44px;
    padding: 6px 20px;
}

.bc-ribbon-panel.is-active {
    display: flex;
}

.bc-ribbon--hover {
    position: relative;
}

.bc-ribbon--hover .bc-ribbon-panels {
    background: white;
    border-bottom: 1px solid var(--bc-border);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
    display: none;
    left: 0;
    position: absolute;
    top: 100%;
    width: 100%;
    z-index: 20;
}

.bc-ribbon--hover:hover .bc-ribbon-panels,
.bc-ribbon--hover:focus-within .bc-ribbon-panels {
    display: block;
}

.bc-ribbon-action,
.bc-header-actions button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: var(--bc-text);
    cursor: pointer;
    font-size: 13px;
    min-height: 30px;
    padding: 5px 8px;
    white-space: nowrap;
}

.bc-ribbon-action {
    text-decoration: none;
}

.bc-sales-quote-action {
    align-items: center;
    display: inline-flex;
    gap: 4px;
}

/* Buttons with their own icon drop the generic square. (Same specificity as the rule further down,
   so this one must be the more specific selector to win.) */
.bc-ribbon-action.bc-sales-quote-action::before,
.bc-ribbon-action:has(> .bc-printer-icon)::before {
    content: none;
}

.bc-printer-icon {
    fill: #008c95;
    flex: 0 0 16px;
    height: 16px;
    width: 16px;
}

.bc-ribbon-action:hover {
    color: var(--bc-text);
}

.bc-ribbon-action::before {
    color: #008c95;
    content: "▣";
    display: inline-block;
    font-size: 12px;
    margin-right: 5px;
}

.bc-ribbon-action:hover,
.bc-header-actions button:hover {
    background: var(--bc-hover);
    border-color: var(--bc-border);
}

.bc-ribbon-action.is-disabled {
    color: #a4acb7;
    cursor: pointer;
}

.bc-ribbon-action.is-disabled::before {
    color: #a4acb7;
}

.bc-ribbon-action.is-highlighted {
    background: #bdeff3;
    color: var(--bc-text);
    padding-left: 10px;
    padding-right: 10px;
}

.bc-ribbon-split {
    align-self: stretch;
    background: transparent;
    border: 0;
    border-left: 1px solid #9aa6b2;
    cursor: pointer;
    margin-left: -8px;
    position: relative;
    width: 22px;
}

.bc-ribbon-split::after {
    border-bottom: 1px solid var(--bc-text);
    border-right: 1px solid var(--bc-text);
    content: "";
    height: 7px;
    left: 6px;
    position: absolute;
    top: 17px;
    transform: rotate(45deg);
    width: 7px;
}

.bc-ribbon-menu {
    position: relative;
}

.bc-ribbon-menu .bc-ribbon-action::after {
    border-bottom: 1px solid #008c95;
    border-right: 1px solid #008c95;
    content: "";
    display: inline-block;
    height: 7px;
    margin-left: 8px;
    transform: rotate(45deg) translateY(-3px);
    width: 7px;
}

.bc-ribbon-dropdown {
    background: white;
    border: 1px solid var(--bc-border);
    box-shadow: 0 3px 10px rgba(0, 0, 0, .18);
    display: none;
    min-width: 320px;
    padding: 6px 0;
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 10;
}

.bc-ribbon-menu.is-open .bc-ribbon-dropdown {
    display: grid;
}

.bc-ribbon-dropdown button {
    background: white;
    border: 0;
    color: var(--bc-text);
    cursor: pointer;
    font-size: 13px;
    padding: 9px 12px;
    text-align: left;
}

.bc-ribbon-dropdown button:hover {
    background: var(--bc-hover);
}

.bc-ribbon-dropdown button.is-disabled {
    color: #a4acb7;
    cursor: default;
}

.bc-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 30px 8px;
}

.bc-back {
    color: var(--bc-primary);
    font-size: 13px;
    margin-bottom: 6px;
}

a.bc-back {
    text-decoration: none;
}

a.bc-back:hover {
    text-decoration: underline;
}

/* The "‹ Sales Quotes" link that sits above the ribbon. */
.bc-back-bar {
    background: white;
    padding: 8px 20px 0;
}

.bc-back-bar .bc-back {
    display: inline-block;
    margin-bottom: 8px;
}

.bc-page-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
}

.bc-content {
    display: flex;
    gap: 16px;
    padding: 8px 30px 30px;
}

.bc-main {
    flex: 1;
    min-width: 0;
}

.bc-fasttab {
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

.bc-fasttab-title {
    background: var(--bc-surface);
    color: var(--bc-text);
    font-size: 15px;
    font-weight: 600;
    padding: 13px 18px;
    border-bottom: 1px solid var(--bc-border-soft);
}

.bc-fasttab-title::before {
    content: "⌄ ";
    color: var(--bc-primary);
    font-weight: 600;
}

.bc-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 8px 28px;
    padding: 15px 18px 18px;
}

.bc-general-fields {
    align-items: start;
}

.bc-field-column {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.bc-field {
    display: grid;
    grid-template-columns: minmax(145px, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.bc-field label {
    color: var(--bc-text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    min-width: 0;
    white-space: nowrap;
}

.bc-field label::after {
    content: "";
    border-bottom: 1px dotted #c8c6c4;
    flex: 1;
    margin-left: 8px;
    min-width: 12px;
}

.bc-required label::before {
    content: "*";
    color: #d13438;
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    margin-right: 5px;
    order: 2;
}

.bc-required label::after {
    order: 1;
}

.bc-field-heading {
    color: var(--bc-text);
    font-weight: 600;
    padding: 4px 0 2px;
}

.bc-field input,
.bc-field select,
.bc-field textarea {
    width: 100%;
    height: 30px;
    border: 1px solid var(--bc-input-border);
    border-radius: 3px;
    background: white;
    color: var(--bc-text);
    padding: 4px 7px;
    font-size: 13px;
    box-sizing: border-box;
    min-width: 0;
}

.bc-field textarea {
    min-height: 50px;
    resize: vertical;
}

.bc-field input:focus,
.bc-field select:focus,
.bc-field textarea:focus,
.bc-line-table input:focus,
.bc-line-table select:focus {
    outline: none;
    border-color: var(--bc-primary);
    box-shadow: 0 0 0 1px var(--bc-primary);
}

.bc-field input[readonly],
.bc-field textarea[readonly],
.bc-line-table input[readonly] {
    background: var(--bc-disabled);
    color: var(--bc-text-muted);
}

.bc-lookup {
    display: flex;
    min-width: 0;
}

.bc-lookup input {
    border-right: 0;
    border-radius: 3px 0 0 3px;
}

.bc-lookup button {
    width: 28px;
    flex: 0 0 28px;
    border: 1px solid var(--bc-input-border);
    border-radius: 0 3px 3px 0;
    background: white;
    color: var(--bc-text);
    cursor: pointer;
    padding: 0;
}

.bc-toggle {
    appearance: none;
    width: 30px !important;
    min-width: 30px !important;
    height: 16px !important;
    border-radius: 999px !important;
    padding: 0 !important;
    background: #6b7280 !important;
    position: relative;
}

.bc-toggle::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: white;
    position: absolute;
    top: 1px;
    left: 2px;
}

.bc-toggle:checked {
    background: var(--bc-primary) !important;
}

.bc-toggle:checked::before {
    left: 15px;
}

.bc-status-value {
    color: #107c10 !important;
    font-weight: 600;
}

.bc-field-tall {
    align-items: start;
}

.bc-line-table {
    width: max-content;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 13px;
}

.bc-line-scroll {
    overflow-x: auto;
    overflow-y: hidden;
}

.bc-line-table th {
    background: var(--bc-ribbon);
    border-bottom: 1px solid var(--bc-border);
    color: var(--bc-text-muted);
    text-align: left;
    font-weight: 600;
    padding: 8px 7px;
    white-space: nowrap;
    font-size: 11px;
    position: relative;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-line-table.is-resizing .bc-column-resizer.is-active::after {
    background: #008c95;
}

.bc-line-table td {
    border-bottom: 1px solid var(--bc-border-soft);
    padding: 3px;
    background: white;
}

.bc-line-table tr:hover td {
    background: var(--bc-hover);
}

.bc-line-table td:first-child {
    border-left: 3px solid transparent;
}

.bc-line-table tr:hover td:first-child {
    border-left-color: var(--bc-primary);
}

.bc-line-table input,
.bc-line-table select {
    width: 100%;
    height: 28px;
    border: 1px solid transparent;
    background: transparent;
    padding: 3px 5px;
    font-size: 13px;
    box-sizing: border-box;
}


.bc-line-table textarea {
    width: 100%;
    height: 28px;
    border: 1px solid transparent;
    background: transparent;
    padding: 4px 5px;
    font: inherit;
    font-size: 13px;
    line-height: 18px;
    box-sizing: border-box;
    resize: none;
    display: block;
    overflow-y: auto;
}

.bc-line-table textarea:focus {
    background: white;
}

.bc-row-resizer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 7px;
    cursor: row-resize;
    touch-action: none;
    z-index: 2;
}

.bc-row-resizer:hover,
.bc-row-resizer.is-active {
    background: #008c95;
    opacity: .6;
}

body.bc-row-resize-active {
    cursor: row-resize;
    user-select: none;
}

.bc-line-table input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 5px auto;
    display: block;
}

.bc-line-table input:focus,
.bc-line-table select:focus {
    background: white;
}

.bc-totals-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(320px, 1fr));
    gap: 8px 28px;
    padding: 15px 18px 18px;
    background: white;
}

.bc-totals-column {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.bc-total-field {
    display: grid;
    grid-template-columns: minmax(145px, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.bc-total-field label {
    color: var(--bc-text-muted);
    display: flex;
    align-items: center;
    font-size: 13px;
    min-width: 0;
    white-space: nowrap;
}

.bc-total-field label::after {
    content: "";
    border-bottom: 1px dotted #c8c6c4;
    flex: 1;
    margin-left: 8px;
    min-width: 12px;
}

.bc-total-field output {
    background: var(--bc-disabled);
    box-sizing: border-box;
    color: var(--bc-text-muted);
    display: block;
    font-size: 13px;
    height: 30px;
    line-height: 20px;
    min-width: 0;
    padding: 4px 7px;
    text-align: right;
    width: 100%;
}

.bc-factbox {
    width: 315px;
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-radius: 6px;
    height: fit-content;
    overflow: hidden;
}

.bc-factbox-title {
    background: var(--bc-ribbon);
    color: var(--bc-text);
    font-weight: 600;
    padding: 12px 14px;
    border-bottom: 1px solid var(--bc-border-soft);
}

.bc-factbox-title::before {
    content: "⌄ ";
    color: var(--bc-primary);
}

.bc-factbox-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--bc-border-soft);
}

.bc-factbox-row span {
    color: var(--bc-text-muted);
}

.bc-factbox-row strong {
    color: var(--bc-primary);
    font-weight: 600;
}

.bc-factbox-note {
    padding: 14px;
    color: var(--bc-text-muted);
    line-height: 1.5;
}

.bc-list-shell {
    background: #f4f5f7;
}

.bc-list-commandbar {
    align-items: center;
    background: #f7f7f8;
    border-bottom: 1px solid #cfd4da;
    display: flex;
    gap: 8px;
    min-height: 58px;
    overflow-x: auto;
    padding: 0 14px;
}

.bc-command,
.bc-icon-command {
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #242424;
    cursor: pointer;
    display: inline-flex;
    font-size: 14px;
    min-height: 34px;
    padding: 5px 10px;
    text-decoration: none;
    white-space: nowrap;
}

.bc-command:hover,
.bc-icon-command:hover {
    background: var(--bc-hover);
    border-color: var(--bc-border);
    color: #242424;
}

.bc-command-new::before {
    color: #008c95;
    content: "+";
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    margin-right: 8px;
}

.bc-command-more {
    border-left-color: #9aa6b2;
    color: #566579;
    margin-left: 6px;
    padding-left: 22px;
}

.bc-command-spacer {
    flex: 1;
    min-width: 18px;
}

.bc-icon-command {
    color: #008c95;
    font-size: 22px;
    justify-content: center;
    min-width: 34px;
    padding: 4px;
}

.bc-list-titlebar {
    padding-bottom: 6px;
}

.bc-list-content {
    padding: 0 38px 30px;
}

.bc-list-main {
    min-width: 0;
}

.bc-document-grid-wrap {
    background: white;
    border: 1px solid var(--bc-border);
    max-height: calc(100vh - 160px);
    overflow: auto;
}

.bc-document-grid {
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
    width: max-content;
}

.bc-document-grid th {
    background: #f4f5f7;
    border-bottom: 1px solid var(--bc-border);
    color: #526172;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    padding: 11px 10px 12px;
    position: relative;
    text-align: left;
    vertical-align: bottom;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-document-grid th.bc-column-menu-cell {
    overflow: visible;
}

.bc-document-grid td {
    background: white;
    border-bottom: 1px solid #d7f2f4;
    color: #111827;
    height: 38px;
    padding: 6px 10px;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bc-document-grid tbody tr:first-child td {
    background: #b9edf1;
}

.bc-document-grid tbody tr:hover td {
    background: var(--bc-hover);
}

.bc-document-grid th:nth-child(2),
.bc-document-grid td:nth-child(2) {
    text-align: center;
}

.bc-column-menu-host {
    display: inline-block;
    margin: -11px -10px -12px;
    position: relative;
    width: auto;
}

.bc-column-menu-trigger {
    align-items: center;
    background: transparent;
    border: 0;
    color: inherit;
    display: inline-flex;
    font: inherit;
    gap: 3px;
    height: 39px;
    justify-content: flex-start;
    padding: 0 7px 0 10px;
    text-align: left;
    width: auto !important;
}

.bc-column-menu-label {
    align-items: center;
    display: inline-flex;
    gap: 3px;
    white-space: nowrap;
}

.bc-column-menu-trigger:hover,
.bc-column-menu-host.is-open .bc-column-menu-trigger {
    background: #eceff3;
}

.bc-column-menu-chevron {
    color: #526172;
    display: inline-block;
    font-size: 10px;
    line-height: 1;
    margin-left: 4px;
    opacity: 0;
    transform: translateY(-1px);
}

.bc-column-menu-cell:hover .bc-column-menu-chevron,
.bc-column-menu-trigger:focus .bc-column-menu-chevron,
.bc-column-menu-host.is-open .bc-column-menu-chevron {
    opacity: 1;
}

.bc-column-menu {
    background: #fff;
    border: 1px solid #d0d5dd;
    box-shadow: 0 2px 6px rgb(0 0 0 / 22%);
    display: none;
    left: 0;
    min-width: 160px;
    padding: 4px 0;
    position: absolute;
    top: 100%;
    z-index: 20;
}

.bc-column-menu-host.is-open .bc-column-menu {
    display: block;
}

.bc-column-menu button {
    align-items: center;
    background: #fff;
    border: 0;
    color: #526172;
    display: flex;
    font-size: 14px;
    gap: 9px;
    min-height: 37px;
    padding: 6px 10px;
    text-align: left;
    width: 100%;
}

.bc-column-menu button:hover,
.bc-column-menu button.is-active {
    background: #d6f0f2;
}

.bc-column-menu button:disabled {
    background: #fff;
    color: #a8b1bc;
    cursor: default;
}

.bc-menu-icon {
    color: #008c95;
    flex: 0 0 17px;
    font-size: 12px;
    font-weight: 600;
    line-height: 0.85;
    min-height: 17px;
    position: relative;
    text-align: center;
}

.bc-filter-icon::before {
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #008c95;
    content: "";
    left: 1px;
    position: absolute;
    top: 2px;
}

.bc-filter-icon::after {
    background: #008c95;
    content: "";
    height: 7px;
    left: 7px;
    position: absolute;
    top: 9px;
    width: 3px;
}

.bc-clear-filter-icon::before {
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 8px solid #9bcdd1;
    content: "";
    left: 0;
    position: absolute;
    top: 2px;
}

.bc-clear-filter-icon::after {
    color: #9bcdd1;
    content: "×";
    font-size: 14px;
    font-weight: 700;
    left: 9px;
    line-height: 1;
    position: absolute;
    top: 7px;
}

.bc-help-icon {
    align-items: center;
    background: #008c95;
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 12px;
    justify-content: center;
    line-height: 17px;
}

.bc-sort-indicator {
    margin-left: 4px;
}

.bc-column-resizer {
    bottom: 0;
    cursor: col-resize;
    position: absolute;
    right: -3px;
    top: 0;
    touch-action: none;
    width: 7px;
    z-index: 2;
}

.bc-column-resizer::after {
    background: transparent;
    bottom: 0;
    content: "";
    left: 3px;
    position: absolute;
    top: 0;
    width: 2px;
}

.bc-column-resizer:hover::after,
.bc-document-grid.is-resizing .bc-column-resizer.is-active::after {
    background: #008c95;
}

body.bc-column-resize-active {
    cursor: col-resize;
    user-select: none;
}

.bc-list-link {
    border-bottom: 1px dotted currentColor;
    color: #003f52;
    text-decoration: none;
}

.bc-list-link:hover {
    color: var(--bc-primary);
}

.bc-row-menu {
    color: #004b5b;
    font-size: 22px;
    line-height: 1;
}

.bc-row-menu-btn {
    background: transparent;
    border: 0;
    color: #004b5b;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    padding: 0 6px;
}

.bc-row-menu-btn:hover,
.bc-row-menu-btn[aria-expanded="true"] {
    background: var(--bc-hover);
}

.bc-row-menu-popup {
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    min-width: 150px;
    padding: 4px 0;
    position: fixed;
    z-index: 2000;
}

.bc-row-menu-popup[hidden] {
    display: none;
}

.bc-row-menu-popup button {
    background: transparent;
    border: 0;
    color: var(--bc-text);
    display: block;
    font-size: 14px;
    padding: 6px 16px;
    text-align: left;
    width: 100%;
}

.bc-row-menu-popup button:hover:not(:disabled) {
    background: var(--bc-hover);
}

.bc-row-menu-popup button:disabled {
    color: #a19f9d;
    cursor: default;
}

.bc-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-empty-list {
    color: var(--bc-text-muted);
    padding: 18px !important;
}

.users-name-cell {
    align-items: center;
    display: flex;
    gap: 8px;
    position: relative;
    padding-right: 32px !important;
}

.users-row-caret {
    color: #27606a;
    display: inline-block;
    font-size: 10px;
    transform: rotate(90deg);
}

.users-row-menu {
    color: #14383d;
    font-size: 20px;
    line-height: 1;
    position: absolute;
    right: 9px;
    top: 7px;
}

.user-card-shell {
    background: #fff;
}

.user-card-modal {
    align-items: center;
    background: rgb(0 0 0 / 42%);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.user-card-modal[hidden] {
    display: none;
}

.user-card-modal-panel {
    background: #fff;
    box-shadow: 0 18px 55px rgb(0 0 0 / 32%);
    height: min(850px, calc(100vh - 36px));
    overflow: hidden;
    width: min(1540px, calc(100vw - 36px));
}

.user-card-modal iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

body.user-card-modal-active {
    overflow: hidden;
}

.user-card-form {
    min-height: 100vh;
}

.user-card-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 78px;
    padding: 8px 14px;
}

.user-card-back {
    display: inline-block;
    margin: 0 0 7px;
    text-decoration: none;
}

.user-card-header h1 {
    font-size: 24px;
    font-weight: 400;
    margin: 0;
}

.user-card-primary-actions {
    align-items: center;
    display: flex;
    gap: 18px;
}

.user-card-save,
.user-card-close {
    align-items: center;
    background: #fff;
    border: 1px solid #008c95;
    border-radius: 50%;
    color: #008c95;
    display: inline-flex;
    font-size: 20px;
    height: 36px;
    justify-content: center;
    text-decoration: none;
    width: 36px;
}

.user-card-save:hover,
.user-card-close:hover {
    background: #e8f6f7;
    color: #006b73;
}

.user-card-commandbar {
    align-items: center;
    border-bottom: 1px solid #c9d0d8;
    border-top: 1px solid #c9d0d8;
    display: flex;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
}

.user-card-commandbar button,
.user-card-commandbar a,
.user-card-commandbar span {
    background: transparent;
    border: 1px solid transparent;
    color: #26384e;
    font-size: 13px;
    padding: 6px 9px;
    text-decoration: none;
}

.user-card-commandbar button:hover,
.user-card-commandbar a:hover {
    background: var(--bc-hover);
    border-color: var(--bc-border);
}

.user-card-commandbar .user-card-command-muted {
    color: #7b8490;
}

.user-card-body {
    padding: 0 14px 30px;
}

.user-card-body > .alert {
    margin: 12px 0;
}

.user-card-body > .validation-summary-valid {
    display: none;
}

.user-card-section {
    margin-top: 16px;
}

.user-card-section h2 {
    border-bottom: 1px solid #657389;
    color: #2b2f33;
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 14px;
    padding: 0 0 7px;
}

.user-card-general-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: minmax(330px, 1fr) minmax(330px, 1fr) minmax(250px, .9fr);
}

.user-card-fields,
.user-card-wide-fields {
    display: grid;
    gap: 7px;
}

.user-card-fields h3,
.user-card-info h3 {
    font-size: 13px;
    font-weight: 600;
    margin: 2px 0 2px;
}

.user-card-fields label,
.user-card-wide-fields label {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(145px, 44%) minmax(0, 1fr);
    margin: 0;
}

.user-card-fields label > span,
.user-card-wide-fields label > span {
    align-items: center;
    color: #28405f;
    display: flex;
    min-width: 0;
    white-space: nowrap;
}

.user-card-fields label > span::after,
.user-card-wide-fields label > span::after {
    border-bottom: 2px dotted #d1d8e3;
    content: "";
    flex: 1;
    margin-left: 8px;
    min-width: 12px;
}

.user-card-fields input,
.user-card-fields select,
.user-card-wide-fields input {
    background: #fff;
    border: 1px solid #8d96a5;
    box-sizing: border-box;
    color: #111827;
    font-size: 13px;
    height: 30px;
    min-width: 0;
    padding: 4px 7px;
    width: 100%;
}

.user-card-fields input[readonly],
.user-card-wide-fields input[readonly] {
    background: #e9ebef;
    border-color: transparent;
}

.user-card-fields input:focus,
.user-card-fields select:focus,
.user-card-wide-fields input:focus {
    border-color: var(--bc-primary);
    box-shadow: 0 0 0 1px var(--bc-primary);
    outline: none;
}

.user-card-info p,
.user-card-unavailable p {
    color: var(--bc-text-muted);
    line-height: 1.5;
    margin: 8px 0;
}

.user-card-wide-fields label {
    grid-template-columns: minmax(220px, 46%) minmax(300px, 1fr);
}

@media (max-width: 1050px) {
    .user-card-general-grid {
        grid-template-columns: 1fr 1fr;
    }

    .user-card-info {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .user-card-general-grid {
        grid-template-columns: 1fr;
    }

    .user-card-fields label,
    .user-card-wide-fields label {
        grid-template-columns: 1fr;
    }

    .user-card-header h1 {
        font-size: 20px;
    }
}

.erp-home {
    align-items: center;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(0, 1fr) 240px;
    min-height: 100vh;
    padding: 48px;
}

.erp-home-kicker {
    color: var(--bc-primary);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .08em;
    margin: 0 0 8px;
    text-transform: uppercase;
}

.erp-home h1 {
    font-size: 34px;
    font-weight: 600;
    margin: 0 0 10px;
}

.erp-home p {
    color: var(--bc-text-muted);
    font-size: 15px;
    margin: 0;
    max-width: 560px;
}

.erp-home-tiles {
    display: grid;
    gap: 16px;
}

.erp-home-tile {
    background: #fff;
    border: 1px solid var(--bc-border);
    border-radius: 8px;
    color: var(--bc-text);
    display: grid;
    gap: 8px;
    min-height: 160px;
    padding: 24px;
    text-decoration: none;
}

.erp-home-tile:hover {
    border-color: var(--bc-primary);
    color: var(--bc-text);
}

.erp-home-tile span {
    align-items: center;
    background: #16439a;
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    font-size: 20px;
    font-weight: 800;
    height: 46px;
    justify-content: center;
    width: 52px;
}

.erp-home-tile strong {
    font-size: 19px;
}

.erp-home-tile small {
    color: var(--bc-text-muted);
    font-size: 13px;
}

.report-preview {
    align-items: center;
    background: rgba(0, 0, 0, .52);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1000;
}

.report-preview[hidden] {
    display: none;
}

.report-preview-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
    display: grid;
    grid-template-rows: auto 1fr;
    height: min(920px, calc(100vh - 36px));
    overflow: hidden;
    width: min(1120px, calc(100vw - 36px));
}

.report-preview-header {
    align-items: center;
    background: #f7f7f8;
    border-bottom: 1px solid var(--bc-border);
    display: flex;
    justify-content: space-between;
    min-height: 48px;
    padding: 8px 12px 8px 16px;
}

.report-preview-header div {
    display: flex;
    gap: 8px;
}

.report-preview-header button,
.report-preview-header a {
    background: #fff;
    border: 1px solid var(--bc-border);
    border-radius: 4px;
    color: var(--bc-text);
    cursor: pointer;
    font-size: 13px;
    min-height: 30px;
    padding: 5px 10px;
    text-decoration: none;
}

.report-preview-header button:hover,
.report-preview-header a:hover {
    background: var(--bc-hover);
}

.report-preview iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

body.report-preview-active {
    overflow: hidden;
}

.print-options {
    align-items: center;
    background: rgba(0, 0, 0, .34);
    bottom: 0;
    display: flex;
    justify-content: center;
    left: 0;
    padding: 18px;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1001;
}

.print-options[hidden] {
    display: none;
}

.print-options-panel {
    background: #fff;
    box-shadow: 0 18px 46px rgba(0, 0, 0, .32);
    display: grid;
    grid-template-rows: auto 1fr auto;
    height: min(760px, calc(100vh - 36px));
    max-width: calc(100vw - 36px);
    width: 590px;
}

.print-options-titlebar {
    align-items: center;
    display: flex;
    font-size: 20px;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 8px;
}

.print-options-titlebar strong {
    font-weight: 600;
}

.print-options-titlebar div {
    display: flex;
    gap: 12px;
}

.print-options-titlebar button {
    background: transparent;
    border: 0;
    color: #555;
    cursor: pointer;
    font-size: 28px;
    height: 32px;
    line-height: 1;
    padding: 0;
    width: 24px;
}

.print-options-body {
    overflow: auto;
    padding: 2px 14px 18px 8px;
}

.print-options-body h2 {
    border-bottom: 1px solid #657389;
    color: #2b2f33;
    font-size: 18px;
    font-weight: 600;
    margin: 14px 0 18px;
    padding-bottom: 6px;
}

.print-options-fields {
    display: grid;
    gap: 10px;
}

.print-options-fields label {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(210px, 44%) minmax(0, 1fr);
    margin: 0;
}

.print-options-fields label span {
    align-items: center;
    color: #28405f;
    display: flex;
    min-width: 0;
    white-space: nowrap;
}

.print-options-fields label span::after {
    border-bottom: 2px dotted #d1d8e3;
    content: "";
    flex: 1;
    margin-left: 8px;
    min-width: 12px;
}

.print-options-fields input:not(.bc-toggle) {
    background: #e9ebef;
    border: 1px solid transparent;
    color: #111827;
    font-size: 14px;
    height: 30px;
    padding: 4px 7px;
    width: 100%;
}

.print-options-fields select {
    background: #fff;
    border: 1px solid #8d96a5;
    color: #111827;
    font-size: 14px;
    height: 34px;
    padding: 4px 7px;
    width: 100%;
}

.print-options-settings {
    margin: 10px 0 22px;
}

.print-layout-picker {
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 46px;
}

.print-layout-picker button {
    background: #fff;
    border: 1px solid #8d96a5;
    color: #242424;
    cursor: pointer;
    font-size: 18px;
    height: 34px;
}

.print-layout-picker button:hover {
    background: var(--bc-hover);
}

.print-options-fields label:nth-of-type(n+4) {
    grid-template-columns: minmax(210px, 44%) 42px;
    justify-content: start;
}

.print-options-fields .bc-toggle {
    justify-self: start;
}

.print-options-filter {
    background: transparent;
    border: 0;
    color: #007c89;
    cursor: pointer;
    font-size: 14px;
    margin: 13px 0;
    padding: 0 0 0 8px;
}

.print-options-divider {
    border-top: 1px solid #c4ccd6;
    margin: 10px 0;
}

.print-options-muted {
    color: #687385;
    font-size: 14px;
}

.print-options-actions {
    border-top: 1px solid #c4ccd6;
    display: flex;
    gap: 7px;
    justify-content: flex-end;
    padding: 12px 14px;
}

.print-options-actions button {
    background: #fff;
    border: 1px solid #8d96a5;
    color: #242424;
    cursor: pointer;
    font-size: 14px;
    min-height: 32px;
    min-width: 92px;
    padding: 5px 14px;
}

.print-options-actions button:hover {
    background: var(--bc-hover);
}

body.print-options-active {
    overflow: hidden;
}

@media (max-width: 1100px) {
    .bc-content {
        flex-direction: column;
    }

    .bc-factbox {
        width: 100%;
    }
}

@media (max-width: 620px) {
    .erp-home {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 28px 18px;
    }

    .report-preview {
        padding: 8px;
    }

    .report-preview-panel {
        height: calc(100vh - 16px);
        width: calc(100vw - 16px);
    }

    .report-preview-header {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .print-options {
        padding: 8px;
    }

    .print-options-panel {
        height: calc(100vh - 16px);
        max-width: none;
        width: calc(100vw - 16px);
    }

    .print-options-fields label {
        grid-template-columns: 1fr;
    }

    .print-options-fields label:nth-of-type(n+4) {
        grid-template-columns: 1fr 42px;
    }

    .print-options-actions {
        flex-wrap: wrap;
    }

    .bc-ribbon-tabs,
    .bc-ribbon-panel {
        height: auto;
        flex-wrap: wrap;
        padding: 8px 12px;
    }

    .bc-ribbon-tabs {
        gap: 12px;
        min-height: 36px;
    }

    .bc-ribbon-tabs button,
    .bc-ribbon-action,
    .bc-ribbon-dropdown button {
        font-size: 13px;
    }

    .bc-ribbon-dropdown {
        left: 0;
        min-width: min(320px, calc(100vw - 24px));
        right: auto;
    }

    .bc-page-header,
    .bc-content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .bc-fields {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .bc-field {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .bc-field label {
        white-space: normal;
    }

    .bc-totals-panel {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 12px;
    }

    .bc-total-field {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .bc-total-field label {
        white-space: normal;
    }
}

/* Sales Quote Index: BC Sync status pill (quote_bc_sync.Sync Status). */
.bc-sync-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    background: #e9ecef;
    color: #495057;
}

.bc-sync-status-synced {
    background: #d4edda;
    color: #155724;
}

.bc-sync-status-pending,
.bc-sync-status-numbering,
.bc-sync-status-syncing {
    background: #fff3cd;
    color: #856404;
}

.bc-sync-status-failed,
.bc-sync-status-failed_permanent {
    background: #f8d7da;
    color: #721c24;
}

/* Sales Quote Create: item suggestion list (shared, fixed-position; see itemSuggest in site.js). */
.item-suggest {
    position: fixed;
    z-index: 2000;
    overflow-y: auto;
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.item-suggest-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 7px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--bc-border-soft);
}

.item-suggest-option strong {
    font-size: 13px;
    color: var(--bc-text);
}

.item-suggest-option span {
    font-size: 12px;
    color: var(--bc-text-muted);
}

.item-suggest-option.is-active {
    background: var(--bc-selected);
}

.item-suggest-more {
    padding: 7px 12px;
    font-size: 12px;
    font-style: italic;
    color: var(--bc-text-muted);
}

/* Sales Quote Comment Sheet (Terms & Conditions) page. */
.comment-sheet-subtitle {
    color: var(--bc-text-muted);
    font-size: 13px;
    margin-top: 2px;
}

.comment-sheet-body {
    padding: 14px 20px 40px;
}

.comment-sheet-hint {
    color: var(--bc-text-muted);
    font-size: 13px;
    margin: 0 0 12px;
    max-width: 980px;
}

.comment-sheet-wrap {
    overflow-x: auto;
}

.comment-sheet-grid {
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed;
    width: max-content;
}

.comment-sheet-grid th {
    background: #f4f5f7;
    border-bottom: 1px solid var(--bc-border);
    color: #526172;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 6px;
    text-align: left;
}

.comment-sheet-grid td {
    border-bottom: 1px solid var(--bc-border-soft);
    padding: 0;
}

.comment-sheet-grid td input:not([type="checkbox"]):not([type="hidden"]) {
    background: transparent;
    border: 0;
    box-sizing: border-box;
    font: inherit;
    padding: 7px 6px;
    width: 100%;
}

.comment-sheet-grid td input:focus {
    background: #fff;
    outline: 2px solid var(--bc-primary);
    outline-offset: -2px;
}

.comment-sheet-grid tr.is-selected td {
    background: var(--bc-hover);
}

.comment-sheet-grid tr.is-selected .comment-sheet-marker::before {
    color: #008c95;
    content: "\2192";
    padding-left: 6px;
}

.comment-sheet-check {
    text-align: center;
}

.comment-sheet-grid td select {
    background: transparent;
    border: 0;
    box-sizing: border-box;
    font: inherit;
    padding: 7px 4px;
    width: 100%;
}

.comment-sheet-grid td select:focus {
    background: #fff;
    outline: 2px solid var(--bc-primary);
    outline-offset: -2px;
}

/* ---- Home (BC-style header + page) ---- */
.bc-home-body { background: var(--bc-bg); }

.bc-home-header {
    align-items: center;
    background: #1f2d4d;
    color: #fff;
    display: flex;
    gap: 24px;
    height: 48px;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.bc-home-header-left { align-items: center; display: flex; gap: 14px; min-width: 0; }

.bc-home-brand { color: #fff; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.bc-home-brand:hover { color: #fff; }

a.bc-home-entity { color: inherit; text-decoration: none; }
a.bc-home-entity:hover { text-decoration: underline; }

.bc-home-entity {
    border-left: 1px solid rgba(255, 255, 255, .35);
    font-size: 13px;
    overflow: hidden;
    padding-left: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bc-home-nav { align-items: stretch; display: flex; flex: 1; gap: 4px; height: 100%; }

.bc-home-nav-item { display: flex; position: relative; }

.bc-home-nav-link {
    align-items: center;
    background: none;
    border: 0;
    color: #fff;
    cursor: pointer;
    display: flex;
    font: inherit;
    padding: 0 14px;
    text-decoration: none;
}

.bc-home-nav-link:hover,
.bc-home-nav-item:focus-within .bc-home-nav-link { background: rgba(255, 255, 255, .14); color: #fff; }

.bc-home-menu {
    background: #fff;
    border: 1px solid var(--bc-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
    display: none;
    left: 0;
    min-width: 200px;
    padding: 4px 0;
    position: absolute;
    top: 100%;
}

.bc-home-nav-item:hover .bc-home-menu,
.bc-home-nav-item:focus-within .bc-home-menu { display: block; }

.bc-home-menu-item { color: var(--bc-text); display: block; padding: 8px 14px; text-decoration: none; }
.bc-home-menu-item:hover { background: var(--bc-hover); color: var(--bc-text); }
.bc-home-menu-item.is-disabled { color: var(--bc-text-muted); cursor: default; }

.bc-home-switcher { align-items: center; display: flex; gap: 8px; margin-left: auto; }
.bc-home-switcher label { font-size: 12px; margin: 0; opacity: .8; }
.bc-home-switcher select {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 3px;
    color: #fff;
    font: inherit;
    font-size: 12px;
    max-width: 240px;
    padding: 4px 6px;
}
.bc-home-switcher select option { color: var(--bc-text); }

.bc-home-page { margin: 0 auto; max-width: 1200px; padding: 28px 24px 48px; }
.bc-home-title { font-size: 28px; font-weight: 600; margin: 0; }
.bc-home-subtitle { color: var(--bc-text-muted); margin: 2px 0 24px; }
.bc-home-section h2 { font-size: 15px; font-weight: 600; margin: 0 0 12px; }

.bc-home-tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.bc-home-tile {
    background: var(--bc-surface);
    border: 1px solid var(--bc-border);
    border-left: 4px solid var(--bc-primary);
    border-radius: 2px;
    color: var(--bc-text);
    display: grid;
    gap: 4px;
    padding: 16px;
    text-decoration: none;
}
.bc-home-tile:hover { background: var(--bc-hover); color: var(--bc-text); }
.bc-home-tile small { color: var(--bc-text-muted); text-transform: uppercase; letter-spacing: .06em; font-size: 11px; }
.bc-home-tile strong { font-size: 17px; font-weight: 600; }
.bc-home-tile span { color: var(--bc-text-muted); font-size: 12px; }

@media (max-width: 720px) {
    .bc-home-header { flex-wrap: wrap; height: auto; padding: 8px 12px; gap: 8px; }
    .bc-home-nav { order: 3; flex-basis: 100%; height: 36px; }
    .bc-home-switcher { margin-left: auto; }
}

/* Inventory -> Items list (mirrors BC page 31: grid + Details side panel) */
.items-layout {
    align-items: flex-start;
    display: flex;
    gap: 16px;
}

.items-grid-wrap {
    flex: 1 1 auto;
    min-width: 0;
}

.items-page .bc-document-grid th:nth-child(2),
.items-page .bc-document-grid td:nth-child(2) {
    text-align: left;
}

.items-page .bc-document-grid tbody tr:first-child td {
    background: white;
}

.items-page .bc-document-grid tbody tr:hover td {
    background: var(--bc-hover);
}

.items-page .bc-document-grid tbody tr.is-selected td {
    background: #b9edf1;
}

.items-page .bc-document-grid tbody tr.is-blocked td {
    color: #8a94a0;
}

.items-page .bc-document-grid th.is-numeric,
.items-page .bc-document-grid td.is-numeric {
    text-align: right;
}

.items-details {
    background: white;
    border: 1px solid var(--bc-border);
    flex: 0 0 360px;
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding: 12px 20px 20px;
}

.items-details-tabs {
    border-bottom: 1px solid var(--bc-border);
    margin-bottom: 12px;
}

.items-details-tabs .is-active {
    border-bottom: 2px solid #008c95;
    color: #242424;
    display: inline-block;
    font-size: 14px;
    padding: 6px 2px;
}

.items-details h2 {
    font-size: 17px;
    font-weight: 600;
    margin: 14px 0 10px;
}

.items-details section + section {
    border-top: 1px solid var(--bc-border);
    margin-top: 18px;
}

.items-details dl {
    display: grid;
    font-size: 14px;
    gap: 8px 12px;
    grid-template-columns: 1fr auto;
    margin: 0;
}

.items-details dt {
    color: #3a4552;
    font-weight: 400;
}

.items-details dd {
    margin: 0;
    text-align: right;
}

.items-details-empty {
    color: #6b7785;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .items-layout {
        flex-direction: column;
    }

    .items-details {
        flex-basis: auto;
        max-height: none;
        width: 100%;
    }
}

/* Finance (read-only BC ledger copy) screens */
.fin-note { background: #eef5ff; border: 1px solid #c8dcf7; border-radius: 4px; padding: 8px 12px; margin: 0 0 12px; font-size: 13px; }
.fin-tabs { display: flex; gap: 18px; padding: 0 24px 8px; border-bottom: 1px solid #dcdcdc; font-size: 14px; }
.fin-tabs a { text-decoration: none; color: #1f5f9f; padding-bottom: 4px; }
.fin-tabs a:hover { text-decoration: underline; }
.fin-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 0 0 10px; font-size: 13px; }
.fin-filter label { display: flex; flex-direction: column; gap: 2px; }
.fin-summary { font-size: 13px; color: #444; margin: 4px 0 8px; }
.fin-table .fin-num, .fin-table th.fin-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.fin-table tfoot .fin-total td { font-weight: 600; border-top: 2px solid #999; background: #f6f6f6; }
.fin-pager { display: flex; gap: 16px; align-items: center; margin: 10px 0; font-size: 13px; }

/* Sales Order card (BC page 42 structure, loop L27) */
.bc-page-title {
    color: var(--bc-text);
    font-size: 15px;
    font-weight: 400;
    margin: 2px 0 0;
}

.bc-subheading {
    color: #605e5c;
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0 2px;
}

.bc-line-ribbon {
    align-items: center;
    background: var(--bc-ribbon);
    border-bottom: 1px solid #edebe9;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    padding: 6px 10px;
}

.bc-line-ribbon-group {
    color: #605e5c;
    font-size: 12px;
    font-weight: 600;
}

.bc-line-ribbon button {
    background: transparent;
    border: 0;
    color: var(--bc-text);
    font-size: 13px;
}

.bc-line-ribbon button:disabled {
    color: #a19f9d;
}

.bc-factbox-tabs {
    border-bottom: 1px solid #edebe9;
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    padding: 0 4px 6px;
}

.bc-factbox-tabs span:first-child {
    border-bottom: 2px solid #008c95;
    font-weight: 600;
    padding-bottom: 4px;
}

.bc-factbox-sub {
    color: #605e5c;
    font-size: 12px;
    margin: 2px 0 2px 12px;
}

.bc-ribbon-dropdown form {
    display: contents;
}

.bc-ribbon-dropdown a.bc-ribbon-link {
    background: white;
    color: var(--bc-text);
    font-size: 13px;
    padding: 9px 12px;
    text-decoration: none;
}

.bc-ribbon-dropdown a.bc-ribbon-link:hover,
.bc-ribbon-dropdown button:not(:disabled):hover {
    background: #f3f2f1;
}

.bc-ribbon-dropdown button:disabled {
    color: #a19f9d;
    cursor: not-allowed;
}

/* Info icon with a hover / focus popover (Copy Sales Document dialog) */
.copy-info {
    align-items: center;
    background: #5b7aa8;
    border-radius: 50%;
    color: #fff;
    cursor: help;
    display: inline-flex;
    flex: none;
    font: italic 700 11px/1 Georgia, serif;
    height: 16px;
    justify-content: center;
    margin-left: 6px;
    position: relative;
    width: 16px;
}

.copy-info .copy-tip {
    background: #fff;
    border: 1px solid #b8c4d6;
    border-radius: 6px;
    box-shadow: 0 6px 18px rgba(20, 40, 70, .22);
    color: #28405f;
    display: none;
    font: 400 12px/1.4 system-ui, sans-serif;
    left: -6px;
    padding: 8px 10px 8px 24px;
    position: absolute;
    text-align: left;
    top: 22px;
    white-space: normal;
    width: 320px;
    z-index: 30;
}

.copy-info .copy-tip u {
    display: list-item;
    list-style: disc;
    margin-bottom: 4px;
    text-decoration: none;
}

.copy-info:hover .copy-tip,
.copy-info:focus .copy-tip {
    display: block;
}

/* The Copy Sales Document dialog is short: let the info popovers overflow the body instead of being clipped by its scroll area. */
[data-copy-document] .print-options-body {
    overflow: visible;
}

/* Prepare > Copy Document...: no generic square before the label. */
.bc-ribbon-action[data-copy-document-open]::before {
    content: none;
}

/* Sales Quotes filter pane (BC "Filter list by") */
.bc-has-filter-pane { display: flex; align-items: flex-start; gap: 16px; }
.bc-has-filter-pane .bc-list-main { flex: 1 1 auto; }
.bc-filter-pane { flex: 0 0 230px; background: white; border: 1px solid var(--bc-border); padding: 10px 12px; font-size: 13px; }
.bc-filter-pane[hidden] { display: none; }
.bc-filter-pane-head { display: flex; justify-content: space-between; align-items: center; font-weight: 600; margin-bottom: 8px; }
.bc-filter-pane-close, .bc-filter-field button { background: none; border: 0; cursor: pointer; font-size: 18px; line-height: 1; color: #526172; }
.bc-filter-field { display: grid; grid-template-columns: 1fr auto; column-gap: 4px; margin-bottom: 8px; }
.bc-filter-field label { grid-column: 1 / -1; color: #526172; margin-bottom: 2px; }
.bc-filter-field input { min-width: 0; border: 1px solid var(--bc-border); padding: 3px 6px; }
.bc-filter-pane-add select { width: 100%; border: 0; background: none; color: #0f6cbd; cursor: pointer; padding: 4px 0; }
.bc-filter-pane-clear { background: none; border: 0; color: #0f6cbd; cursor: pointer; padding: 4px 0; }
.bc-filter-pane-clear:disabled { color: #9aa5b1; cursor: default; }
.bc-filter-pane-count { color: #526172; margin-top: 6px; }
.bc-document-grid tr.bc-pane-hidden { display: none; }
#bc-filter-toggle.is-filtered { color: #0f6cbd; }

#order-lines-grid td input {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}

/* Visible column separators in the resizable line tables (quote card and order card). */
.bc-line-table th,
.bc-line-table td,
#order-lines-grid th,
#order-lines-grid td {
    border-right: 1px solid #c8d0d8;
}

/* Home > Make Order on the Sales Quote card: no generic square before the label. */
.bc-ribbon-action[data-make-order]::before {
    content: none;
}

/* Main navigation bar under the entity bar (_Layout pages): same menus as the home header, light theme. */
.bc-navbar { background: #fff; border-bottom: 1px solid var(--bc-border); height: 40px; padding: 0 18px; position: relative; z-index: 100; }
.bc-navbar .bc-home-nav { flex: none; gap: 2px; }
.bc-navbar .bc-home-nav-link { color: var(--bc-text); font-size: 14px; }
.bc-navbar .bc-home-nav-link:hover,
.bc-navbar .bc-home-nav-item:focus-within .bc-home-nav-link { background: var(--bc-hover); color: var(--bc-text); }
.bc-navbar button.bc-home-nav-link::after { border-bottom: 1.5px solid currentColor; border-right: 1.5px solid currentColor; content: ""; height: 5px; margin: -2px 0 0 7px; transform: rotate(45deg); width: 5px; }

/* Lines focus mode (BC's "Toggle focus mode"): the Lines FastTab fills the window; same DOM, so edits and Save keep working. */
.bc-lines-title { display: flex; align-items: center; }
.bc-lines-title > span { flex: 1 1 auto; }
.bc-focus-toggle {
    background: transparent; border: 0; color: var(--bc-primary); padding: 4px 8px; border-radius: 4px; cursor: pointer; line-height: 0;
}
.bc-focus-toggle:hover, .bc-focus-toggle[aria-pressed="true"] { background: rgba(0, 120, 212, 0.12); }
body.bc-lines-focus { overflow: hidden; }
.bc-fasttab.is-focus {
    position: fixed; inset: 0; z-index: 1080; margin: 0; border-radius: 0;
    display: flex; flex-direction: column; overflow: hidden;
}
.bc-fasttab.is-focus .bc-line-scroll { flex: 1 1 auto; overflow: auto; min-height: 0; }
.bc-fasttab.is-focus .bc-totals-panel { flex: 0 0 auto; }

/* Sales Order card ribbons: no generic square before the action labels. */
.bc-ribbon--plain .bc-ribbon-action::before {
    content: none;
    margin-right: 0;
}

/* Quote lines: Select items... dialog */
.bc-select-items { width: min(720px, 94vw); max-height: 80vh; padding: 16px; border: 1px solid #c8c8c8; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25); }
.bc-select-items::backdrop { background: rgba(0, 0, 0, 0.35); }
.bc-select-items h3 { margin: 0 0 10px; font-size: 18px; font-weight: 600; }
.bc-select-items input[type="search"] { width: 100%; box-sizing: border-box; padding: 6px 8px; margin-bottom: 8px; }
.bc-select-items-list { max-height: 46vh; overflow: auto; border: 1px solid #ddd; }
.bc-select-items-list label { display: grid; grid-template-columns: 24px 140px 1fr 90px; gap: 8px; align-items: center; padding: 4px 8px; border-bottom: 1px solid #eee; cursor: pointer; }
.bc-select-items-list label:hover { background: rgba(0, 120, 212, 0.08); }
.bc-select-items-list .bc-select-items-price { text-align: right; }
.bc-select-items-footer { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.bc-select-items-footer span { flex: 1 1 auto; color: #666; }

/* Autosave status next to the card's Save button. */
.bc-autosave-status {
    color: #6b6b6b;
    font-size: 12px;
    margin-right: 10px;
}

.bc-autosave-status[data-state="saved"] { color: #2e7d32; }
.bc-autosave-status[data-state="error"] { color: #c62828; font-weight: 600; }
.bc-autosave-status[data-state="wait"] { color: #8a6d00; }

/* the order line the Item Addition Component button will open */
[data-order-line].is-picked td { background: #eef6ff; }
