:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f0f2f7;
  --border: #e3e6ee;
  --text: #171a26;
  --muted: #687089;
  --brand: #3485e8;
  --brand-ink: #ffffff;
  --navy: #1b2a66;
  --danger: #d93a4a;
  --danger-bg: #fdecee;
  --warn: #b26a00;
  --warn-bg: #fff4e0;
  --ok: #1d8a5a;
  --ok-bg: #e5f6ee;
  --violet: #6b4fd8;
  --violet-bg: #efebfd;
  --blue-bg: #e7f0fd;
  --gray-bg: #eceef3;
  --shadow: 0 1px 2px rgba(20, 24, 40, .06), 0 8px 24px rgba(20, 24, 40, .06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11131b;
    --surface: #1a1d28;
    --surface-2: #232736;
    --border: #2e3346;
    --text: #e9ebf3;
    --muted: #9aa1b8;
    --brand: #5a9cf0;
    --navy: #9fb4ff;
    --danger: #ff6b78;
    --danger-bg: #3a1d22;
    --warn: #ffb547;
    --warn-bg: #3a2c14;
    --ok: #4cd29a;
    --ok-bg: #16352a;
    --violet: #a993ff;
    --violet-bg: #2a2445;
    --blue-bg: #1c2b45;
    --gray-bg: #262a37;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--brand); }
.boot { padding: 80px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: Consolas, ui-monospace, monospace; font-size: 13px; }
.hidden { display: none !important; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; font-weight: 600; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s, opacity .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 1px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--brand) 88%, #000); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.btn.danger:hover { background: var(--danger-bg); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.loading { pointer-events: none; opacity: .85; }
.btn.loading::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- шапка ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 24px; background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--navy); }
.brand img { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid var(--border); }
.nav { display: flex; gap: 4px; }
.nav button {
  border: 0; background: transparent; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  font-weight: 600; color: var(--muted);
}
.nav button.active { background: var(--blue-bg); color: var(--brand); }
.topbar .spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13px; font-weight: 600; cursor: default; white-space: nowrap;
}
button.chip { cursor: pointer; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.dot.bad { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); animation: pulse 1.4s infinite; }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
@keyframes pulse { 50% { opacity: .4; } }

.offline {
  background: var(--danger); color: #fff; text-align: center; padding: 8px 16px; font-weight: 600;
}

/* ---------- основная часть ---------- */
.page { max-width: 1280px; margin: 0 auto; padding: 20px 24px 60px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.stat:hover { border-color: var(--brand); }
.stat.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--blue-bg); }
.stat .num { font-size: 26px; font-weight: 800; line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 13px; margin-top: 2px; }
.stat.static { cursor: default; }
.stat.static:hover { border-color: var(--border); }

