/* UGARIT Inventory R31 — application components.
 * Loaded after the existing application styles and minimal-core-r31.css.
 * Screen-only overrides retain the established document and label print rules.
 * The original application continues to own drawer, dialog and data behaviour.
 */
@media screen {
  body.ugarit-minimal .app-shell { background: #f7f8fa; }
  body.ugarit-minimal .sidebar {
    background: #fff;
    border-right: 1px solid #e6e9e7;
    padding: 28px 16px 20px;
    scrollbar-width: thin;
    scrollbar-color: #d8dedb transparent;
  }
  body.ugarit-minimal .sidebar .wordmark { margin: 0 6px; }
  body.ugarit-minimal .workspace-tag {
    color: #626b68;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.1px;
    margin: 27px 12px 16px;
  }
  body.ugarit-minimal .sidebar nav { gap: 5px; padding-bottom: 8px; }
  body.ugarit-minimal .sidebar nav button {
    min-height: 43px;
    padding: 11px 12px;
    gap: 11px;
    color: #626b68;
    background: transparent;
    border: 0;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.35;
    font-weight: 500;
    box-shadow: none;
  }
  body.ugarit-minimal .sidebar nav button:hover { background: #f5f7f6; color: #1d2523; }
  body.ugarit-minimal .sidebar nav button.selected {
    background: #edf1ef;
    color: #1d2523;
    font-weight: 650;
    box-shadow: none;
  }
  body.ugarit-minimal .sidebar nav button svg { width: 18px; height: 18px; flex: 0 0 18px; }
  body.ugarit-minimal .sidebar nav button.selected svg { stroke-width: 2; }
  body.ugarit-minimal .nav-count {
    color: #3e554a;
    background: #dfe9e3;
    border-radius: 6px;
    font-size: 11px;
    padding: 2px 6px;
  }
  body.ugarit-minimal .sidebar-foot { padding: 18px 10px 0; }
  body.ugarit-minimal .private { color: #4e5a55; border-color: #e6e9e7; padding-top: 18px; font-size: 12px; }
  body.ugarit-minimal .private small { color: #626b68; font-size: 11px; }
  body.ugarit-minimal .sidebar-foot .text-button { padding: 9px 11px; margin-top: 12px; font-size: 12px; }
  body.ugarit-minimal .sidebar-foot p { color: #74807a; font-size: 10px; line-height: 1.65; }

  body.ugarit-minimal .main-area > .topbar {
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #e6e9e7;
    padding: 0 32px;
    box-shadow: none;
  }
  body.ugarit-minimal .crumb { gap: 10px; color: #74807a; font-size: 12px; }
  body.ugarit-minimal .crumb b { color: #1d2523; font-weight: 550; }
  body.ugarit-minimal .today { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .top-actions { gap: 12px; }
  body.ugarit-minimal .top-actions .icon-button { color: #626b68; border-radius: 10px; }
  body.ugarit-minimal .avatar { background: #edf1ef; color: #304339; font-size: 11px; }
  body.ugarit-minimal .bell i { background: #566f5e; }
  body.ugarit-minimal .global-shortcuts {
    top: 70px;
    padding: 10px 32px;
    gap: 8px;
    border-color: #e6e9e7;
    background: #fff;
  }
  body.ugarit-minimal .global-shortcuts button { font-size: 12px; padding: 8px 11px; }
  body.ugarit-minimal .global-shortcuts kbd { background: #edf0ee; color: #626b68; font-size: 10px; padding: 2px 5px; }
  body.ugarit-minimal .content { max-width: 1540px; padding: 32px 32px 0; }
  body.ugarit-minimal .page-heading { align-items: center; gap: 24px; margin-bottom: 27px; }
  body.ugarit-minimal .page-heading h1 { color: #1d2523; font-size: 30px; font-weight: 650; letter-spacing: -.85px; }
  body.ugarit-minimal .eyebrow { color: #626b68; font-size: 10px; font-weight: 600; letter-spacing: 1.1px; margin: 0 0 9px; }
  body.ugarit-minimal .page-heading p { color: #626b68; font-size: 14px; line-height: 1.6; margin-top: 9px; }
  body.ugarit-minimal .heading-actions { gap: 9px; }
  body.ugarit-minimal .heading-actions button { font-size: 13px; }
  body.ugarit-minimal .section-title { margin-bottom: 20px; }
  body.ugarit-minimal .section-title h2 { color: #1d2523; font-size: 18px; font-weight: 600; }
  body.ugarit-minimal .section-title p { color: #626b68; font-size: 13px; line-height: 1.55; }
  body.ugarit-minimal .app-footer { color: #74807a; padding: 26px 0 22px; font-size: 11px; }
  body.ugarit-minimal .app-footer > span:first-child { font-size: 10px; letter-spacing: 1px; font-weight: 550; }

  /* Overview and action cards share restrained surfaces and clear numbers. */
  body.ugarit-minimal :is(.panel, .price-checker, .order-card, .login-card, .migration-card) {
    background: #fff;
    border-color: #e6e9e7;
    border-radius: 14px;
    box-shadow: 0 2px 7px #1d252303;
  }
  body.ugarit-minimal .panel { padding: 24px; margin-bottom: 24px; }
  body.ugarit-minimal .stats { gap: 16px; }
  body.ugarit-minimal :is(.stats > div, .executive-stats > button, .order-summary-grid > button) {
    padding: 22px;
    background: #fff;
    border: 1px solid #e6e9e7;
    border-radius: 12px;
    box-shadow: 0 2px 6px #1d252302;
    color: #1d2523;
  }
  body.ugarit-minimal :is(.stats > div > span, .executive-stats > button > span, .order-summary-grid > button > span) {
    color: #626b68;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
  }
  body.ugarit-minimal :is(.stats > div > strong, .executive-stats > button > strong, .order-summary-grid > button > strong) {
    color: #1d2523;
    font-size: 31px;
    font-weight: 600;
    letter-spacing: -1px;
    line-height: 1.2;
    margin: 15px 0 9px;
    font-variant-numeric: tabular-nums;
  }
  body.ugarit-minimal :is(.stats > div > small, .executive-stats > button > small) { color: #626b68; font-size: 12px; line-height: 1.6; }
  body.ugarit-minimal .stats > div > span svg { color: #7b8981; }
  body.ugarit-minimal .executive-stats .alert-card { background: #fffaf2; border-color: #eadfc9; }
  body.ugarit-minimal .executive-stats .alert-card > strong { color: #956022; }
  body.ugarit-minimal .live-refresh-note { color: #626b68; font-size: 12px; margin: -9px 0 23px; }
  body.ugarit-minimal .feature-panel { background: #edf2ef; border: 1px solid #e0e8e2; border-radius: 14px; padding: 30px; }
  body.ugarit-minimal .feature-panel h2 { color: #1d2523; font-size: 29px; font-weight: 600; }
  body.ugarit-minimal .feature-panel p { color: #58685e; font-size: 13px; line-height: 1.7; max-width: 290px; }
  body.ugarit-minimal .feature-panel button { font-size: 13px; }
  body.ugarit-minimal :is(.mini-label, .feature-index) { color: #62746a; font-size: 10px; letter-spacing: 1px; }
  body.ugarit-minimal .feature-products img { border-radius: 10px; box-shadow: 0 8px 22px #1d252310; }
  body.ugarit-minimal .setup { margin-bottom: 0; }
  body.ugarit-minimal .setup-step { color: #1d2523; border-color: #e6e9e7; padding: 16px 0; border-radius: 0; }
  body.ugarit-minimal .setup-step > span { background: #edf1ef; color: #586d60; font-size: 12px; width: 34px; height: 34px; }
  body.ugarit-minimal .setup-step b { font-size: 13px; font-weight: 600; }
  body.ugarit-minimal .setup-step small { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .setup-step > svg { color: #819087; }
  body.ugarit-minimal .quick-links > button { border-color: #e6e9e7; border-radius: 12px; padding: 23px; color: #1d2523; font-size: 14px; }
  body.ugarit-minimal .quick-links > button > svg { color: #75867b; }
  body.ugarit-minimal .quick-links small { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .empty { padding: 45px 24px; }
  body.ugarit-minimal .empty-icon { background: #f0f4f1; color: #7a8a80; border-radius: 12px; }
  body.ugarit-minimal .empty h3 { color: #1d2523; font-size: 16px; font-weight: 600; }
  body.ugarit-minimal .empty p { color: #626b68; font-size: 13px; line-height: 1.7; }
  body.ugarit-minimal .empty button { font-size: 13px; }

  /* Data tables retain their columns, sorting and mobile card conversion. */
  body.ugarit-minimal .toolbar { gap: 12px; margin-bottom: 20px; }
  body.ugarit-minimal .toolbar > select { height: 42px; font-size: 13px; }
  body.ugarit-minimal .search input { background: #fff; height: 42px; font-size: 13px; padding-left: 39px; }
  body.ugarit-minimal .search svg { color: #7b8981; }
  body.ugarit-minimal .main-area table:not(.print-document table, .display-card table) { font-size: 13px; }
  body.ugarit-minimal .main-area :where(th:not(.print-document *, .display-card *, .a4-sheet *)) {
    background: #f6f8f7;
    color: #626b68;
    font-size: 12px;
    font-weight: 550;
    letter-spacing: .1px;
    padding: 13px 15px;
    border-bottom: 1px solid #e6e9e7;
  }
  body.ugarit-minimal .main-area :where(td:not(.print-document *, .display-card *, .a4-sheet *)) { color: #4b5751; border-color: #edf0ee; padding: 17px 15px; }
  body.ugarit-minimal .main-area :where(td b:not(.print-document *, .display-card *, .a4-sheet *)) { color: #1d2523; font-size: 13px; font-weight: 550; }
  body.ugarit-minimal .main-area :where(td small:not(.print-document *, .display-card *, .a4-sheet *)) { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .code { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .product-cell { gap: 13px; }
  body.ugarit-minimal .product-cell b { line-height: 1.55; }
  body.ugarit-minimal .photo { border-radius: 9px; }
  body.ugarit-minimal .placeholder { background: #f1f4f2; color: #96a59a; }
  body.ugarit-minimal .product-open-row:hover { background: #f8faf9; }
  body.ugarit-minimal .product-open-row:active { background: #edf2ee; }
  body.ugarit-minimal .product-open-row:focus-visible { outline-color: #6d8576; }
  body.ugarit-minimal .table-footer { color: #626b68; font-size: 12px; margin-top: 20px; gap: 12px; }
  body.ugarit-minimal .table-footer button { font-size: 12px; padding: 8px 12px; }
  body.ugarit-minimal .quantity-row-actions { gap: 8px; }
  body.ugarit-minimal .quantity-row-actions > button:first-child { font-size: 12px; }
  body.ugarit-minimal .pill { border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 550; }
  body.ugarit-minimal .pill.green { background: #edf5ef; color: #346346; }
  body.ugarit-minimal .pill.red { background: #fcefee; color: #a04740; }
  body.ugarit-minimal .pill.amber { background: #fbf3e1; color: #866326; }
  body.ugarit-minimal .pill.neutral { background: #eff2f0; color: #626b68; }
  body.ugarit-minimal .brand-grid { gap: 14px; }
  body.ugarit-minimal .brand-card { border-color: #e6e9e7; border-radius: 12px; background: #fff; padding: 21px; gap: 14px; }
  body.ugarit-minimal .brand-card b { color: #1d2523; font-size: 14px; font-weight: 600; }
  body.ugarit-minimal .brand-card small { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .brand-card > svg { color: #849288; }
  body.ugarit-minimal .brand-initial { color: #627b68; background: #edf2ef; width: 40px; height: 40px; border-radius: 10px; font-size: 13px; }
  body.ugarit-minimal .add-brand { border-style: dashed; background: #fafcfb; }

  /* Form groups, tabs, edits and reports use a single neutral hierarchy. */
  body.ugarit-minimal .segmented { border-color: #e6e9e7; background: #f0f3f1; border-radius: 10px; padding: 4px; gap: 4px; }
  body.ugarit-minimal .segmented button { color: #626b68; background: transparent; font-size: 13px; font-weight: 500; border-radius: 7px; padding: 8px 13px; }
  body.ugarit-minimal .segmented button.active { background: #fff; color: #1d2523; font-weight: 600; box-shadow: 0 1px 4px #1d25230d; }
  body.ugarit-minimal .inventory-scope { gap: 6px; }
  body.ugarit-minimal .check { color: #4c5952; font-size: 13px; }
  body.ugarit-minimal .check small { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .field { gap: 8px; margin-bottom: 18px; }
  body.ugarit-minimal :is(.field > span, .journal-line label) { color: #4c5952; font-size: 13px; font-weight: 550; }
  body.ugarit-minimal .field :is(input, select, textarea) { font-size: 14px; }
  body.ugarit-minimal .form-grid { gap: 17px; }
  body.ugarit-minimal .form-subtitle { color: #1d2523; font-size: 14px; }
  body.ugarit-minimal .form-footer { border-color: #e6e9e7; padding-top: 20px; }
  body.ugarit-minimal .form-footer button { font-size: 13px; }
  body.ugarit-minimal .journal-line { background: #f6f8f7; padding: 20px; border-radius: 12px; }
  body.ugarit-minimal .journal-line small { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .picker :is(input, select) { font-size: 14px; }
  body.ugarit-minimal .report-note { color: #58665d; background: #f3f6f4; border-radius: 10px; font-size: 13px; line-height: 1.7; padding: 15px 17px; }
  body.ugarit-minimal .report-totals { color: #626b68; border-color: #e6e9e7; font-size: 12px; }
  body.ugarit-minimal .report-totals b { color: #1d2523; font-size: 20px; font-weight: 600; }
  body.ugarit-minimal .pending-row { color: #4c5952; font-size: 13px; border-color: #e6e9e7; }
  body.ugarit-minimal .overlay { background: #14201965; backdrop-filter: blur(3px); }
  body.ugarit-minimal .modal { color: #1d2523; border-radius: 14px; padding: 28px; box-shadow: 0 24px 80px #15241b26; }
  body.ugarit-minimal .modal-head { gap: 18px; margin-bottom: 24px; }
  body.ugarit-minimal .modal-head h2 { color: #1d2523; font-size: 21px; font-weight: 600; letter-spacing: -.4px; }
  body.ugarit-minimal .modal-head .icon-button { color: #626b68; background: #f2f5f3; border-radius: 9px; }
  body.ugarit-minimal :is(.photo-editor, .image-dropzone, .import-file-drop) { background: #f9fbfa; border-color: #cdd7d0; border-radius: 12px; }
  body.ugarit-minimal .image-dropzone:focus,
  body.ugarit-minimal .image-dropzone.dragging { background: #eef5f0; border-color: #6d8576; box-shadow: 0 0 0 3px #6d857619; }
  body.ugarit-minimal :is(.image-dropzone > svg, .import-file-drop svg) { color: #7a8e7f; }
  body.ugarit-minimal :is(.photo-editor small, .image-dropzone small, .image-upload-control .muted) { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .document-line { border-color: #e6e9e7; border-radius: 12px; padding: 20px; }
  body.ugarit-minimal .line-title { color: #626b68; letter-spacing: .6px; font-size: 12px; }
  body.ugarit-minimal .item-line-actions .text-button { font-size: 12px; }
  body.ugarit-minimal .document-details summary { color: #4c5952; font-size: 13px; }
  body.ugarit-minimal .document-import { background: #f6f8f7; border-color: #e6e9e7; border-radius: 12px; }
  body.ugarit-minimal .document-entry .entry-table tbody > tr { border-color: #e6e9e7; background: #fff; padding: 18px; border-radius: 12px; }
  body.ugarit-minimal .document-entry .entry-table td { padding: 0; border: 0; }
  body.ugarit-minimal .document-entry .entry-table td:first-child { color: #4c5952; font-size: 13px; }
  body.ugarit-minimal .entry-options { border-color: #dce3de; box-shadow: 0 8px 24px #182d1f12; }
  body.ugarit-minimal .entry-options button.active { background: #edf3ef; color: #1d2523; }
  body.ugarit-minimal .entry-options button :is(span, small) { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .entry-help { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .doc-totals { color: #626b68; font-size: 13px; }
  body.ugarit-minimal .doc-totals > div:last-child { color: #1d2523; border-color: #e6e9e7; font-weight: 600; }
  body.ugarit-minimal .document-tools button { font-size: 13px; }
  body.ugarit-minimal .alter-item { color: #1d2523; padding: 15px 12px; border-color: #e6e9e7; border-radius: 9px; margin-bottom: 3px; }
  body.ugarit-minimal .alter-item.selected { background: #edf3ef; }
  body.ugarit-minimal .alter-item b { font-size: 13px; font-weight: 550; }
  body.ugarit-minimal .alter-item :is(small, strong) { font-size: 12px; color: #626b68; }
  body.ugarit-minimal .alter-empty { color: #626b68; }
  body.ugarit-minimal .alter-empty p { font-size: 13px; }
  body.ugarit-minimal :is(.quick-item h3, .quick-values strong, .quantity-selected h3) { color: #1d2523; }
  body.ugarit-minimal :is(.quick-item p, .quick-values span, .quantity-preview span, .lookup-options p, .quick-hint) { color: #626b68; font-size: 13px; }
  body.ugarit-minimal :is(.quick-values > div, .quantity-preview > div, .audit-counts > div, .audit-counts > label) { background: #f3f6f4; border-radius: 10px; }
  body.ugarit-minimal .audit-counts :is(span, small) { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .audit-counts strong { color: #1d2523; }
  body.ugarit-minimal .audit-counts input { border-color: #9aafa0; }
  body.ugarit-minimal .audit-counts .variance-warning { background: #fff6e6; }
  body.ugarit-minimal :is(.selection-list, .audit-events details) { border-color: #e6e9e7; border-radius: 10px; }
  body.ugarit-minimal .selection-list > label { border-color: #e6e9e7; padding: 14px 15px; }
  body.ugarit-minimal .selection-list b { color: #1d2523; font-size: 13px; }
  body.ugarit-minimal .selection-list small { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .selection-actions b { color: #626b68; font-size: 13px; }
  body.ugarit-minimal .bulk-review p { border-color: #e6e9e7; font-size: 13px; }
  body.ugarit-minimal .audit-events summary :is(span, small) { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .audit-diff > div { background: #f5f8f6; color: #4c5952; }
  body.ugarit-minimal :is(.inventory-switch, .quantity-note, .bulk-review, .share-actions, .import-instructions) { background: #f2f6f3; color: #4c5952; border-radius: 10px; }
  body.ugarit-minimal .share-actions small { color: #626b68; font-size: 12px; }

  /* Barcode and name lookup keeps large, readable product and price details. */
  body.ugarit-minimal .price-checker { padding: 30px; }
  body.ugarit-minimal .checker-top button { font-size: 13px; }
  body.ugarit-minimal .checker-badge { color: #587061; background: #edf3ef; border-radius: 12px; }
  body.ugarit-minimal .checker-intro h1 { color: #1d2523; font-weight: 600; font-size: 33px; }
  body.ugarit-minimal .checker-intro p { color: #626b68; font-size: 14px; }
  body.ugarit-minimal .checker-search { border: 1px solid #ccd7cf; border-radius: 12px; background: #fff; box-shadow: 0 3px 12px #1d252304; }
  body.ugarit-minimal .checker-search:focus-within { border-color: #718b78; box-shadow: 0 0 0 3px #718b7817; }
  body.ugarit-minimal .checker-search > svg { color: #74897b; }
  body.ugarit-minimal .checker-search input { color: #1d2523; }
  body.ugarit-minimal .checker-idle { color: #8b9b90; }
  body.ugarit-minimal .checker-idle h2 { color: #1d2523; font-size: 21px; font-weight: 600; }
  body.ugarit-minimal .checker-idle p { color: #626b68; font-size: 14px; }
  body.ugarit-minimal .checker-idle small { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .checker-photo { background: #f7f9f8; color: #96a59a; border-radius: 12px; }
  body.ugarit-minimal .checker-brand { color: #526d5b; font-size: 12px; letter-spacing: .9px; }
  body.ugarit-minimal .checker-detail h2 { color: #1d2523; font-size: 26px; font-weight: 600; }
  body.ugarit-minimal .checker-code { color: #626b68; font-size: 13px; }
  body.ugarit-minimal .checker-amount { color: #1d2523; }
  body.ugarit-minimal :is(.checker-tax, .checker-exclusive, .checker-updated, .checker-result-count) { color: #626b68; font-size: 13px; }
  body.ugarit-minimal .checker-no-price h3 { color: #1d2523; }
  body.ugarit-minimal .checker-no-price p { color: #626b68; font-size: 13px; }
  body.ugarit-minimal .checker-foot { border-color: #e6e9e7; color: #626b68; font-size: 12px; }
  body.ugarit-minimal .checker-list button { color: #1d2523; background: #fff; border-color: #e6e9e7; border-radius: 10px; }
  body.ugarit-minimal .checker-list b { color: #1d2523; font-size: 14px; font-weight: 550; }
  body.ugarit-minimal .checker-list small { color: #626b68; font-size: 12px; }

  /* Customer order progress, fulfilment, staff links and packing controls. */
  body.ugarit-minimal .customer-order-notice { background: #fbf6eb; border-color: #eadfc9; color: #6f5a32; border-radius: 12px; }
  body.ugarit-minimal .customer-order-notice small { color: #78694d; font-size: 12px; }
  body.ugarit-minimal .order-summary-grid { gap: 14px; }
  body.ugarit-minimal .order-summary-grid button.selected { background: #edf3ef; border-color: #a9bdb0; box-shadow: none; }
  body.ugarit-minimal .order-summary-grid button > strong { margin: 2px 0 0; }
  body.ugarit-minimal .order-approve p { color: #626b68; font-size: 14px; }
  body.ugarit-minimal .order-card { border-radius: 14px; }
  body.ugarit-minimal .order-card.is-overdue { border-color: #dec1b7; }
  body.ugarit-minimal .order-card-open { color: #1d2523; background: transparent; border-radius: 0; padding: 24px; }
  body.ugarit-minimal .order-card-open:hover { background: #fafcfb; }
  body.ugarit-minimal .order-card h2 { color: #1d2523; font-size: 21px; font-weight: 600; }
  body.ugarit-minimal .order-card p { color: #626b68; font-size: 14px; }
  body.ugarit-minimal .order-card p.order-overdue { color: #9b5141; }
  body.ugarit-minimal :is(.order-card-counts span, .order-editor-head p, .order-guidance, .order-stock-note, .order-check span) { color: #626b68; }
  body.ugarit-minimal .order-preview-lines { border-color: #e6e9e7; }
  body.ugarit-minimal .order-editor-head h2 { color: #1d2523; font-weight: 600; }
  body.ugarit-minimal .order-line { background: #fff; border-color: #e6e9e7; border-radius: 12px; padding: 20px; }
  body.ugarit-minimal .order-line.is-ready { background: #f8fcf9; border-color: #cedfd2; }
  body.ugarit-minimal .order-line-title h3 { color: #1d2523; font-size: 15px; font-weight: 600; }
  body.ugarit-minimal .order-line-title small { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .order-stock-note { font-size: 12px; }
  body.ugarit-minimal .order-stock-note b { color: #1d2523; }
  body.ugarit-minimal .order-metric { background: #f1f5f2; color: #626b68; border-radius: 9px; padding: 12px; }
  body.ugarit-minimal .order-metric > b { color: #1d2523; }
  body.ugarit-minimal .order-metric small { color: #626b68; font-size: 11px; }
  body.ugarit-minimal .order-shortage { background: #fcf4e3; }
  body.ugarit-minimal .order-shortage > b { color: #926427; }
  body.ugarit-minimal .order-balance { background: #edf3ef; }
  body.ugarit-minimal .order-quantity-grid .field > span { white-space: normal; color: #4c5952; font-size: 12px; }
  body.ugarit-minimal .order-savebar { border-color: #e6e9e7; background: #fff; }
  body.ugarit-minimal .order-savebar > span:first-child { color: #626b68; font-size: 13px; }
  body.ugarit-minimal .order-warning { background: #fff7e8; border-color: #eaddc1; color: #806331; }
  body.ugarit-minimal :is(.order-card progress, .order-progress-copy progress, .ugarit-progress-track) { background: #e7eee9; }
  body.ugarit-minimal progress::-webkit-progress-bar { background: #e7eee9; }
  body.ugarit-minimal progress::-webkit-progress-value { background: #718c79; }
  body.ugarit-minimal progress::-moz-progress-bar { background: #718c79; }
  body.ugarit-minimal .ugarit-progress-fill { background: #718c79; }
  body.ugarit-minimal .item-detail-list > div { border-color: #e6e9e7; }
  body.ugarit-minimal .item-detail-list dt { color: #626b68; }
  body.ugarit-minimal .item-detail-list dd { color: #1d2523; }
  body.ugarit-minimal .staff-link-panel { background: #f7faf8; color: #1d2523; border-color: #e0e7e2; border-radius: 12px; }
  body.ugarit-minimal :is(.staff-link-panel small, .staff-notification small, .staff-count-note) { color: #626b68; }
  body.ugarit-minimal .staff-notification { border-color: #e6e9e7; }
  body.ugarit-minimal .staff-notification.unread { border-left-color: #8fa593; }
  body.ugarit-minimal .staff-packing-rule { background: #f8faf9; border-color: #e0e7e2; border-radius: 12px; }
  body.ugarit-minimal :is(.staff-packing-calculation, .staff-packing-help, .staff-packing-editor small) { color: #586a60; }
  body.ugarit-minimal .packing-source-banner { background: #edf3ef; color: #4c6253; }
  body.ugarit-minimal :is(.packing-invoice-quantity, .packing-group-example) { border-color: #e6e9e7; }
  body.ugarit-minimal .staff-packing-editor select { color: #1d2523; border-color: #d8e0da; }

  /* Masters, stock queries, locations and allocation editors. */
  body.ugarit-minimal .um-menu-row { color: #1d2523; border-color: #e6e9e7; padding: 16px 13px; border-radius: 9px; font-size: 14px; font-weight: 500; }
  body.ugarit-minimal :is(.um-menu-row, .um-link):hover { background: #f2f6f3; }
  body.ugarit-minimal .um-link { color: #405c49; font-size: 13px; }
  body.ugarit-minimal .um-book { color: #1d2523; }
  body.ugarit-minimal .um-book b { font-size: 19px; font-weight: 600; }
  body.ugarit-minimal :is(.um-book small, .um-query-item small, .um-form-help, .um-empty) { color: #626b68; }
  body.ugarit-minimal .um-history { border-color: #e6e9e7; }
  body.ugarit-minimal .um-history article { border-color: #e6e9e7; }
  body.ugarit-minimal .um-history pre { background: #f5f8f6; color: #4c5952; border-radius: 9px; }
  body.ugarit-minimal .um-stock-line { border-color: #e6e9e7; }
  body.ugarit-minimal .um-query-item { color: #1d2523; border-color: #e6e9e7; border-radius: 10px; }
  body.ugarit-minimal .um-row-action:hover { background: #f5f9f6; }
  body.ugarit-minimal .um-rack-frame { border-color: #e0e7e2; }
  body.ugarit-minimal .rack-intro :is(h2, h3) { color: #1d2523; font-weight: 600; }
  body.ugarit-minimal :is(.rack-intro p, .rack-hint, .rack-empty, .rack-model > small, .rack-field-label, .rack-picker-expanded > small) { color: #626b68; }
  body.ugarit-minimal .rack-home-link { background: #edf3ef; border-color: #d8e3da; color: #36573f; border-radius: 12px; font-size: 14px; }
  body.ugarit-minimal :is(.rack-results b, .rack-product-open b) { color: #1d2523; font-size: 13px; font-weight: 550; }
  body.ugarit-minimal :is(.rack-results small, .rack-product-open small, .rack-levels span) { color: #626b68; font-size: 12px; }
  body.ugarit-minimal :is(.rack-results .selected, .rack-levels .selected, .rack-sides .selected, .rack-slot.selected) { color: #1d2523; background: #edf3ef; border-color: #a3b8aa; box-shadow: none; }
  body.ugarit-minimal :is(.rack-picker-buttons .selected, .rack-picker-positions .selected) { background: #314a3b; border-color: #314a3b; color: #fff; box-shadow: none; }
  body.ugarit-minimal :is(.rack-model iframe, .rack-picker-expanded iframe, .rack-stock-list article, .rack-picker-expanded, .allocation-row) { border-color: #e0e7e2; border-radius: 12px; }
  body.ugarit-minimal :is(.rack-empty, .rack-placement, .rack-location-current, .rack-selection-summary, .allocation-summary > div) { color: #4c6253; background: #f0f5f1; border-color: #dce6de; }
  body.ugarit-minimal .rack-location-current button { color: #36573f; }
  body.ugarit-minimal .rack-shelf-strip { border-bottom: 3px solid #a5b4aa; }
  body.ugarit-minimal .rack-slot { background: #f7faf8; border-color: #cad6ce; }
  body.ugarit-minimal .rack-slot > span { color: #626b68; font-size: 11px; }
  body.ugarit-minimal .rack-slot > b { color: #99aa9e; }
  body.ugarit-minimal .rack-slot small { color: #626b68; }
  body.ugarit-minimal :is(.allocation-summary span, .allocation-summary > small) { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .allocation-summary .allocation-over { background: #fff0ed; border-color: #e4b1a6; color: #9c302b; }
  body.ugarit-minimal .rack-here-qty { color: #44694f; }

  /* Entry and account surfaces follow the same brand-neutral application. */
  body.ugarit-minimal .login-shell { background: #f7f8fa; }
  body.ugarit-minimal .login-card { padding: 36px; box-shadow: 0 8px 32px #1d252307; }
  body.ugarit-minimal .login-card h1 { color: #1d2523; font-size: 30px; font-weight: 600; }
  body.ugarit-minimal :is(.login-intro, .login-help, .login-brand, .login-card footer, .migration-card p) { color: #626b68; }
  body.ugarit-minimal .login-tags { color: #596f61; background: #f3f7f4; border: 0; padding: 13px 12px; border-radius: 9px; flex-wrap: wrap; font-size: 12px; }
  body.ugarit-minimal .login-card footer { border-color: #e6e9e7; }
  body.ugarit-minimal .migration-counts { color: #3d5b46; background: #f0f5f1; }
  body.ugarit-minimal .toast { background: #294b35; box-shadow: 0 5px 24px #1d252317; font-size: 13px; border-radius: 11px; }
  body.ugarit-minimal .error-banner { color: #963f37; background: #fff1ee; border: 1px solid #eed5cf; border-radius: 11px; font-size: 13px; box-shadow: 0 5px 24px #5220150b; }
  body.ugarit-minimal .ugarit-save-status { color: #31513b; border-color: #dce6de; border-radius: 10px; box-shadow: 0 3px 18px #1d252310; }
}

@media screen and (min-width: 761px) {
  body.ugarit-minimal .sidebar { width: 232px; }
  body.ugarit-minimal .main-area { width: calc(100% - 232px); margin-left: 232px; }
  body.ugarit-minimal .checker-only .main-area { width: 100%; margin-left: 0; }
  body.ugarit-minimal .checker-only .content { max-width: 1200px; padding: 30px 24px; }
}

@media screen and (min-width: 761px) and (max-width: 1100px) {
  body.ugarit-minimal .content { padding: 27px 24px 0; }
  body.ugarit-minimal .main-area > .topbar,
  body.ugarit-minimal .global-shortcuts { padding-left: 24px; padding-right: 24px; }
  body.ugarit-minimal .page-heading { align-items: flex-start; }
  body.ugarit-minimal .heading-actions { flex-wrap: wrap; max-width: 260px; }
  body.ugarit-minimal .stats > div,
  body.ugarit-minimal .executive-stats > button { padding: 18px; }
}

@media screen and (hover: hover) and (pointer: fine) {
  body.ugarit-minimal :is(.executive-stats, .order-summary-grid) > button:not(:disabled):hover,
  body.ugarit-minimal .brand-card:not(:disabled):hover,
  body.ugarit-minimal .quick-links > button:not(:disabled):hover {
    border-color: #bdcec1;
    box-shadow: 0 3px 12px #1d252307;
  }
  body.ugarit-minimal .order-card:has(.order-card-open:hover) { box-shadow: 0 3px 12px #1d252307; }
}

@media screen and (max-width: 760px) {
  /* Keep the original transformed drawer and open class; only restyle it. */
  body.ugarit-minimal .sidebar {
    width: 260px;
    max-width: 86vw;
    padding: 25px 16px calc(100px + env(safe-area-inset-bottom));
    box-shadow: 10px 0 40px #14201914;
  }
  body.ugarit-minimal .sidebar nav button { min-height: 46px; font-size: 14px; }
  body.ugarit-minimal .sidebar-foot { margin-top: 20px; }
  body.ugarit-minimal .main-area { width: 100%; margin-left: 0; }
  body.ugarit-minimal .main-area > .topbar { min-height: 64px; height: auto; padding: 10px 12px !important; }
  body.ugarit-minimal .topbar .crumb > b { font-size: 13px; color: #1d2523; max-width: 155px; }
  body.ugarit-minimal .content { padding: 25px 16px 108px !important; }
  body.ugarit-minimal .checker-only .content { padding: 14px !important; }
  body.ugarit-minimal .page-heading { align-items: stretch; gap: 17px; margin-bottom: 24px; }
  body.ugarit-minimal .page-heading h1 { font-size: 28px; line-height: 1.2; }
  body.ugarit-minimal .page-heading p { font-size: 14px; margin-top: 9px; }
  body.ugarit-minimal .heading-actions { margin-top: 0; gap: 8px; }
  body.ugarit-minimal .heading-actions > button { font-size: 13px; min-height: 44px; }
  body.ugarit-minimal .panel { padding: 18px; border-radius: 12px; margin-bottom: 20px; }
  body.ugarit-minimal .stats { gap: 10px; }
  body.ugarit-minimal :is(.stats > div, .executive-stats > button) { padding: 17px 15px; border-radius: 12px; }
  body.ugarit-minimal :is(.stats > div > span, .executive-stats > button > span) { font-size: 12px; line-height: 1.5; }
  body.ugarit-minimal :is(.stats > div > strong, .executive-stats > button > strong) { font-size: 28px; margin: 13px 0 8px; }
  body.ugarit-minimal :is(.stats > div > small, .executive-stats > button > small) { font-size: 11px; }
  body.ugarit-minimal .feature-panel { padding: 25px; min-height: 310px; }
  body.ugarit-minimal .feature-panel h2 { font-size: 26px; }
  body.ugarit-minimal .feature-panel p { font-size: 13px; max-width: 190px; }
  body.ugarit-minimal .quick-links > button { padding: 20px; }
  body.ugarit-minimal .section-title { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  body.ugarit-minimal .section-title h2 { font-size: 17px; }
  body.ugarit-minimal .products-panel { background: transparent; border: 0; padding: 0; box-shadow: none; }
  body.ugarit-minimal .inventory-scope { background: #edf1ef; border-radius: 10px; padding: 5px; }
  body.ugarit-minimal .inventory-scope button { font-size: 13px; }
  body.ugarit-minimal .products-panel .toolbar > select { font-size: 14px !important; }
  body.ugarit-minimal .products-panel .product-open-row { padding: 17px; border-color: #e0e7e2; border-radius: 12px; box-shadow: 0 2px 6px #1d252302; }
  body.ugarit-minimal .products-panel td { padding: 0; border: 0; color: #4c5952; font-size: 13px; }
  body.ugarit-minimal .products-panel .product-cell b { font-size: 14px; font-weight: 600; }
  body.ugarit-minimal .products-panel td:first-child:after { color: #7e9183; }
  body.ugarit-minimal .products-panel td:nth-child(2):before,
  body.ugarit-minimal .products-panel td:nth-child(3):before { color: #626b68; font-size: 12px; }
  body.ugarit-minimal .products-panel td:nth-child(5) b { font-size: 18px; }
  body.ugarit-minimal .products-panel td:last-child { padding-top: 12px; border-top: 1px solid #e6e9e7; }
  body.ugarit-minimal .products-panel .photo { width: 54px; height: 60px; flex-basis: 54px; }
  body.ugarit-minimal .quantity-row-actions button { font-size: 13px; }
  body.ugarit-minimal .brand-grid { gap: 10px; }
  body.ugarit-minimal .brand-card { gap: 10px; padding: 16px 13px; }
  body.ugarit-minimal .brand-card b { font-size: 13px; }
  body.ugarit-minimal .brand-card small { font-size: 11px; }
  body.ugarit-minimal .brand-initial { width: 32px; height: 34px; font-size: 11px; }
  body.ugarit-minimal .segmented button { font-size: 13px; padding: 9px 11px; }
  body.ugarit-minimal .report-tabs { gap: 5px; }
  body.ugarit-minimal .report-tabs button { font-size: 12px; padding: 9px 10px; }
  body.ugarit-minimal .report-totals { gap: 18px; flex-wrap: wrap; }
  body.ugarit-minimal .report-totals b { font-size: 18px; }
  body.ugarit-minimal .document-list-table tr { border-color: #e6e9e7; }
  body.ugarit-minimal .document-list-table td { border: 0; }
  body.ugarit-minimal .modal-head { background: #fff; }
  body.ugarit-minimal .modal-head h2 { font-size: 20px; }
  body.ugarit-minimal .form-footer > button { font-size: 14px; }
  body.ugarit-minimal .document-entry .entry-table tbody > tr { padding: 16px; }
  body.ugarit-minimal .document-entry .entry-table td { padding: 0; }
  body.ugarit-minimal .checker-intro h1 { font-size: 28px; }
  body.ugarit-minimal .checker-detail h2 { font-size: 23px; }
  body.ugarit-minimal .checker-list b { font-size: 13px; }
  body.ugarit-minimal .checker-list strong { font-size: 14px; }
  body.ugarit-minimal .checker-foot { font-size: 11px; }
  body.ugarit-minimal .checker-foot .text-button { font-size: 12px; }
  body.ugarit-minimal .order-summary-grid { gap: 9px; }
  body.ugarit-minimal .order-summary-grid > button { padding: 15px 12px; }
  body.ugarit-minimal .order-summary-grid > button > span { font-size: 12px; }
  body.ugarit-minimal .order-summary-grid > button > strong { font-size: 26px; }
  body.ugarit-minimal .order-card-open { padding: 20px; }
  body.ugarit-minimal .order-card h2 { font-size: 20px; }
  body.ugarit-minimal .order-card-counts { font-size: 12px; }
  body.ugarit-minimal .order-line { padding: 15px; }
  body.ugarit-minimal .order-line-title h3 { font-size: 14px; }
  body.ugarit-minimal .order-line-title small { font-size: 11px; }
  body.ugarit-minimal .order-metric { padding: 10px; }
  body.ugarit-minimal .order-metric small { font-size: 11px; }
  body.ugarit-minimal .order-stock-note { font-size: 12px; }
  body.ugarit-minimal .order-savebar button { font-size: 13px; }
  body.ugarit-minimal .rack-results small,
  body.ugarit-minimal .rack-product-open small { font-size: 11px; }
  body.ugarit-minimal .rack-levels span { font-size: 10px; }
  body.ugarit-minimal .allocation-summary span { font-size: 11px; }
  body.ugarit-minimal .mobile-bottom-nav { background: #fff; border-color: #e0e7e2; box-shadow: 0 -3px 20px #1d252304; padding-top: 8px; }
  body.ugarit-minimal .mobile-bottom-nav button { color: #626b68; background: transparent; font-size: 11px; font-weight: 500; gap: 5px; }
  body.ugarit-minimal .mobile-bottom-nav button.selected { color: #1d2523; background: #edf3ef; font-weight: 600; box-shadow: none; border-radius: 9px; }
  body.ugarit-minimal .mobile-nav-badge { color: #33573e; background: #dbe8df; }
  body.ugarit-minimal .app-footer { padding-top: 20px; font-size: 10px; }
  body.ugarit-minimal .login-card { padding: 28px 23px; }
}

@media screen and (max-width: 380px) {
  body.ugarit-minimal .brand-grid { grid-template-columns: 1fr; }
  body.ugarit-minimal .order-summary-grid { gap: 7px; }
  body.ugarit-minimal .order-summary-grid > button { padding: 13px 10px; }
  body.ugarit-minimal .order-summary-grid > button > span { font-size: 11px; }
}
