:root {
  --ink: #18201d;
  --muted: #66736d;
  --line: #dce3df;
  --soft: #f3f6f4;
  --surface: #ffffff;
  --sidebar: #18221f;
  --sidebar-muted: #9daba5;
  --amber: #c96c08;
  --amber-soft: #fff4e8;
  --teal: #0b7a68;
  --teal-soft: #e8f6f2;
  --red: #b42318;
  --red-soft: #fff0ed;
  --blue: #2757a7;
  --blue-soft: #edf3ff;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--soft);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial, sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.8;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.brand,
.brand-copy,
.topbar-tools,
.ghost-button,
.solid-button,
.heading-actions,
.sync-state {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: var(--amber);
  font-size: 18px;
  font-weight: 900;
}

.brand-copy {
  min-width: 0;
  align-items: flex-start;
  flex-direction: column;
  line-height: 1.25;
}

.brand-copy strong {
  overflow: hidden;
  max-width: 220px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
}

.topbar-tools {
  justify-content: flex-end;
  gap: 8px;
}

.environment-badge,
.sync-state {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  background: #fafcfb;
  font-size: 12px;
  white-space: nowrap;
}

.environment-badge.ready {
  border-color: #9bd2c6;
  color: var(--teal);
  background: var(--teal-soft);
}

.ghost-button,
.solid-button {
  min-height: 36px;
  justify-content: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid #cbd5d0;
  border-radius: 6px;
  color: #34423c;
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
}

.ghost-button:hover {
  border-color: #9eada6;
  background: #f8faf9;
}

.solid-button {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.ghost-button.compact {
  min-height: 32px;
  padding: 5px 9px;
}

.app-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: calc(100vh - 68px);
}

.sidebar {
  position: sticky;
  top: 68px;
  display: flex;
  min-width: 0;
  height: calc(100vh - 68px);
  flex-direction: column;
  padding: 14px 12px 12px;
  color: #f8fbf9;
  background: var(--sidebar);
}

.sidebar-store {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.sidebar-store span,
.sidebar-store small {
  color: var(--sidebar-muted);
  font-size: 11px;
}

.sidebar-store strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar nav {
  display: grid;
  min-width: 0;
  gap: 3px;
  overflow-y: auto;
}

.sidebar nav button {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 0;
  border-radius: 5px;
  color: #c8d2ce;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.sidebar nav button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar nav button.active {
  color: #fff;
  background: #314039;
  font-weight: 700;
}

.sidebar nav button.active svg {
  color: #f0a14a;
}

.sidebar-foot {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: auto;
  padding: 12px 8px 2px;
  color: var(--sidebar-muted);
}

.sidebar-foot strong,
.sidebar-foot small {
  display: block;
}

.sidebar-foot strong {
  color: #e9efec;
  font-size: 12px;
}

.sidebar-foot small {
  margin-top: 3px;
  font-size: 10px;
  line-height: 1.45;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 4px;
  border-radius: 50%;
  background: #47c39f;
  box-shadow: 0 0 0 4px rgba(71, 195, 159, 0.12);
}

.main {
  min-width: 0;
  padding: 18px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.page-heading h1 {
  margin: 3px 0 0;
  font-size: 26px;
  line-height: 1.2;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.eyebrow {
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.heading-actions {
  gap: 8px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.metric::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: #aab6b1;
}

.metric.amber::before {
  background: var(--amber);
}

.metric.teal::before {
  background: var(--teal);
}

.metric.red::before {
  background: var(--red);
}

.metric.blue::before {
  background: var(--blue);
}

.metric span,
.metric small {
  display: block;
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 10px 0 6px;
  font-size: 25px;
  line-height: 1;
}

.metric small {
  line-height: 1.45;
}

.panel {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.panel-head {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.panel h2 {
  margin: 0;
  font-size: 16px;
}

.panel-head p,
.panel > p {
  margin: 4px 0 0;
  color: var(--muted);
}

.panel-body {
  padding: 14px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 12px;
}

.module-grid,
.entry-grid,
.route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.module-tile,
.entry-tile {
  display: grid;
  min-height: 86px;
  align-content: start;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfcfb;
}

.module-tile strong,
.entry-tile strong {
  font-size: 14px;
}

.module-tile span,
.entry-tile span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.entry-tile:hover {
  border-color: #9fb4aa;
  background: #f7faf8;
}

.stage-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.stage-item {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfcfb;
}

.stage-item span,
.stage-item strong {
  display: block;
}

.stage-item span {
  color: var(--muted);
  font-size: 12px;
}

.stage-item strong {
  margin-top: 6px;
  font-size: 20px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #e8eeeb;
  text-align: left;
  vertical-align: top;
}

th {
  color: #52605a;
  background: #f7f9f8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: 0;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.tag {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border: 1px solid #cbd5d0;
  border-radius: 99px;
  color: #43514b;
  background: #f8faf9;
  font-size: 11px;
  white-space: nowrap;
}

.tag.green {
  border-color: #9bd2c6;
  color: var(--teal);
  background: var(--teal-soft);
}

.tag.amber {
  border-color: #f1c690;
  color: #9a4d04;
  background: var(--amber-soft);
}

.tag.red {
  border-color: #f2aea6;
  color: var(--red);
  background: var(--red-soft);
}

.tag.blue {
  border-color: #b8cdf4;
  color: var(--blue);
  background: var(--blue-soft);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.row-actions button,
.text-button {
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid #cbd5d0;
  border-radius: 5px;
  color: #34423c;
  background: #fff;
  cursor: pointer;
}

.row-actions button:hover,
.text-button:hover {
  border-color: #91a69c;
  background: #f8faf9;
}

.row-actions button.primary {
  border-color: var(--ink);
  color: #fff;
  background: var(--ink);
}

.searchbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.searchbar input,
.searchbar select,
.form-field input,
.form-field select,
.form-field textarea {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #cbd5d0;
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}

.searchbar input:focus,
.searchbar select:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(11, 122, 104, 0.11);
}

.searchbar input {
  min-width: 240px;
  flex: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-field {
  display: grid;
  gap: 6px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-field span {
  color: #52605a;
  font-size: 12px;
  font-weight: 700;
}

.form-field textarea {
  min-height: 86px;
  resize: vertical;
}

.form-check {
  display: flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  color: #344054;
  background: #f8fafb;
  border: 1px solid #dfe5e2;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 650;
}

.form-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--teal);
}

.service-edit-group {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #e2e8e5;
  border-radius: 6px;
}

.service-edit-group legend {
  padding: 0 6px;
  color: #1f2a24;
  font-size: 13px;
  font-weight: 700;
}

.empty-state,
.skeleton-state {
  padding: 36px 18px;
  border: 1px dashed #cbd5d0;
  border-radius: 6px;
  color: var(--muted);
  background: #fff;
  text-align: center;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline li {
  position: relative;
  padding: 0 0 16px 24px;
  border-left: 1px solid #dce3df;
}

.timeline li::before {
  position: absolute;
  top: 3px;
  left: -5px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 1px #9bd2c6;
  content: "";
}

.timeline li:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline strong,
.timeline small,
.timeline span {
  display: block;
}

.timeline small {
  margin: 3px 0;
  color: var(--muted);
  font-size: 11px;
}

.code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #33423b;
  background: #edf1ef;
  font-family: Consolas, Monaco, monospace;
  font-size: 12px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 34px 16px;
  overflow-y: auto;
  background: rgba(17, 25, 22, 0.56);
}

.modal {
  width: min(860px, 100%);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(14, 24, 20, 0.22);
}

.modal.small {
  width: min(520px, 100%);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-head p {
  margin: 5px 0 0;
  color: var(--muted);
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 11px;
}

.detail-grid dd {
  margin: 4px 0 0;
  word-break: break-all;
}

.order-detail-tabs {
  position: sticky;
  top: -18px;
  z-index: 2;
  display: flex;
  gap: 4px;
  margin: -2px -2px 14px;
  padding: 8px 2px;
  overflow-x: auto;
  background: #ffffff;
  border-bottom: 1px solid #e6eaf1;
}

.order-detail-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 11px;
  color: #667085;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.order-detail-tabs button:hover {
  background: #f5f7fb;
}

.order-detail-tabs button.active {
  color: #315bef;
  background: #eef2ff;
}

.order-detail-panel[hidden] {
  display: none;
}

.order-detail-panel .panel + .panel {
  margin-top: 12px;
}

.order-detail-note {
  margin-top: 10px;
  padding: 9px 11px;
  color: #667085;
  background: #f8f9fc;
  border-left: 3px solid #98a2b3;
  font-size: 12px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 100;
  max-width: 420px;
  padding: 12px 15px;
  border-radius: 6px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 14px 40px rgba(15, 25, 21, 0.22);
}

.toast.error {
  background: var(--red);
}

@media (max-width: 1180px) {
  .metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .two-column {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    padding: 10px;
  }

  .sidebar-foot {
    display: none;
  }

  .sidebar-store {
    display: grid;
    gap: 3px;
    margin-bottom: 8px;
    padding: 9px 10px;
  }

  .sidebar nav {
    display: flex;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
  }

  .sidebar nav button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .module-grid,
  .entry-grid,
  .route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar,
  .page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    position: static;
    min-height: auto;
    padding: 12px;
  }

  .topbar-tools {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .main {
    padding: 12px;
  }

  .metrics,
  .module-grid,
  .entry-grid,
  .route-grid,
  .stage-strip,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .page-heading h1 {
    font-size: 22px;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block;
    min-width: 0;
  }

  .table-wrap thead {
    display: none;
  }

  .table-wrap tbody tr {
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
  }

  .table-wrap td {
    border-bottom: 1px solid #edf1ef;
  }

  .table-wrap td:last-child {
    border-bottom: 0;
  }
}

/* 惠租式页面结构：页面头 + 流程条 + 分面 + 摘要条 + 六格订单卡 + 表格行操作 */
.hz-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 2px 14px;
}

.hz-page-head .hz-eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 0;
  color: var(--muted);
}

.hz-page-head h1 {
  margin: 4px 0 6px;
  font-size: 24px;
}

.hz-page-head p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
}

.hz-page-head code {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.hz-brand-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hz-brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #ff7426;
  font-size: 18px;
  font-weight: 800;
}

.hz-brand-copy {
  display: grid;
  min-width: 0;
  flex: 1 1 auto;
  gap: 2px;
}

.hz-brand-copy > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.hz-brand-copy strong {
  font-size: 15px;
}

.hz-brand-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.hz-brand-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.pe-brand-profile {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
  padding: 9px 10px;
  border: 1px solid #dbe3ed;
  border-radius: 6px;
  background: #f8fafc;
}

.pe-brand-profile > div {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  font-size: 11px;
}

.pe-brand-profile span {
  color: #7b8496;
}

.pe-brand-profile b {
  overflow: hidden;
  color: #344054;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hz-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.hz-flow span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.hz-flow span i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand-soft, #e8f0ff);
  color: var(--brand, #2b6cff);
  font-size: 11px;
  font-style: normal;
}

.hz-focus {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 4px;
}

.hz-focus span {
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  color: var(--muted);
}

.hz-subtabs,
.hz-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 4px;
}

.hz-subtabs button,
.hz-quick button {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font-size: 13px;
}

.hz-subtabs button.active,
.hz-quick button.active {
  border-color: var(--brand, #2b6cff);
  color: var(--brand, #2b6cff);
  box-shadow: inset 0 -2px 0 var(--brand, #2b6cff);
}

.hz-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}

.hz-summary strong {
  font-size: 15px;
}

.hz-summary em {
  padding: 3px 8px;
  border-radius: 4px;
  background: #f3f6f5;
  color: var(--muted);
  font-style: normal;
}

.hz-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  font-size: 13px;
}

.hz-pager .hz-pages {
  display: flex;
  gap: 6px;
}

.hz-pager button {
  min-width: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.hz-pager button.active {
  border-color: var(--brand, #2b6cff);
  background: var(--brand, #2b6cff);
  color: #fff;
}

.hz-pager button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.hz-order-list {
  display: grid;
  gap: 12px;
}

.hz-order-card {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 1fr 1fr 0.8fr 1fr;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hz-order-workspace {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.hz-order-workspace-main {
  min-width: 0;
}

.hz-order-rail {
  position: sticky;
  top: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.hz-order-rail > header {
  display: grid;
  gap: 3px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.hz-order-rail > header strong {
  font-size: 17px;
}

.hz-order-rail > header small,
.hz-order-rail section h2 {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.hz-order-rail section {
  padding: 8px;
  border-bottom: 1px solid #eef1f5;
}

.hz-order-rail section:last-child {
  border-bottom: 0;
}

.hz-order-rail section h2 {
  margin: 4px 8px 6px;
}

.hz-order-rail button {
  display: flex;
  width: 100%;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.hz-order-rail button:hover {
  background: #f5f7fb;
  color: var(--brand, #2b6cff);
}

.hz-order-rail button.active {
  background: #eef3ff;
  color: var(--brand, #2b6cff);
  font-weight: 700;
}

.hz-order-rail button:disabled {
  color: #98a2b3;
  cursor: not-allowed;
}

.hz-order-rail button em {
  min-width: 24px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #edf1f6;
  color: #667085;
  font-size: 10px;
  font-style: normal;
  text-align: center;
}

.hz-order-rail button.active em {
  background: #dbe5ff;
  color: var(--brand, #2b6cff);
}

.hz-risk-tags span {
  background: #eef3f8;
  color: #475467;
}

.hz-risk-tags span.warn {
  background: #fff4e5;
  color: #a15c00;
}

.hz-risk-tags span.danger {
  background: #fff0ee;
  color: #b42318;
}

.hz-risk-tags span.muted {
  background: #f2f4f7;
  color: #667085;
}

.hz-order-cell {
  min-width: 0;
}

.hz-order-cell > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.hz-order-cell strong {
  display: block;
  font-size: 15px;
  word-break: break-word;
}

.hz-order-cell small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.hz-order-thumb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-right: 10px;
  border-radius: 6px;
  background: var(--brand-soft, #e8f0ff);
  color: var(--brand, #2b6cff);
  font-size: 20px;
  vertical-align: top;
}

.hz-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.hz-tags span {
  padding: 3px 8px;
  border-radius: 4px;
  background: #eef7f1;
  color: #2f855a;
  font-size: 12px;
}

.hz-tags span.warn {
  background: #fdf3e7;
  color: #b7791f;
}

.hz-tags span.danger {
  background: #fdf0ef;
  color: #c0392b;
}

.hz-order-actions {
  display: grid;
  gap: 8px;
}

.hz-order-actions button {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}

.hz-order-actions button.primary {
  border-color: var(--brand, #2b6cff);
  background: var(--brand, #2b6cff);
  color: #fff;
}

.hz-order-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hz-order-links {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.hz-order-links span {
  color: var(--brand, #2b6cff);
  font-size: 13px;
}

.hz-row-actions {
  display: grid;
  gap: 6px;
}

.hz-row-actions button {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
}

.media-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.media-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f7f9fb;
  color: var(--muted, #5a6b7c);
  font-size: 12px;
}

.media-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.media-block > strong {
  font-size: 13px;
}

.media-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 8px;
}

.media-thumb {
  display: block;
  width: 100%;
  max-width: 132px;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
  background: #fff;
}

.media-thumb.is-empty {
  display: grid;
  place-items: center;
  padding: 6px;
  color: var(--muted, #5a6b7c);
  font-size: 11px;
  text-align: center;
  background: #f3f6f8;
}

.media-grid .media-thumb {
  max-width: none;
}

.media-meta {
  display: grid;
  gap: 8px;
  min-width: 0;
  flex: 1 1 220px;
}

.media-meta small {
  color: var(--muted, #5a6b7c);
  font-size: 12px;
  line-height: 1.5;
}

.media-meta input[type="file"] {
  width: 100%;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .hz-order-workspace {
    grid-template-columns: 168px minmax(0, 1fr);
  }

  .hz-order-card {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .hz-brand-profile {
    flex-wrap: wrap;
  }

  .hz-brand-copy {
    flex-basis: calc(100% - 50px);
  }

  .hz-brand-facts,
  .hz-brand-profile > button {
    margin-left: 50px;
  }

  .hz-order-workspace {
    display: block;
  }

  .hz-order-rail {
    position: static;
    margin-bottom: 12px;
  }

  .hz-order-rail section {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .hz-order-rail section h2 {
    flex-basis: 100%;
  }

  .hz-order-rail button {
    width: auto;
    min-width: 104px;
  }

  .hz-order-card {
    grid-template-columns: 1fr;
  }
}

.merchant-visual-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 0 20px;
  border-bottom: 1px solid var(--line);
}

.merchant-visual-hero h2 {
  margin: 6px 0 5px;
  color: var(--ink-strong);
  font-size: 28px;
  line-height: 1.2;
}

.merchant-visual-hero p {
  margin: 0;
  color: var(--muted);
}

.merchant-visual-version {
  display: grid;
  min-width: 148px;
  justify-items: end;
  gap: 3px;
}

.merchant-visual-version strong {
  color: var(--ink-strong);
  font-size: 16px;
}

.merchant-visual-version small {
  color: var(--muted);
}

.merchant-visual-layout {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 24px;
  padding-top: 20px;
}

.merchant-visual-phone {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 620px;
  padding: 14px;
  color: #fff;
  background: var(--merchant-visual-bg, #f6f8fa);
  border: 7px solid #111827;
  border-radius: 26px;
  box-shadow: 0 20px 48px rgba(17, 24, 39, 0.14);
}

.merchant-visual-phone-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-strong);
}

.merchant-visual-phone-top strong {
  color: var(--ink-strong);
  font-size: 14px;
}

.merchant-visual-logo {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  object-fit: cover;
  color: var(--merchant-visual-accent, #0b6b63);
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.08);
  font-size: 15px;
  font-weight: 850;
}

.merchant-visual-logo--square {
  border-radius: 3px;
}

.merchant-visual-logo--rounded {
  border-radius: 9px;
}

.merchant-visual-logo--circle {
  border-radius: 50%;
}

.merchant-visual-announcement {
  overflow: hidden;
  padding: 7px 9px;
  color: #52616a;
  background: #fff;
  border: 1px solid #e5eaf1;
  border-radius: 7px;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-visual-hero-card {
  display: grid;
  gap: 7px;
  min-height: 250px;
  align-content: end;
  padding: 20px 16px;
  color: #fff;
  background: var(--merchant-visual-accent, #0b6b63);
  border-radius: 12px;
}

.merchant-visual-hero-card > span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 10px;
  font-weight: 700;
}

.merchant-visual-hero-card h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.18;
}

.merchant-visual-hero-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
}

.merchant-visual-hero-card b {
  font-size: 17px;
}

.merchant-visual-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  padding: 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #e5eaf1;
  border-radius: 9px;
}

.merchant-visual-services > div {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: var(--merchant-visual-accent, #0b6b63);
  text-align: center;
}

.merchant-visual-services svg {
  width: 18px;
  height: 18px;
}

.merchant-visual-services strong {
  color: #475467;
  font-size: 9px;
}

.merchant-visual-detail {
  display: grid;
  align-content: start;
  gap: 16px;
}

.merchant-visual-readonly {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  color: #475467;
  background: #f0f7f5;
  border: 1px solid #cfe3dd;
  border-radius: 8px;
}

.merchant-visual-readonly svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #0b6b63;
}

.merchant-visual-readonly div {
  display: grid;
  gap: 3px;
}

.merchant-visual-readonly strong {
  color: var(--ink-strong);
}

.merchant-visual-readonly span {
  font-size: 12px;
}

.merchant-visual-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.merchant-visual-fields > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.merchant-visual-fields > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.merchant-visual-fields > div.full {
  grid-column: 1 / -1;
  border-right: 0;
}

.merchant-visual-fields dt {
  color: var(--muted);
  font-size: 11px;
}

.merchant-visual-fields dd {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink-strong);
  font-weight: 650;
}

.merchant-color-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.merchant-visual-history {
  display: grid;
  gap: 8px;
}

.merchant-visual-history h3 {
  margin: 0;
  font-size: 15px;
}

.merchant-visual-history > div {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.merchant-visual-history span {
  color: #52616a;
}

.merchant-visual-history small {
  color: var(--muted);
}

@media (max-width: 960px) {
  .merchant-visual-layout {
    grid-template-columns: 1fr;
  }

  .merchant-visual-phone {
    width: min(100%, 390px);
  }
}

@media (max-width: 640px) {
  .merchant-visual-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .merchant-visual-version {
    justify-items: start;
  }

  .merchant-visual-fields {
    grid-template-columns: 1fr;
  }

  .merchant-visual-fields > div:nth-child(odd) {
    border-right: 0;
  }
}
