/* Orders: operational information first, scoped to this workspace. */
.orders-page { max-width:1680px; gap:20px; --orders-quiet:#f7f9fc; --orders-secondary:#52647b; }
.orders-page .page-head { min-height:64px; }
.orders-page h1 { font-size:30px; letter-spacing:-.025em; }
.orders-page .page-head p { font-size:14px; }
.orders-page .button { min-height:40px; font-size:13px; }
.orders-page .button--small { min-height:36px; padding:7px 12px; }
.orders-page ::selection { background:#d9e8ff; color:#17263c; }
.orders-page input { caret-color:var(--accent); }
.orders-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)) minmax(180px,1.3fr); gap:12px; }
.orders-metric { display:grid; gap:10px; padding:18px 20px; border:1px solid var(--line); border-radius:10px; background:#fff; color:var(--ink); text-align:start; min-width:0; }
button.orders-metric:hover { border-color:#a3bce4; background:#fbfdff; }
.orders-metric-label { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--orders-secondary); }
.orders-metric-label svg { width:18px; height:18px; color:var(--accent); }
.orders-metric strong { font-size:27px; line-height:1.15; font-weight:700; font-variant-numeric:tabular-nums; }
.orders-metric small { font-size:12px; line-height:1.4; color:var(--orders-secondary); }
.orders-metric--value { background:#f1f6ff; border-color:#d7e4fb; }
.orders-metric--value strong { font-size:25px; text-align:start; }
.orders-workspace { gap:16px; }
.orders-workspace.has-detail { grid-template-columns:minmax(0,1fr) minmax(410px,450px); }
.orders-list-panel { padding:0; overflow:hidden; display:block; }
.orders-queues { display:flex; gap:4px; padding:15px 18px 0; border-bottom:1px solid var(--line); overflow:auto; scrollbar-width:thin; }
.orders-queue { display:flex; align-items:center; justify-content:center; gap:8px; min-height:45px; padding:9px 12px 13px; border:0; border-bottom:2px solid transparent; background:transparent; color:var(--orders-secondary); font-size:13px; font-weight:600; white-space:nowrap; }
.orders-queue span { padding:2px 6px; min-width:24px; border-radius:4px; background:#eef2f7; color:inherit; font-size:12px; font-variant-numeric:tabular-nums; }
.orders-queue.is-current { border-bottom-color:var(--accent); color:#1855c6; }
.orders-queue.is-current span { background:#e7f0ff; color:#1855c6; }
.orders-queue:hover { background:var(--orders-quiet); }
.orders-toolbar { display:grid; grid-template-columns:minmax(140px,2fr) minmax(110px,1fr) minmax(110px,1fr) 44px; gap:12px; align-items:end; padding:18px 20px 10px; }
.orders-toolbar .field, .orders-filter-grid .field { font-weight:500; font-size:12px; color:var(--orders-secondary); gap:6px; }
.orders-toolbar input, .orders-toolbar select, .orders-filter-grid input, .orders-filter-grid select { height:44px; }
.orders-toolbar > .button { height:44px; }
.orders-filter-meta { display:flex; justify-content:space-between; align-items:start; gap:12px; padding:0 20px 12px; }
.orders-more-filters { margin:0; flex:0 1 auto; }
.orders-more-filters[open] { flex:1; }
.orders-more-filters[open] + .orders-result-count { display:none; }
.orders-more-filters > summary { display:flex; gap:7px; align-items:center; width:fit-content; min-height:36px; font-size:12px; color:var(--orders-secondary); cursor:pointer; }
.orders-more-filters > summary svg { width:16px; height:16px; }
.orders-filter-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; padding:8px 0 10px; }
.orders-result-count { margin:0; padding:9px 0; font-size:12px; color:var(--orders-secondary); }
.orders-table-wrap { border:0; border-radius:0; }
.orders-table { min-width:850px; table-layout:fixed; }
.orders-table th { padding:13px 12px; background:#f7f9fc; font-size:12px; color:#4a5e78; }
.orders-table td { padding:17px 12px; vertical-align:middle; white-space:normal; font-size:13px; overflow-wrap:anywhere; }
.orders-table th:nth-child(1) { width:17%; }
.orders-table th:nth-child(2) { width:17%; }
.orders-table th:nth-child(3) { width:21%; }
.orders-table th:nth-child(4) { width:12%; }
.orders-table th:nth-child(5) { width:14%; }
.orders-table th:nth-child(6) { width:12%; }
.orders-table th:nth-child(7) { width:9%; }
.orders-table td:last-child { padding-inline:8px; }
.orders-table td:last-child .button { white-space:nowrap; min-width:52px; padding-inline:9px; }
.orders-table th:nth-child(3) { width:19%; }
.orders-table td > small { display:block; }
.orders-table strong { font-weight:600; line-height:1.5; }
.orders-table small { font-size:12px; color:var(--orders-secondary); margin-top:6px; line-height:1.4; }
.orders-table .badge { font-size:12px; max-width:100%; white-space:normal; padding:5px 8px; }
.orders-table .is-selected { background:#eef5ff; }
.orders-table .is-selected td:first-child { box-shadow:inset 2px 0 0 var(--accent); }
[dir=rtl] .orders-table .is-selected td:first-child { box-shadow:inset -2px 0 0 var(--accent); }
.orders-table .orders-table-total { display:block; font-weight:700; font-size:14px; }
.orders-phone { display:block; width:fit-content; max-width:100%; margin-top:5px; color:#3e5f8e; font-size:12px; text-decoration:none; overflow-wrap:anywhere; text-underline-offset:3px; }
.orders-phone:hover { text-decoration:underline; }
.orders-product-previews { display:flex; gap:5px; margin-bottom:8px; }
.orders-product-thumb { display:grid; place-items:center; width:32px; height:38px; border-radius:5px; background:#edf1f5; color:#556a82; overflow:hidden; flex-shrink:0; font-size:12px; }
.orders-product-thumb img { width:100%; height:100%; object-fit:cover; }
.orders-shop-names { display:block; font-size:12px; }
.orders-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 20px; border-top:1px solid var(--line); font-size:12px; color:var(--orders-secondary); }
.orders-page-buttons { display:flex; align-items:center; gap:12px; }
.orders-pagination .field { display:flex; align-items:center; gap:8px; font-size:12px; font-weight:400; }
.orders-pagination select { width:65px; height:36px; padding:7px; }
.orders-workspace .review-detail { padding:0; max-height:calc(100vh - 32px); top:16px; background:#fff; overflow:auto; scrollbar-width:thin; }
.orders-workspace .review-detail > .panel-head { position:sticky; top:0; z-index:3; display:flex; flex-wrap:wrap; align-items:center; justify-content:start; gap:8px; margin:0; padding:14px 18px; background:#fff; border-bottom:1px solid var(--line); }
.orders-workspace .review-detail > .panel-head h2 { flex:1; font-size:13px; font-weight:500; color:var(--orders-secondary); }
.orders-workspace .review-detail-body { padding:0; }
.orders-detail-identity { display:flex; align-items:start; justify-content:space-between; gap:14px; padding:22px 20px 12px; }
.orders-detail-identity h2 { margin:0 0 6px; font-size:22px; font-weight:700; }
.orders-detail-identity p { font-size:12px; margin:0; color:var(--orders-secondary); }
.orders-detail-identity .badge { font-size:12px; }
.orders-detail-quick-actions { display:flex; gap:8px; padding:0 20px 18px; }
.orders-detail-quick-actions .button { flex:1; color:#1d58b7; background:#f6f9ff; border-color:#dae5f7; }
.orders-detail-tabs { position:sticky; top:65px; z-index:2; display:flex; padding:0 12px; border-bottom:1px solid var(--line); background:#fff; overflow:auto; scrollbar-width:thin; }
.orders-detail-tabs button { flex:1; min-height:45px; padding:10px 8px; white-space:nowrap; color:var(--orders-secondary); background:transparent; border:0; border-bottom:2px solid transparent; font-size:12px; font-weight:600; }
.orders-detail-tabs button.is-current { color:#1855c6; border-bottom-color:#2563eb; }
.orders-tab-content { padding:4px 20px 20px; min-height:260px; }
.orders-detail-section { padding:20px 0; border-bottom:1px solid var(--line); }
.orders-detail-section:last-child { border-bottom:0; }
.orders-detail-section h3 { font-size:14px; font-weight:650; margin:0 0 15px; }
.orders-detail-section > p { font-size:13px; margin:10px 0 12px; }
.orders-detail-section > .button { margin-top:12px; }
.orders-contact { display:flex; gap:12px; align-items:center; }
.orders-contact > div { min-width:0; }
.orders-contact strong { font-size:14px; }
.orders-contact p { margin:4px 0; font-size:12px; }
.orders-avatar { display:grid; place-items:center; width:40px; height:40px; flex-shrink:0; border-radius:50%; background:#eaf1fc; color:#315583; font-size:17px; font-weight:600; }
.orders-facts { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.35fr); gap:11px 16px; font-size:12px; line-height:1.55; margin:16px 0 0; }
.orders-facts dt { color:var(--orders-secondary); }
.orders-facts dd { margin:0; text-align:end; color:var(--ink); overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.orders-amounts { display:grid; grid-template-columns:1fr auto; gap:12px 20px; margin:0; font-size:13px; }
.orders-amounts dt { color:var(--orders-secondary); }
.orders-amounts dd { margin:0; text-align:end; font-variant-numeric:tabular-nums; font-weight:600; }
.orders-amounts .orders-grand-total { border-top:1px solid var(--line); padding-top:14px; color:var(--ink); font-size:18px; font-weight:700; }
.orders-section-status { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; font-size:13px; }
.orders-section-status .badge { font-size:12px; }
.orders-shop-summary { display:grid; gap:12px; }
.orders-shop-summary > div { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:13px; }
.orders-note { padding:12px 14px; margin:16px 0; border-radius:6px; background:#f2f6fc; color:#445b79; font-size:12px; line-height:1.65; }
.orders-attention { padding:12px; border-radius:6px; background:#fff5e7; color:#855109; font-size:13px; line-height:1.6; }
.orders-shop-part { padding:20px 0; border-bottom:1px solid var(--line); }
.orders-shop-part > header { display:flex; justify-content:space-between; gap:12px; align-items:start; }
.orders-shop-part h3 { font-size:15px; margin:0 0 5px; }
.orders-reference { display:block; font-size:12px; color:var(--orders-secondary); }
.orders-shop-contact { padding:12px 0; }
.orders-shop-contact p { margin:0; font-size:12px; }
.orders-purchased-item { display:grid; grid-template-columns:48px minmax(0,1fr) auto; gap:12px; align-items:start; padding:16px 0; border-block:1px solid #edf1f6; }
.orders-item-photo { width:48px; height:60px; background:#edf1f5; border-radius:5px; overflow:hidden; display:grid; place-items:center; }
.orders-item-photo img { width:100%; height:100%; object-fit:cover; }
.orders-purchased-item strong { font-size:13px; font-weight:600; }
.orders-purchased-item p { font-size:12px; margin:5px 0; }
.orders-purchased-item span { font-size:12px; color:var(--orders-secondary); }
.orders-item-amount { display:grid; justify-items:end; gap:8px; }
.orders-item-amount .badge { font-size:11px; }
.orders-pickup, .orders-assignment, .orders-refund, .orders-payment-record { padding:16px 0; border-bottom:1px solid var(--line); }
.orders-pickup:last-child, .orders-assignment:last-child, .orders-refund:last-child, .orders-payment-record:last-child { border-bottom:0; }
.orders-pickup > p, .orders-assignment > p, .orders-refund > p { font-size:13px; margin:10px 0; }
.orders-technical-reference { display:block; padding:9px 0; font-size:12px; color:var(--orders-secondary); }
.orders-technical-reference summary { display:flex; justify-content:space-between; cursor:pointer; gap:12px; }
.orders-technical-reference code { display:block; padding-top:8px; font-family:inherit; color:var(--ink); text-align:end; overflow-wrap:anywhere; min-width:0; }
.orders-history { list-style:none; padding:0; margin:0; }
.orders-history li { position:relative; padding:0 0 24px 22px; border-inline-start:1px solid #c8d9f1; padding-inline-start:22px; padding-inline-end:0; }
.orders-history li::before { content:""; position:absolute; inset-inline-start:-4px; top:5px; width:7px; height:7px; border-radius:50%; background:#2563eb; }
.orders-history strong { font-size:13px; font-weight:500; line-height:1.6; }
.orders-history time { display:block; color:var(--orders-secondary); margin-top:6px; font-size:12px; }
.orders-page .technical-details { font-size:12px; margin:14px 0; }
.orders-page .technical-details summary { cursor:pointer; color:var(--orders-secondary); padding:7px 0; }
.orders-detail-loading { padding:24px 20px; }
.orders-skeleton { height:65px; margin:14px 0; border-radius:6px; background:#f0f4f9; }
.orders-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.orders-workspace.has-detail .orders-table th:nth-child(3), .orders-workspace.has-detail .orders-table td:nth-child(3) { display:none; }
.orders-workspace.has-detail .orders-table { min-width:610px; }
.orders-workspace.has-detail .orders-toolbar { grid-template-columns:minmax(140px,2fr) minmax(105px,1fr) minmax(105px,1fr) 44px; }

.orders-workspace.has-detail .orders-toolbar > .button { width:44px; }
.orders-workspace.is-expanded { grid-template-columns:minmax(0,1fr); }
.orders-workspace.is-expanded .orders-list-panel { display:none; }
.orders-workspace.is-expanded .review-detail { position:relative; top:0; max-height:none; }
.orders-workspace.is-expanded .orders-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:40px; align-items:start; }
@media(max-width:1399px) and (min-width:701px) {
  .orders-workspace.has-detail { grid-template-columns:minmax(0,1fr); }
  .orders-workspace.has-detail .review-detail { position:fixed; z-index:12; inset-block:78px 20px; inset-inline-end:20px; width:min(540px,calc(100vw - 40px)); max-height:none; box-shadow:0 18px 60px rgba(0,0,0,.18); }
  .orders-workspace.has-detail .orders-table th:nth-child(3), .orders-workspace.has-detail .orders-table td:nth-child(3) { display:table-cell; }
  .orders-workspace.has-detail .orders-table { min-width:850px; }
  .orders-workspace.has-detail .orders-toolbar { grid-template-columns:minmax(140px,2fr) minmax(110px,1fr) minmax(110px,1fr) 44px; }
  .orders-workspace.has-detail .orders-toolbar > :first-child { grid-column:auto; }
  .orders-workspace.is-expanded .review-detail { inset-inline:20px; width:auto; }
}
@media(max-width:1100px) {
  .orders-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .orders-metric { padding:16px; }
  .orders-metric--value { grid-column:span 2; }
}
@media(max-width:700px) {
  .orders-page { gap:16px; }
  .orders-page .page-head { align-items:start; }
  .orders-page .page-head h1 { font-size:26px; }
  .orders-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .orders-metric { padding:14px; gap:8px; }
  .orders-metric strong { font-size:24px; }
  .orders-metric small { font-size:12px; }
  .orders-metric--value { grid-column:span 2; }
  .orders-metric-label { font-size:12px; }
  .orders-queues { padding-inline:12px; }
  .orders-toolbar, .orders-workspace.has-detail .orders-toolbar { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:16px 14px 8px; }
  .orders-toolbar > :first-child, 
  .orders-toolbar > .button { grid-column:2; grid-row:3; justify-self:end; }
  .orders-filter-meta { padding:0 14px 10px; flex-wrap:wrap; }
  .orders-result-count { font-size:11px; }
  .orders-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .orders-table, .orders-workspace.has-detail .orders-table { min-width:0; table-layout:auto; }
  .orders-table thead { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
  .orders-table tbody { display:block; }
  .orders-table tbody tr { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); padding:14px; gap:16px 10px; border-top:1px solid var(--line); }
  .orders-table tbody td { display:block; border:0; min-width:0; padding:0; font-size:13px; }
  .orders-table td::before { content:attr(data-label); display:block; margin-bottom:7px; color:var(--orders-secondary); font-size:12px; font-weight:500; }
  .orders-table td:nth-child(3), .orders-workspace.has-detail .orders-table td:nth-child(3) { display:block; grid-column:1 / -1; }
  .orders-table td:last-child { grid-column:1 / -1; }
  .orders-table td:last-child::before { display:none; }
  .orders-table td:last-child .button { width:100%; min-height:44px; }
  .orders-table .is-selected td:first-child { box-shadow:none; }
  .orders-pagination { flex-wrap:wrap; padding:14px; }
  .orders-page-buttons { gap:8px; }
  .orders-workspace.has-detail { grid-template-columns:minmax(0,1fr); }
  .orders-workspace.has-detail .review-detail { position:fixed; z-index:15; inset:0; width:100%; max-height:100dvh; border:0; border-radius:0; }
  .orders-workspace.is-expanded .orders-summary-grid { display:block; }
  .orders-detail-tabs { top:65px; }
  .orders-detail-tabs button { min-height:48px; padding-inline:8px; }
  .orders-purchased-item { grid-template-columns:42px minmax(0,1fr); }
  .orders-item-photo { width:42px; height:54px; }
  .orders-item-amount { grid-column:2; display:flex; justify-content:space-between; align-items:center; }
  .orders-page .review-detail .panel-head .button { min-height:40px; }
}


.orders-page .badge--delivery_problem, .orders-page .badge--partially_canceled { background:#fff0e0; color:#92520b; }
.orders-page .badge--picking_up, .orders-page .badge--picked_up, .orders-page .badge--courier_assigned { background:#eaf2ff; color:#2059ae; }
.orders-page .badge--ready, .orders-page .badge--ready_for_pickup { background:#e8f5ef; color:#166d50; }
