:root {
  --ink: #151719;
  --muted: #65717f;
  --line: #dfe6ee;
  --paper: #f5f7f9;
  --panel: #ffffff;
  --accent: #1f7a6d;
  --accent-deep: #13574e;
  --warn: #a65d00;
  --bad: #ad3030;
  --good: #1e744b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(31, 122, 109, 0.08), transparent 42%),
    linear-gradient(180deg, #eef3f6, var(--paper));
  font-family: ui-sans-serif, "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
select {
  font: inherit;
}

.shell {
  width: min(1160px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(25, 36, 48, 0.08);
}

.side {
  display: grid;
  gap: 18px;
  padding: 22px;
  position: sticky;
  top: 24px;
}

.main {
  padding: 22px;
  min-height: 540px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

button {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.primary:not(:disabled):hover {
  background: var(--accent-deep);
}

.quote {
  min-height: 76px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
  background: #fafbfc;
  line-height: 1.6;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.balance {
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  text-align: right;
  background: #fafbfc;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.status-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fcfdfe;
}

.metric span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 24px;
}

.actions {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  min-height: 220px;
  padding: 16px;
}

.info-band {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.info-band article {
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 16px;
}

.info-band h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.info-band p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.empty {
  color: var(--muted);
}

.order-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #eef2f5;
}

.order-row:last-child {
  border-bottom: 0;
}

.order-row span:first-child {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: #edf6f4;
  color: var(--accent-deep);
  font-weight: 700;
}

.code {
  color: var(--good);
  font-size: 28px;
  font-weight: 800;
}

.warning {
  color: var(--warn);
}

.error {
  color: var(--bad);
}

@media (max-width: 820px) {
  .shell {
    width: min(100vw - 20px, 680px);
    padding: 10px 0;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .side {
    position: static;
  }

  .topbar {
    display: grid;
  }

  .balance {
    text-align: left;
  }

  .status-grid {
    grid-template-columns: 1fr;
  }

  .actions {
    display: grid;
  }

  .info-band {
    grid-template-columns: 1fr;
  }
}
