:root {
  --ink: #17191d;
  --muted: #636972;
  --bg: #f1f3f6;
  --line: #e7e9ed;
  --accent: #e7342a;
  --action: #cc3027;
  --dark: #17191d;
  --soft: #f9e5e2;
  --green: #39735c;
}
* { box-sizing: border-box; }
body { margin: 0; background: #e7e9ed; color: var(--ink); font: 16px/1.5 'Avenir Next', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
a { color: inherit; text-decoration: none; }
button,input,select,textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; }
main:focus { outline: none; }
.skip-link { position: fixed; top: -100px; left: 20px; padding: 12px; background: #fff; z-index: 10; }
.skip-link:focus { top: 12px; }
.link-button { border: 0; background: none; color: var(--muted); padding: 6px; }
.link-button:hover { color: var(--action); }
main { padding: 22px 20px 16px; width: 100%; flex: 1; }
footer { padding: 16px 20px; display: flex; justify-content: space-between; gap: 15px; font-size: 13px; color: var(--muted); }
h1 { font-size: 30px; font-weight: 650; line-height: 1.25; letter-spacing: -1px; margin: 9px 0; }
h2 { font-size: 17px; font-weight: 600; margin: 0; }
p { margin: 8px 0 16px; }
.eyebrow { font-size: 12px; letter-spacing: 1.7px; font-weight: 600; color: var(--muted); }
.muted { color: var(--muted); }
.small,small { font-size: 14px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-heading p { margin-bottom: 0; font-size: 15px; }
.count { font-size: 19px; font-weight: 400; color: var(--muted); margin-left: 7px; vertical-align: middle; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 10px; padding: 11px 16px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.primary { background: var(--action); color: #fff; }
.primary:hover { background: #b42c24; }
.secondary { border-color: #d9dde3; background: #fff; }
.secondary:hover { background: #f7f8fa; }
/* Shared shipment action: existing card appearance, also used by batch toolbar. */
.order-card .button.dark,.oc-shipping-dialog .button.dark,
.orders-list-page [data-bulk-open].dark,.orders-list-page [data-bulk-open].dark:hover:not(:disabled) { background: #262d35; color: white; border-color: transparent; }
.orders-list-page [data-bulk-open].dark:disabled { opacity: .55; cursor: default; }
.orders-list-page [data-bulk-open].dark:focus-visible { outline: 2px solid var(--action); outline-offset: 4px; }
.wide { width: 100%; margin-top: 12px; }
.panel { padding: 24px; margin-bottom: 20px; border: 1px solid var(--line); background: #fff; border-radius: 18px; min-width: 0; }
.list-panel { padding: 0; overflow: hidden; }
.toolbar { display: flex; gap: 12px; padding: 22px 24px; }
.search { flex: 1; min-width: 200px; }
.search input { width: 100%; background: #f7f8fa; }
input,select,textarea { border: 1px solid #d7dbe1; border-radius: 9px; background: #fff; padding: 10px 11px; min-height: 46px; color: var(--ink); max-width: 100%; }
input:focus,select:focus,textarea:focus { outline: 2px solid var(--action); outline-offset: 1px; }
input::placeholder { color: #737a84; }
input[type=checkbox] { accent-color: var(--action); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th { padding: 13px 22px; font-size: 13px; font-weight: 500; color: var(--muted); background: #fafbfc; border-block: 1px solid var(--line); white-space: nowrap; }
td { padding: 20px 22px; border-bottom: 1px solid #eff1f4; font-size: 15px; }
tr:last-child td { border-bottom: 0; }
.orders-table td { white-space: nowrap; }
.orders-table tbody tr:hover { background: #fdf8f7; }
td small { display: block; color: var(--muted); margin-top: 5px; font-size: 13px; }
.numeric { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.money { font-weight: 650; }
.order-number { color: #b42c24; font-weight: 600; }
.order-number:hover { text-decoration: underline; }
.status { display: inline-block; color: var(--green); background: #edf7f2; padding: 5px 9px; border-radius: 6px; font-size: 13px; font-weight: 500; letter-spacing: 0; vertical-align: middle; white-space: nowrap; }
.pagination { display: flex; flex-wrap: wrap; gap: 20px; border-top: 1px solid var(--line); padding: 17px 24px; color: var(--muted); font-size: 14px; }
.pagination a { color: #b42c24; }
.notice { padding: 13px 16px; background: #e9edef; color: #515d65; border-radius: 10px; font-size: 14px; }
.empty { text-align: center; padding: 64px 24px; }
.empty h2 { font-size: 22px; }
.empty-icon { font-size: 38px; color: #ab756e; margin-bottom: 15px; }
.back { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 22px; }
.back:hover { color: var(--action); }
.detail-layout,.editor-layout { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 22px; }
.detail-main,.editor-main { min-width: 0; }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.section-heading>.small { margin-left: auto; text-align: right; }
.section-number { padding: 4px 7px; color: #a72a23; background: var(--soft); border-radius: 6px; font-size: 12px; }
.fields-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; font-size: 14px; color: #505660; min-width: 0; }
.field input,.field select,.field textarea { width: 100%; font-size: 15px; }
.field small { font-size: 13px; color: var(--muted); }
.field strong { padding: 11px 0; color: var(--ink); }
.discount-controls { display: flex; gap: 20px; align-items: center; }
.discount-controls .field { min-width: 180px; }
.product-row { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.row-product { grid-column: span 2; }
.line-result { grid-column: 1/-1; border-radius: 8px; background: #f7f8fa; padding: 10px 12px; }
.line-result:empty { display: none; }
.delete-control { display: flex; align-items: center; gap: 7px; grid-column: 1/-1; font-size: 14px; color: var(--muted); }
.delete-control input { min-height: 0; }
.delete-control:has(input:checked) { color: #a72a23; }
.product-row:has(.delete-control input:checked) { background: #fff7f6; }
.summary { position: sticky; top: 20px; align-self: start; }
.summary,.summary-card { background: var(--soft); border-color: transparent; }
.summary dl,.summary-card dl { margin: 24px 0; }
dl>div { display: flex; justify-content: space-between; gap: 16px; margin: 12px 0; font-size: 15px; }
dt { color: var(--muted); }
dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.summary dd,.summary-card dd { white-space: nowrap; }
.total-label { border-top: 1px solid #e9c7c3; padding-top: 22px; font-size: 14px; color: var(--muted); }
.total-value { font-size: 36px; font-weight: 650; letter-spacing: -1px; font-variant-numeric: tabular-nums; margin-top: 10px; overflow-wrap: anywhere; }
.error-box,.errorlist { background: #fff0ed; color: #9e2922; padding: 14px 18px; border-radius: 9px; font-size: 14px; }
.error-box { margin-bottom: 18px; border-left: 3px solid #9e2922; }
.error-box a { text-decoration: underline; }
.errorlist { margin-block: 6px; }
.error-text { font-size: 14px; color: #9e2922; }
.details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin: 0; }
.details>div { display: block; margin: 0; }
.details dt { font-size: 14px; margin-bottom: 7px; }
.details dd { font-size: 16px; }
.comment { margin-top: 24px; padding: 14px 16px; background: #f7f8fa; border-radius: 9px; font-size: 15px; overflow-wrap: anywhere; }
.summary-foot { border-top: 1px solid #e9c7c3; padding-top: 16px; font-size: 14px; color: var(--muted); }
.separate dl { margin-bottom: 0; }
.price-note { padding: 0 12px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.price-note strong { font-weight: 500; }
.padded { padding: 22px 24px 0; }
.history details { border-top: 1px solid var(--line); padding: 18px 0; }
.history summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; cursor: pointer; font-size: 14px; list-style: none; }
.history summary::after { content: '+'; color: var(--muted); margin-left: auto; font-size: 18px; }
.history details[open]>summary::after { content: '−'; }
.history summary time { color: var(--muted); font-size: 13px; }
.history summary>span { color: var(--muted); }
.event-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.event-body { padding-top: 20px; }
.change { display: grid; grid-template-columns: minmax(100px,1fr) minmax(0,1fr) 16px minmax(0,1fr); gap: 12px; margin-bottom: 15px; font-size: 14px; overflow-wrap: anywhere; }
.change strong { font-weight: 550; }
.before,.arrow { color: var(--muted); }
.login { max-width: 460px; margin: 55px auto; }
.login h1 { font-size: 30px; }
.login .field { margin-bottom: 18px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
[hidden] { display: none!important; }
@media(max-width:1200px) {
  main { padding-inline: 20px; }
  .detail-layout,.editor-layout { grid-template-columns: minmax(0,1fr) 250px; gap: 16px; }
  .toolbar { flex-wrap: wrap; }
  .search { flex-basis: 100%; }
  .section-heading { flex-wrap: wrap; }
  .product-row { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .row-product { grid-column: 1/-1; }
  footer { flex-wrap: wrap; }
}
@media(max-width:950px) {
  .detail-layout,.editor-layout { display: flex; flex-direction: column; }
  .detail-main { display: contents; }
  .detail-layout .order-summary { order: 1; }
  .detail-layout .history { order: 2; }
  .summary { position: static; width: 100%; }
  .order-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .summary-card { grid-row: span 2; }
  .price-note { margin-top: 0; }
}
@media(max-width:680px) {
  main { padding: 24px 16px 10px; }
  .page-heading { flex-wrap: wrap; gap: 16px; }
  h1 { font-size: 27px; }
  h1 .status { margin-top: 6px; }
  .panel { padding: 20px 18px; }
  .list-panel { padding: 0; }
  .toolbar,.padded { padding: 18px; }
  .toolbar select { flex: 1; min-width: 0; }
  .order-summary { display: block; }
  .fields-grid { grid-template-columns: 1fr; gap: 8px; }
  .details { gap: 24px 12px; }
  .details dd { font-size: 15px; }
  .discount-controls { flex-wrap: wrap; gap: 0; }
  .discount-controls .field { width: 100%; }
  .change { grid-template-columns: 1fr; gap: 6px; }
  .change .arrow { display: none; }
  .before::before { content: 'Было: '; }
  .change>span:last-child::before { content: 'Стало: '; }
  .section-heading>.small { margin-left: 0; text-align: left; }
  footer { padding: 22px 18px; font-size: 12px; }
  .login { margin: 25px auto; }
}
@media(prefers-reduced-motion:reduce) { * { scroll-behavior: auto!important; } }

/* A compact working list: expand only the order being inspected. */
.compact-heading { margin-bottom: 16px; }
.compact-toolbar { padding: 14px 16px 10px; }
.search-feedback { margin: 0; padding: 0 16px 10px; min-height: 29px; font-size: 13px; color: var(--muted); }
.list-guide { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 0 16px 12px; color: var(--muted); font-size: 13px; }
.orders-scroll { max-height: 72vh; overflow: auto; scrollbar-gutter: stable; }
.compact-orders { table-layout: fixed; min-width: 1626px; border-collapse: separate; border-spacing: 0; }
.col-number { width: 88px; } .col-stage { width: 114px; } .col-days { width: 124px; }
.col-manager { width: 120px; } .col-shipping { width: 156px; } .col-comment { width: 200px; }
.col-items { width: 280px; } .col-expand { width: 44px; }
.compact-orders th { position: sticky; top: 0; z-index: 2; padding: 10px 8px; font-size: 13px; }
.compact-orders .order-row td { height: 60px; padding: 8px; font-size: 15px; vertical-align: middle; background: #fff; }
.compact-orders th:first-child,.compact-orders .order-row td:first-child { position: sticky; left: 0; box-shadow: 1px 0 var(--line); }
.compact-orders th:first-child { z-index: 3; }
.compact-orders .order-row td:first-child { z-index: 1; }
.compact-orders .order-row:hover td,.compact-orders .order-row.expanded td { background: #fff7f5; }
.order-row { cursor: pointer; }
.compact-orders .status { font-size: 13px; padding: 4px 6px; background: #f0f2f5; color: #47515d; }
.compact-orders td small { margin-top: 1px; font-size: 12px; line-height: 1.4; }
.compact-orders .hot-label,.overdue { color: #b42c24; }
.hot-row td:first-child { border-left: 3px solid var(--action); }
.cell-clip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-comment { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; overflow-wrap: anywhere; line-height: 1.45; }
.days { font-size: 17px; font-weight: 600; }
.due-today { color: #9b5e0d; }
.expand-order { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #d9dde3; border-radius: 6px; background: #fff; color: #545b65; font-size: 18px; line-height: 1; }
.expand-order[aria-expanded=true] span { transform: rotate(180deg); }
.compact-orders .order-peek>td { padding: 18px; background: #f8f9fb; white-space: normal; }
.peek-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 24px; }
.peek-grid section { min-width: 0; }
.peek-grid h2 { margin-bottom: 12px; font-size: 14px; }
.peek-items { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow-y: auto; }
.peek-items li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 8px; font-size: 14px; overflow-wrap: anywhere; }
.peek-items li strong { white-space: nowrap; font-weight: 500; }
.peek-details { margin: 0; }
.peek-details>div { margin: 7px 0; font-size: 14px; }
.peek-comment { max-height: 180px; overflow-y: auto; overflow-wrap: anywhere; font-size: 14px; }
.peek-link { display: inline-block; margin: 12px 12px 0 0; color: #b42c24; font-size: 13px; }
.hot-control { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.hot-control input { min-height: auto; }
@media(max-width:680px) {
  .compact-toolbar { padding: 12px; gap: 8px; }
  .compact-toolbar select { flex: 1; min-width: 0; width: 150px; font-size: 14px; }
  .compact-toolbar .search { min-width: 0; }
  .list-guide { padding-inline: 12px; }
  .orders-scroll { max-height: 65vh; }
}
.item-summary { display: flex; align-items: baseline; gap: 6px; }
.item-summary .cell-clip { min-width: 0; }
.item-summary>b { flex-shrink: 0; }
.compact-orders th:last-child,.compact-orders .order-row td:last-child { position: sticky; right: 0; box-shadow: -1px 0 var(--line); }
.compact-orders th:last-child { z-index: 3; }
.compact-orders .order-row td:last-child { z-index: 1; }
/* Keep horizontal navigation discoverable, including with macOS overlay scrollbars. */
.table-scroll::-webkit-scrollbar { width: 12px; height: 12px; }
.table-scroll::-webkit-scrollbar-track { background: #edf0f3; }
.table-scroll::-webkit-scrollbar-thumb { background: #a4abb5; border: 3px solid #edf0f3; border-radius: 8px; }
.table-scroll::-webkit-scrollbar-thumb:hover { background: #747d89; }

.col-client { width: 270px; }
.client-cell .cell-clip { line-height: 1.5; }
.col-payment { width: 230px; }
.payment-indicator { --payment-color: #687280; max-width: 480px; }
.payment-indicator.unpaid { --payment-color: #c03537; }
.payment-indicator.partial { --payment-color: #b87516; }
.payment-indicator.paid { --payment-color: #27845b; }
.payment-indicator.excess { --payment-color: #7450ae; }
.payment-indicator strong { display: block; color: var(--payment-color); font-size: 14px; font-weight: 600; }
.payment-indicator small { display: block; font-variant-numeric: tabular-nums; color: var(--muted); }
.payment-track { height: 6px; margin: 5px 0; border-radius: 4px; overflow: hidden; background: #e8ebed; }
.unpaid .payment-track { background: #f7dddd; }
.payment-track span { display: block; height: 100%; background: var(--payment-color); border-radius: inherit; }
.payment-totals { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 22px 0; }
.payment-totals dt { color: var(--muted); font-size: 14px; }
.payment-totals dd { margin: 4px 0 0; font-size: 20px; font-variant-numeric: tabular-nums; }
.invoice-links { list-style: none; padding: 0; margin: 20px 0 0; }
.invoice-links li { border-top: 1px solid var(--line); }
.invoice-links a { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; }
.invoice-links strong { white-space: nowrap; }
.payment-steps>div { padding: 20px 0; border-top: 1px solid var(--line); }
.payment-steps>div>strong { margin: 0 0 8px; font-size: 17px; }
.payment-steps>div p { margin-bottom: 12px; }
.payment-events { list-style: none; padding: 0; }
.payment-events li { padding: 14px 0; border-top: 1px solid var(--line); }
.payment-events strong,.payment-events small { display: block; }
.payment-events small { margin-top: 6px; color: var(--muted); }
.payment-table { min-width: 1400px; table-layout: fixed; }
.payment-table th { font-size: 13px; padding: 12px; }
.payment-table td { font-size: 15px; padding: 12px; height: 68px; }
.payment-table td:first-child { white-space: nowrap; }
.payment-table small { display: block; color: var(--muted); }
@media(max-width:680px) {
  .payment-totals { grid-template-columns: 1fr; }
  .invoice-links a { flex-direction: column; gap: 5px; }
}

.payment-event { padding: 14px 0; border-top: 1px solid var(--line); }
.payment-event p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.invoice-form { max-width: 900px; }

.payment-table .invoice-inactive td { background: #fff0f0; color: #9e3434; }

/* A completed invoice requires both independent confirmations. */
.invoice-row { cursor: pointer; }
.payment-table .invoice-row td { transition: background-color .12s; }
.payment-table .invoice-complete td { background: #f5fbf7; }
.payment-table .invoice-row:hover td,.payment-table .invoice-row:focus-within td { background: #edf2f6; }
.payment-table .invoice-complete:hover td,.payment-table .invoice-complete:focus-within td { background: #e5f3ea; }
.payment-table .invoice-inactive:hover td { background: #fce3e3; }
.invoice-status { display: inline-flex; align-items: center; padding: 6px 10px; border: 1px solid #d4dbe2; border-radius: 7px; background: #f4f6f8; color: #536171; font-weight: 600; font-size: 14px; white-space: nowrap; }
.invoice-status.complete { border-color: #83c29c; color: #21623e; background: #e7f5ec; }
.invoice-status.waiting { border-color: #e6bd79; color: #85500a; background: #fff4df; }
.invoice-status.manager { border-color: #95b8df; color: #305d91; background: #edf4ff; }
.invoice-status.inactive { border-color: #df9c9c; color: #9e3434; background: #ffecec; }
.invoice-check { color: var(--muted); white-space: nowrap; }
.invoice-check.checked { color: #21623e; font-weight: 600; }

/* Working order row: all main models, planned date and readable contacts. */
.compact-orders .order-row td { vertical-align: top; height: auto; padding-block: 12px; }
.compact-orders .order-id-cell { font-variant-numeric: tabular-nums; }
.order-created { display: block; margin-top: 5px; font-size: 13px; color: #505660; }
.order-id-cell .hot-label { display: block; margin-top: 5px; font-size: 13px; font-weight: 600; }
.compact-orders .status { white-space: normal; }
.list-composition { list-style: none; padding: 0; margin: 0; }
.list-composition li { display: flex; align-items: baseline; gap: 10px; white-space: normal; line-height: 1.5; }
.list-composition li+li { margin-top: 9px; }
.list-composition li>span { min-width: 0; overflow-wrap: anywhere; }
.list-composition b { flex-shrink: 0; margin-left: auto; white-space: nowrap; font-size: 16px; color: #17191d; }
.composition-cell>small { white-space: normal; }
.deadline-cell time { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
.deadline-cell .days,.deadline-cell .due-today,.deadline-cell .overdue { display: block; margin-top: 6px; }
.deadline-cell .due-today { font-weight: 650; }
.deadline-cell .overdue>span { display: block; font-size: 13px; }
.shipping-badge { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 5px; border-radius: 6px; font-size: 15px; font-weight: 500; white-space: normal; }
.shipping-badge svg { width: 16px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shipping-badge.carrier { color: #17633d; background: #e5f5eb; }
.shipping-badge.courier { color: #934409; background: #fff0df; }
.shipping-badge.europost { color: #653990; background: #f1e9fa; }
.shipping-badge.tk { color: #17633d; background: #e5f5eb; }
.shipping-badge.pickup { color: #235887; background: #e9f2fc; }
.inline-comment { white-space: normal; }
.inline-comment summary { cursor: pointer; list-style: none; }
.inline-comment summary::-webkit-details-marker { display: none; }
.inline-comment .cell-comment { font-size: 15px; color: #343940; }
.comment-open-label,.comment-close-label { display: block; margin-top: 5px; color: #a32c26; font-size: 13px; font-weight: 600; }
.comment-close-label { display: none; }
.inline-comment[open] .cell-comment { display: block; -webkit-line-clamp: unset; white-space: pre-wrap; }
.inline-comment[open] .comment-open-label { display: none; }
.inline-comment[open] .comment-close-label { display: block; }
.order-total { font-size: 18px; font-weight: 650; margin-bottom: 7px; font-variant-numeric: tabular-nums; }
.order-total>span { font-size: 13px; font-weight: 500; }
.order-money-cell .payment-indicator { white-space: normal; }
.compact-orders .order-money-cell small { font-size: 13px; line-height: 1.5; }
.manager-label { white-space: normal; overflow-wrap: anywhere; }
.compact-orders .client-cell { white-space: normal; font-size: 15px; color: #24282e; }
.client-name,.client-phone,.client-instagram { display: block; margin-bottom: 5px; line-height: 1.5; }
.client-name,.client-instagram { overflow-wrap: anywhere; }
.client-phone { white-space: nowrap; font-size: 16px; font-variant-numeric: tabular-nums; }

.filter-toolbar { flex-wrap: wrap; }
.filter-toolbar .search { flex: 1 1 230px; }
.primary-filters { flex-basis: 100%; display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 12px; }
.primary-filters label,.filter-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); min-width: 0; }
.primary-filters select,.filter-grid select { width: 100%; font-size: 15px; }
.primary-filters small,.filter-dates small { font-size: 12px; }
.advanced-filters { width: 100%; border-top: 1px solid var(--line); padding-top: 10px; }
.advanced-filters summary { cursor: pointer; width: fit-content; padding: 6px 0; font-size: 14px; font-weight: 600; }
.filter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 12px; }
.filter-dates { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.filter-checks { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 16px; }
.filter-checks label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.filter-checks input { min-height: 0; width: 18px; height: 18px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.filter-chips a { display: inline-flex; align-items: center; gap: 12px; border: 1px solid #d5dbe2; border-radius: 7px; padding: 5px 9px; font-size: 13px; background: #f4f6f8; max-width: 100%; overflow-wrap: anywhere; }
.filter-chips a:hover { border-color: var(--action); }
.filter-chips .filter-reset { background: #fff; color: #b42c24; }
.filter-errors { margin: 0 16px 14px; }
.filter-match { background: #fff0d4; border-radius: 4px; padding: 2px 4px; }
@media(max-width:680px) { .primary-filters,.filter-grid { grid-template-columns: 1fr; } .filter-toolbar .search { flex-basis: 100%; } }
@media(max-width:680px) {
}

/* Packing: readable checks, separate events, persistent shortage attention. */
.pack-date {display:block;margin-top:6px;font-size:13px;line-height:1.4;color:#48534c}
.pack-working {background:#fff0bc;color:#6b4a00}.pack-complete {background:#d6f0df;color:#155637}
.pack-incomplete,.pack-review {background:#ffe4c3;color:#854000}.pack-sent {background:#e1edf8;color:#244c74}
.pack-alert {background:#fff2df;border:1px solid #e9b971;border-left:4px solid #cf7309;border-radius:9px;padding:14px 18px;margin:14px 0;color:#713e0d}
.packing-queue {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,390px),1fr));gap:18px}
a.packing-card {display:block;color:inherit;text-decoration:none;border:1px solid #d5ddd7}
a.packing-card:hover {border-color:#238451;box-shadow:0 4px 16px #17382812}
.packing-card-head,.packing-buttons {display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.pack-border-incomplete,.pack-border-review {border-left:5px solid #cf7309!important}.pack-border-complete {border-left:5px solid #28894f!important}
.packing-preview {padding-left:20px;line-height:1.65}.packing-facts small {display:block;font-size:13px;margin-top:4px}
.packing-item {display:flex;gap:20px;align-items:center;justify-content:space-between;padding:18px 12px;border-bottom:1px solid #dfe5e0}
.packing-item-name {min-width:0;flex:1}.packing-item-name strong {display:block;font-size:17px;line-height:1.5}.packing-item-name b {white-space:nowrap;color:#172b20;margin-left:10px}
.packing-item-name small {display:block;margin-bottom:6px}.packing-item-name details {margin-top:8px}.packing-item-name details summary {cursor:pointer}
.packing-group {background:#edf3ee;padding:12px;font-size:18px;margin:22px 0 0;border-radius:6px}
.packing-marks {display:flex;gap:8px;align-items:center;flex-wrap:wrap}.packing-mark {padding:11px 13px;background:#fff;border:1px solid #a5b4a9;border-radius:7px;font:inherit;cursor:pointer}
.packing-mark.placed.selected {background:#177347;color:white;border-color:#177347}.packing-mark.missing.selected {background:#fbe2ba;color:#743b05;border-color:#c67b25}
.item-placed {background:#f2faf5}.item-missing {background:#fff7ea}.packing-result {white-space:nowrap}.packing-change {color:#90530d;font-size:14px;margin:7px 0 0}
.packing-check-form label,.packing-finish label {display:block;font-size:14px;margin-top:8px}.packing-check-form input {max-width:340px}.packing-finish {border-top:1px solid #ddd;padding-top:20px;margin-top:22px}
.packing-corrections {margin-top:20px;border-top:1px solid #ddd;padding-top:16px}.packing-corrections summary {cursor:pointer;font-weight:600}.packing-corrections .packing-buttons {grid-column:1/-1}
@media(max-width:900px){.packing-item{align-items:flex-start;flex-direction:column;gap:12px}.packing-check-form{width:100%}.packing-facts{grid-template-columns:repeat(2,minmax(0,1fr))}.packing-marks .packing-mark{flex:1}.packing-item-name strong{font-size:17px}}

.packing-facts{grid-template-columns:repeat(3,minmax(0,1fr))}.packing-item{scroll-margin-top:18px}.packing-note label{display:grid;gap:8px;margin-bottom:12px}.packing-note textarea{width:100%;max-width:760px;min-height:80px}.packing-check-form input{width:100%}
@media(max-width:900px){.packing-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}

.compact-orders .status.pack-working{background:#fff0bc;color:#6b4a00}.compact-orders .status.pack-complete{background:#d6f0df;color:#155637}.compact-orders .status.pack-incomplete,.compact-orders .status.pack-review{background:#ffe4c3;color:#854000}.compact-orders .status.pack-sent{background:#e1edf8;color:#244c74}

.pack-shipped{background:#e6edf5;color:#31506b}.deadline-cell small,.order-money-cell small{display:block}

/* Orders workspace: layout parameters, not lifecycle operations. */
.order-sections{display:flex;gap:8px;padding:16px;flex-wrap:wrap;border-bottom:1px solid var(--border,#e5e7eb)}
.order-sections a{padding:12px 18px;border-radius:10px;font-weight:700;color:inherit;text-decoration:none;background:#f2f4f6}
.order-sections a[aria-current="page"]{background:#252b32;color:white}
.search-scope{display:flex;flex-direction:column;gap:4px;font-size:13px}
.workspace-scope{padding:0 18px;font-size:15px}
.shipment-period{display:flex;align-items:end;flex-wrap:wrap;gap:12px;flex-basis:100%}
.shipment-period>span{font-weight:600;align-self:center}
.shipment-period label{display:flex;flex-direction:column;gap:4px;font-size:13px}
.shipment-period small{max-width:300px;color:#525b65}
.orders-finance-links{display:flex;gap:16px;flex-wrap:wrap;margin:18px 0;font-size:15px}
@media(max-width:600px){.order-sections{gap:6px;padding:12px}.order-sections a{padding:10px 12px}.search-scope,.search-scope select,.shipment-period label{width:100%}.shipment-period input{min-width:0;width:100%;box-sizing:border-box}}

.order-sections{padding:10px 16px}
.order-sections a{padding:10px 16px}
.filter-toolbar{padding-top:10px;padding-bottom:8px;gap:10px}
.workspace-scope{margin:6px 0}
.shipment-period{padding:8px 0 12px}

.filter-toolbar{align-items:center}
.filter-toolbar>.search-scope{flex:0 1 215px}
.filter-toolbar>.search-scope select{width:100%;min-height:46px}

/* C-289–290: blue manager verification; green completion requires both marks. */
.payment-indicator .payment-track{background:#e4f0f9}.payment-indicator .payment-track span{background:linear-gradient(90deg,#77c5f3,#339bdd)}
.payment-indicator.partial,.payment-indicator.checked,.payment-indicator.unpaid{--payment-color:#287da8}
.status.pack-agreed,.compact-orders .status.pack-agreed{background:#e9ecf0;color:#58616c}
.status.pack-planned,.status.pack-sent,.compact-orders .status.pack-planned,.compact-orders .status.pack-sent{background:#fff0dc;color:#8c591e}
.status.pack-working,.compact-orders .status.pack-working{background:#dff2ff;color:#287da8}
.status.pack-shipped,.compact-orders .status.pack-shipped{background:#292e35;color:white}

label.unpack-confirm{display:flex;flex-direction:row;align-items:flex-start;gap:12px}label.unpack-confirm input[type=checkbox]{width:20px;height:20px;flex:0 0 20px;margin:3px 0;accent-color:#26845c}

/* Two separate work queues; attention is factual, not a priority override. */
.packing-tabs{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 20px}
.packing-tab{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:14px 18px;border:2px solid #d9dfe4;border-radius:12px;background:#fff;color:#26343c;font-size:18px;font-weight:700;text-decoration:none;min-height:52px}
.packing-tab.is-current{border-color:#26343c;box-shadow:inset 0 -3px #26343c}
.packing-tab-count{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;background:#e3e7eb;color:#37434d;border-radius:999px;min-width:32px;height:32px;padding:0 8px;box-sizing:border-box;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums}
.packing-tab-count.has-tasks{background:#c52b35;color:#fff}
.packing-tab:focus-visible{outline:3px solid #176b99;outline-offset:3px}
@media(max-width:480px){.packing-tab{width:100%;font-size:18px}}

.packing-manager-instructions { overflow-wrap:anywhere; border-left:4px solid #bd4337; }
.packing-instructions-editor textarea { width:100%; box-sizing:border-box; }
[data-packing-dialog] label { display:block; margin:16px 0; }
[data-packing-dialog] textarea { width:100%; box-sizing:border-box; }
[data-packing-dialog]{padding:24px;overflow:auto}
[data-packing-form]{display:grid;gap:16px;margin-top:20px}
[data-packing-form]>label{display:grid;gap:8px}
[data-packing-form] textarea{width:100%;box-sizing:border-box}
[data-packing-form] .packing-buttons{justify-content:flex-end;flex-wrap:wrap}
@media(max-width:600px){[data-packing-dialog]{padding:16px}[data-packing-form] .packing-buttons>button{flex:1;white-space:normal}}

.packing-change-badge{display:inline-block;font-size:14px;font-weight:700;color:#75440d;background:#fff2da;border:1px solid #d8a04d;border-radius:7px;padding:4px 7px;line-height:1.35}
.packing-changes{padding:18px;margin:16px 0;border:1px solid #d3ad71;border-left:4px solid #b77a21;border-radius:10px;background:#fffbf3;font-size:17px;overflow-wrap:anywhere}.packing-changes h2{font-size:21px;margin:0 0 10px}.packing-changes-boundary,.packing-changes-help{font-size:15px;color:#574a36;line-height:1.5}.packing-change-event{padding:8px 0;border-top:1px solid #eadfc9}.packing-change-author{font-size:15px;margin:5px 0}.packing-change-event ul{list-style:none;padding:0;margin:8px 0}.packing-change-event li{margin:6px 0;padding:8px 10px;border-radius:6px;line-height:1.5}.packing-delta-added{background:#eaf4ec;color:#214c2e}.packing-delta-removed{background:#fff0ec;color:#84392a}.packing-delta-quantity,.packing-delta-changed{background:#eef2fb;color:#334d7d}.packing-change-event small{display:block;font-size:15px;color:#555d66}.packing-changes-gap{background:#fff0df;padding:10px;font-size:16px}.packing-item-changed{border-left:4px solid #bd852a;background:#fffbf1}.packing-queue-details>.packing-changes{margin:8px 0}

/* Supplemental facts retain text labels as well as distinct colours. */
.supplemental-card>a{display:block;color:inherit;text-decoration:none}.supplemental-card>a:hover{text-decoration:none;outline:2px solid var(--accent,#b53b2b);outline-offset:8px}.supplemental-state{display:inline-block;padding:8px 12px;border-radius:10px;font-weight:700}.supplemental-waiting,.supplemental-review,.supplemental-cancelled{background:#fff1d8;color:#77490a}.supplemental-prepared{background:#e7efff;color:#245595}.supplemental-sent,.supplemental-included{background:#e5f4eb;color:#22653d}.supplemental-card li{margin:8px 0}.contact-phone{white-space:nowrap}.supplemental-card h2{font-size:22px}
.order-supplemental-row{padding:16px 0;border-top:1px solid var(--line,#e5e7eb)}.order-supplemental-row h3{margin:0;font-size:20px}.order-supplemental-row li{margin:6px 0;overflow-wrap:anywhere}.order-supplemental-row .history{margin-top:12px}.order-supplemental-row .section-heading{flex-wrap:wrap;gap:10px}

/* Payment methods retain exact names; colors/icons are presentation only. */
.payment-order-number{font-size:20px;font-weight:750;white-space:nowrap}
.payment-method{display:inline-flex;align-items:center;gap:7px;padding:6px 9px;border:1px solid var(--method-border);border-radius:9px;background:var(--method-bg);color:var(--method-ink);font-size:13px;font-weight:700;line-height:1.35}
.payment-method svg{flex-shrink:0}
.payment-external-number{display:block;margin-top:7px;font-size:14px;line-height:1.4;color:#273343;overflow-wrap:anywhere}
.method-cash-register{--method-bg:#ecfdf5;--method-ink:#166534;--method-border:#a7f3d0}
.method-card-register{--method-bg:#eff6ff;--method-ink:#1e40af;--method-border:#bfdbfe}
.method-erip{--method-bg:#f5f3ff;--method-ink:#6d28d9;--method-border:#ddd6fe}
.method-bank-transfer{--method-bg:#ecfeff;--method-ink:#155e75;--method-border:#a5f3fc}
.method-transport{--method-bg:#fff7ed;--method-ink:#9a3412;--method-border:#fed7aa}
.method-installment{--method-bg:#fdf2f8;--method-ink:#9d174d;--method-border:#fbcfe8}
.method-cash{--method-bg:#f7fee7;--method-ink:#3f6212;--method-border:#d9f99d}
.method-europost{--method-bg:#fffbeb;--method-ink:#92400e;--method-border:#fde68a}
.method-carrier{--method-bg:#eef2ff;--method-ink:#3730a3;--method-border:#c7d2fe}

.packing-plan-group{margin:18px 0}.packing-plan-row{border-top:1px solid #e4e7ec;padding:16px 0}.packing-plan-row summary{display:flex;flex-wrap:wrap;align-items:center;gap:16px;font-size:18px;cursor:pointer}.packing-plan-row summary strong{font-size:24px;color:#a12c22}.packing-plan-row summary .muted{font-size:14px;margin-left:auto}.packing-plan-row li{padding:8px 0;line-height:1.6}.packing-plan-row .attention-badge{margin-left:12px}

.workspace-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}.workspace-tabs a{padding:12px 18px;border:1px solid #dfe3e8;border-radius:10px;background:white;color:#30343b;font-weight:650}.workspace-tabs a[aria-current=page]{color:#fff;background:#a93227;border-color:#a93227}

.packing-period-buttons{border:0;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:12px;min-width:0}.packing-period-buttons legend{margin-bottom:12px;font-size:16px}.packing-period-choice{position:relative;cursor:pointer;margin:0}.packing-period-choice input{position:absolute;opacity:0;width:1px;height:1px}.packing-period-choice span{display:block;padding:13px 18px;border:1px solid #d7dce3;border-radius:12px;background:white;font-size:16px;font-weight:600;line-height:1.4}.packing-period-choice input:checked+span{background:#a5372c;border-color:#a5372c;color:white}.packing-period-choice input:focus-visible+span{outline:3px solid #2876c7;outline-offset:3px}.packing-custom-dates:not([hidden]){display:flex;flex-wrap:wrap;align-items:end;gap:14px;margin-top:18px}.packing-custom-dates[hidden]{display:none}.packing-period-form{margin-top:18px}.packing-period-choice{max-width:100%}.packing-period-choice span{overflow-wrap:anywhere}

.sales-channel-dealer{display:inline-flex;align-items:center;flex:none;white-space:nowrap;padding:3px 8px;border-radius:6px;background:#eee5fa;color:#61379a;font-size:14px;font-weight:700;line-height:1.35}

.invoice-inactive{display:inline-flex;align-items:center;margin-top:7px;padding:5px 9px;border:1px solid #cf655c;border-radius:7px;background:#fff0ee;color:#9e2c23;font-size:15px;font-weight:650;line-height:1.3}

.order-payment-metrics{margin:10px 0}.order-payment-metrics>div{display:block;min-width:0;margin:9px 0}.order-payment-metrics dt{font-size:14px;color:#46525e}.order-payment-metrics dd{margin:2px 0 0;font-size:16px;white-space:normal;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.order-payment-metrics dd strong{font-weight:500;white-space:normal;overflow-wrap:anywhere}.order-card .order-payment-metrics dd strong{white-space:normal}.order-money-cell .order-payment-metrics>div{margin:5px 0}.order-money-cell .order-payment-metrics dd{font-size:16px}.order-money-cell .order-payment-metrics{margin:5px 0}

/* Shared workspace header: the approved Orders reference, independent of module CSS. */
.topbar { --ink:#17191d; --muted:#626873; --line:#e7e9ed; min-height:56px; height:auto; flex:0 0 56px; padding:0 24px; border-bottom:1px solid var(--line); background:#fff; display:flex; align-items:center; justify-content:space-between; gap:12px; color:var(--ink); font:16px/1.4 'Avenir Next',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.topbar .breadcrumb { display:flex; gap:13px; min-width:0; color:var(--muted); font-size:14px; }
.topbar .breadcrumb strong { color:var(--ink); font-weight:600; }
.topbar .topbar-right { display:flex; gap:12px; align-items:center; flex-shrink:0; }
.topbar .test-badge { color:#775427; background:#f4ecd9; padding:5px 10px; font-size:12px; font-weight:650; letter-spacing:.5px; border-radius:6px; white-space:nowrap; }
.topbar .identity { display:flex; align-items:center; gap:10px; font-size:13px; }
.topbar .identity small { display:block; color:var(--muted); font-size:11px; }
.topbar .identity form { margin:0 0 0 7px; flex-shrink:0; }
.topbar .avatar { display:grid; place-items:center; width:30px; height:30px; flex-shrink:0; background:#e3e5e9; border:3px solid #fff; border-radius:50%; font-size:14px; font-weight:650; }
.topbar .identity .link-button { color:inherit; border:1px solid var(--line); background:#fff; border-radius:8px; font:inherit; font-size:13px; padding:0; }
.topbar .identity .link-button:hover { background:#f8f9fb; }
@media(max-width:900px) {
  .topbar { padding-inline:16px; }
  .topbar .breadcrumb>span { display:none; }
}
@media(max-width:900px) {
  .topbar { flex-basis:84px; min-height:84px; padding:8px 16px; flex-direction:column; align-items:stretch; justify-content:center; gap:6px; }
  .topbar .breadcrumb { min-height:20px; }
  .topbar .topbar-right { width:100%; min-width:0; justify-content:space-between; gap:8px; }
  .topbar .test-badge { min-width:0; max-width:45%; overflow:hidden; text-overflow:ellipsis; }
  .topbar .identity { flex:1; min-width:0; justify-content:flex-end; gap:6px; }
  .topbar .identity>span:nth-child(2) { min-width:0; max-width:94px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .topbar .identity small { display:none; }
  .topbar .identity form { margin-left:0; }
}

/* Shared workspace shell. Module styles own content, never navigation geometry. */
.app-shell { display:flex; align-items:flex-start; max-width:none; min-height:100dvh; margin:0; width:100%; background:#17191d; border-radius:0; overflow:clip; }
.workspace { flex:1; min-width:0; min-height:100dvh; background:var(--bg); border-radius:0; display:flex; flex-direction:column; }
.sidebar { --ink:#17191d; --muted:#626873; --line:#e7e9ed; --accent:#cc3027; position:sticky; top:0; z-index:30; height:100dvh; width:221px; flex:0 0 221px; padding:25px 17px; background:#17191d; color:#fff; display:flex; flex-direction:column; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; font:16px/1.4 'Avenir Next',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; }
.sidebar>* { flex-shrink:0; }
.sidebar .sidebar-head { display:block; width:100%; }
.sidebar .brand { display:flex; align-items:center; padding:0 10px; color:#fff; font-weight:750; font-size:29px; letter-spacing:-1.4px; text-decoration:none; }
.sidebar .brand-name>span { color:#a2a6ae; font-weight:500; margin-left:5px; }
.sidebar .brand-mark { display:flex; gap:3px; align-items:center; width:24px; height:25px; margin-right:10px; transform:skew(-13deg); }
.sidebar .brand-mark i { width:4px; height:16px; background:#e7342a; border-radius:3px; }
.sidebar .brand-mark i:nth-child(2) { height:24px; background:#fff; }
.sidebar .brand-mark i:nth-child(3) { height:20px; }
.sidebar button.sidebar-toggle { display:flex; gap:12px; align-items:center; justify-content:center; width:100%; min-height:42px; margin:18px 0 24px; padding:8px; border:1px solid #383b42; border-radius:8px; background:transparent; color:#b8bec9; font:inherit; font-size:14px; }
.sidebar button.sidebar-toggle:hover:not(:disabled) { background:#2c3037; color:#fff; }
.sidebar .sidebar-toggle svg,.sidebar .nav-item svg { flex:0 0 19px; width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; }
.sidebar nav { margin:0; }
.sidebar .nav-divider { display:block; border-top:1px solid #3b424c; margin:14px 12px; }
.sidebar .nav-item { position:relative; display:flex; gap:11px; align-items:center; padding:13px 12px; margin:6px 0; color:#fff; font-size:15px; line-height:1.4; border-radius:10px; text-decoration:none; }
.sidebar .nav-item:hover { background:#2c3037; }
.sidebar .nav-item.nav-active { background:#cc3027; font-weight:650; }
.sidebar .nav-text { flex:1 1 0; min-width:0; white-space:normal; }
.sidebar .nav-tooltip { display:none; position:fixed; transform:translateY(-50%); z-index:60; padding:8px 12px; border-radius:7px; background:#17191d; color:#fff; box-shadow:0 3px 12px #0003; white-space:normal; max-width:calc(100vw - 96px); font-size:14px; font-weight:400; pointer-events:none; }
.sidebar .sidebar-note { display:none; }
.sidebar .sidebar-bottom { display:block; margin-top:auto; padding:28px 12px 0; color:#a2a6ae; font-size:14px; }
.sidebar .sidebar-bottom small { display:block; font-size:12px; color:#a3aab4; margin:3px 0 0 13px; }
.sidebar .demo-dot { display:inline-block; width:7px; height:7px; border-radius:50%; background:#8ed4ac; margin-right:6px; }
html.sidebar-collapsed .sidebar { width:72px; flex-basis:72px; padding-inline:12px; }
html.sidebar-collapsed .sidebar .brand { justify-content:center; padding:0; min-height:44px; }
html.sidebar-collapsed .sidebar .brand-mark { margin:0; }
html.sidebar-collapsed .sidebar .brand-name,html.sidebar-collapsed .sidebar .nav-caption,html.sidebar-collapsed .sidebar .nav-text,html.sidebar-collapsed .sidebar .sidebar-toggle span { display:none; }
html.sidebar-collapsed .sidebar .sidebar-toggle { margin-block:22px; padding:8px 4px; }
html.sidebar-collapsed .sidebar .sidebar-toggle svg { transform:rotate(180deg); }
html.sidebar-collapsed .sidebar .nav-item { justify-content:center; min-height:48px; padding:13px; }
html.sidebar-collapsed .sidebar .sidebar-bottom { padding-inline:0; font-size:0; text-align:center; }
html.sidebar-collapsed .sidebar .sidebar-bottom small { display:none; }
html.sidebar-collapsed .sidebar .nav-item:hover .nav-tooltip,html.sidebar-collapsed .sidebar .nav-item:focus-visible .nav-tooltip { display:block; }
@media(max-width:680px) {
  .app-shell { display:block; }
  .workspace { min-height:calc(100dvh - 116px); }
  .sidebar,html.sidebar-collapsed .sidebar { position:relative; width:100%; height:116px; min-height:116px; padding:12px 16px; gap:10px; overflow:visible; }
  .sidebar .sidebar-head { display:flex; align-items:center; justify-content:space-between; gap:12px; height:42px; }
  .sidebar .brand,html.sidebar-collapsed .sidebar .brand { padding:0; min-height:0; font-size:25px; }
  html.sidebar-collapsed .sidebar .brand-name { display:inline; }
  html.sidebar-collapsed .sidebar .brand-mark { margin-right:10px; }
  .sidebar button.sidebar-toggle,html.sidebar-collapsed .sidebar .sidebar-toggle { width:44px; min-height:42px; margin:0; padding:8px 4px; flex-shrink:0; }
  .sidebar .sidebar-toggle span,.sidebar .nav-caption,.sidebar .sidebar-bottom { display:none; }
  .sidebar nav { display:flex; gap:8px; width:100%; height:40px; overflow-x:auto; overflow-y:hidden; overscroll-behavior-x:contain; scrollbar-width:thin; }
  .sidebar .nav-divider { flex:0 0 16px; align-self:center; margin:0 4px; }
  .sidebar .nav-item,html.sidebar-collapsed .sidebar .nav-item { flex:0 0 auto; min-height:40px; height:40px; margin:0; padding:10px 12px; font-size:14px; }
  .sidebar .nav-text { white-space:nowrap; }
  html.sidebar-collapsed .sidebar .nav-item .nav-tooltip { display:none; }
}
