/* Исполнение заказов — отдельный хаб (список / карта заказа) */
@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600&family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg0: #0e1116;
  --panel: #1a212c;
  --panel-2: #212a38;
  --text: #eef2f7;
  --muted: #8f9bb0;
  --accent: #d4a15a;
  --accent-soft: rgba(212,161,90,.16);
  --teal-soft: rgba(61,155,143,.16);
  --ok: #3ecf8e;
  --warn: #e6b84c;
  --fail: #e86a5c;
  --border: #2c3648;
  --input: #10161f;
  --radius: 14px;
  --font: "Manrope", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: linear-gradient(180deg, #0c0f14, var(--bg0) 40%, #0a0d12);
  color: var(--text);
  min-height: 100vh;
}
body.exec-hub-detail { background: #0b0e13; }

.exec-hub-shell {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 12px 16px 32px;
}
body.exec-hub-detail .exec-hub-shell {
  max-width: none;
  padding: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.exec-hub-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
body.exec-hub-detail .exec-hub-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(14,17,22,.94);
  backdrop-filter: blur(10px);
}
.exec-hub-topbar-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}
.exec-hub-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
}
.exec-hub-back:hover { color: var(--accent); border-color: rgba(212,161,90,.45); }
.exec-hub-title-block h1 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.exec-hub-title-block .sub { margin-top: 4px; color: var(--muted); font-size: 0.84rem; }

.exec-hub-detail-main {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 8px 12px 20px;
  overflow: auto;
}
body.exec-hub-detail .exec-hub-detail-main {
  max-width: none;
  margin: 0;
  padding: 8px 16px 24px;
  --exec-font-scale: 1;
}
body.exec-hub-list .exec-hub-detail-panel { display: none !important; }
body.exec-hub-detail .exec-hub-list-panel { display: none !important; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.22);
}
.panel-head {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: baseline;
  justify-content: space-between; margin-bottom: 14px;
}
.panel-head h2 { margin: 0; font-size: 1.05rem; font-weight: 750; }
.sub { color: var(--muted); font-size: 0.88rem; line-height: 1.45; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
button {
  border: 1px solid transparent; background: var(--accent); color: #1a140c;
  border-radius: 10px; padding: 8px 13px; cursor: pointer; font: inherit;
  font-weight: 700; font-size: 0.86rem;
}
button.secondary {
  background: transparent; color: var(--text); border-color: var(--border); font-weight: 600;
}
button.ghost {
  background: var(--teal-soft); color: #9adcd3; border-color: rgba(61,155,143,.35);
}
button:disabled { opacity: .55; cursor: wait; }
input, select, textarea {
  background: var(--input); color: var(--text); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; font: inherit;
}
label.field {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.72rem; color: var(--muted); text-transform: uppercase; font-weight: 700;
}
.status-line { color: var(--muted); min-height: 1.2em; margin: 8px 0; font-size: 0.88rem; }
.status-line.err { color: var(--fail); }
.status-line.ok { color: var(--ok); }

.table-wrap { overflow-x: auto; border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 900px; }
th, td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .04em; }
tr.selected { background: rgba(110,181,255,.08); }
.money { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); }

.exec-src-filter.active { background: var(--accent-soft); }
.exec-src-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--muted);
}
.exec-src-badge.site { color: #6eb5ff; border-color: rgba(110,181,255,.35); }
.exec-src-badge.stock { color: #7dcea0; border-color: rgba(125,206,160,.4); }
#executionListBody td.exec-pos { max-width: 280px; font-size: 0.78rem; color: var(--muted); }

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.62); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal-frame {
  width: min(720px, 96vw); max-height: 92vh; overflow: auto;
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
}
.modal-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.modal-head h2 { margin: 0; font-size: 1rem; }
.grid-form {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.grid-form .wide { grid-column: 1 / -1; }

body:not(.exec-hub-detail) #tab-execution #executionDetailMain,
body:not(.exec-hub-detail) #tab-execution #executionDetailCache {
  display: none !important;
}

/* Полноэкранная карта заказа — одна колонка на всю ширину */
body.exec-hub-detail .exec-workfield {
  gap: 10px;
  width: 100%;
}
body.exec-hub-detail .exec-workfield-main {
  width: 100%;
  min-width: 0;
}
body.exec-hub-detail .exec-pipeline__head button {
  padding: 4px 10px;
  min-height: 28px;
  font-size: 0.76rem;
}
body.exec-hub-detail .exec-stage-workspace--compact {
  padding: 8px 12px;
  border-radius: 10px;
}
body.exec-hub-detail .exec-stage-workspace__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}
body.exec-hub-detail .exec-stage-workspace__label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 800;
  flex-shrink: 0;
}
body.exec-hub-detail .exec-stage-workspace__hint {
  flex: 1 1 200px;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.35;
}
body.exec-hub-detail .exec-launch-actions--inline {
  margin: 0;
  gap: 6px;
}
body.exec-hub-detail .exec-launch-actions--inline button {
  padding: 5px 10px;
  min-height: 30px;
  font-size: 0.78rem;
}
body.exec-hub-detail .cdek-panel {
  margin-top: 8px;
}
body.exec-hub-detail .cdek-panel__head {
  padding: 10px 12px;
}
body.exec-hub-detail .cdek-panel__body {
  padding: 10px 12px;
  gap: 10px;
}
body.exec-hub-detail .exec-gateway {
  padding: 10px 12px;
}

/* Масштаб текста карты — zoom на .exec-hub-detail-main (JS), топбар фиксирован */
body.exec-hub-page {
  --exec-font-scale: 1;
}
.exec-font-scale {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(16, 22, 31, .55);
  font-size: 0.72rem;
  color: var(--muted);
  cursor: default;
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}
.exec-font-scale-frame {
  flex: 0 0 156px;
  width: 156px;
  min-width: 156px;
  max-width: 156px;
  contain: layout style;
  isolation: isolate;
}
.exec-font-scale input[type="range"] {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  accent-color: var(--accent);
  cursor: pointer;
}
.exec-font-scale--topbar {
  margin: 0;
  padding: 6px 10px;
}
.exec-font-scale__sm { font-size: 0.72rem; opacity: .75; }
.exec-font-scale__lg { font-size: 0.95rem; font-weight: 700; color: var(--text); }
