/* Internal operations shell. Existing business panels and role gates are retained. */
:root { --ink:#23312d; --muted:#66736d; --line:#dce3dc; --ground:#f5f6f2; --nav:#203b32; --accent:#c5a46d; }
.sidebar { overflow-y:auto; padding:30px 18px 22px; }
.primary-nav { margin-top:34px; }
.primary-nav a { flex-direction:column; align-items:flex-start; gap:5px; min-height:48px; }
.primary-nav a.active { background:#e7eee7; color:#203b32; }
.primary-nav a.active small { color:#50695b; }
.primary-nav small { color:#b3c5bb; }
.primary-nav .nav-group-label { color:#b3c5bb; }
.sidebar-footer { padding-top:24px; color:#b3c5bb; }
.topbar { position:sticky; top:0; z-index:30; padding:22px 36px; background:#fbfcf9; }
.topbar .eyebrow { color:#66736d; }
.content { padding:28px 36px 64px; }
section[id], main[id] { scroll-margin-top:112px; }
.operations-launcher { display:grid; grid-template-columns:1fr minmax(240px,340px); gap:24px; padding:30px; background:#fff; border:1px solid var(--line); border-radius:16px; }
.operations-launcher h2 { margin:0 0 10px; font-size:clamp(1.5rem,2.5vw,2rem); letter-spacing:-.05em; }
.operations-launcher p { color:var(--muted); font-size:.88rem; line-height:1.65; margin-bottom:0; }
.operations-launcher .eyebrow { margin-bottom:10px; font-size:.7rem; }
.operations-search { display:flex; gap:8px; margin-top:8px; }
.operations-search input { min-width:0; padding:11px 12px; }
.operations-search button { flex-shrink:0; background:var(--nav); color:#fff; }
#operations-search-status { min-height:1.65em; font-size:.78rem; margin-top:6px; }
.operations-destinations { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-column:1/-1; border-top:1px solid var(--line); padding-top:22px; gap:12px; }
.operations-destinations a { display:flex; flex-direction:column; gap:8px; padding:16px; color:var(--ink); background:#f6f8f4; border:1px solid transparent; border-radius:10px; text-decoration:none; }
.operations-destinations a:hover { background:#edf2ea; border-color:#9aac9c; }
.operations-destinations span { color:#667c6b; font-size:.72rem; font-weight:700; }
.operations-destinations strong { font-size:.92rem; }
.operations-destinations small { font-size:.74rem; color:var(--muted); line-height:1.5; }
.panel { border-radius:14px; }
#operations-return { margin-top:8px; padding:6px 0; color:#365b48; background:transparent; text-align:left; font-size:.78rem; }
.operations-task-nav { display:flex; flex-wrap:wrap; gap:8px; margin:20px 0; }
.operations-task-nav a { display:inline-flex; align-items:center; min-height:44px; padding:10px 14px; border:1px solid var(--line); border-radius:8px; background:#f6f8f4; color:#284d39; font-size:.86rem; font-weight:700; text-decoration:none; }
.operations-task-nav a:hover { background:#e7eee7; }
.operations-source-tools { margin:18px 0; border:1px solid var(--line); border-radius:10px; padding:14px; }
.operations-source-tools > summary { cursor:pointer; color:#4c6556; font-size:.84rem; font-weight:700; min-height:24px; }
.operations-source-tools[open] > summary { margin-bottom:16px; }
.project-progress-fold { margin:16px 36px 0; }
@media (max-width:1100px) {
  .operations-launcher { grid-template-columns:1fr; }
  .operations-destinations { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .account { flex-wrap:wrap; justify-content:flex-end; }
}
@media (max-width:760px) {
  .app-shell { grid-template-columns:1fr; }
  .sidebar { display:none; }
  .menu-button { display:block; }
  .topbar { gap:12px; padding:16px; flex-wrap:wrap; }
  .topbar h1 { font-size:1.2rem; }
  .account { margin-left:auto; font-size:.75rem; }
  .content { padding:18px 16px 40px; }
  .operations-launcher { padding:20px; gap:18px; }
  .operations-destinations { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .operations-destinations a { padding:12px; min-height:110px; }
  .operations-destinations a:last-child { grid-column:1/-1; min-height:auto; }
  .project-progress-fold { margin:12px 16px; }
  .mobile-nav { position:sticky; top:105px; z-index:29; max-height:60vh; overflow:auto; }
  .mobile-nav a { min-height:44px; }
  section[id], main[id] { scroll-margin-top:170px; }
}

/* Connected B2B preparation: summary, quantities and existing fulfillment links. */
.b2b-quote-order-prep { max-width:52rem; padding:20px; margin:16px 0; border:1px solid var(--line); border-radius:12px; background:#fff; }
.b2b-quote-order-prep > h6 { margin:0 0 12px; font-size:1rem; }
.b2b-prep-summary { font-weight:700; }
.b2b-prep-items { list-style:none; padding:0 !important; }
.b2b-prep-items > li { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 16px; padding:16px 0; border-bottom:1px solid var(--line); }
.b2b-prep-items > li > span { grid-column:1; color:var(--muted); }
.b2b-prep-items > li > label { grid-column:2; grid-row:1/3; align-self:center; }
.b2b-prep-items details { grid-column:1/-1; overflow-wrap:anywhere; }
.b2b-quote-order-prep button { min-height:44px; margin:4px; }
.b2b-quote-order-prep [role="status"] { overflow-wrap:anywhere; }
.b2b-quote-order-prep .shadow-shipment-group details { overflow-wrap:anywhere; }
.b2b-quote-order-prep [aria-invalid="true"] { border:2px solid #9f3636; }
@media (max-width:520px) {
  .b2b-prep-items > li { grid-template-columns:minmax(0,1fr); }
  .b2b-prep-items > li > label { grid-column:1; grid-row:auto; }
}

/* Native order shipment allocation: keep selection, amount and result together. */
.native-allocation-row { display:grid; grid-template-columns:5rem minmax(0,1fr) auto; gap:10px; padding:16px 0; align-items:start; }
.native-allocation-row input[type="number"] { width:100%; min-width:0; }
.native-shipment-select-panel { display:grid; gap:8px; min-width:0; }
.native-shipment-candidates-select { width:100%; min-width:0; max-width:100%; }
.native-allocation-status { grid-column:1/-1; margin:0; overflow-wrap:anywhere; }
.native-allocation-notice { padding:12px; border-left:3px solid #42664e; background:#edf4ec; overflow-wrap:anywhere; }
.native-shipment-open-form { overflow-wrap:anywhere; }
@media(max-width:650px) { .native-allocation-row { grid-template-columns:minmax(0,1fr); } }

.native-dispatch-details { margin:12px 0; }
.native-dispatch-details summary { cursor:pointer; min-height:32px; }

.service-case-assignment-form { border:1px solid var(--line); border-radius:10px; padding:16px; display:flex; flex-wrap:wrap; align-items:end; gap:12px; }
.service-case-assignment-form > p { flex-basis:100%; margin:0; }
.service-case-assignment-form > label { min-width:0; flex:1 1 220px; }
.service-case-assignment-form select { width:100%; min-width:0; }
.service-case-assignment-form button { min-height:44px; }

.order-refund-overview { margin:20px 0; padding:16px; border:1px solid var(--line); border-radius:10px; max-width:52rem; }
.order-refund-overview article { padding:12px 0; border-bottom:1px solid var(--line); }
.order-refund-overview p { overflow-wrap:anywhere; }
.order-refund-overview button { min-height:44px; }

/* Actual ledger reader and internal refund draft controls. */
.inventory-location-overview { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line, #ddd); border-radius: 12px; }
.inventory-location-overview select, .refund-draft-editor input { max-width: 100%; min-width: 0; }
.inventory-location-overview li { margin-block: .65rem; overflow-wrap: anywhere; }
.inventory-location-overview details, .refund-draft-editor { margin-block: .65rem; }
.refund-draft-editor label { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-right: .5rem; }
.refund-draft-editor p, .inventory-location-overview p { overflow-wrap: anywhere; }
@media (max-width: 600px) { .inventory-location-overview label, .refund-draft-editor label { display: flex; flex-direction: column; align-items: stretch; } }

/* Keep completed forms and unavailable actions out of the visible task flow. */
.inventory-location-overview [hidden], .order-refund-overview [hidden] { display: none !important; }
.inventory-transfer-action label { display: grid; gap: .35rem; max-width: 32rem; margin-block: .6rem; }
.inventory-transfer-action p { margin-block: .65rem; }

.shipment-tracking-bind-section label { display: grid; gap: .35rem; margin-block: .65rem; max-width: 32rem; }
.shipment-tracking-bind-section p { overflow-wrap: anywhere; }

/* Inventory count: summary first, entered values remain distinct from ledger. */
.inventory-count-workspace { margin-block: 1rem; }
.inventory-count-workspace[open] > summary { margin-bottom: .75rem; }
.inventory-count-workspace > label, .inventory-count-workspace > button { margin: .25rem; }
.inventory-count-lines { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .75rem; margin-block: .75rem; }
.inventory-count-lines article { padding: .75rem; border: 1px solid var(--border, #d6d9de); border-radius: .5rem; min-width: 0; }
.inventory-count-lines strong { overflow-wrap: anywhere; }
.inventory-count-lines label { display: flex; gap: .5rem; align-items: center; }
.inventory-count-lines input { min-width: 0; width: 8rem; max-width: 100%; }
.inventory-count-lines article > span { display: block; margin-block: .5rem; }
.inventory-count-workspace [hidden] { display: none !important; }

/* The original menu follows the actual header height without inline styles. */
@media(max-width:960px){.topbar>.mobile-nav{position:absolute;top:100%;left:0;right:0;max-height:60dvh;overflow:auto}}

@media(max-width:960px){.topbar>.mobile-nav{flex-wrap:wrap;white-space:normal;padding:12px 16px;box-shadow:0 10px 20px #183a2520}.topbar>.mobile-nav>a{flex:1 1 calc(50% - 8px);min-width:0}}
