/* Замовлення товарки (ShopOrders.js). Усі кольори — через токени зі styles.css, тож темна й
   нічна теми працюють без окремих правил. Власні кольори є лише в статусів і джерел: вони
   приходять із бази й підмішуються через color-mix, щоб на темному тлі не різати очі. */

.shop-orders{
  --shop-row-h:52px;
  --shop-border:var(--sky-line);
  --shop-hover:color-mix(in srgb, var(--sky) 70%, transparent);
  display:flex; flex-direction:column; gap:14px; min-width:0;
  color:var(--ink); font-family:var(--font-body);
}
.shop-orders button{font-family:inherit}
.shop-muted{color:var(--slate-2); font-size:12.5px}
.shop-mono{font-family:var(--font-mono); font-size:12.5px; letter-spacing:-.01em; cursor:copy}

/* ── Шапка ── */
.shop-head{display:flex; align-items:center; justify-content:space-between; gap:12px}
.shop-head__title{display:flex; align-items:baseline; gap:10px}
.shop-head__title h1{margin:0; font-family:var(--font-display); font-size:24px; font-weight:800; letter-spacing:-.02em}
.shop-head__count{font-size:14px; font-weight:700; color:var(--slate-2); font-variant-numeric:tabular-nums}
.shop-head__actions{display:flex; align-items:center; gap:8px}
.shop-new-btn svg{width:16px; height:16px}

.shop-iconbtn{
  display:inline-flex; align-items:center; justify-content:center; min-width:32px; height:32px; padding:0 6px;
  border-radius:8px; border:1px solid var(--shop-border); background:var(--paper); color:var(--slate);
  cursor:pointer; transition:background .12s, border-color .12s, color .12s;
}
.shop-iconbtn:hover:not(:disabled){background:var(--sky); color:var(--ink)}
.shop-iconbtn:disabled{opacity:.4; cursor:not-allowed}
.shop-iconbtn svg{width:16px; height:16px}

.shop-kbd{
  display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px;
  border-radius:5px; border:1px solid var(--shop-border); border-bottom-width:2px; background:var(--sky);
  font-family:var(--font-mono); font-size:10.5px; font-weight:600; color:var(--slate); line-height:1;
}
.shop-kbd--inv{background:rgba(255,255,255,.18); border-color:rgba(255,255,255,.3); color:inherit}
.btn .shop-kbd{margin-left:4px}