.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow-x: auto; max-width: 100%; }
.tabs button {
  border: 0; background: transparent; border-radius: 9px; padding: 7px 12px; cursor: pointer;
  font-weight: 600; color: var(--muted); white-space: nowrap;
}
.tabs button.active { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .tabs button.active { color: #10142a; } }
.tabs .count { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; border-radius: 10px;
  background: var(--surface-2); color: var(--text); font-size: 12px; }
.tabs button.active .count { background: rgba(255, 255, 255, .2); color: inherit; }
.search { flex: 1; min-width: 200px; max-width: 360px; height: 40px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); }
.search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--blue-bg); }
.sync { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ---------- список заказов ---------- */
.list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); }
.row {
  display: grid; grid-template-columns: 72px minmax(150px, 1.3fr) minmax(150px, 1.4fr) 100px 210px 110px 150px;
  gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer;
}
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--surface-2); }
.row.head { cursor: default; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  font-weight: 700; background: var(--surface-2); padding-top: 10px; padding-bottom: 10px; }
.row.selected { background: var(--blue-bg); }
.row.fresh { animation: fresh 2.5s ease-out; }
@keyframes fresh { from { background: color-mix(in srgb, var(--brand) 25%, transparent); } }
.row .id { font-weight: 800; }
.row .client b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .client span { font-size: 13px; color: var(--muted); }
.row .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .amount { font-weight: 700; }
.row .when { font-size: 13px; color: var(--muted); }
.row .quick { text-align: right; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty img { width: 96px; opacity: .9; border-radius: 50%; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.badge.new { background: var(--blue-bg); color: var(--brand); }
.badge.printing { background: var(--violet-bg); color: var(--violet); }
.badge.printing::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1s infinite; }
.badge.fronts_printed { background: var(--warn-bg); color: var(--warn); }
.badge.printed { background: var(--ok-bg); color: var(--ok); }
.badge.issued { background: var(--gray-bg); color: var(--muted); }
.badge.cancelled { background: var(--gray-bg); color: var(--muted); text-decoration: line-through; }
.badge.error { background: var(--danger-bg); color: var(--danger); }

@media (max-width: 980px) {
  .row.head { display: none; }
  .row { grid-template-columns: 1fr auto; grid-template-areas: "id status" "client amount" "what what" "when quick"; gap: 6px 12px; }
  .row .id { grid-area: id; } .row .status { grid-area: status; justify-self: end; }
  .row .client { grid-area: client; } .row .amount { grid-area: amount; justify-self: end; }
  .row .what { grid-area: what; white-space: normal; } .row .when { grid-area: when; } .row .quick { grid-area: quick; }
}

/* ---------- карточка заказа ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 12, 20, .35); z-index: 40; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); z-index: 41;
  background: var(--bg); box-shadow: -10px 0 40px rgba(0, 0, 0, .15); display: flex; flex-direction: column;
  animation: slide .2s ease-out;
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer header { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: var(--surface);
  border-bottom: 1px solid var(--border); }
.drawer header h2 { margin: 0; font-size: 20px; white-space: nowrap; }
.drawer .body { overflow-y: auto; padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.card h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.banner.error { background: var(--danger-bg); color: var(--danger); }
.banner.info { background: var(--violet-bg); color: var(--violet); }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.banner .spinner { width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 2px solid currentColor;
  border-right-color: transparent; animation: spin .8s linear infinite; flex: none; }
.hint { font-size: 13px; color: var(--muted); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.thumb { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2);
  cursor: zoom-in; padding: 0; display: flex; flex-direction: column; }
.thumb img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; background: #fff; }
.thumb.square img { aspect-ratio: 1; }
.thumb span { font-size: 12px; padding: 4px 6px; color: var(--muted); text-align: left; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 12px 22px; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--muted); }
.timeline li::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline li.success::before { background: var(--ok); }
.timeline li.warning::before { background: var(--warn); }
.timeline li.error::before { background: var(--danger); }
.timeline time { display: block; font-size: 12px; color: var(--muted); }

textarea, .input {
  width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface);
  resize: vertical;
}
textarea:focus, .input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--blue-bg); }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 8px; }
.saved { font-size: 13px; color: var(--ok); }

/* ---------- модальные окна ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 12, 20, .45); animation: fade .15s; }
.modal { width: min(480px, 100%); background: var(--surface); border-radius: 18px; box-shadow: var(--shadow);
  padding: 22px; animation: pop .15s ease-out; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } }
.modal h3 { margin: 0 0 8px; font-size: 19px; }
.modal p { margin: 0 0 12px; color: var(--muted); }
.modal ol { margin: 0 0 12px; padding-left: 20px; }
.modal .buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.check { display: flex; gap: 10px; align-items: center; margin: 10px 0; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.presets button { border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 4px 10px;
  font-size: 13px; cursor: pointer; }
.presets button:hover { border-color: var(--brand); }

/* ---------- просмотр изображения ---------- */
.lightbox { position: fixed; inset: 0; z-index: 70; background: rgba(5, 6, 10, .88); display: flex; flex-direction: column; }
.lightbox .bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; color: #fff; }
.lightbox .bar .btn { background: rgba(255, 255, 255, .1); border-color: transparent; color: #fff; }
.lightbox .stage { flex: 1; display: grid; place-items: center; min-height: 0; padding: 0 16px 16px; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; background: #fff; border-radius: 6px; }

/* ---------- принтер ---------- */
.popover { position: absolute; right: 24px; top: 60px; width: min(420px, calc(100vw - 32px)); z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.job { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--border); font-size: 14px; }

/* ---------- цены ---------- */
.prices { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0;
  border-top: 1px solid var(--border); }
.price-row:first-of-type { border-top: 0; }
.money { display: flex; align-items: center; gap: 6px; }
.money input { width: 110px; text-align: right; }

/* ---------- вход ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login form { width: min(380px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: 28px; box-shadow: var(--shadow); text-align: center; }
.login img { width: 110px; height: 110px; border-radius: 50%; background: #fff; border: 3px solid var(--border); }
.login h1 { margin: 10px 0 4px; font-size: 22px; color: var(--navy); }
.login .input { margin: 18px 0 10px; height: 44px; }
.login .btn { width: 100%; height: 44px; }
.login .error { color: var(--danger); min-height: 22px; margin-top: 10px; font-size: 14px; }

/* ---------- уведомления ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px;
  max-width: min(400px, calc(100vw - 32px)); }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow);
  font-weight: 600; animation: pop .15s ease-out; display: flex; gap: 10px; align-items: flex-start; }
.toast.error { background: var(--danger); color: #fff; }
.toast.ok { background: var(--ok); color: #fff; }

@media (max-width: 640px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .brand span, .nav button { font-size: 15px; }
  .brand img { width: 32px; height: 32px; }
  .chip { height: 30px; padding: 0 10px; font-size: 12px; }
  #sound-chip .label { display: none; }
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat .num { font-size: 20px; }
  .stat .lbl { font-size: 12px; }
  .sync { margin-left: 0; }
  .page { padding: 16px 16px 60px; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dt { margin-top: 6px; }
  .search { max-width: none; }
}

/* ---------- принтеры ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head > div:first-child { min-width: 0; flex: 1 1 320px; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.section-title { margin: 22px 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.agent-card, .profile-card { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.agent-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.agent-name { font-size: 16px; }
.agent-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.agent-card .dot, .pr-line .dot { display: inline-block; vertical-align: middle; margin-right: 6px; }
.pr-list { display: flex; flex-direction: column; gap: 6px; }
.pr-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 14px; }
.pr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pr-bad { color: var(--danger); }
.pr-more summary { cursor: pointer; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.profiles .profile-card { margin-bottom: 0; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.profile-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); min-width: 0; }
.profile-grid select { min-height: 38px; color: var(--text); }
.empty-agents { display: flex; flex-direction: row; gap: 14px; align-items: center; }
.empty-agents img { width: 64px; border-radius: 50%; flex: none; }
.pair-steps { padding-left: 20px; margin: 8px 0; line-height: 1.7; }
.pair-steps code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; user-select: all; overflow-wrap: anywhere; }
.pair-code { font: 800 44px/1.1 Consolas, ui-monospace, monospace; letter-spacing: .12em; text-align: center; padding: 14px;
  border-radius: 14px; background: var(--blue-bg); color: var(--brand); margin: 6px 0; user-select: all; }
.pair-code.done { background: var(--ok-bg); color: var(--ok); }
@media (max-width: 640px) { .profile-grid { grid-template-columns: 1fr; } .pair-code { font-size: 34px; } }

[hidden] { display: none !important; }

/* склад */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; }
.nav-badge.hidden { display: none; }
.stock-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.stock-card h3 { margin: 0; font-size: 15px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.stock-num { font-size: 14px; color: var(--muted); margin: 8px 0 6px; }
.stock-num b { font-size: 28px; color: var(--text); }
.stock-bar { height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; margin-bottom: 12px; }
.stock-bar i { display: block; height: 100%; background: var(--ok); }
.stock-bar i.warn { background: var(--warn); }
.stock-bar i.error { background: var(--danger); }
.stock-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.stock-actions .input { width: 110px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.error { background: var(--danger-bg); color: var(--danger); }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.table td { padding: 7px 8px; border-bottom: 1px solid var(--border); }
.table td.neg { color: var(--danger); font-weight: 700; }
.table td.pos { color: var(--ok); font-weight: 700; }

/* статистика */
.chart { display: grid; grid-template-columns: repeat(var(--n), 1fr); align-items: end; gap: 2px; height: 160px; margin: 8px 0 6px; }
.chart .col { height: 100%; display: flex; align-items: flex-end; }
.chart .col i { display: block; width: 100%; min-height: 2px; border-radius: 3px 3px 0 0; background: var(--brand); opacity: .85; }
.chart .col:hover i { opacity: 1; }
.hbar { display: grid; grid-template-columns: minmax(90px, 1.2fr) 2fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.hbar .track { height: 8px; border-radius: 4px; background: var(--border); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.hbar b { white-space: nowrap; }

/* этап заказа */
.stage-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.stage-row select { width: auto; }
