:root {
  --bg: #f3f5f7;
  --surface: #fff;
  --ink: #14212b;
  --muted: #5d6d7e;
  --line: #d7e0e8;
  --accent: #0b6e5f;
  --accent-soft: #d8f3ee;
  --cost: #b45309;
  --cost-soft: #fef3c7;
  --speed: #1d4ed8;
  --speed-soft: #dbeafe;
  --both: #5b21b6;
  --both-soft: #ede9fe;
  --balance: #0b6e5f;
  --balance-soft: #ccfbf1;
  --danger: #b91c1c;
  --radius: 12px;
  --shadow: 0 8px 24px rgba(20, 33, 43, 0.06);
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 0%, #e7f5f2 0, transparent 28%),
    radial-gradient(circle at 100% 0%, #e8eef8 0, transparent 30%),
    var(--bg);
  min-height: 100vh;
}

/* 打开密码门 */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: linear-gradient(160deg, #e7f5f2, #eef2ff 55%, #f3f5f7);
}
.lock-screen[hidden] { display: none !important; }
.lock-card {
  width: min(380px, calc(100% - 32px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.1);
  text-align: center;
}
.lock-mark {
  width: 52px; height: 52px; margin: 0 auto 12px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #0b6e5f, #0f766e);
  color: #fff; font-weight: 700;
}
.lock-card h2 { margin: 0 0 6px; font-size: 1.1rem; }
.lock-card form {
  display: flex; flex-direction: column; gap: 10px; margin-top: 14px;
}
.lock-card input[type="password"] {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  text-align: center;
  outline: none;
}
.lock-card input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.lock-err { color: #b91c1c; font-size: 0.88rem; margin: 10px 0 0; }
.lock-err[hidden] { display: none; }
.app {
  max-width: none;
  width: min(85%, 1680px);
  margin: 0 auto;
  padding: 18px 18px 40px;
}
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: linear-gradient(145deg, #0b6e5f, #0f766e); color: #fff; font-weight: 700;
}
.brand h1 { margin: 0; font-size: 1.4rem; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: 0.92rem; }
.top-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.sync-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: 8px 12px; font-size: 0.88rem; color: var(--muted);
}
.sync-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.sync-pill.ok .dot { background: #10b981; box-shadow: 0 0 0 3px #d1fae5; }
.sync-pill.ok { color: #065f46; }
.sync-pill.busy .dot { background: #f59e0b; animation: pulse 1s infinite; }
.sync-pill.err .dot { background: #ef4444; }
.sync-pill.err { color: #991b1b; }
@keyframes pulse { 50% { opacity: 0.35; } }

.nav { display: flex; gap: 6px; background: var(--surface); padding: 4px; border-radius: 999px; border: 1px solid var(--line); }
.nav-btn { border: 0; background: transparent; color: var(--muted); padding: 10px 18px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 0.95rem; }
.nav-btn.active { background: var(--ink); color: #fff; }

.view { display: none; }
.view.active { display: block; }

.split-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}
.split-main > .panel {
  margin-bottom: 0;
  min-width: 0;
}
/* ④ 高度由 JS 对齐 ②，内容超出滚动 */
#calc-panel {
  /* 高度由自身表单内容决定 */
}
#tips-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* height 由 JS 写入，跟随 #calc-panel */
}
#tips-panel .panel-head {
  flex: 0 0 auto;
}
#tips-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px; margin-bottom: 14px;
}
.panel-head { margin-bottom: 12px; }
.panel-head.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0 0 4px; font-size: 1.12rem; }
.panel-head p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 14px; }
.calc-rows { display: flex; flex-direction: column; gap: 12px; flex: 1; }
.form-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px 10px;
  align-items: end;
}
.form-row.row-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
/* ⑤ 毛利输入：一行紧凑排布 */
.form-row.cost-inputs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  align-items: end;
}
.form-row.cost-inputs .field {
  flex: 1 1 0;
  min-width: 0;
  gap: 3px;
  font-size: 0.82rem;
}
.form-row.cost-inputs .field span {
  font-size: 0.78rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.form-row.cost-inputs .field input {
  height: 34px;
  padding: 0 8px;
  font-size: 0.88rem;
  border-radius: 8px;
}
.form-row.cost-inputs .field[hidden] {
  display: none !important;
}
.path-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
/* 按产品显隐字段后，隐藏项不占位 */
.path-row .field[hidden],
.calc-rows .form-row .field[hidden] {
  display: none !important;
}
.path-row {
  /* 列数由可见字段撑开 */
  display: flex;
  flex-wrap: wrap;
}
.path-row .field {
  flex: 1 1 180px;
  min-width: 160px;
}
.form-row[hidden] { display: none !important; }
.field-spacer { min-height: 38px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: 0.95rem; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline input { width: 200px; }
.field span { color: var(--muted); font-weight: 500; }
.field em { color: var(--danger); font-style: normal; }
.field input, .field select {
  height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px;
  font: inherit; font-size: 0.95rem; color: var(--ink); background: #fbfcfd; outline: none; width: 100%;
}
.field input:focus, .field select:focus, #admin-search:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.full { grid-column: 1 / -1; }
.check-field .switch { display: inline-flex; align-items: center; }
.switch input { width: 42px; height: 24px; accent-color: var(--accent); }
.hint { color: var(--muted); font-size: 0.92rem; }

.quote-settings-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  align-items: end;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px dashed #d7e0e8;
  border-radius: 10px;
  background: #fafbfc;
}
.quote-settings-bar .field.inline { min-width: 140px; }
.quote-settings-bar .field.grow { flex: 1; min-width: 220px; }
.quote-settings-bar .field.grow input { width: 100%; min-width: 180px; }

/* 中文万年历 */
.date-field { align-items: center; gap: 6px; }
.date-field input[readonly] { background: #fff; cursor: pointer; }
.calendar-pop {
  position: fixed;
  z-index: 200;
  width: 280px;
  background: #fff;
  border: 1px solid #d7e0e8;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.16);
  padding: 10px;
  user-select: none;
}
.calendar-pop[hidden] { display: none !important; }
.cal-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 4px; margin-bottom: 8px;
}
.cal-title { font-weight: 700; font-size: 0.95rem; min-width: 110px; text-align: center; }
.cal-nav {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid #e2e8f0; background: #f8fafc; cursor: pointer;
  font-size: 1rem; color: #334155;
}
.cal-nav:hover { background: #e2e8f0; }
.cal-week {
  display: grid; grid-template-columns: repeat(7, 1fr);
  text-align: center; font-size: 0.78rem; color: #94a3b8; margin-bottom: 4px;
}
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.cal-day {
  height: 32px; border: 0; border-radius: 8px; background: transparent;
  cursor: pointer; font: inherit; font-size: 0.85rem; color: #1e293b;
}
.cal-day:hover { background: #e0f2fe; }
.cal-day.out { color: #cbd5e1; }
.cal-day.today { box-shadow: inset 0 0 0 1px #38bdf8; font-weight: 700; }
.cal-day.sel { background: #0b6e5f; color: #fff; font-weight: 700; }
.cal-foot {
  display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px;
  padding-top: 8px; border-top: 1px solid #f1f5f9;
}

.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.btn {
  height: 42px; padding: 0 16px; border-radius: 10px; border: 1px solid transparent;
  font: inherit; font-weight: 600; cursor: pointer;
}
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: #0f766e; }
.btn.primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.ghost { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn.danger { background: #fff; border-color: #fecaca; color: var(--danger); }
.btn.small { height: 34px; padding: 0 12px; font-size: 0.88rem; }

.match-status {
  margin-top: 12px; padding: 12px 14px; border-radius: 10px;
  background: #f8fafc; border: 1px dashed var(--line); color: var(--muted); font-size: 0.98rem;
}
.match-status.hot { background: var(--accent-soft); border-color: #99f6e4; color: #065f46; font-weight: 600; }
.match-status.warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }

.legend { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 700;
}
.badge.best-cost { background: var(--cost-soft); color: var(--cost); }
.badge.best-speed { background: var(--speed-soft); color: var(--speed); }
.badge.best-both { background: var(--both-soft); color: var(--both); }
.badge.neutral { background: #eef2f6; color: var(--muted); }
.badge.warn { background: #fee2e2; color: #991b1b; }
.badge.ok { background: #d1fae5; color: #065f46; }

.table-wrap {
  overflow: auto;
  border: 1px solid #e6ecf2;
  border-radius: 12px;
  background: #fff;
  max-width: 100%;
}
.table-wrap.short { max-height: 480px; }
.route-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 100%; }
.route-table th, .route-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  font-size: 0.9rem;
  white-space: nowrap;
}
.route-table th {
  background: #fbfcfe;
  color: #64748b;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1;
}

/* —— 分组表（①汇总 / ③渠道）—— */
.match-table thead tr:first-child th {
  text-align: center;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: #0f172a;
  border-bottom: none;
  padding: 10px 12px;
}
.match-table thead tr:nth-child(2) th {
  top: 36px;
  background: #fff;
  color: #64748b;
  font-weight: 500;
  border-bottom: 1px solid #e2e8f0;
}

/* 分组标题：淡色块 + 底部色条，不画满框 */
.match-table th.g-i {
  background: #e8f4fc;
  box-shadow: inset 0 -3px 0 #38bdf8;
}
.match-table th.g-o {
  background: #f1ebfb;
  box-shadow: inset 0 -3px 0 #a78bfa;
}
.match-table th.g-c {
  background: #fff7e8;
  box-shadow: inset 0 -3px 0 #fbbf24;
}
.match-table th.g-sum {
  background: #fbfcfe;
  box-shadow: inset 0 -3px 0 #cbd5e1;
  vertical-align: middle;
}
.summary-table th.g-i { background: #e8f4fc; box-shadow: inset 0 -3px 0 #38bdf8; }
.summary-table th.g-o { background: #f1ebfb; box-shadow: inset 0 -3px 0 #a78bfa; }
.summary-table th.g-c { background: #fff7e8; box-shadow: inset 0 -3px 0 #fbbf24; }
.summary-table th.g-sum { background: #fbfcfe; box-shadow: inset 0 -3px 0 #94a3b8; }
/* ① 毛利三段：成本淡黄 / 报价淡绿 / 毛利淡灰 */
.summary-table th.g-cost { background: #fff8e6; box-shadow: inset 0 -3px 0 #f0d78c; }
.summary-table th.g-quote { background: #eafaf1; box-shadow: inset 0 -3px 0 #a8d5c2; }
.summary-table th.g-profit { background: #f3f4f6; box-shadow: inset 0 -3px 0 #d1d5db; }
/* ① 渠道信息可折叠 */
.summary-table.ch-hidden .col-ch { display: none !important; }

.route-table tr.row-ended td {
  background: #f1f5f9 !important;
  color: #94a3b8;
}
.route-table tr.row-ended .price { color: #94a3b8; }
.cell-select {
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 6px;
  font: inherit;
  font-size: 0.78rem;
  background: #fff;
  color: var(--ink);
  max-width: 100px;
}
.cell-select:disabled {
  background: #f8fafc;
  color: #94a3b8;
}

.confirm-card { max-width: 420px; }
.confirm-card h3 { margin: 0; }
.alert-body {
  margin: 0 0 16px;
  line-height: 1.65;
  max-height: 50vh;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.92rem;
}

/* 组间竖向分隔：只画组边界，不套满框 */
.match-table .grp-start { border-left: 1px solid #e2e8f0; }
.match-table .grp-end { border-right: 1px solid #e2e8f0; }
.match-table thead tr:nth-child(2) th.grp-start,
.match-table thead tr:nth-child(2) th.grp-end,
.match-table tfoot td.grp-start,
.match-table tfoot td.grp-end { border-left-color: #cbd5e1; border-right-color: #cbd5e1; }

/* 首尾行收口，形成区块感 */
.match-table tbody tr:first-child td.grp-start,
.match-table tbody tr:first-child td.grp-end { border-top: 1px solid #e2e8f0; }
.match-table tbody tr:last-child td.grp-start,
.match-table tbody tr:last-child td.grp-end { border-bottom: 2px solid #e2e8f0; }

/* 行状态 */
.route-table tbody tr:last-child td { border-bottom: 0; }
.route-table tbody tr:hover td { background: #f8fafc; }
.route-table tr.row-cost td { background: #fffbeb; }
.route-table tr.row-speed td { background: #eff6ff; }
.route-table tr.row-both td { background: linear-gradient(90deg, #fffbeb, #eff6ff); }
.route-table tr.selected td { background: #ecfdf5 !important; }
/* 分段/综合单元格高亮 */
.route-table td.hl-cost,
.route-table td.hl-cost .price {
  background: #fffbeb !important;
  color: #b45309;
  font-weight: 700;
}
.route-table td.hl-speed {
  background: #eff6ff !important;
  color: #1d4ed8;
  font-weight: 700;
}
.route-table tr.selected td.hl-cost,
.route-table tr.selected td.hl-speed {
  box-shadow: inset 0 0 0 1px rgba(11, 110, 95, 0.15);
}
.route-table tr.selected { outline: none; }
.route-table .empty-row td { text-align: center; color: var(--muted); padding: 22px; background: #fff; }
.route-table tfoot td { background: #f0fdfa; font-weight: 700; border-top: 1px solid #ccfbf1; }
.price { font-weight: 700; font-variant-numeric: tabular-nums; }
.price.rub, td.rub { color: #0f766e; }
.muted { color: var(--muted); }
.pos { color: #047857; }
.neg { color: #b91c1c; }

/* 客户中俄方案摘要 */
.plan-line {
  margin: 4px 0 0;
  padding: 8px 12px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 0.9rem;
  line-height: 1.5;
  word-break: break-all;
}
.customer-plan-box {
  margin-bottom: 12px;
  border: 1px solid #d7e0e8;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px 12px;
}
.customer-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}
.customer-plan-text {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  font: inherit;
  font-size: 0.92rem;
  line-height: 1.7;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  color: #0f172a;
  white-space: pre-wrap;
  font-variant-numeric: tabular-nums;
}

/* ⑤ 毛利分析：3×3 卡片 */
.profit-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}
.profit-grid-3 .card { min-height: 92px; }
.profit-grid-3 .card.col-y { grid-column: 1; }
.profit-grid-3 .card.col-g { grid-column: 2; }
.profit-grid-3 .card.col-gray { grid-column: 3; }
/* 第一列淡黄、第二列淡绿、第三列淡灰 */
.profit-grid-3 .card.col-y {
  background: #fff8e6;
  border-color: #f0d78c;
}
.profit-grid-3 .card.col-g {
  background: #eafaf1;
  border-color: #a8d5c2;
}
.profit-grid-3 .card.col-gray {
  background: #f3f4f6;
  border-color: #d1d5db;
}
.profit-grid-3 .card.col-y.cost { background: #fff8e6; border-color: #f0d78c; }
.profit-grid-3 .card.col-g.cost { background: #eafaf1; border-color: #a8d5c2; }
.profit-grid-3 .card.col-gray.speed { background: #f3f4f6; border-color: #d1d5db; }
.profit-grid-3 .card.col-y.balance { background: #fff8e6; border-color: #f0d78c; }
@media (max-width: 960px) {
  .profit-grid-3 { grid-template-columns: 1fr; }
}

.card {
  border-radius: 12px; padding: 12px; border: 1px solid var(--line); background: #fbfcfd;
}
.card h3 { margin: 0 0 6px; font-size: 0.88rem; color: var(--muted); font-weight: 600; }
.card-value { margin: 0 0 4px; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.card-meta { margin: 0; color: var(--muted); font-size: 0.88rem; }
.card.cost { background: var(--cost-soft); border-color: #fde68a; }
.card.speed { background: var(--speed-soft); border-color: #bfdbfe; }
.card.balance { background: var(--balance-soft); border-color: #99f6e4; }
.card.profit-pos .card-value { color: #047857; }
.card.profit-neg .card-value { color: #b91c1c; }

.tips-body { display: grid; gap: 10px; }
.tip-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fbfcfd;
}
.tip-card h4 { margin: 0 0 6px; font-size: 1rem; }
.tip-card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 0.92rem; line-height: 1.55; }
.tip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }

.filter-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
#admin-search, #admin-type {
  height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font: inherit; background: #fbfcfd;
}
#admin-search { min-width: 240px; flex: 1; }
.count { color: var(--muted); font-size: 0.95rem; margin-left: auto; }
.pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.88rem;
  color: var(--muted);
  flex-wrap: wrap;
}
.pager-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}
.pager-size select {
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  font: inherit;
  background: #fff;
}
.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sync-panel { border-color: #99f6e4; background: linear-gradient(180deg, #f0fdfa, #fff 70%); }

.footer { margin-top: 8px; color: var(--muted); font-size: 0.9rem; text-align: center; }

.modal[hidden] { display: none; }
.modal {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.45);
  display: grid; place-items: center; padding: 16px; z-index: 50;
}
.modal-card {
  width: min(860px, 100%); background: var(--surface); border-radius: 16px;
  border: 1px solid var(--line); padding: 18px; max-height: 92vh; overflow: auto;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.modal-head h3 { margin: 0; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; font-size: 1.15rem; cursor: pointer; color: var(--muted);
}
.modal-form { grid-template-columns: repeat(3, 1fr); }
.modal-form textarea {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  resize: vertical;
  background: #fbfcfd;
  width: 100%;
}

.toast {
  position: fixed; right: 18px; bottom: 18px; background: var(--ink); color: #fff;
  padding: 12px 14px; border-radius: 10px; font-size: 0.88rem; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); transition: 0.2s ease; z-index: 80; pointer-events: none;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 1100px) {
  .form-grid, .modal-form { grid-template-columns: repeat(2, 1fr); }
  .split-main { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .form-grid, .modal-form, .form-row, .form-row.row-5, .path-row { grid-template-columns: 1fr; }
  .form-row.cost-inputs { flex-wrap: wrap; }
  .form-row.cost-inputs .field { flex: 1 1 45%; min-width: 140px; }
  .field-spacer { display: none; }
  .brand p { display: none; }
}
