.fbo-page {
  color: #17212b;
  background: #f4f6f8;
  font-family: Inter, Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}
.fbo-page button,
.fbo-page input,
.fbo-page select { font: inherit; }
.fbo-page button:focus-visible,
.fbo-page input:focus-visible,
.fbo-page select:focus-visible,
.fbo-page a:focus-visible,
.fbo-page summary:focus-visible { outline: 2px solid #2f6fe4; outline-offset: 2px; }
.fbo-topbar { z-index: 50; height: 48px; padding: 0 14px; }
.fbo-topbar .top-left { align-items: center; gap: 10px; }
.fbo-topbar #page-title { font-size: 15px; }
.fbo-topbar .who { border-width: 1px; padding: 3px 8px; font-size: 12px; }
.fbo-topbar .top-right { gap: 6px; }
.fbo-topbar .top-right .ghost { min-height: 34px; padding: 6px 10px; border-radius: 7px; font-size: 13px; }
.fbo-topbar .top-right svg { width: 16px; height: 16px; }
.fbo-main { padding: 10px 14px 14px; }
#fbo-orders, #fbo-assembly { width: 100%; max-width: none; margin: 0 auto; }
#fbo-orders:not([hidden]) { display: flex; flex-direction: column; height: calc(100vh - 68px); min-height: 520px; }
.fbo-section-head, .fbo-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fbo-section-head { flex: 0 0 auto; justify-content: space-between; min-height: 38px; margin-bottom: 6px; padding: 0 2px; }
.fbo-section-head > div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.fbo-section-head h1, .fbo-main h2 { margin: 0; letter-spacing: 0; }
.fbo-section-head h1 { font-size: 22px; line-height: 1.2; color: #16202b; }
.fbo-section-head p { margin: 0; color: #6b7480; font-size: 12px; }
.fbo-main h2 { margin-top: 22px; margin-bottom: 10px; font-size: 20px; }
.fbo-result-count { padding: 4px 8px; border: 1px solid #d7dee7; border-radius: 6px; background: #fff; color: #52606d; font-size: 12px; font-weight: 700; }

.fbo-filter-panel, .fbo-list-panel {
  border: 1px solid #d7dee7; border-radius: 8px; background: #fff;
}
.fbo-filter-panel { position: relative; z-index: 6; flex: 0 0 auto; margin-bottom: 8px; padding: 9px 10px; }
.fbo-filter-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(165px, .8fr) minmax(185px, .9fr) minmax(210px, 1fr) minmax(410px, 1.8fr) auto;
  gap: 10px;
  align-items: end;
}
.fbo-filter-field { display: grid; align-content: start; gap: 5px; min-width: 0; }
.fbo-filter-field > span { color: #52606d; font-size: 11px; font-weight: 700; }
.fbo-filter-field input[type="search"],
.fbo-filter-field input[type="date"] {
  width: 100%; height: 36px; min-width: 0; padding: 7px 10px;
  border: 1px solid #bfc9d5; border-radius: 7px; background: #fff;
  color: #16202b; font: inherit;
}
.fbo-filter-field input:focus, .fbo-multi[open] > summary {
  outline: none; border-color: #2f6fe4; box-shadow: 0 0 0 3px #dbe6ff;
}
.fbo-date-row { display: grid; grid-template-columns: minmax(116px, 1fr) auto minmax(116px, 1fr) auto; gap: 6px; align-items: center; }
.fbo-date-separator { color: #8a95a3; font-size: 12px; }
.fbo-period-segment { display: inline-grid; grid-template-columns: 1fr 1fr; height: 36px; border: 1px solid #bfc9d5; border-radius: 7px; overflow: hidden; }
.fbo-period-segment button { min-width: 62px; padding: 6px 9px; border: 0; border-radius: 0; background: #fff; color: #52606d; font-size: 12px; }
.fbo-period-segment button + button { border-left: 1px solid #bfc9d5; }
.fbo-period-segment button.active { background: #e8f0ff; color: #185ab8; box-shadow: inset 0 -2px #2f6fe4; }

.fbo-multi { position: relative; min-width: 0; }
.fbo-multi > summary {
  display: flex; align-items: center; width: 100%; height: 36px; padding: 5px 30px 5px 9px;
  border: 1px solid #bfc9d5; border-radius: 7px; background: #fff; cursor: pointer;
  list-style: none; position: relative; overflow: hidden;
}
.fbo-multi > summary::-webkit-details-marker { display: none; }
.fbo-multi > summary::after { content: '▾'; position: absolute; right: 12px; color: #52606d; }
.fbo-multi[open] > summary::after { transform: rotate(180deg); }
.fbo-multi-value { display: flex; align-items: center; gap: 5px; min-width: 0; color: #6b7480; white-space: nowrap; overflow: hidden; }
.fbo-multi.has-value .fbo-multi-value { color: #16202b; }
.fbo-filter-chip, .fbo-filter-more { display: inline-block; max-width: 130px; padding: 3px 6px; border-radius: 5px; overflow: hidden; text-overflow: ellipsis; background: #e8f0ff; color: #174f9e; font-size: 11px; font-weight: 700; }
.fbo-filter-more { flex: 0 0 auto; background: #e9eef5; color: #43505e; }
.fbo-multi-menu {
  position: absolute; z-index: 40; top: calc(100% + 5px); left: 0; width: max(100%, 280px); max-width: 380px;
  padding: 8px; border: 1px solid #bfc9d5; border-radius: 7px; background: #fff;
  box-shadow: 0 10px 24px rgba(25, 41, 61, .18);
}
.fbo-multi-search { height: 34px !important; margin-bottom: 6px; }
.fbo-multi-options { max-height: 250px; overflow-y: auto; }
.fbo-multi-option { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 5px; cursor: pointer; }
.fbo-multi-option:hover { background: #eef4ff; }
.fbo-multi-option input { width: 17px; height: 17px; margin: 0; }
.fbo-filter-empty { display: block; padding: 10px; color: #6b7480; font-size: 13px; }
.fbo-filter-actions { display: flex; justify-content: flex-end; gap: 6px; align-items: end; }
.fbo-filter-actions button { height: 36px; padding: 6px 10px; border-radius: 7px; font-size: 12px; white-space: nowrap; }
.fbo-filter-actions svg { width: 15px; height: 15px; }
#clear-order-filters { width: 36px; padding: 0; }
#clear-order-filters span { display: none; }

.fbo-list-panel { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow: hidden; }
.fbo-table-wrap { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0; scrollbar-gutter: stable; }
.fbo-table { width: 100%; border-collapse: collapse; background: #fff; }
.fbo-table th, .fbo-table td { border: 1px solid #ccd4dd; padding: 10px 12px; text-align: left; vertical-align: middle; }
.fbo-table th { background: #edf1f5; color: #43505e; font-size: 13px; text-transform: uppercase; }
.fbo-table tr[data-id] { cursor: pointer; }
.fbo-table tr[data-id]:hover { background: #edf8f2; }
.fbo-orders-table { min-width: 1160px; border: 0; table-layout: fixed; }
.fbo-orders-table th, .fbo-orders-table td { padding: 8px 10px; border: 0; border-right: 1px solid #e2e7ed; border-bottom: 1px solid #d9e0e8; }
.fbo-orders-table th:last-child, .fbo-orders-table td:last-child { border-right: 0; }
.fbo-orders-table th { position: sticky; z-index: 3; top: 0; height: 38px; background: #edf2f7; color: #52606d; font-size: 11px; letter-spacing: 0; box-shadow: 0 1px 0 #cdd6e0; }
.fbo-orders-table th:nth-child(1) { width: 118px; }
.fbo-orders-table th:nth-child(2) { width: 105px; }
.fbo-orders-table th:nth-child(3) { width: 124px; }
.fbo-orders-table th:nth-child(4) { width: 200px; }
.fbo-orders-table th:nth-child(5) { width: 118px; }
.fbo-orders-table th:nth-child(6) { width: 174px; }
.fbo-orders-table th:nth-child(7) { width: 140px; }
.fbo-orders-table th:nth-child(8) { width: 218px; }
.fbo-orders-table th:nth-child(9) { width: 48px; }
.fbo-orders-table tbody tr:nth-child(even) td { background: #fafbfd; }
.fbo-orders-table tbody td { height: 48px; line-height: 1.3; overflow-wrap: anywhere; }
.fbo-orders-table tbody tr[data-id]:hover td { background: #eef4ff; }
.fbo-orders-table tbody tr[data-open="1"] td:first-child { box-shadow: inset 3px 0 0 transparent; }
.fbo-orders-table tbody tr[data-open="1"]:hover td:first-child { box-shadow: inset 3px 0 0 #2f6fe4; }
.fbo-orders-table .fbo-row-disabled { cursor: default; }
.fbo-orders-table .fbo-row-disabled td { color: #7d8793; }
.fbo-orders-table .fbo-empty-row { cursor: default; }
.fbo-orders-table .fbo-empty-row td { height: 130px; text-align: center; color: #6b7480; background: #fff; }
.fbo-sort { padding: 0; border: 0; background: transparent; color: inherit; font-size: inherit; font-weight: inherit; text-transform: uppercase; }
.fbo-sort:hover { background: transparent; color: #185ab8; }
.fbo-sort span { color: #185ab8; font-size: 15px; }
.fbo-date-cell, .fbo-supply-number { font-variant-numeric: tabular-nums; }
.fbo-date-cell time { display: grid; gap: 1px; white-space: nowrap; }
.fbo-date-cell time span { color: #263442; font-weight: 700; }
.fbo-date-cell time small { color: #7b8794; font-size: 11px; line-height: 1.2; }
.fbo-date-empty { color: #7b8794; }
.fbo-order-number { color: #174f9e; font-size: 14px; font-variant-numeric: tabular-nums; }
.fbo-marketplace { font-weight: 700; }
.fbo-warehouse { display: block; line-height: 1.3; }
.fbo-status { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 5px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.fbo-status.new { background: #e8f0ff; color: #185ab8; }
.fbo-status.work { background: #fff0cc; color: #8a5a00; }
.fbo-status.done { background: #e4f5e9; color: #11703e; }
.fbo-status.partial { background: #eee8ff; color: #5b3aa6; }
.fbo-status.shipped { background: #ddf4f2; color: #08726b; }
.fbo-status.cancelled { background: #fde7e7; color: #b32025; }
.fbo-orders-table .fbo-status { max-width: 100%; white-space: normal; line-height: 1.25; }
.fbo-open-cell { text-align: center !important; }
.fbo-open-order { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #c7d8f7; border-radius: 7px; background: #f4f7fc; color: #185ab8; line-height: 1; }
.fbo-open-order:hover { background: #185ab8; color: #fff; }
.fbo-open-order svg { width: 16px; height: 16px; }
.fbo-pagination { display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 14px; min-height: 46px; padding: 6px 10px; color: #52606d; font-size: 12px; background: #fff; }
.fbo-pagination label { display: flex; align-items: center; gap: 8px; }
.fbo-pagination select { min-width: 66px; height: 32px; padding: 5px 8px; }
.fbo-page-controls { display: flex; align-items: center; gap: 10px; }
.fbo-page-controls button { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; line-height: 1; }
.fbo-page-controls button svg { width: 15px; height: 15px; }
.fbo-page-controls button:disabled { opacity: .4; cursor: not-allowed; }
.fbo-page-controls span { min-width: 56px; text-align: center; color: #263442; font-weight: 700; }

.fbo-detail-section {
  margin-bottom: 14px; overflow: hidden; border: 1px solid #d7dee7; border-radius: 8px;
  background: #fff; box-shadow: 0 2px 8px rgba(25, 41, 61, .06);
}
.fbo-detail-title {
  display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 11px 16px;
  border-bottom: 1px solid #e2e7ed; background: #f8fafc;
}
.fbo-detail-title h2 { margin: 0; color: #263442; font-size: 17px; }
.fbo-detail-section-compact { margin-bottom: 10px; }
.fbo-detail-section-compact .fbo-detail-title { min-height: 38px; padding: 7px 12px; }
.fbo-detail-section-compact .fbo-detail-title h2 { font-size: 15px; }
.fbo-detail-subtitle, .fbo-section-count { color: #6b7480; font-size: 12px; font-weight: 600; }
.fbo-section-count { margin-left: auto; padding: 4px 8px; border-radius: 5px; background: #e9eef5; }
.fbo-section-count:empty { display: none; }
.fbo-supply-info {
  display: grid;
  grid-template-columns: 1.05fr 1fr 1fr 1.25fr 1.4fr 1.1fr .95fr;
  padding: 15px 16px;
}
.fbo-detail-section-compact .fbo-supply-info { padding: 10px 12px; }
.fbo-detail-section-compact .fbo-supply-fact { padding: 0 10px; }
.fbo-detail-section-compact .fbo-supply-fact:first-child { padding-left: 0; }
.fbo-detail-section-compact .fbo-supply-fact:last-child { padding-right: 0; }
.fbo-detail-section-compact .fbo-supply-fact > span { margin-bottom: 3px; }
.fbo-detail-section-compact .fbo-supply-fact > strong { line-height: 1.25; }
.fbo-supply-fact { min-width: 0; padding: 0 14px; border-right: 1px solid #e2e7ed; }
.fbo-supply-fact:first-child { padding-left: 0; }
.fbo-supply-fact:last-child { padding-right: 0; border-right: 0; }
.fbo-supply-fact > span { display: block; margin-bottom: 6px; color: #6b7480; font-size: 11px; font-weight: 700; }
.fbo-supply-fact > strong { display: block; overflow-wrap: anywhere; color: #16202b; font-size: 14px; line-height: 1.35; }
.fbo-detail-link { color: #174f9e; text-decoration: none; }
.fbo-detail-link:hover { text-decoration: underline; }
.fbo-status-fact > strong { min-height: 24px; }
.fbo-status-fact .fbo-status { display: inline-block; margin-top: -2px; }

.fbo-management { display: grid; grid-template-columns: minmax(0, auto) minmax(260px, 1fr); gap: 16px; align-items: center; padding: 14px 16px; }
.fbo-management-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fbo-management-actions button { min-height: 42px; white-space: nowrap; }
.fbo-detail-section-compact .fbo-management { gap: 10px; padding: 9px 12px; }
.fbo-detail-section-compact .fbo-management-actions { gap: 7px; }
.fbo-detail-section-compact .fbo-management-actions button { min-height: 36px; padding: 7px 10px; }
.fbo-detail-section-compact .fbo-assembly-notice { min-height: 40px; padding: 6px 10px; }
.fbo-assembly-summary { margin-bottom: 8px; border-radius: 7px; box-shadow: none; }
.fbo-assembly-summary .fbo-supply-info {
  grid-template-columns: .95fr .82fr .95fr 1.08fr 1.35fr 1fr .92fr;
  min-height: 40px; padding: 4px 6px; border-bottom: 1px solid #dfe5ec;
}
.fbo-assembly-summary .fbo-supply-fact { align-self: stretch; padding: 0 6px; }
.fbo-assembly-summary .fbo-supply-fact:first-child { padding-left: 2px; }
.fbo-assembly-summary .fbo-supply-fact:last-child { padding-right: 2px; }
.fbo-assembly-summary .fbo-supply-fact > span { margin-bottom: 0; font-size: 9px; line-height: 1.15; }
.fbo-assembly-summary .fbo-supply-fact > strong { font-size: 12px; line-height: 1.15; }
.fbo-assembly-summary .fbo-status-fact > strong { min-height: 20px; }
.fbo-assembly-summary .fbo-status { padding: 2px 6px; font-size: 10px; }
.fbo-assembly-summary .fbo-management {
  grid-template-columns: minmax(510px, auto) minmax(260px, 1fr);
  gap: 6px; min-height: 38px; padding: 3px 6px;
}
.fbo-assembly-summary .fbo-management-actions { gap: 4px; flex-wrap: nowrap; }
.fbo-assembly-summary .fbo-management-actions button { min-height: 30px; padding: 4px 7px; border-radius: 6px; font-size: 11px; }
.fbo-assembly-summary .fbo-management-actions svg { width: 14px; height: 14px; }
.fbo-assembly-summary .fbo-main-action { min-width: 126px; }
.fbo-assembly-summary .fbo-assembly-notice {
  grid-template-columns: auto auto minmax(0, 1fr); gap: 4px 7px;
  min-height: 30px; padding: 3px 6px; font-size: 10px;
}
.fbo-assembly-summary .fbo-assembly-notice::before { grid-row: 1; width: 18px; height: 18px; border-width: 1px; font-size: 10px; }
.fbo-assembly-summary .fbo-assembly-notice strong,
.fbo-assembly-summary .fbo-assembly-notice span { line-height: 1.2; }
.fbo-management-actions button:disabled { opacity: .48; cursor: not-allowed; }
.fbo-main-action { min-width: 150px; font-weight: 800; }
.fbo-assembly-notice {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center;
  min-height: 48px; padding: 9px 12px; border: 1px solid #d7dee7; border-radius: 7px;
  background: #f7f9fb; color: #52606d; font-size: 13px;
}
.fbo-assembly-notice::before {
  content: 'i'; grid-row: 1 / 3; display: grid; place-items: center; width: 24px; height: 24px;
  border: 2px solid #6b7480; border-radius: 50%; color: #52606d; font-weight: 800;
}
.fbo-assembly-notice strong { color: #263442; }
.fbo-assembly-notice span { min-width: 0; }
.fbo-assembly-notice.active { border-color: #bfd2fa; background: #eef4ff; color: #174f9e; }
.fbo-assembly-notice.active::before { border-color: #2f6fe4; color: #2f6fe4; }
.fbo-assembly-notice.active strong { color: #174f9e; }
.fbo-assembly-notice.blocked { border-color: #efb7b7; background: #fff1f1; color: #942126; }
.fbo-assembly-notice.blocked::before { content: '!'; border-color: #cf2e2e; color: #b32025; }
.fbo-assembly-notice.blocked strong { color: #942126; }
.fbo-assembly-notice.blocked a { color: #942126; font-weight: 800; }

.fbo-box-empty {
  display: grid; place-items: center; gap: 5px; min-height: 88px; background: #fafbfd; text-align: center;
}
.fbo-box-empty strong { color: #263442; }
.fbo-box-empty span { color: #6b7480; font-size: 13px; }
.fbo-resizable-table { width: 100%; table-layout: fixed; border: 0; }
.fbo-resizable-table th, .fbo-resizable-table td { border: 1px solid #d6dee8; border-width: 0 1px 1px 0; }
.fbo-resizable-table th:last-child, .fbo-resizable-table td:last-child { border-right: 0; }
.fbo-resizable-table thead th { position: sticky; top: 0; z-index: 2; padding-right: 16px; background: #edf2f7; }
.fbo-column-resizer {
  position: absolute; top: 0; right: -4px; z-index: 3; width: 9px; height: 100%;
  cursor: col-resize; touch-action: none;
}
.fbo-column-resizer::after { content: ''; position: absolute; top: 20%; right: 4px; width: 1px; height: 60%; background: #afbbc8; }
.fbo-column-resizer:hover::after, .fbo-column-resizer:focus::after { width: 2px; background: #2f6fe4; }
.fbo-column-resizer:focus { outline: none; }
.fbo-resizable-table th:last-child .fbo-column-resizer { right: 0; }
.fbo-resizing-column, .fbo-resizing-column * { cursor: col-resize !important; user-select: none !important; }

.fbo-composition-table th, .fbo-composition-table td { padding: 9px 10px; }
.fbo-composition-table th { font-size: 11px; }
.fbo-composition-table td:nth-child(n+5) { text-align: center; }
.fbo-composition-table tbody tr td:first-child { box-shadow: inset 3px 0 0 #aeb9c6; }
.fbo-composition-row.complete td { background: #eaf7ef; }
.fbo-composition-row.complete td:first-child { box-shadow: inset 3px 0 0 #1d9957; }
.fbo-composition-row.working td { background: #f1f6ff; }
.fbo-composition-row.working td:first-child { box-shadow: inset 3px 0 0 #2f6fe4; }
.fbo-composition-row.partial td { background: #fff9ea; }
.fbo-composition-row.partial td:first-child { box-shadow: inset 3px 0 0 #d89000; }
.fbo-composition-row:hover td { filter: brightness(.985); }
.fbo-composition-table td:nth-child(1),
.fbo-composition-table td:nth-child(2) { overflow-wrap: anywhere; white-space: normal; }
.fbo-item-name strong { display: block; overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
.fbo-item-progress { display: inline-flex; margin-top: 4px; padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: 750; }
.fbo-item-progress.complete { background: #dff3e7; color: #11703e; }
.fbo-item-progress.working { background: #dfeaff; color: #185ab8; }
.fbo-item-progress.partial { background: #ffedbd; color: #865600; }
.fbo-item-progress.pending { background: #e9eef4; color: #5e6b78; }
.fbo-barcode { white-space: nowrap; font-variant-numeric: tabular-nums; }
.fbo-cz-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; background: #e4f5e9; color: #11703e; font-size: 15px; font-weight: 900; }
.fbo-cz-empty { color: #aab4c0; }
.fbo-quantity-assembled { color: #11703e; font-weight: 800; }
.fbo-quantity-working { color: #185ab8; font-weight: 800; }
.fbo-quantity-assembled.has-value { background: #e1f5e9; }
.fbo-quantity-working.has-value { background: #e7f0ff; }
.fbo-quantity-remaining { color: #11703e; }
.fbo-quantity-remaining.has-value { background: #fdebed; color: #b4232c; }
.fbo-composition-row.complete .fbo-quantity-remaining { background: #e1f5e9; color: #11703e; }

@media (max-width: 1100px) {
  .fbo-composition-table th, .fbo-composition-table td { padding: 7px 6px; }
  .fbo-composition-table th { padding-right: 11px; font-size: 10px; }
}

.fbo-boxes-table th, .fbo-boxes-table td { padding: 8px 10px; vertical-align: middle; }
.fbo-boxes-table th { font-size: 11px; }
.fbo-boxes-table tbody tr:nth-child(even) td { background: #fafbfd; }
.fbo-box-row.open td:first-child { box-shadow: inset 3px 0 0 #2f6fe4; }
.fbo-box-row.closed td:first-child { box-shadow: inset 3px 0 0 #1d9957; }
.fbo-box-row.error td { background: #fff5f5; }
.fbo-box-row.error td:first-child { box-shadow: inset 3px 0 0 #cf2e2e; }
.fbo-box-row.selected td { background: #eaf3ff !important; }
.fbo-box-row.selected td:first-child { box-shadow: inset 3px 0 0 #1769d2; }
.fbo-select-cell { padding: 0 !important; text-align: center !important; }
.fbo-select-cell input { width: 17px; height: 17px; margin: 0; accent-color: #1769d2; cursor: pointer; }
.fbo-boxes-toolbar { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.fbo-boxes-toolbar .fbo-section-count { margin-left: 0; }
.fbo-boxes-toolbar button { min-height: 32px; padding: 5px 9px; }
.fbo-boxes-toolbar button:disabled { opacity: .45; cursor: not-allowed; }
.fbo-box-number { max-width: 100%; padding: 0; border: 0; background: transparent; color: #174f9e; font: inherit; font-weight: 800; text-align: left; overflow-wrap: anywhere; }
.fbo-box-number:hover { text-decoration: underline; }
.fbo-box-status { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 5px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.fbo-box-status.done { background: #dff3e7; color: #11703e; }
.fbo-box-status.work { background: #dfeaff; color: #185ab8; }
.fbo-box-status.pending { background: #fff0cc; color: #8a5a00; }
.fbo-box-status.error { background: #fde7e7; color: #b32025; }
.fbo-box-error { display: block; margin-top: 4px; color: #b32025; font-size: 11px; font-weight: 700; }
.fbo-muted { color: #94a0ad; }
.fbo-number-cell { text-align: center; font-variant-numeric: tabular-nums; font-weight: 750; }
.fbo-box-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.fbo-row-action { display: inline-flex; align-items: center; gap: 5px; min-height: 30px; padding: 5px 7px; border-radius: 6px; background: #fff; color: #344454; font-size: 12px; font-weight: 700; }
.fbo-row-action:hover { border-color: #8caee1; background: #f3f7ff; color: #174f9e; }
.fbo-row-action.danger { color: #ad252a; }
.fbo-row-action.danger:hover { border-color: #e6a5a8; background: #fff3f3; color: #9d151b; }
.fbo-row-action:disabled { opacity: .45; cursor: not-allowed; }
.fbo-row-action svg { width: 14px; height: 14px; }

.fbo-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 1px solid #bfc9d5; border-radius: 8px; box-shadow: 0 18px 50px rgba(25, 41, 61, .28); }
.fbo-dialog::backdrop { background: rgba(22, 32, 43, .42); }
.fbo-dialog form { padding: 20px; }
.fbo-dialog h2 { margin: 0 0 10px; font-size: 21px; }
.fbo-dialog p { margin: 0; color: #52606d; line-height: 1.5; }
.fbo-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

.fbo-summary { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid #ccd4dd; background: #fff; }
.fbo-summary strong { font-size: 24px; }
.fbo-summary span { color: #566371; }
.fbo-box-start-notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 10px 16px; border-bottom: 1px solid #bfd4f2; background: #eef5ff; }
.fbo-box-start-notice.active { border-color: #a9d7bd; background: #edf9f2; }
.fbo-box-start-notice.error { border-color: #efb4b8; background: #fff2f3; }
.fbo-box-start-copy { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fbo-box-start-copy > div { display: grid; min-width: 0; gap: 2px; }
.fbo-box-start-copy strong { font-size: 14px; }
.fbo-box-start-copy span { color: #5f6f82; font-size: 12px; }
.fbo-box-start-icon { display: grid; place-items: center; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 8px; background: #dceaff; color: #185ab8; }
.fbo-box-start-notice.active .fbo-box-start-icon { background: #d8f1e3; color: #087a45; }
.fbo-box-start-notice.error .fbo-box-start-icon { background: #fde1e3; color: #b4232c; }
.fbo-box-start-icon svg { width: 18px; height: 18px; }
.fbo-box-start-notice > button { flex: 0 0 auto; min-height: 40px; padding: 8px 12px; border-radius: 7px; }
.fbo-actions { margin: 10px 0; padding: 0 12px; }
.fbo-box-table-wrap { margin: 0 12px 16px; overflow: hidden; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; }
.fbo-box-table { table-layout: fixed; font-size: 13px; }
.fbo-box-table th { position: sticky; z-index: 1; top: 0; height: 36px; padding: 7px 9px; border-right: 1px solid #d8e0e8; background: #edf2f7; color: #435267; font-size: 11px; text-transform: uppercase; }
.fbo-box-table td { min-width: 0; height: 48px; padding: 7px 9px; border-right: 1px solid #d8e0e8; border-bottom: 1px solid #d8e0e8; vertical-align: middle; overflow-wrap: anywhere; }
.fbo-box-table th:last-child,
.fbo-box-table td:last-child { border-right: 0; }
.fbo-box-table tbody tr:last-child td { border-bottom: 0; }
.fbo-box-table th:nth-child(1) { width: 16%; }
.fbo-box-table th:nth-child(2) { width: 30%; }
.fbo-box-table th:nth-child(3) { width: 14%; }
.fbo-box-table th:nth-child(4) { width: 15%; }
.fbo-box-table th:nth-child(5) { width: 15%; }
.fbo-box-table th:nth-child(6) { width: 10%; }
.fbo-box-table tbody tr { transition: background-color .15s ease; }
.fbo-box-table tbody tr:hover td { background: #f7faff; }
.fbo-box-table tbody tr.fbo-box-row-latest td { background: #e8f7ee; }
.fbo-box-table tbody tr.fbo-box-row-latest td:first-child { box-shadow: inset 3px 0 #15945a; }
.fbo-box-code { font-weight: 700; }
.fbo-box-name strong { display: block; }
.fbo-latest-badge { display: inline-flex; align-items: center; gap: 3px; margin-top: 3px; color: #087a45; font-size: 10px; font-weight: 700; }
.fbo-latest-badge svg { width: 12px; height: 12px; }
.fbo-box-identifier { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; font-variant-numeric: tabular-nums; }
.fbo-box-quantity-inner { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fbo-box-quantity-inner > div { display: grid; gap: 1px; }
.fbo-box-quantity strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.fbo-box-quantity span { color: #087a45; font-size: 10px; font-weight: 700; }
.fbo-remove-unit { display: grid; place-items: center; flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 1px solid #efb4b8; border-radius: 6px; background: #fff; color: #b4232c; }
.fbo-remove-unit:hover { background: #fff0f1; }
.fbo-remove-unit svg { width: 15px; height: 15px; }
.fbo-box-empty { display: grid; place-items: center; gap: 3px; min-height: 110px; color: #65758b; text-align: center; }
.fbo-box-empty strong { color: #263442; font-size: 14px; }

.fbo-dialog-heading { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; }
.fbo-dialog-heading h2 { margin-bottom: 3px; }
.fbo-dialog-heading p { font-size: 13px; }
.fbo-dialog-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #e8f7ee; color: #087a45; }
.fbo-dialog-icon svg { width: 21px; height: 21px; }
.fbo-confirm-box-code { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 16px; padding: 9px 11px; border: 1px solid #cbd5e1; border-radius: 7px; background: #f7f9fc; }
.fbo-confirm-box-code span { color: #65758b; font-size: 12px; }
.fbo-confirm-box-code strong { font-size: 17px; }
.fbo-confirm-scan { display: grid; gap: 5px; margin-top: 12px; }
.fbo-confirm-scan > span { color: #435267; font-size: 12px; font-weight: 700; }
.fbo-confirm-scan .scan { width: 100%; min-height: 48px; padding: 10px 12px; font-size: 16px; }
.fbo-inline-message { min-height: 22px; padding-top: 6px; color: #65758b; font-size: 12px; }
.fbo-inline-message.error { color: #b4232c; }
.fbo-inline-message.success { color: #087a45; }
.settings-tabs { display: flex; gap: 4px; padding: 14px 18px 0; }
.settings-tabs a { padding: 9px 22px; border: 1px solid #ccd4dd; color: #263442; text-decoration: none; background: #fff; }
.settings-tabs a.active { background: #185ab8; color: #fff; border-color: #185ab8; }
.fbo-save-bar { border-top: 1px solid #c9d1da; box-shadow: 0 -4px 12px rgba(27, 39, 51, .08); }
.fbo-save-bar .save-note { color: #65758b; }
.fbo-save-bar.settings-dirty { border-top-color: #d99a12; background: #fffbeb; }
.fbo-save-bar.settings-dirty .save-note { color: #8a5700; }
.msg { overflow-wrap: anywhere; }
.form select, .form input { max-width: 100%; }
.form .attr-row input:not([type]) { min-width: 280px; padding: 9px 12px; font: inherit; border: 1px solid #c9d1da; border-radius: 7px; background: #fff; }
.fbo-directory { display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; }
.fbo-directory-value { display: inline-flex; align-items: center; gap: 7px; padding: 6px 8px 6px 12px; border: 1px solid #aab4c0; border-radius: 6px; background: #fff; }
.fbo-directory-value button { padding: 0 5px; border: 0; color: #a01b1b; font-size: 18px; line-height: 1; }

/* FBO settings: compact operational UI */
.fbo-settings-page {
  min-width: 960px;
  padding-bottom: 66px;
  background: #f4f6f8;
  color: #17212b;
  font-family: Inter, Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}
.fbo-settings-page button,
.fbo-settings-page input,
.fbo-settings-page select { font: inherit; }
.fbo-settings-page button:focus-visible,
.fbo-settings-page input:focus-visible,
.fbo-settings-page select:focus-visible,
.fbo-settings-page a:focus-visible { outline: 2px solid #2f6fe4; outline-offset: 2px; }
.fbo-settings-top {
  position: sticky; z-index: 50; top: 0;
  height: 56px; padding: 0 20px;
  border-bottom: 1px solid #d7dee7; background: #fff;
}
.fbo-settings-identity { gap: 10px; }
.fbo-settings-identity > svg { width: 19px; height: 19px; color: #52606d; }
.fbo-settings-identity > b { font-size: 16px; }
.button-with-icon { display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button-with-icon svg { width: 17px; height: 17px; }
.fbo-settings-page .top-right { gap: 8px; }
.fbo-settings-page .top-right .ghost { min-height: 36px; padding: 7px 11px; border-radius: 7px; }
.fbo-settings-pill {
  display: inline-flex; align-items: center; min-height: 24px; padding: 3px 8px;
  border: 1px solid #d7dee7; border-radius: 6px; background: #f4f6f8;
  color: #52606d; font-size: 12px; font-weight: 700;
}
.fbo-settings-pill.ready { border-color: #abd7bd; background: #e8f6ed; color: #0e7040; }
.fbo-settings-pill.warning { border-color: #edcf8c; background: #fff7df; color: #835800; }
.fbo-settings-pill.error { border-color: #efb7b7; background: #fff0f0; color: #ae2529; }
.fbo-settings-page .settings-tabs {
  position: sticky; z-index: 45; top: 56px;
  gap: 20px; height: 44px; padding: 0 20px;
  border-bottom: 1px solid #d7dee7; background: #fff;
}
.fbo-settings-page .settings-tabs a {
  display: grid; place-items: center; padding: 0 2px;
  border: 0; border-bottom: 2px solid transparent; background: transparent;
  color: #52606d; font-size: 13px; font-weight: 700;
}
.fbo-settings-page .settings-tabs a.active {
  border-color: #2f6fe4; background: transparent; color: #185ab8;
}
.fbo-settings-main { display: grid; gap: 12px; padding: 12px 20px 24px; }
.fbo-settings-message:empty { display: none; }
.fbo-settings-message { margin: 0; border-radius: 7px; }
.fbo-settings-band {
  overflow: visible; border: 1px solid #d7dee7; border-radius: 8px; background: #fff;
}
.fbo-settings-band-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 54px; padding: 10px 14px; border-bottom: 1px solid #e2e7ed;
}
.fbo-settings-band-head h1,
.fbo-settings-band-head h2 { margin: 0; color: #17212b; font-size: 16px; line-height: 1.3; letter-spacing: 0; }
.fbo-settings-band-head p { margin: 2px 0 0; color: #687687; font-size: 12px; line-height: 1.35; }
.fbo-section-tag {
  padding: 4px 7px; border-radius: 5px; background: #eef2f6;
  color: #52606d; font-size: 11px; font-weight: 700;
}
.fbo-settings-band-head .primary { min-height: 34px; padding: 7px 11px; border-radius: 7px; font-size: 13px; }

.fbo-readiness-band { border-left: 3px solid #2f6fe4; }
.fbo-readiness-summary {
  display: grid; grid-template-columns: minmax(300px, 1.5fr) minmax(230px, 1fr) 120px 140px;
  min-height: 70px; border-bottom: 1px solid #e2e7ed;
}
.fbo-readiness-summary > div { min-width: 0; padding: 12px 14px; border-right: 1px solid #e2e7ed; }
.fbo-readiness-summary > div:last-child { border-right: 0; }
.fbo-readiness-main { display: flex; align-items: center; gap: 10px; }
.fbo-readiness-main > div { display: grid; gap: 2px; }
.fbo-readiness-main strong { font-size: 14px; }
.fbo-readiness-main span { color: #687687; font-size: 12px; }
.fbo-readiness-icon { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: #eef2f6; color: #52606d; }
.fbo-readiness-icon svg { width: 18px; height: 18px; }
.fbo-readiness-icon.ready { background: #e8f6ed; color: #0e7040; }
.fbo-readiness-icon.warning { background: #fff4d6; color: #835800; }
.fbo-readiness-icon.error { background: #fff0f0; color: #ae2529; }
.fbo-readiness-progress { display: grid; align-content: center; gap: 7px; }
.fbo-readiness-progress span { color: #687687; font-size: 12px; }
.fbo-readiness-progress span b { color: #17212b; }
.fbo-readiness-progress progress { width: 100%; height: 7px; border: 0; border-radius: 4px; overflow: hidden; accent-color: #248653; }
.fbo-readiness-progress progress::-webkit-progress-bar { background: #e4e9ef; }
.fbo-readiness-progress progress::-webkit-progress-value { background: #248653; }
.fbo-readiness-metric { display: grid; align-content: center; gap: 2px; }
.fbo-readiness-metric span { color: #687687; font-size: 11px; }
.fbo-readiness-metric strong { font-size: 21px; line-height: 1; font-variant-numeric: tabular-nums; }
.fbo-readiness-checks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fbo-readiness-check { display: flex; gap: 8px; min-width: 0; padding: 9px 12px; border-right: 1px solid #e2e7ed; border-bottom: 1px solid #e2e7ed; }
.fbo-readiness-check:nth-child(4n) { border-right: 0; }
.fbo-readiness-check:nth-last-child(-n+4) { border-bottom: 0; }
.fbo-readiness-check > svg { flex: 0 0 auto; width: 15px; height: 15px; margin-top: 1px; }
.fbo-readiness-check > span { display: grid; min-width: 0; gap: 1px; }
.fbo-readiness-check b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fbo-readiness-check small { overflow: hidden; color: #7b8794; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fbo-readiness-check.ready { color: #0e7040; }
.fbo-readiness-check.warning { color: #835800; }
.fbo-readiness-check.error { color: #ae2529; }

.fbo-status-grid { display: grid; grid-template-columns: 1fr 1fr 1.15fr; }
.fbo-status-group,
.fbo-status-transitions { min-width: 0; padding: 12px 14px; border-right: 1px solid #e2e7ed; }
.fbo-status-grid > :last-child { border-right: 0; }
.fbo-status-group-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.fbo-status-group-head > div { display: grid; gap: 1px; }
.fbo-status-group-head strong { color: #43505e; font-size: 12px; }
.fbo-status-group-head span { color: #7b8794; font-size: 10px; }
.fbo-status-control { position: relative; min-width: 0; }
.fbo-status-selection { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 34px; }
.fbo-status-chip { display: inline-flex; align-items: center; max-width: 100%; height: 28px; padding-left: 8px; border: 1px solid #a9c4e9; border-radius: 6px; background: #eef5ff; color: #174f9e; font-size: 11px; font-weight: 700; }
.fbo-status-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbo-status-chip button { display: grid; place-items: center; flex: 0 0 auto; width: 26px; height: 26px; padding: 0; border: 0; background: transparent; color: #526f95; }
.fbo-status-chip button:hover { background: #dbe9fb; color: #174f9e; }
.fbo-status-chip svg { width: 13px; height: 13px; }
.fbo-status-empty { color: #8994a1; font-size: 11px; }
.fbo-status-add { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 4px 8px; border: 1px solid #9bb9df; border-radius: 6px; background: #fff; color: #185ab8; font-size: 11px; font-weight: 700; }
.fbo-status-add:hover { border-color: #2f6fe4; background: #eef5ff; }
.fbo-status-add svg { width: 14px; height: 14px; }
.fbo-status-control.open .fbo-status-add { border-color: #2f6fe4; box-shadow: 0 0 0 2px #dbe6ff; }
.fbo-status-menu { position: absolute; z-index: 110; bottom: calc(100% + 5px); left: 0; width: min(430px, calc(100vw - 48px)); padding: 7px; border: 1px solid #bfc9d5; border-radius: 7px; background: #fff; box-shadow: 0 12px 28px rgba(25, 41, 61, .18); }
.fbo-status-transitions .fbo-status-menu { right: 0; left: auto; }
.fbo-status-search { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px; border: 1px solid #c6d0db; border-radius: 6px; }
.fbo-status-search:focus-within { border-color: #2f6fe4; box-shadow: 0 0 0 2px #dbe6ff; }
.fbo-status-search svg { width: 15px; height: 15px; color: #687687; }
.fbo-status-search input { width: 100%; min-width: 0; border: 0; outline: 0; }
.fbo-status-results { display: grid; max-height: 248px; margin-top: 5px; overflow-y: auto; }
.fbo-status-result { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 36px; padding: 5px 8px; border: 0; border-radius: 5px; background: #fff; color: #263442; text-align: left; }
.fbo-status-result:hover,
.fbo-status-result.selected { background: #eef4ff; color: #174f9e; }
.fbo-status-result > span { display: grid; min-width: 0; }
.fbo-status-result b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fbo-status-result small { color: #7b8794; font-size: 10px; }
.fbo-status-result svg { flex: 0 0 auto; width: 15px; height: 15px; }
.fbo-status-transitions { display: grid; gap: 10px; align-content: start; }
.fbo-transition-row { display: grid; grid-template-columns: minmax(145px, .85fr) minmax(170px, 1fr); align-items: start; gap: 8px; min-height: 34px; }
.fbo-transition-row > span { padding-top: 6px; color: #43505e; font-size: 12px; font-weight: 700; }
.fbo-transition-row .fbo-status-chip { max-width: calc(100% - 82px); }

.fbo-mapping-wrap { overflow: visible; }
.fbo-mapping-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fbo-mapping-table th,
.fbo-mapping-table td { height: 48px; padding: 7px 12px; border-right: 1px solid #e2e7ed; border-bottom: 1px solid #e2e7ed; text-align: left; vertical-align: middle; }
.fbo-mapping-table th:last-child,
.fbo-mapping-table td:last-child { border-right: 0; }
.fbo-mapping-table tbody tr:last-child td { border-bottom: 0; }
.fbo-mapping-table th { height: 34px; background: #f4f6f8; color: #52606d; font-size: 11px; text-transform: uppercase; }
.fbo-mapping-table th:nth-child(1) { width: 25%; }
.fbo-mapping-table th:nth-child(2) { width: 16%; }
.fbo-mapping-table th:nth-child(3) { width: 13%; }
.fbo-mapping-table th:nth-child(4) { width: 34%; }
.fbo-mapping-table th:nth-child(5) { width: 12%; }
.fbo-mapping-table td > strong { display: block; font-size: 13px; }
.fbo-mapping-table td > small { display: block; margin-top: 1px; color: #7b8794; font-size: 11px; }
.fbo-map-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; }
.fbo-map-status svg { width: 14px; height: 14px; }
.fbo-map-status.ready { color: #0e7040; }
.fbo-map-status.missing { color: #ae2529; }

.fbo-settings-combobox { position: relative; min-width: 0; }
.fbo-combo-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; height: 34px; padding: 5px 8px 5px 10px;
  border: 1px solid #c6d0db; border-radius: 6px; background: #fff; color: #17212b; text-align: left;
}
.fbo-combo-trigger:hover { border-color: #8ca7c7; background: #fff; }
.fbo-combo-trigger span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fbo-combo-trigger .placeholder { color: #7b8794; }
.fbo-combo-trigger svg { flex: 0 0 auto; width: 15px; height: 15px; color: #687687; }
.fbo-settings-combobox.open .fbo-combo-trigger { border-color: #2f6fe4; box-shadow: 0 0 0 2px #dbe6ff; }
.fbo-combo-menu {
  position: absolute; z-index: 80; top: calc(100% + 4px); left: 0; width: max(100%, 360px);
  padding: 7px; border: 1px solid #bfc9d5; border-radius: 7px; background: #fff;
  box-shadow: 0 12px 28px rgba(25, 41, 61, .18);
}
.fbo-combo-search { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 8px; border: 1px solid #c6d0db; border-radius: 6px; }
.fbo-combo-search:focus-within { border-color: #2f6fe4; box-shadow: 0 0 0 2px #dbe6ff; }
.fbo-combo-search svg { width: 15px; height: 15px; color: #687687; }
.fbo-combo-search input { width: 100%; min-width: 0; border: 0; outline: 0; }
.fbo-combo-options { display: grid; max-height: 230px; margin-top: 5px; overflow-y: auto; }
.fbo-combo-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 34px; padding: 5px 8px; border: 0; border-radius: 5px; background: #fff; color: #263442; text-align: left; }
.fbo-combo-option:hover,
.fbo-combo-option.selected { background: #eef4ff; color: #174f9e; }
.fbo-combo-option > span { display: grid; min-width: 0; }
.fbo-combo-option b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fbo-combo-option small { overflow: hidden; color: #7b8794; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.fbo-combo-option svg { flex: 0 0 auto; width: 15px; height: 15px; }
.fbo-combo-empty,
.fbo-settings-empty { display: block; padding: 9px; color: #7b8794; font-size: 12px; }

.fbo-directory-grid { display: grid; grid-template-columns: 1fr 1fr; }
.fbo-directory-panel { min-width: 0; padding: 12px 14px; }
.fbo-directory-panel + .fbo-directory-panel { border-left: 1px solid #e2e7ed; }
.fbo-directory-title { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.fbo-directory-title strong { font-size: 13px; }
.fbo-directory-title span { overflow: hidden; color: #7b8794; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.fbo-settings-page .fbo-directory { align-content: flex-start; min-height: 38px; gap: 5px; }
.fbo-settings-page .fbo-directory-value { gap: 4px; padding: 4px 4px 4px 8px; border-color: #ccd5df; border-radius: 5px; background: #f7f9fb; font-size: 12px; }
.fbo-settings-page .fbo-directory-value button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; background: transparent; }
.fbo-settings-page .fbo-directory-value button svg { width: 13px; height: 13px; }
.fbo-directory-add { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 8px; }
.fbo-directory-add input { min-width: 0; height: 34px; padding: 6px 9px; border: 1px solid #c6d0db; border-radius: 6px; }
.fbo-directory-add button { min-height: 34px; padding: 6px 9px; border-radius: 6px; }

.fbo-shipment-settings { display: grid; }
.fbo-shipment-row { display: grid; grid-template-columns: minmax(250px, .8fr) minmax(360px, 1.2fr) 140px; gap: 16px; align-items: center; min-height: 54px; padding: 9px 14px; border-bottom: 1px solid #e2e7ed; }
.fbo-shipment-row:last-child { border-bottom: 0; }
.fbo-shipment-row > div:first-child { display: grid; gap: 2px; }
.fbo-shipment-row > div:first-child strong { font-size: 13px; }
.fbo-shipment-row > div:first-child span { color: #7b8794; font-size: 11px; }
.fbo-code-row { align-items: start; }
.fbo-code-settings { display: grid; grid-template-columns: 1.4fr 1fr 72px 100px 1fr; gap: 8px; align-items: end; }
.fbo-code-settings > label { display: grid; gap: 3px; }
.fbo-code-settings > label > span,
.fbo-code-preview > span { color: #687687; font-size: 10px; font-weight: 700; }
.fbo-code-settings input { width: 100%; height: 34px; padding: 6px 8px; border: 1px solid #c6d0db; border-radius: 6px; }
.fbo-segmented { display: grid; grid-template-columns: 1fr 1fr; height: 34px; border: 1px solid #c6d0db; border-radius: 6px; overflow: hidden; }
.fbo-segmented label { position: relative; display: grid; place-items: center; cursor: pointer; }
.fbo-segmented label + label { border-left: 1px solid #c6d0db; }
.fbo-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.fbo-segmented span { display: grid; place-items: center; width: 100%; height: 100%; color: #52606d; font-size: 11px; font-weight: 700; }
.fbo-segmented input:checked + span { background: #e8f0ff; color: #185ab8; box-shadow: inset 0 -2px #2f6fe4; }
.fbo-code-preview { display: grid; gap: 3px; min-width: 0; }
.fbo-code-preview strong { overflow: hidden; height: 34px; padding: 7px 8px; border-radius: 6px; background: #f0f3f6; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.fbo-toggle { display: inline-flex; align-items: center; gap: 8px; width: max-content; cursor: pointer; font-size: 12px; font-weight: 700; }
.fbo-toggle input { width: 36px; height: 20px; margin: 0; accent-color: #2f6fe4; }

.fbo-settings-page .fbo-save-bar {
  z-index: 100; display: flex; align-items: center; justify-content: space-between;
  min-height: 58px; padding: 8px 20px; background: #fff;
}
.fbo-settings-page .save-note { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; }
.fbo-settings-page .save-note svg { width: 16px; height: 16px; }
.fbo-settings-page .fbo-save-bar .primary { min-width: 156px; min-height: 38px; padding: 7px 12px; border-radius: 7px; }

@media (max-width: 1600px) {
  .fbo-filter-grid { grid-template-columns: repeat(24, minmax(0, 1fr)); }
  .fbo-search-field { grid-column: span 5; }
  .fbo-marketplace-field, .fbo-shipment-field, .fbo-agent-field { grid-column: span 3; }
  .fbo-date-field { grid-column: span 7; }
  .fbo-filter-actions { grid-column: span 3; }
}
@media (max-width: 1320px) {
  .fbo-readiness-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fbo-readiness-check:nth-child(4n) { border-right: 1px solid #e2e7ed; }
  .fbo-readiness-check:nth-child(3n) { border-right: 0; }
  .fbo-readiness-check:nth-last-child(-n+4) { border-bottom: 1px solid #e2e7ed; }
  .fbo-readiness-check:nth-last-child(-n+3) { border-bottom: 0; }
  .fbo-code-settings { grid-template-columns: 1.3fr 1fr 72px 100px; }
  .fbo-code-preview { grid-column: 1 / -1; }
}
@media (max-width: 1200px) {
  .fbo-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fbo-search-field, .fbo-marketplace-field, .fbo-shipment-field, .fbo-agent-field { grid-column: span 1; }
  .fbo-date-field { grid-column: 1 / -1; }
  .fbo-filter-actions { grid-column: 1 / -1; }
  #clear-order-filters { width: auto; padding: 6px 10px; }
  #clear-order-filters span { display: inline; }
  .fbo-supply-info { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 0; }
  .fbo-supply-fact:nth-child(4) { border-right: 0; }
  .fbo-supply-fact:nth-child(5) { padding-left: 0; }
  .fbo-management { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .fbo-orders-table th:last-child,
  .fbo-orders-table td:last-child {
    position: sticky; right: 0; z-index: 3; background: #fff; box-shadow: -1px 0 #d6dee8;
  }
  .fbo-orders-table th:last-child { z-index: 4; background: #edf2f7; }
  .fbo-orders-table tbody tr:nth-child(even) td:last-child { background: #fafbfd; }
  .fbo-boxes-table th, .fbo-boxes-table td { padding: 6px 7px; font-size: 12px; }
  .fbo-boxes-table col:nth-child(1) { width: 36px !important; }
  .fbo-boxes-table col:nth-child(2) { width: 145px !important; }
  .fbo-boxes-table col:nth-child(3) { width: 115px !important; }
  .fbo-boxes-table col:nth-child(4) { width: 110px !important; }
  .fbo-boxes-table col:nth-child(5) { width: 135px !important; }
  .fbo-boxes-table col:nth-child(6) { width: 62px !important; }
  .fbo-boxes-table col:nth-child(7) { width: 52px !important; }
  .fbo-boxes-table col:nth-child(8) { width: 130px !important; }
  .fbo-boxes-table th:last-child,
  .fbo-boxes-table td:last-child {
    position: sticky; right: 0; z-index: 3; min-width: 116px;
    background: #fff; box-shadow: -1px 0 #d6dee8;
  }
  .fbo-boxes-table th:last-child { z-index: 4; background: #edf2f7; }
  .fbo-boxes-table tbody tr:nth-child(even) td:last-child { background: #fafbfd; }
  .fbo-box-row.selected td:last-child { background: #eaf3ff; }
  .fbo-box-row.error td:last-child { background: #fff5f5; }
  .fbo-box-actions { justify-content: flex-start; }
  .fbo-box-actions .fbo-row-action { width: 32px; justify-content: center; padding: 5px; }
  .fbo-box-actions .fbo-row-action span { display: none; }
}
@media (max-width: 760px) {
  .top { height: auto; min-height: 62px; flex-wrap: wrap; align-items: flex-start; padding: 10px 16px; }
  .top-left { min-height: 40px; align-items: center; }
  .top-right { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .top-right > button, .top-right > a { width: 100%; min-width: 0; min-height: 42px; white-space: normal; text-align: center; }
  .form { padding-left: 16px; padding-right: 16px; }
  .form .attr-row { flex-wrap: wrap; align-items: end; }
  .form .attr-row label { display: grid; gap: 5px; width: 100%; }
  .form select, .form input { width: 100%; min-width: 0 !important; }
  .msg { width: 100%; max-width: 100vw; white-space: normal; }
  .fbo-main { padding: 10px; }
  #fbo-orders:not([hidden]) { height: auto; min-height: 0; }
  .fbo-section-head { align-items: flex-start; }
  .fbo-section-head > div { display: block; }
  .fbo-section-head h1 { font-size: 21px; }
  .fbo-section-head p { margin-top: 2px; }
  .fbo-filter-panel { padding: 10px; }
  .fbo-filter-grid { grid-template-columns: 1fr; gap: 13px; }
  .fbo-search-field, .fbo-marketplace-field, .fbo-shipment-field, .fbo-date-field, .fbo-agent-field { grid-column: span 1; }
  .fbo-date-row { grid-template-columns: 1fr auto 1fr; }
  .fbo-period-segment { grid-column: 1 / -1; }
  .fbo-filter-actions { display: grid; grid-column: span 1; grid-template-columns: 1fr 1fr; }
  .fbo-filter-actions button { width: 100%; min-width: 0; }
  .fbo-multi-menu { position: fixed; z-index: 60; top: auto; left: 12px; right: 12px; bottom: 12px; width: auto; max-width: none; max-height: 60vh; }
  .fbo-list-panel { min-height: 420px; }
  .fbo-pagination { align-items: flex-start; }
  .fbo-pagination label { display: grid; }
  .fbo-detail-section { margin-bottom: 12px; }
  .fbo-detail-title { align-items: flex-start; flex-direction: column; gap: 4px; }
  .fbo-section-count { margin-left: 0; }
  .fbo-supply-info { grid-template-columns: 1fr; padding: 6px 14px; }
  .fbo-supply-fact, .fbo-supply-fact:first-child, .fbo-supply-fact:nth-child(5) { padding: 10px 0; border-right: 0; border-bottom: 1px solid #e2e7ed; }
  .fbo-supply-fact:last-child { border-bottom: 0; }
  .fbo-assembly-summary .fbo-supply-info { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 6px 8px; }
  .fbo-assembly-summary .fbo-supply-fact,
  .fbo-assembly-summary .fbo-supply-fact:first-child,
  .fbo-assembly-summary .fbo-supply-fact:nth-child(5) { padding: 5px 7px; border-right: 1px solid #e2e7ed; border-bottom: 1px solid #e2e7ed; }
  .fbo-assembly-summary .fbo-supply-fact:nth-child(even) { border-right: 0; }
  .fbo-assembly-summary .fbo-management { grid-template-columns: 1fr; padding: 6px 8px; }
  .fbo-assembly-summary .fbo-management-actions { display: flex; }
  .fbo-assembly-summary .fbo-management-actions button { width: auto; }
  .fbo-assembly-summary .fbo-assembly-notice { grid-template-columns: auto 1fr; }
  .fbo-assembly-summary .fbo-assembly-notice::before { grid-row: 1 / 3; }
  .fbo-management { padding: 12px 14px; }
  .fbo-management-actions { display: grid; grid-template-columns: 1fr; }
  .fbo-management-actions button { width: 100%; white-space: normal; }
  .fbo-assembly-notice { grid-template-columns: auto 1fr; }
  .fbo-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .fbo-box-start-notice { align-items: stretch; flex-direction: column; }
  .fbo-box-start-notice > button { width: 100%; }
  .fbo-box-table-wrap { overflow-x: auto; }
  .fbo-box-table { min-width: 760px; }
}
