/* Вкладки «Грузоместа» и «Остатки» (public/tools.js). Цвета — переменные тем из app.css */
.pick-store { max-width: 560px; }
.pick-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

.spin { display: inline-block; width: 13px; height: 13px; margin-right: 6px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: cg-spin .7s linear infinite; vertical-align: -2px; }
@keyframes cg-spin { to { transform: rotate(360deg); } }

.cg { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.cg-side { position: sticky; top: 74px; max-height: calc(100vh - 96px); display: flex; flex-direction: column; overflow: hidden; }
.cg-side-head { padding: 12px; border-bottom: 1px solid var(--border); }
.cg-side-head .btn { width: 100%; justify-content: center; }
.cg-tree { overflow-y: auto; padding: 8px; }
.cg-order { margin-bottom: 10px; }
.cg-order-title { display: flex; align-items: center; gap: 6px; font-weight: 700; padding: 6px 8px 0; }
.cg-order-sub { font-size: 12px; padding: 0 8px 6px 29px; }
.cg-supply { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px 7px 29px; border-radius: 8px; font: inherit; font-size: 13.5px; color: var(--text); cursor: pointer; }
.cg-supply:hover { background: var(--hover); }
.cg-supply.done::before { content: '✓'; position: absolute; margin-left: -17px; color: #16a34a; font-weight: 700; }
.cg-supply.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.cg-supply .muted { font-size: 12px; }

.cg-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cg-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 13.5px; }
.cg-goods { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.cg-good { display: grid; grid-template-columns: minmax(0, 1fr) auto 80px; gap: 12px; align-items: center; font-size: 13.5px; }
.cg-good b { text-align: right; }
.cg-tool p { margin: 0 0 10px; font-size: 13px; }
.cg-tool.bulk { border-color: var(--accent); }
.cg-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.cg-row .select { min-width: 220px; max-width: 100%; }
.input.num { width: 84px; }
.cg-left { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; font-size: 13px; }
.cg-left:empty { display: none; }

.cg-progress { height: 6px; border-radius: 99px; background: var(--panel-2); overflow: hidden; margin-top: 12px; }
.cg-progress > div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.cg-log { margin-top: 10px; max-height: 220px; overflow-y: auto; padding: 10px 12px; border-radius: 8px; background: var(--panel-2); font: 12.5px/1.6 ui-monospace, Consolas, monospace; white-space: pre-wrap; }

.cg-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin: 14px 0; }
.cg-cards > .empty { grid-column: 1 / -1; }
.cg-card { border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 12px; background: var(--panel); }
.cg-card.pallet { border-left-color: #0891b2; }
.cg-card.sent { border-left-color: #16a34a; background: var(--panel-2); }
.cg-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-bottom: 8px; }
.cg-card-head .badge { font-size: 11px; }
.cg-x { border: 0; background: none; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 6px; }
.cg-x:hover { color: var(--neg); background: var(--neg-soft); }
.cg-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; margin-top: 4px; }
.cg-item .cut { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cg-item .input.num { width: 76px; height: 32px; }

.cg-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 14px; }
.fs-field { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500; }
.fs-table { max-height: 420px; overflow-y: auto; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }

@media (max-width: 900px) {
  .cg { grid-template-columns: 1fr; }
  .cg-side { position: static; max-height: 360px; }
  .cg-good { grid-template-columns: minmax(0, 1fr) auto; }
  .cg-good > .muted { display: none; }
}

.cg-row .select.cg-kind { min-width: 0; width: auto; }

/* География по кластерам (карточка товара) */
.geo-help { font-size: 12.5px; margin: 0 0 10px; }
.geo-wh { font-size: 11.5px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-away { margin-top: 16px; }
.geo-sub { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.geo-flows { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 6px 18px; }
.geo-flow { display: flex; gap: 8px; align-items: baseline; font-size: 13.5px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.geo-flow .geo-n { margin-left: auto; white-space: nowrap; }
.geo td, .geo th { white-space: nowrap; }