/* ── Вкладки статусів ── */
.shop-tabs{
  display:flex; gap:2px; overflow-x:auto; scrollbar-width:none; padding-bottom:1px;
  border-bottom:1px solid var(--shop-border); margin:0 -2px;
  mask-image:linear-gradient(90deg, #000 calc(100% - 32px), transparent);
}
.shop-tabs::-webkit-scrollbar{display:none}
.shop-tab{
  display:inline-flex; align-items:center; gap:7px; padding:9px 11px 10px; white-space:nowrap;
  border:0; background:none; color:var(--slate); font-size:13.5px; font-weight:600; cursor:pointer;
  border-bottom:2px solid transparent; margin-bottom:-1px; border-radius:8px 8px 0 0; transition:color .12s, background .12s;
}
.shop-tab:hover{color:var(--ink); background:var(--shop-hover)}
.shop-tab.is-active{color:var(--ink); border-bottom-color:var(--visa)}
.shop-tab.is-empty:not(.is-active){color:var(--slate-2)}
.shop-tab__n{
  font-size:11.5px; font-weight:700; padding:1px 7px; border-radius:99px; background:var(--sky); color:var(--slate);
  font-variant-numeric:tabular-nums; min-width:22px; text-align:center;
}
.shop-tab.is-active .shop-tab__n{background:var(--visa-soft); color:var(--visa-ink)}
.shop-dot{display:inline-block; width:8px; height:8px; border-radius:50%; flex:none}
.shop-dot--lg{width:12px; height:12px; box-shadow:0 0 0 4px color-mix(in srgb, var(--st) 18%, transparent)}

/* ── Панель інструментів ── */
.shop-toolbar{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.shop-search{
  position:relative; flex:1 1 260px; max-width:380px; display:flex; align-items:center;
}
.shop-search__icon{position:absolute; left:10px; color:var(--slate-2); display:flex; pointer-events:none}
.shop-search__icon svg{width:16px; height:16px}
.shop-search input{
  width:100%; height:34px; padding:0 12px 0 34px; border-radius:9px; border:1px solid var(--shop-border);
  background:var(--paper); color:var(--ink); font:inherit; font-size:13.5px; outline:none; transition:border-color .12s, box-shadow .12s;
}
.shop-search input:focus{border-color:var(--visa); box-shadow:0 0 0 3px color-mix(in srgb, var(--visa) 16%, transparent)}

.shop-seg{display:inline-flex; padding:2px; border-radius:9px; background:var(--sky); border:1px solid var(--shop-border)}
.shop-seg button{
  border:0; background:none; padding:0 10px; height:28px; border-radius:7px; font-size:12.5px; font-weight:600;
  color:var(--slate); cursor:pointer; white-space:nowrap;
}
.shop-seg button:hover{color:var(--ink)}
.shop-seg button.is-active{background:var(--paper); color:var(--ink); box-shadow:var(--shadow-card)}
.shop-custom-dates{display:inline-flex; align-items:center; gap:6px; color:var(--slate-2)}
.shop-custom-dates input{height:32px; border-radius:8px; border:1px solid var(--shop-border); background:var(--paper); color:var(--ink); padding:0 8px; font:inherit; font-size:13px}

.shop-filter-btn{
  display:inline-flex; align-items:center; gap:6px; height:34px; padding:0 12px; border-radius:9px;
  border:1px solid var(--shop-border); background:var(--paper); color:var(--slate); font-size:13px; font-weight:600; cursor:pointer;
}
.shop-filter-btn svg{width:15px; height:15px}
.shop-filter-btn.is-active{color:var(--visa-ink); border-color:color-mix(in srgb, var(--visa) 40%, transparent); background:var(--visa-soft)}
.shop-filter-btn__n{background:var(--visa); color:var(--visa-on, #fff); border-radius:99px; font-size:11px; padding:0 6px; line-height:17px}

.shop-filters{
  display:grid; grid-template-columns:repeat(auto-fill, minmax(170px, 1fr)); gap:10px; align-items:end;
  padding:12px; border-radius:var(--radius-md); background:var(--sky); border:1px solid var(--shop-border);
  animation:shop-in .16s ease;
}
.shop-filters label{display:flex; flex-direction:column; gap:4px; font-size:11.5px; font-weight:700; color:var(--slate); text-transform:uppercase; letter-spacing:.04em}
.shop-filters select, .shop-filters input{
  height:32px; border-radius:8px; border:1px solid var(--shop-border); background:var(--paper); color:var(--ink);
  padding:0 8px; font:inherit; font-size:13px; text-transform:none; letter-spacing:0; font-weight:500;
}
.shop-link{border:0; background:none; color:var(--visa); font-weight:700; font-size:13px; cursor:pointer; padding:6px 2px; justify-self:start}
.shop-link:hover{text-decoration:underline}

/* ── Масові дії ── */
.shop-bulk{
  position:sticky; top:8px; z-index:20; display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  padding:8px 10px 8px 14px; border-radius:12px; background:var(--ink-invert); color:#fff; box-shadow:var(--shadow-pop);
}
.shop-bulk__n{font-weight:700; font-size:13.5px; margin-right:6px}
.shop-bulk select, .shop-bulk__btn{
  height:30px; border-radius:8px; border:1px solid rgba(255,255,255,.18); background:rgba(255,255,255,.08); color:#fff;
  font:inherit; font-size:13px; font-weight:600; padding:0 10px; cursor:pointer;
}
.shop-bulk select option{color:#111}
.shop-bulk__btn{display:inline-flex; align-items:center; gap:6px}
.shop-bulk__btn svg{width:14px; height:14px}
.shop-bulk__btn:hover:not(:disabled), .shop-bulk select:hover{background:rgba(255,255,255,.16)}
.shop-bulk__btn.is-danger{color:#ffb4a6}
.shop-bulk__btn:disabled, .shop-bulk select:disabled{opacity:.5; cursor:wait}
.shop-bulk__close{margin-left:auto; border:0; background:none; color:rgba(255,255,255,.7); cursor:pointer; display:flex; padding:4px}
.shop-bulk__close svg{width:16px; height:16px}
.shop-bulk__spin, .shop-spin{
  width:14px; height:14px; border-radius:50%; border:2px solid currentColor; border-right-color:transparent;
  animation:shop-spin .7s linear infinite; display:inline-block;
}
.shop-fade-enter-active, .shop-fade-leave-active{transition:opacity .15s, transform .15s}
.shop-fade-enter-from, .shop-fade-leave-to{opacity:0; transform:translateY(-4px)}

/* ── Таблиця ── */
.shop-table-wrap{
  position:relative; overflow-x:auto; border:1px solid var(--shop-border); border-radius:var(--radius-md);
  background:var(--paper); box-shadow:var(--shadow-card);
}
.shop-table{width:100%; border-collapse:separate; border-spacing:0; font-size:13.5px; min-width:1180px}
.shop-table thead th{
  position:sticky; top:0; z-index:1; background:var(--paper); text-align:left; white-space:nowrap;
  padding:10px 10px; font-size:11.5px; font-weight:700; color:var(--slate-2); text-transform:uppercase; letter-spacing:.05em;
  border-bottom:1px solid var(--shop-border);
}
.shop-table td{padding:0 10px; height:var(--shop-row-h); border-bottom:1px solid var(--shop-border); vertical-align:middle; white-space:nowrap}
.shop-table tbody tr:last-child td{border-bottom:0}
.shop-table tbody tr{cursor:pointer; transition:background .1s}
.shop-table tbody tr:hover{background:var(--shop-hover)}
.shop-table tbody tr.is-selected{background:color-mix(in srgb, var(--visa) 7%, transparent)}
.shop-table tbody tr.is-open{background:color-mix(in srgb, var(--visa) 10%, transparent)}
.shop-table tbody tr.is-cursor td:first-child{box-shadow:inset 3px 0 0 var(--visa)}
.shop-table tbody tr.is-fresh{animation:shop-fresh 6s ease-out}
.shop-table tbody.is-stale{opacity:.55; transition:opacity .15s}
.shop-table input[type="checkbox"]{width:15px; height:15px; accent-color:var(--visa); cursor:pointer; margin:0}
.shop-table .c-check{width:34px; padding-right:0}
.shop-table .c-no{width:1%}
.shop-table .c-num{text-align:right}
.shop-no{font-weight:700; font-variant-numeric:tabular-nums; color:var(--ink-soft)}
.shop-dup{
  display:inline-block; margin-left:6px; font-size:11px; font-weight:700; padding:1px 6px; border-radius:6px;
  background:var(--amber-soft); color:var(--amber); text-decoration:none;
}
.shop-dup:hover{filter:brightness(.95); text-decoration:underline}
.c-date{color:var(--slate); font-size:13px; font-variant-numeric:tabular-nums}

.shop-chip, .shop-src{
  display:inline-flex; align-items:center; gap:6px; padding:3px 9px 3px 8px; border-radius:99px; border:1px solid transparent;
  font-size:12px; font-weight:700; white-space:nowrap; line-height:1.3;
}
.shop-src{padding:2px 8px; font-size:11.5px; border-radius:6px}

.c-cust{max-width:200px}
.shop-cust__name{font-weight:600; overflow:hidden; text-overflow:ellipsis; line-height:1.25}
.shop-cust__phone{font-size:12.5px; color:var(--slate); text-decoration:none; font-variant-numeric:tabular-nums}
.shop-cust__phone:hover{color:var(--visa); text-decoration:underline}
.c-items{max-width:230px; overflow:hidden; text-overflow:ellipsis; color:var(--ink-soft)}
.c-items > span:first-child{overflow:hidden; text-overflow:ellipsis}
.shop-upsell-mark{
  display:inline-flex; align-items:center; justify-content:center; width:16px; height:16px; margin-left:6px; border-radius:5px;
  background:var(--good-soft); color:var(--good); font-weight:800; font-size:12px; vertical-align:1px;
}
.shop-sum{font-weight:700; font-variant-numeric:tabular-nums}
.c-offer{max-width:150px; overflow:hidden; text-overflow:ellipsis; color:var(--slate)}
.shop-op{display:inline-flex; align-items:center; gap:7px; max-width:150px}
.shop-op__name{overflow:hidden; text-overflow:ellipsis; font-size:13px}
.shop-ava{
  width:22px; height:22px; border-radius:50%; flex:none; object-fit:cover; display:inline-flex; align-items:center; justify-content:center;
  color:#fff; font-size:9.5px; font-weight:800; letter-spacing:.02em;
}
.c-ttn{line-height:1.2}
.c-ttn .shop-mono{display:block}
.shop-ttn-st{display:block; font-size:11.5px; color:var(--slate-2); max-width:150px; overflow:hidden; text-overflow:ellipsis}
.shop-cb{display:inline-flex; align-items:center; gap:5px; font-size:12.5px; font-weight:600; color:var(--slate)}
.shop-cb svg{width:13px; height:13px}
.shop-cb.is-overdue{color:var(--stamp)}

.shop-skel-row td{cursor:default}
.shop-skel{
  display:block; height:10px; border-radius:6px; max-width:100%;
  background:linear-gradient(90deg, var(--sky) 0%, var(--sky-deep) 50%, var(--sky) 100%); background-size:200% 100%;
  animation:shop-shimmer 1.2s ease-in-out infinite;
}

.shop-empty{display:flex; flex-direction:column; align-items:center; text-align:center; padding:64px 20px 72px; gap:6px}
.shop-empty__art{
  width:56px; height:56px; border-radius:16px; display:flex; align-items:center; justify-content:center; margin-bottom:8px;
  background:var(--visa-soft); color:var(--visa);
}
.shop-empty__art svg{width:26px; height:26px}
.shop-empty h3{margin:0; font-size:16px; font-weight:800}
.shop-empty p{margin:0 0 10px; color:var(--slate); font-size:13.5px; max-width:360px}
.shop-empty .btn svg{width:14px; height:14px}

.shop-pager{display:flex; align-items:center; justify-content:space-between; color:var(--slate); font-size:13px; font-variant-numeric:tabular-nums}
.shop-pager__btns{display:flex; align-items:center; gap:8px}
.shop-pager__page{min-width:56px; text-align:center; font-weight:600}

/* ── Шухляда ── */
.shop-drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:250; width:min(720px, 100vw);
  display:flex; flex-direction:column; background:var(--paper); border-left:1px solid var(--shop-border);
  box-shadow:-24px 0 48px -24px rgba(12,37,29,.28);
}
.shop-drawer-enter-active, .shop-drawer-leave-active{transition:transform .22s cubic-bezier(.16,1,.3,1), opacity .18s}
.shop-drawer-enter-from, .shop-drawer-leave-to{transform:translateX(32px); opacity:0}
.shop-drawer__head{display:flex; align-items:center; gap:12px; padding:14px 18px; border-bottom:1px solid var(--shop-border)}
.shop-drawer__nav{display:flex; gap:4px}
.shop-drawer__title{flex:1; min-width:0; display:flex; align-items:baseline; gap:10px; flex-wrap:wrap}
.shop-drawer__title h2{margin:0; font-family:var(--font-display); font-size:20px; font-weight:800; letter-spacing:-.02em; font-variant-numeric:tabular-nums}
.shop-dirty{font-size:11.5px; font-weight:700; color:var(--amber); background:var(--amber-soft); padding:2px 8px; border-radius:99px}
.shop-drawer__body{flex:1; min-height:0; overflow-y:auto; padding:16px 18px 24px; display:flex; flex-direction:column; gap:12px; background:var(--sky)}
.shop-drawer__foot{
  display:flex; align-items:center; justify-content:space-between; gap:10px; padding:12px 18px;
  border-top:1px solid var(--shop-border); background:var(--paper);
}
.shop-drawer__foot-r{display:flex; gap:8px; align-items:center}
.shop-drawer__foot .btn{height:36px}

.shop-status-pick{
  --st:#98a2b3;
  position:relative; display:flex; align-items:center; gap:12px; padding:0 14px; height:52px; border-radius:var(--radius-md);
  background:color-mix(in srgb, var(--st) 12%, var(--paper)); border:1px solid color-mix(in srgb, var(--st) 35%, transparent);
  transition:background .2s, border-color .2s;
}
.shop-status-pick select{
  flex:1; appearance:none; -webkit-appearance:none; border:0; background:transparent; outline:none; cursor:pointer;
  font:inherit; font-size:17px; font-weight:800; color:var(--ink); height:100%; padding-right:24px;
}
.shop-status-pick select:disabled{cursor:not-allowed}
.shop-status-pick__chev{position:absolute; right:14px; pointer-events:none; color:var(--slate); display:flex}
.shop-status-pick__chev svg{width:18px; height:18px}
.shop-status-quick{display:flex; flex-wrap:wrap; gap:6px}
.shop-status-quick button{
  display:inline-flex; align-items:center; gap:6px; height:28px; padding:0 9px 0 5px; border-radius:8px;
  border:1px solid var(--shop-border); background:var(--paper); color:var(--slate); font-size:12.5px; font-weight:600; cursor:pointer;
}
.shop-status-quick button:hover:not(:disabled){color:var(--ink); border-color:var(--slate-2)}
.shop-status-quick button.is-active .shop-kbd{background:transparent; border-color:currentColor; color:inherit}
.shop-status-quick button:disabled{opacity:.5; cursor:not-allowed}
.shop-lock{display:flex; align-items:center; gap:8px; margin:0; font-size:13px; color:var(--amber); background:var(--amber-soft); padding:8px 12px; border-radius:10px}
.shop-lock svg{width:15px; height:15px; flex:none}

.shop-card{background:var(--paper); border:1px solid var(--shop-border); border-radius:var(--radius-md); padding:14px 16px; box-shadow:var(--shadow-card)}
.shop-card--flat{padding:0}
.shop-card__head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:12px}
.shop-card__head h3{margin:0; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--slate)}
.shop-total{font-size:17px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--ink)}

.shop-history-badge{font-size:12px; font-weight:700; padding:3px 9px; border-radius:99px; background:var(--sky); color:var(--slate); cursor:default}
.shop-history-badge.is-good{background:var(--good-soft); color:var(--good)}
.shop-history-badge.is-bad{background:var(--stamp-soft); color:var(--stamp)}
.shop-history-badge.is-new{background:var(--visa-soft); color:var(--visa-ink)}
.shop-dup-line{display:block; margin-top:10px; font-size:13px; font-weight:600; color:var(--amber); text-decoration:none}
.shop-dup-line:hover{text-decoration:underline}

.shop-grid2{display:grid; grid-template-columns:1fr 1fr; gap:10px 12px}
.shop-span2{grid-column:1 / -1}
.shop-field{display:flex; flex-direction:column; gap:5px; min-width:0; position:relative}
.shop-field > span{font-size:12px; font-weight:600; color:var(--slate)}
.shop-field input, .shop-field select, .shop-textarea, .shop-item input, .shop-cb-input input, .shop-ac > input{
  width:100%; height:36px; padding:0 10px; border-radius:9px; border:1px solid var(--shop-border); background:var(--paper);
  color:var(--ink); font:inherit; font-size:14px; outline:none; transition:border-color .12s, box-shadow .12s; box-sizing:border-box;
}
.shop-textarea{height:auto; padding:9px 10px; resize:vertical; line-height:1.45}
.shop-field input:focus, .shop-field select:focus, .shop-textarea:focus, .shop-item input:focus, .shop-cb-input input:focus, .shop-ac > input:focus{
  border-color:var(--visa); box-shadow:0 0 0 3px color-mix(in srgb, var(--visa) 15%, transparent);
}
.shop-input-group{display:flex; align-items:stretch}
.shop-input-group > input, .shop-input-group > select{border-top-right-radius:0; border-bottom-right-radius:0; flex:1; min-width:0}
.shop-input-group > button, .shop-input-group > a{
  display:flex; align-items:center; justify-content:center; min-width:36px; padding:0 8px; border:1px solid var(--shop-border);
  border-left:0; background:var(--sky); color:var(--slate); cursor:pointer; text-decoration:none; font-size:12.5px; font-weight:700;
}
.shop-input-group > :last-child{border-radius:0 9px 9px 0}
.shop-input-group > button:hover, .shop-input-group > a:hover{color:var(--ink); background:var(--sky-deep)}
.shop-input-group > .is-call{color:var(--good)}
.shop-input-group svg{width:15px; height:15px}

.shop-call__row{display:flex; align-items:center; gap:8px; flex-wrap:wrap}
.shop-cb-input{position:relative; display:flex; align-items:center; flex:0 1 220px}
.shop-cb-input > span:first-child{position:absolute; left:10px; color:var(--slate-2); display:flex; pointer-events:none}
.shop-cb-input > span:first-child svg{width:15px; height:15px}
.shop-cb-input input{padding-left:32px; height:32px; font-size:13px}
.shop-cb-input .shop-x{position:absolute; right:4px}
.shop-pills{display:flex; gap:4px}
.shop-pills button{height:28px; padding:0 9px; border-radius:99px; border:1px solid var(--shop-border); background:var(--sky); color:var(--slate); font-size:12px; font-weight:600; cursor:pointer}
.shop-pills button:hover{color:var(--ink); border-color:var(--slate-2)}

.shop-x{border:0; background:none; color:var(--slate-2); cursor:pointer; display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:7px; flex:none}
.shop-x:hover{background:var(--stamp-soft); color:var(--stamp)}
.shop-x svg{width:15px; height:15px}

/* Позиції */
.shop-items{display:flex; flex-direction:column; gap:6px; margin-bottom:10px}
.shop-item{display:grid; grid-template-columns:minmax(0,1fr) 58px 10px 92px 88px auto auto; align-items:center; gap:6px; padding:4px; margin:0 -4px; border-radius:10px}
.shop-item.is-upsell{background:color-mix(in srgb, var(--good) 7%, transparent)}
.shop-item input{height:32px; font-size:13.5px}
.shop-item__qty, .shop-item__price{text-align:right; font-variant-numeric:tabular-nums}
.shop-item__x{color:var(--slate-2); text-align:center; font-size:12px}
.shop-item__sum{text-align:right; font-weight:700; font-variant-numeric:tabular-nums; font-size:13.5px}
.shop-items__empty{margin:0 0 10px}
.shop-toggle{
  height:26px; padding:0 8px; border-radius:7px; border:1px dashed var(--shop-border); background:none; color:var(--slate-2);
  font-size:11.5px; font-weight:700; cursor:pointer; white-space:nowrap;
}
.shop-toggle:hover{color:var(--good); border-color:var(--good)}
.shop-toggle.is-on{border-style:solid; border-color:transparent; background:var(--good-soft); color:var(--good)}
.shop-product-add{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.shop-product-add .shop-ac{flex:1 1 260px}

.shop-ac{position:relative}
.shop-ac > input{padding-left:32px}
.shop-field.shop-ac > input{padding-left:10px; padding-right:30px}
.shop-ac__icon{position:absolute; left:10px; top:50%; transform:translateY(-50%); color:var(--slate-2); display:flex; pointer-events:none}
.shop-ac__icon svg{width:15px; height:15px}
.shop-ac__ok{position:absolute; right:9px; bottom:9px; color:var(--good); display:flex}
.shop-ac__ok svg{width:16px; height:16px}
.shop-ac__list{
  position:absolute; left:0; right:0; top:calc(100% + 4px); z-index:30; max-height:280px; overflow-y:auto; padding:4px;
  background:var(--paper); border:1px solid var(--shop-border); border-radius:10px; box-shadow:var(--shadow-pop); animation:shop-in .12s ease;
}
.shop-ac__list button{
  display:flex; align-items:center; gap:10px; width:100%; padding:7px 8px; border:0; background:none; border-radius:7px;
  text-align:left; cursor:pointer; color:var(--ink); font-size:13.5px;
}
.shop-ac__list button:hover{background:var(--sky)}
.shop-ac__list img, .shop-ac__ph{width:30px; height:30px; border-radius:7px; object-fit:cover; flex:none; background:var(--sky-deep)}
.shop-ac__name{flex:1; min-width:0; display:flex; flex-direction:column; line-height:1.25; overflow:hidden; text-overflow:ellipsis}
.shop-ac__name small{color:var(--slate-2); font-family:var(--font-mono); font-size:11px}
.shop-ac__price{font-weight:700; font-variant-numeric:tabular-nums}

.shop-upsells{display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:12px; padding-top:12px; border-top:1px dashed var(--shop-border)}
.shop-upsells__label{font-size:12px; font-weight:700; color:var(--slate)}
.shop-upsells button{
  height:28px; padding:0 10px; border-radius:99px; border:1px solid color-mix(in srgb, var(--good) 30%, transparent);
  background:var(--good-soft); color:var(--good); font-size:12.5px; font-weight:600; cursor:pointer;
}
.shop-upsells button:hover{filter:brightness(.96)}
.shop-upsells b{font-weight:800; margin-left:2px}

.shop-hint{margin:10px 0 0; font-size:12.5px; color:var(--amber)}
.shop-ship{margin-top:12px; display:flex; flex-direction:column; gap:6px}
.shop-ship__row{display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:8px 10px; border-radius:9px; background:var(--sky)}
.shop-ship__st{font-size:12.5px; font-weight:700; color:var(--visa-ink); flex:1}
.shop-ttn-btn{margin-top:12px}

.shop-collapse{
  display:flex; align-items:center; gap:10px; width:100%; padding:12px 16px; border:0; background:none; cursor:pointer;
  font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--slate); text-align:left;
}
.shop-collapse .shop-muted{flex:1; text-transform:none; letter-spacing:0; font-weight:500; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap}
.shop-collapse__chev{display:flex; transition:transform .15s}
.shop-collapse__chev svg{width:16px; height:16px}
.shop-collapse__chev.is-open{transform:rotate(180deg)}
.shop-utm{display:grid; grid-template-columns:120px 1fr; gap:6px 12px; margin:0; padding:0 16px 14px; font-size:13px}
.shop-utm dt{color:var(--slate-2); font-family:var(--font-mono); font-size:12px}
.shop-utm dd{margin:0; word-break:break-all}

.shop-timeline{list-style:none; margin:0; padding:0; position:relative}
.shop-timeline::before{content:''; position:absolute; left:3.5px; top:6px; bottom:6px; width:1px; background:var(--shop-border)}
.shop-timeline li{position:relative; display:flex; gap:12px; padding:5px 0}
.shop-timeline li .shop-dot{margin-top:6px; box-shadow:0 0 0 3px var(--paper); position:relative}
.shop-timeline__text{font-size:13.5px; font-weight:600}
.shop-timeline li.is-call .shop-timeline__text, .shop-timeline li.is-system .shop-timeline__text{font-weight:500; color:var(--ink-soft)}
.shop-timeline__meta{font-size:12px; color:var(--slate-2)}

/* ── Легенда клавіш ── */
.shop-legend{
  position:fixed; right:20px; bottom:76px; z-index:320; width:260px; padding:12px 14px;
  background:var(--paper); border:1px solid var(--shop-border); border-radius:var(--radius-md); box-shadow:var(--shadow-pop);
  animation:shop-in .14s ease;
}
.shop-legend__head{display:flex; align-items:center; justify-content:space-between; margin-bottom:6px; font-size:13.5px}
.shop-legend ul{list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:7px}
.shop-legend li{display:flex; align-items:center; gap:4px; font-size:13px; color:var(--ink-soft)}
.shop-legend li .shop-kbd:last-of-type{margin-right:6px}

/* ── Нове замовлення ── */
.shop-overlay{z-index:330}
.shop-modal{
  width:640px; max-width:calc(100vw - 32px); max-height:90vh; display:flex; flex-direction:column;
  background:var(--paper); border-radius:var(--radius-lg); box-shadow:var(--shadow-pop); animation:popin .16s cubic-bezier(.16,1,.3,1);
}
.shop-modal__head{display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-bottom:1px solid var(--shop-border)}
.shop-modal__head h2{margin:0; font-size:18px; font-weight:800; letter-spacing:-.01em}
.shop-modal__body{flex:1; min-height:0; overflow-y:auto; padding:16px 20px; display:flex; flex-direction:column; gap:12px}
.shop-modal__sub{margin:6px 0 0; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.06em; color:var(--slate)}
.shop-modal__foot{display:flex; align-items:center; justify-content:space-between; padding:12px 20px; border-top:1px solid var(--shop-border)}
.shop-modal .shop-item{grid-template-columns:minmax(0,1fr) 58px 10px 92px 88px auto}

@keyframes shop-spin{to{transform:rotate(360deg)}}
@keyframes shop-in{from{opacity:0; transform:translateY(-3px)} to{opacity:1; transform:none}}
@keyframes shop-shimmer{0%{background-position:100% 0} 100%{background-position:-100% 0}}
@keyframes shop-fresh{
  0%, 30%{background:color-mix(in srgb, var(--visa) 16%, transparent)}
  100%{background:transparent}
}

/* ── Телефон ── */
@media (max-width:760px){
  .shop-head__title h1{font-size:20px}
  .shop-search{max-width:none; flex-basis:100%}
  .shop-seg{overflow-x:auto; max-width:100%}
  .shop-drawer{width:100vw; border-left:0}
  .shop-drawer__body{padding:12px}
  .shop-grid2{grid-template-columns:1fr}
  .shop-item{grid-template-columns:minmax(0,1fr) 52px 80px auto; row-gap:4px}
  .shop-item__x, .shop-item__sum{display:none}
  .shop-drawer__foot .btn .shop-kbd{display:none}
  .shop-legend{right:12px; left:12px; width:auto}
}
@media (prefers-reduced-motion:reduce){
  .shop-table tbody tr.is-fresh, .shop-skel{animation:none}
}

/* Orbita, 08.11.2026 — замовлення на телефоні карткою, а не таблицею на 12 колонок.
   Раніше видно було лише №, дату й статус, а клієнт, телефон і сума ховались за правим краєм. */
@media (max-width:720px){
  .shop-table-wrap{overflow:visible}
  .shop-table, .shop-table tbody{display:block;width:100%;min-width:0!important}
  .shop-table thead{display:none}
  .shop-table tbody tr{display:grid;grid-template-columns:auto 1fr auto;gap:6px 10px;align-items:center;
    padding:12px 14px;margin:0 0 10px;border:1px solid var(--sky-line);border-radius:14px;background:var(--paper)}
  .shop-table tbody td{display:block;padding:0;border:0;min-width:0;max-width:none;white-space:normal;height:auto!important}
  .shop-table tbody tr{box-sizing:border-box;width:100%}
  .shop-table tbody td:nth-child(1), .shop-table tbody td:nth-child(8),
  .shop-table tbody td:nth-child(10), .shop-table tbody td:nth-child(12){display:none}
  .shop-table tbody td:nth-child(2){grid-column:1;grid-row:1;font-weight:800}
  .shop-table tbody td:nth-child(4){grid-column:2;grid-row:1}
  .shop-table tbody td:nth-child(7){grid-column:3;grid-row:1;text-align:right;font-weight:800}
  .shop-table tbody td:nth-child(5){grid-column:1 / -1;grid-row:2}
  .shop-table tbody td:nth-child(6){grid-column:1 / -1;grid-row:3;color:var(--slate);font-size:13px;overflow:hidden;text-overflow:ellipsis}
  .shop-table tbody td:nth-child(3){grid-column:1 / 3;grid-row:4;font-size:12px;color:var(--slate)}
  .shop-table tbody td:nth-child(9){grid-column:3;grid-row:4;text-align:right}
  .shop-table tbody td:nth-child(11){grid-column:1 / -1;grid-row:5;font-size:12px}
  .shop-table tbody td:nth-child(11):empty{display:none}
  .shop-table tbody tr.shop-skel-row td:nth-child(n+8){display:none}
}

