:root {
  color-scheme: dark;
  --bg: #090b10;
  --panel: #111821;
  --panel-2: #151f2a;
  --ink: #f5f7fb;
  --muted: #9ca8b7;
  --faint: #687586;
  --line: #26313d;
  --line-2: #334150;
  --green: #36e28a;
  --green-ink: #04120a;
  --blue: #69b9ff;
  --amber: #f0bf5a;
  --red: #ff7188;
  --shadow: 0 20px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(54, 226, 138, .08), transparent 360px),
    linear-gradient(90deg, rgba(105, 185, 255, .05), transparent 45%),
    var(--bg);
  color: var(--ink);
  font: 15px/1.55 Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; transform: none !important; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0b1118;
  color: var(--ink);
  outline: none;
}
input, select { min-height: 48px; padding: 0 14px; }
textarea { min-height: 150px; padding: 14px; resize: vertical; font: 13px/1.6 ui-monospace, Consolas, monospace; }
textarea.compact-textarea { min-height: 132px; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(105, 185, 255, .14); }
a { color: inherit; text-decoration: none; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(30px, 4vw, 54px); line-height: 1.04; letter-spacing: -.04em; }
h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.02em; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1240px) / 2));
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(9, 11, 16, .84);
  backdrop-filter: blur(18px);
}
.brand, .nav { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--green), #8df6bd);
  color: var(--green-ink);
  font-weight: 900;
}
.brand b, .brand small { display: block; }
.brand b { font-size: 15px; }
.brand small { color: var(--faint); font: 800 10px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .12em; }
.nav a {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
}
.nav a.active { border-color: rgba(54,226,138,.34); color: var(--green); background: rgba(54,226,138,.08); }

.shell, .customer-shell, .scan-shell {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 34px 0 46px;
}
.customer-shell { width: min(1120px, calc(100% - 36px)); }
.scan-shell { width: min(980px, calc(100% - 36px)); }

.hero-panel, .command-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: end;
  margin-bottom: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(21,31,42,.96), rgba(11,17,24,.96));
  box-shadow: var(--shadow);
}
.hero-copy p, .command-band p { max-width: 720px; margin: 12px 0 0; color: var(--muted); }
.hero-status {
  display: grid;
  min-width: 210px;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.03);
}
.hero-status strong { font: 900 42px/1 ui-monospace, Consolas, monospace; }
.hero-status small { color: var(--muted); }

.kicker { color: var(--green); font: 900 10px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .16em; }
.status-strip {
  display: grid;
  grid-template-columns: repeat(3, 96px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
}
.status-strip span { padding: 13px 12px; color: var(--muted); font-size: 12px; }
.status-strip span + span { border-left: 1px solid var(--line); }
.status-strip b { display: block; color: var(--ink); font: 900 24px/1 ui-monospace, Consolas, monospace; }

.customer-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(360px, .75fr); gap: 16px; }
.customer-grid-wide { align-items: stretch; grid-template-columns: minmax(0, 1fr) minmax(360px, .62fr); }
.admin-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(340px,.8fr) minmax(320px,.8fr); gap: 16px; }
.admin-grid.lower { grid-template-columns: minmax(0,1fr) minmax(320px,.8fr); margin-top: 16px; }
.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(21, 31, 42, .98), rgba(13, 18, 25, .98));
  box-shadow: var(--shadow);
  padding: 22px;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.pill {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(54,226,138,.34);
  border-radius: 999px;
  color: var(--green);
  background: rgba(54,226,138,.08);
  font: 900 11px ui-monospace, Consolas, monospace;
  white-space: nowrap;
}
.pill.muted { border-color: var(--line-2); color: var(--muted); background: rgba(255,255,255,.03); }
.pill.success { color: var(--green); }
.pill.warning { border-color: rgba(240,191,90,.34); color: var(--amber); background: rgba(240,191,90,.08); }
.pill.danger { border-color: rgba(255,113,136,.34); color: var(--red); background: rgba(255,113,136,.09); }

.stepper { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 22px; }
.stepper span {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
}
.stepper i {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #0b1118;
  color: var(--faint);
  font-style: normal;
  font-weight: 900;
}
.stepper span.active, .stepper span.done { border-color: rgba(54,226,138,.34); color: var(--ink); background: rgba(54,226,138,.07); }
.stepper span.active i, .stepper span.done i { background: var(--green); color: var(--green-ink); }

.form-stack { display: grid; gap: 13px; }
.field { display: block; }
.field span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.guard-card {
  display: grid;
  gap: 5px;
  margin-top: 6px;
  padding: 15px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
}
.guard-card b { color: var(--ink); }
.guard-card span { font-size: 12px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.task-inline-status {
  flex: 1 1 220px;
  align-self: center;
  min-width: 180px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.task-reason {
  display: inline-flex;
  width: fit-content;
  margin: 12px 0 0;
  padding: 7px 10px;
  border: 1px solid rgba(255,113,136,.24);
  border-radius: 999px;
  color: #ffb3c0;
  background: rgba(255,113,136,.08);
  font-size: 12px;
  font-weight: 800;
}
.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 900;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button.primary { background: var(--green); color: var(--green-ink); }
.button.success { background: linear-gradient(135deg, var(--green), #62e6ff); color: var(--green-ink); border-color: transparent; }
.button.secondary { border-color: var(--line-2); color: var(--ink); background: #1a2530; }
.button.ghost { border-color: var(--line); color: var(--muted); background: transparent; }
.button.warning { border-color: rgba(240,191,90,.38); color: var(--amber); background: rgba(240,191,90,.09); }
.button.danger { border-color: rgba(255,113,136,.4); color: #ffc5ce; background: rgba(255,113,136,.1); }
.button.wide { width: 100%; }

.notice {
  margin: 14px 0 0;
  padding: 12px 13px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  color: var(--muted);
  background: rgba(255,255,255,.03);
  font-size: 12px;
}
.notice.ok { border-color: rgba(54,226,138,.36); color: var(--green); }
.notice.error { border-color: rgba(255,113,136,.34); color: var(--red); }
.notice.warning { border-color: rgba(240,191,90,.38); color: var(--amber); }

.customer-notice-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(2, 6, 10, .68);
  backdrop-filter: blur(18px);
}

.customer-notice-dialog {
  position: relative;
  width: min(560px, 100%);
  overflow: hidden;
  padding: 28px;
  border: 1px solid rgba(240, 191, 90, .24);
  border-radius: 28px;
  background:
    radial-gradient(circle at 88% 0%, rgba(240,191,90,.20), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(54,226,138,.13), transparent 34%),
    linear-gradient(145deg, rgba(18, 23, 27, .98), rgba(8, 12, 16, .98));
  box-shadow: 0 30px 100px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.08);
  color: var(--ink);
}

.customer-notice-dialog .notice-glow {
  position: absolute;
  inset: auto -70px -90px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(54,226,138,.15);
  filter: blur(8px);
  pointer-events: none;
}

.notice-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(54,226,138,.22);
  border-radius: 999px;
  background: rgba(54,226,138,.08);
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.notice-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 5px rgba(54,226,138,.12);
}

.customer-notice-dialog h2 {
  margin: 18px 40px 12px 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.08;
  letter-spacing: -.04em;
}

.notice-message {
  position: relative;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
  white-space: normal;
}

.notice-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(159,181,202,.20);
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  color: var(--ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.notice-confirm {
  width: 100%;
  justify-content: center;
}

.notice-tone-warning .customer-notice-dialog { border-color: rgba(240,191,90,.34); }
.notice-tone-danger .customer-notice-dialog { border-color: rgba(255,113,136,.36); }
.notice-tone-success .customer-notice-dialog { border-color: rgba(54,226,138,.34); }
.notice-tone-danger .notice-badge { color: var(--red); background: rgba(255,113,136,.10); border-color: rgba(255,113,136,.24); }
.notice-tone-warning .notice-badge { color: var(--amber); background: rgba(240,191,90,.10); border-color: rgba(240,191,90,.24); }
.search-box { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; margin-bottom: 14px; }

.progress-card { text-align: center; }
.progress-ring {
  position: relative;
  display: grid;
  width: 156px;
  height: 156px;
  margin: 6px auto 18px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--value, 0%), rgba(255,255,255,.08) 0);
}
.progress-ring::before {
  position: absolute;
  width: 128px;
  height: 128px;
  content: "";
  border-radius: 50%;
  background: var(--panel);
}
.progress-ring span { position: relative; z-index: 1; font: 900 32px/1 ui-monospace, Consolas, monospace; }
.progress-track { height: 8px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), var(--blue)); transition: width .25s ease; }
.progress-stage { min-height: 44px; margin: 14px 0; color: var(--muted); }
.timeline { display: grid; gap: 9px; text-align: left; }
.timeline-item { display: grid; grid-template-columns: 12px minmax(0,1fr); gap: 10px; align-items: start; color: var(--muted); font-size: 12px; }
.timeline-item i { width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: var(--line-2); }
.timeline-item.is-current i { background: var(--amber); box-shadow: 0 0 0 5px rgba(240,191,90,.12); }
.timeline-item.is-done i { background: var(--green); }
.timeline-item.is-error i { background: var(--red); }
.timeline.compact { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

.task-quick-nav {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(74px, 1fr);
  justify-content: start;
  gap: 10px;
  margin: 16px 0 6px;
  padding: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.018)),
    rgba(0,0,0,.16);
}
.task-dot {
  min-width: 74px;
  height: 70px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  background:
    radial-gradient(circle at 28% 12%, rgba(255,255,255,.12), transparent 30%),
    rgba(255,255,255,.035);
  font: 900 13px/1 ui-monospace, Consolas, monospace;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.task-dot b { font-size: 22px; letter-spacing: -.04em; }
.task-dot small {
  font: 800 11px/1.1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: .8;
}
.task-dot:hover { transform: translateY(-2px); border-color: var(--green); box-shadow: 0 14px 28px rgba(0,0,0,.18); }
.task-dot.active { color: var(--green-ink); background: linear-gradient(145deg, var(--green), #4fe0cf); border-color: transparent; }
.task-dot.pay-ready { color: #17110a; background: linear-gradient(145deg, #ffd16a, var(--amber)); border-color: transparent; }
.task-dot.done { color: #07180f; background: linear-gradient(145deg, var(--green), #74f1bb); border-color: transparent; }
.task-dot.error {
  color: #fff;
  background: linear-gradient(145deg, #ff6b8b, #ff4d6d);
  border-color: transparent;
  animation: taskPulseError 1s ease-in-out infinite;
}
.task-dot.idle { background: rgba(255,255,255,.035); }
.task-dot.muted {
  min-width: 100%;
  height: 54px;
  cursor: default;
  opacity: .55;
}
@keyframes taskPulseError {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 123, 123, .26), inset 0 1px 0 rgba(255,255,255,.18); }
  50% { box-shadow: 0 0 0 10px rgba(255, 123, 123, 0), inset 0 1px 0 rgba(255,255,255,.18); }
}

.task-panel, .customer-history-panel { margin-top: 16px; }
.task-panel .panel-head p, .customer-history-panel .panel-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.task-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.customer-task-card {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(54,226,138,.08), transparent 34%),
    rgba(10,15,20,.72);
}
.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.task-card-head h3 { margin: 4px 0 0; font-size: 16px; }
.task-card-head code {
  color: var(--ink);
  font: 900 14px ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}
.task-title-wrap h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.task-index-badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(53, 226, 139, .28);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(53, 226, 139, .14), rgba(116, 198, 255, .08)),
    rgba(255, 255, 255, .035);
  color: var(--green);
  font: 900 13px ui-monospace, Consolas, monospace;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.cdk-capsule {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  max-width: min(100%, 420px);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: var(--ink);
  font: 900 14px ui-monospace, Consolas, monospace;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
  text-align: left;
  cursor: copy;
  transition: border-color .18s ease, background .18s ease, transform .18s ease, color .18s ease;
}
.cdk-capsule:hover,
.cdk-capsule:focus-visible {
  border-color: rgba(53, 226, 139, .48);
  background: rgba(53, 226, 139, .08);
  color: #f6fff9;
  outline: none;
}
.cdk-capsule:active {
  transform: translateY(1px);
}
.mini-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
}
.mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue));
  transition: width .25s ease;
}
.task-meta {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}
.task-meta span:first-child {
  color: var(--green);
  font: 900 13px ui-monospace, Consolas, monospace;
}
.customer-task-card textarea { min-height: 118px; }
.customer-task-card textarea:disabled {
  color: var(--faint);
  background: rgba(255,255,255,.025);
}
.customer-task-card.is-located,
.customer-history-row.is-located {
  outline: 2px solid var(--green);
  box-shadow: 0 0 0 8px rgba(110,231,168,.12);
}

.customer-history-list { display: grid; gap: 12px; }
.customer-history-row {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(160px, .42fr) minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10,15,20,.68);
}
.customer-history-row code {
  color: var(--ink);
  font: 900 13px ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}
.history-progress {
  display: grid;
  gap: 8px;
  min-width: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.025);
}
.history-progress strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ink);
  font-size: 13px;
}
.history-progress strong span { color: var(--green); font-family: ui-monospace, Consolas, monospace; }
.history-meta { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.history-meta small { display: block; margin-top: 4px; color: var(--faint); }

.table-panel { margin-top: 16px; }
.record-list { display: grid; gap: 9px; }
.record-row {
  display: grid;
  grid-template-columns: minmax(220px,.72fr) minmax(0,1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(10,15,20,.72);
}
.record-row code { color: var(--ink); font: 900 13px ui-monospace, Consolas, monospace; word-break: break-all; }
.record-row small { display: block; margin-top: 4px; color: var(--faint); }
.record-stage { color: var(--muted); overflow-wrap: anywhere; }
.record-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.worker-row .record-actions { min-width: 360px; }
.mini-input {
  width: 150px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5,10,15,.76);
  color: var(--ink);
  outline: none;
}
.mini-input:focus { border-color: rgba(54,226,138,.55); box-shadow: 0 0 0 3px rgba(54,226,138,.11); }
.admin-record {
  align-content: start;
  justify-items: start;
  min-height: 220px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0b1118;
  text-align: left;
}
.admin-record dl { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 8px 12px; width: 100%; margin: 0; }
.admin-record dt { color: var(--faint); }
.admin-record dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.danger-zone { background: linear-gradient(180deg, rgba(44, 22, 29, .96), rgba(17, 19, 24, .98)); }

.scan-login { margin-bottom: 16px; }
.scan-entry-card.is-hidden,
.scan-workbench.is-hidden {
  display: none;
}
.scan-workbench .panel-head p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}
.scan-start-button {
  min-height: 62px;
  margin: 10px 0 16px;
  border-radius: 18px;
  font-size: clamp(19px, 2.4vw, 26px);
  letter-spacing: .02em;
}
.scan-result {
  margin: 14px 0;
}

.scan-payment-card {
  display: grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap: 26px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(54,226,138,.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 8% 0%, rgba(54,226,138,.10), transparent 35%),
    rgba(4, 10, 14, .55);
}
.scan-result.is-hidden { display: none; }
.qr-frame {
  display: grid;
  min-height: 240px;
  place-items: center;
  border-radius: 14px;
  background: #f7faf9;
}
.qr-frame.large { min-height: 320px; }
.qr-frame img { width: min(260px, 100%); height: auto; }
.pay-copy p { color: var(--muted); overflow-wrap: anywhere; }
.pay-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.empty-state {
  display: grid;
  min-height: 160px;
  place-items: center;
  align-content: center;
  gap: 5px;
  color: var(--faint);
  text-align: center;
}
.empty-state b { color: var(--muted); }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(3, 6, 10, .72);
  backdrop-filter: blur(12px);
}
.modal-backdrop[hidden] { display: none; }
.modal-card {
  width: min(620px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(21,31,42,.98), rgba(13,18,25,.98));
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
  padding: 22px;
}
.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 1080px) {
  .hero-panel, .command-band, .customer-grid, .admin-grid, .admin-grid.lower, .scan-payment-card { grid-template-columns: 1fr; }
  .task-list, .customer-history-row { grid-template-columns: 1fr; }
  .status-strip { width: min(100%, 420px); }
}

@media (max-width: 700px) {
  .topbar { align-items: flex-start; flex-direction: column; gap: 12px; padding: 14px 16px; }
  .shell, .customer-shell, .scan-shell { width: min(100% - 24px, 1240px); padding-top: 22px; }
  .hero-panel, .command-band, .panel { padding: 18px; border-radius: 14px; }
  .status-strip, .stepper, .two-fields, .search-box { grid-template-columns: 1fr; }
  .record-row { grid-template-columns: 1fr; }
  .record-actions { justify-content: flex-start; }
}

body[data-page="customer"] {
  color-scheme: light;
  --bg: #fff8fc;
  --panel: #ffffff;
  --panel-2: #fff3fa;
  --ink: #25172d;
  --muted: #6c5d77;
  --faint: #9a8aa6;
  --line: #eaddec;
  --line-2: #dcc8df;
  --green: #13c98b;
  --green-ink: #06281c;
  --blue: #6677ff;
  --amber: #ffb43f;
  --red: #ff5d7e;
  --shadow: 0 24px 70px rgba(104, 67, 121, .14);
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 122, 187, .20), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(102, 119, 255, .18), transparent 30%),
    radial-gradient(circle at 78% 78%, rgba(19, 201, 139, .14), transparent 34%),
    linear-gradient(180deg, #fff8fc 0%, #fffdf7 48%, #f8fbff 100%);
}

body[data-page="customer"] .topbar {
  border-bottom-color: rgba(226, 190, 226, .7);
  background: rgba(255, 250, 253, .84);
}

body[data-page="customer"] .brand-mark {
  background: conic-gradient(from 210deg, #ff6fb4, #ffca52, #40dda1, #7a8cff, #ff6fb4);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 111, 180, .28);
}

body[data-page="customer"] .nav a.active {
  border-color: rgba(255, 111, 180, .32);
  color: #d62879;
  background: rgba(255, 111, 180, .12);
}

body[data-page="customer"] .hero-panel,
body[data-page="customer"] .panel {
  border-color: rgba(224, 197, 225, .9);
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,246,252,.94)),
    radial-gradient(circle at top right, rgba(255, 111, 180, .14), transparent 34%);
  box-shadow: var(--shadow);
}

body[data-page="customer"] .hero-panel {
  position: relative;
  overflow: hidden;
}

body[data-page="customer"] .hero-panel::after {
  position: absolute;
  top: -80px;
  right: -70px;
  width: 220px;
  height: 220px;
  content: "";
  border-radius: 50%;
  background: conic-gradient(from 180deg, rgba(255,111,180,.24), rgba(255,202,82,.24), rgba(64,221,161,.18), rgba(122,140,255,.24), rgba(255,111,180,.24));
  filter: blur(.2px);
}

body[data-page="customer"] .hero-copy,
body[data-page="customer"] .hero-status {
  position: relative;
  z-index: 1;
}

body[data-page="customer"] input,
body[data-page="customer"] textarea {
  border-color: #e7d9e9;
  background: #fff;
  color: var(--ink);
}

body[data-page="customer"] textarea.compact-textarea {
  max-height: 160px;
  overflow-y: auto;
}

body[data-page="customer"] input:focus,
body[data-page="customer"] textarea:focus {
  border-color: #ff7abd;
  box-shadow: 0 0 0 4px rgba(255, 122, 189, .16);
}

body[data-page="customer"] .stepper span,
body[data-page="customer"] .guard-card,
body[data-page="customer"] .customer-task-card,
body[data-page="customer"] .customer-history-row,
body[data-page="customer"] .history-progress {
  border-color: #eaddec;
  background: rgba(255,255,255,.78);
}

body[data-page="customer"] .stepper i {
  background: #fff2fa;
}

body[data-page="customer"] .stepper span.active,
body[data-page="customer"] .stepper span.done {
  border-color: rgba(255, 111, 180, .36);
  background: rgba(255, 111, 180, .10);
}

body[data-page="customer"] .stepper span.active i,
body[data-page="customer"] .stepper span.done i {
  background: linear-gradient(135deg, #ff6fb4, #ffca52);
  color: #fff;
}

body[data-page="customer"] .button.primary {
  background: linear-gradient(135deg, #32df9b, #91f2be);
  color: #06311f;
  box-shadow: 0 12px 26px rgba(19, 201, 139, .20);
}

body[data-page="customer"] .button.secondary {
  border-color: #dec8e2;
  color: #3a2444;
  background: #fff;
}

body[data-page="customer"] .button.ghost {
  border-color: #eaddec;
  color: #7a6688;
  background: rgba(255,255,255,.56);
}

body[data-page="customer"] .pill {
  border-color: rgba(19, 201, 139, .30);
  color: #087b55;
  background: rgba(19, 201, 139, .10);
}

body[data-page="customer"] .pill.muted {
  border-color: #e5d6e8;
  color: #7a6688;
  background: #fff;
}

body[data-page="customer"] .progress-ring {
  background: conic-gradient(#ff6fb4 var(--value, 0%), #ffca52 calc(var(--value, 0%) + 6%), rgba(235, 219, 237, .9) 0);
}

body[data-page="customer"] .progress-ring::before {
  background: #fff;
}

body[data-page="customer"] .progress-track,
body[data-page="customer"] .mini-progress {
  background: #efe4f1;
}

body[data-page="customer"] .progress-track i,
body[data-page="customer"] .mini-progress i {
  background: linear-gradient(90deg, #ff6fb4, #ffca52, #32df9b, #7a8cff);
}

body[data-page="customer"] .progress-card .timeline {
  max-height: 168px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #eaddec;
  border-radius: 12px;
  background: rgba(255,255,255,.62);
}

body[data-page="customer"] .timeline.compact {
  max-height: 130px;
  overflow-y: auto;
}

body[data-page="customer"] .candy-dashboard {
  min-width: min(410px, 100%);
  gap: 14px;
  border-color: rgba(255, 111, 180, .22);
  background:
    linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,243,250,.82)),
    radial-gradient(circle at top right, rgba(255,202,82,.18), transparent 32%);
}

body[data-page="customer"] .rate-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

body[data-page="customer"] .rate-card strong {
  color: #d62879;
  font-size: 52px;
}

body[data-page="customer"] .summary-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

body[data-page="customer"] .summary-metrics span {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid #eaddec;
  border-radius: 13px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 11px;
}

body[data-page="customer"] .summary-metrics b {
  color: var(--ink);
  font: 900 22px/1 ui-monospace, Consolas, monospace;
}

body[data-page="customer"] .activity-box {
  display: grid;
  gap: 8px;
}

body[data-page="customer"] .activity-title {
  color: #d62879;
  font: 900 11px/1.2 ui-monospace, Consolas, monospace;
  letter-spacing: .12em;
}

body[data-page="customer"] .activity-feed {
  display: grid;
  max-height: 92px;
  overflow-y: auto;
  gap: 6px;
  padding-right: 4px;
  color: var(--muted);
  font-size: 12px;
}

body[data-page="customer"] .activity-feed div {
  padding: 8px 10px;
  border: 1px solid #eaddec;
  border-radius: 10px;
  background: rgba(255,255,255,.68);
}

body[data-page="customer"] ::-webkit-scrollbar { width: 8px; height: 8px; }
body[data-page="customer"] ::-webkit-scrollbar-thumb { border-radius: 999px; background: #dfcce4; }
body[data-page="customer"] ::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 700px) {
  body[data-page="customer"] .summary-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body[data-page="customer"] .candy-dashboard { min-width: 0; }
}

/* Customer page visual refresh: Candy Club neon-green edition */
body[data-page="customer"] {
  --bg: #f6fff4;
  --panel: #ffffff;
  --panel-2: #efffed;
  --ink: #102018;
  --muted: #53645a;
  --faint: #84918a;
  --line: #dbeadb;
  --line-2: #bed8c1;
  --green: #5cff75;
  --green-ink: #061b0c;
  --blue: #40b7ff;
  --amber: #ffbd4a;
  --red: #ff5f75;
  --shadow: 0 22px 66px rgba(45, 111, 65, .12);
  background:
    radial-gradient(circle at 8% 9%, rgba(92, 255, 117, .18), transparent 30%),
    radial-gradient(circle at 94% 4%, rgba(64, 183, 255, .10), transparent 28%),
    linear-gradient(180deg, #f8fff6 0%, #fbfff7 45%, #f2fbf0 100%);
}

body[data-page="customer"] .topbar {
  border-bottom-color: rgba(183, 216, 188, .74);
  background: rgba(250, 255, 248, .88);
}

body[data-page="customer"] .brand-mark {
  background: linear-gradient(135deg, #5cff75, #c5ff67);
  color: #07330f;
  box-shadow: 0 10px 26px rgba(92, 255, 117, .28);
}

body[data-page="customer"] .brand b,
body[data-page="customer"] h1,
body[data-page="customer"] h2 {
  color: var(--ink);
}

body[data-page="customer"] .nav a.active {
  border-color: rgba(58, 212, 94, .32);
  color: #08752c;
  background: rgba(92, 255, 117, .15);
}

body[data-page="customer"] .hero-panel {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  min-height: 348px;
  border-color: rgba(180, 219, 186, .86);
  background:
    linear-gradient(135deg, rgba(255,255,255,.97), rgba(245,255,243,.95)),
    radial-gradient(circle at 0% 100%, rgba(92, 255, 117, .16), transparent 36%);
}

body[data-page="customer"] .hero-panel::after {
  top: -74px;
  right: -88px;
  width: 230px;
  height: 230px;
  background: radial-gradient(circle, rgba(92,255,117,.26), rgba(64,183,255,.10) 45%, transparent 70%);
}

body[data-page="customer"] .hero-copy {
  display: grid;
  align-content: center;
  gap: 18px;
}

body[data-page="customer"] .hero-copy h1 {
  max-width: 720px;
  font-size: clamp(42px, 5vw, 74px);
  line-height: .98;
  letter-spacing: -.055em;
}

body[data-page="customer"] .hero-copy p {
  max-width: 760px;
  margin: 0;
  color: #52685a;
  font-size: 18px;
  line-height: 1.7;
}

body[data-page="customer"] .exchange-identity {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 12px;
  padding: 11px 14px 11px 11px;
  border: 1px solid rgba(48, 201, 83, .28);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
  box-shadow: 0 12px 34px rgba(46, 130, 64, .10);
}

body[data-page="customer"] .exchange-logo {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 18px;
  background: #0f1f16;
  color: #80ff83;
  font: 950 14px/1 ui-monospace, Consolas, monospace;
  letter-spacing: -.04em;
  box-shadow: inset 0 0 0 1px rgba(128,255,131,.26), 0 14px 28px rgba(15,31,22,.18);
}

body[data-page="customer"] .exchange-identity b,
body[data-page="customer"] .exchange-identity small {
  display: block;
}

body[data-page="customer"] .exchange-identity b {
  color: #0f2418;
  font-size: 18px;
  line-height: 1.1;
}

body[data-page="customer"] .exchange-identity small {
  margin-top: 3px;
  color: #657267;
  font-size: 12px;
}

body[data-page="customer"] .candy-dashboard {
  min-width: 0;
  padding: 22px;
  border-color: rgba(75, 218, 103, .28);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(246,255,244,.84)),
    radial-gradient(circle at top right, rgba(92,255,117,.17), transparent 34%);
  box-shadow: 0 18px 50px rgba(47, 119, 62, .12);
}

body[data-page="customer"] .candy-dashboard > .pill {
  width: 100%;
  justify-content: center;
  min-height: 38px;
  border-color: rgba(39, 190, 78, .32);
  background: rgba(92, 255, 117, .14);
  color: #08752c;
}

body[data-page="customer"] .rate-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 4px 2px 2px;
}

body[data-page="customer"] .rate-card strong {
  color: #132119;
  font-size: 58px;
  letter-spacing: -.08em;
}

body[data-page="customer"] .rate-card small {
  color: #4f6154;
  font-size: 14px;
  line-height: 1.55;
}

body[data-page="customer"] .summary-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body[data-page="customer"] .summary-metrics span {
  min-height: 72px;
  padding: 13px;
  border-color: rgba(188, 218, 191, .85);
  background: rgba(255,255,255,.78);
  font-size: 12px;
}

body[data-page="customer"] .summary-metrics b {
  color: #132119;
  font-size: 26px;
}

body[data-page="customer"] .activity-title {
  color: #08752c;
  letter-spacing: .18em;
}

body[data-page="customer"] .activity-feed {
  max-height: 112px;
}

body[data-page="customer"] .activity-feed div {
  border-color: rgba(188, 218, 191, .8);
  background: rgba(255,255,255,.74);
}

body[data-page="customer"] .kicker {
  color: #08752c;
}

body[data-page="customer"] .panel,
body[data-page="customer"] .hero-panel {
  box-shadow: var(--shadow);
}

body[data-page="customer"] input:focus,
body[data-page="customer"] textarea:focus {
  border-color: #5cff75;
  box-shadow: 0 0 0 4px rgba(92, 255, 117, .18);
}

body[data-page="customer"] .button.primary {
  background: linear-gradient(135deg, #5cff75, #c8ff5c);
  color: #092110;
}

body[data-page="customer"] .button.secondary {
  border-color: #bfe2c2;
  color: #173522;
  background: #ffffff;
}

body[data-page="customer"] .stepper span.active,
body[data-page="customer"] .stepper span.done {
  border-color: rgba(92, 255, 117, .40);
  background: rgba(92, 255, 117, .12);
}

body[data-page="customer"] .stepper span.active i,
body[data-page="customer"] .stepper span.done i {
  background: linear-gradient(135deg, #5cff75, #c8ff5c);
  color: #092110;
}

body[data-page="customer"] .progress-ring {
  background: conic-gradient(#5cff75 var(--value, 0%), #c8ff5c calc(var(--value, 0%) + 6%), rgba(219, 234, 219, .95) 0);
}

body[data-page="customer"] .progress-track i,
body[data-page="customer"] .mini-progress i {
  background: linear-gradient(90deg, #5cff75, #c8ff5c, #40b7ff);
}

body[data-page="customer"] .progress-card .timeline {
  max-height: 150px;
}

body[data-page="customer"] ::-webkit-scrollbar-thumb {
  background: #b9d9bc;
}

@media (max-width: 1080px) {
  body[data-page="customer"] .hero-panel {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

@media (max-width: 700px) {
  body[data-page="customer"] .hero-copy h1 {
    font-size: 38px;
  }
  body[data-page="customer"] .rate-card {
    grid-template-columns: 1fr;
  }
}

/* Customer page visual refresh: calm Apple-style edition */
body[data-page="customer"] {
  --bg: #f5f5f7;
  --panel: #ffffff;
  --panel-2: #fbfbfd;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --faint: #9b9ba1;
  --line: #e5e5ea;
  --line-2: #d2d2d7;
  --green: #30d158;
  --green-ink: #06230d;
  --blue: #007aff;
  --amber: #ff9f0a;
  --red: #ff453a;
  --shadow: 0 20px 60px rgba(0, 0, 0, .08);
  background:
    radial-gradient(circle at 18% 8%, rgba(48, 209, 88, .09), transparent 24%),
    linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 100%);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body[data-page="customer"] .topbar {
  min-height: 64px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: rgba(251,251,253,.72);
  backdrop-filter: saturate(180%) blur(22px);
}

body[data-page="customer"] .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #1d1d1f;
  color: #fff;
  box-shadow: none;
}

body[data-page="customer"] .brand b { font-weight: 700; letter-spacing: -.01em; }
body[data-page="customer"] .brand small { color: #86868b; letter-spacing: .08em; }
body[data-page="customer"] .nav a {
  border-radius: 999px;
  color: #6e6e73;
}
body[data-page="customer"] .nav a.active {
  border-color: transparent;
  color: #1d1d1f;
  background: rgba(0,0,0,.06);
}

body[data-page="customer"] .customer-shell {
  width: min(1180px, calc(100% - 40px));
  padding-top: 28px;
}

body[data-page="customer"] .hero-panel {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  min-height: auto;
  padding: 34px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 28px;
  background: rgba(255,255,255,.86);
  box-shadow: var(--shadow);
}

body[data-page="customer"] .hero-panel::after { display: none; }
body[data-page="customer"] .hero-copy { gap: 18px; }
body[data-page="customer"] .hero-copy h1 {
  max-width: 680px;
  color: #1d1d1f;
  font-size: clamp(42px, 5.3vw, 76px);
  line-height: .96;
  letter-spacing: -.065em;
}
body[data-page="customer"] .hero-copy p {
  max-width: 650px;
  color: #6e6e73;
  font-size: 18px;
  line-height: 1.65;
}

body[data-page="customer"] .exchange-identity {
  gap: 12px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 18px;
  background: #f5f5f7;
  box-shadow: none;
}
body[data-page="customer"] .exchange-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #30d158;
  color: #07190b;
  box-shadow: none;
}
body[data-page="customer"] .exchange-identity b { font-size: 17px; }
body[data-page="customer"] .exchange-identity small { color: #86868b; }

body[data-page="customer"] .candy-dashboard {
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 24px;
  background: #fbfbfd;
  box-shadow: none;
}
body[data-page="customer"] .candy-dashboard > .pill,
body[data-page="customer"] .service-pill {
  justify-content: flex-start;
  gap: 8px;
  min-height: 40px;
  padding: 0 12px;
  border-color: rgba(48, 209, 88, .20);
  background: rgba(48, 209, 88, .10);
  color: #1d1d1f;
}
body[data-page="customer"] .service-pill i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 0 5px rgba(48, 209, 88, .14);
}
body[data-page="customer"] .service-pill.warning i { background: #ff9f0a; box-shadow: 0 0 0 5px rgba(255,159,10,.14); }
body[data-page="customer"] .service-pill.danger i { background: #ff453a; box-shadow: 0 0 0 5px rgba(255,69,58,.14); }
body[data-page="customer"] .service-pill b {
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

body[data-page="customer"] .rate-card {
  grid-template-columns: 112px minmax(0, 1fr);
  padding: 8px 2px;
}
body[data-page="customer"] .rate-card strong {
  color: #1d1d1f;
  font-size: 50px;
  letter-spacing: -.075em;
}
body[data-page="customer"] .rate-card small {
  color: #6e6e73;
}

body[data-page="customer"] .summary-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
body[data-page="customer"] .summary-metrics span {
  min-height: 70px;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 18px;
  background: #fff;
  color: #6e6e73;
}
body[data-page="customer"] .summary-metrics b {
  color: #1d1d1f;
}

body[data-page="customer"] .activity-title,
body[data-page="customer"] .kicker {
  color: #1d1d1f;
  letter-spacing: .12em;
}
body[data-page="customer"] .activity-feed div {
  border: 0;
  border-radius: 14px;
  background: #fff;
  color: #6e6e73;
}

body[data-page="customer"] .panel {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 24px;
  background: rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}
body[data-page="customer"] .customer-grid {
  gap: 18px;
}
body[data-page="customer"] input,
body[data-page="customer"] textarea {
  border-color: rgba(0,0,0,.10);
  border-radius: 16px;
  background: #fff;
  color: #1d1d1f;
}
body[data-page="customer"] input:focus,
body[data-page="customer"] textarea:focus {
  border-color: rgba(0,122,255,.58);
  box-shadow: 0 0 0 4px rgba(0,122,255,.12);
}
body[data-page="customer"] .button {
  border-radius: 999px;
}
body[data-page="customer"] .button.primary {
  background: #1d1d1f;
  color: #fff;
  box-shadow: none;
}
body[data-page="customer"] .button.secondary {
  border-color: transparent;
  color: #fff;
  background: #007aff;
}
body[data-page="customer"] .button.ghost {
  border-color: rgba(0,0,0,.08);
  color: #1d1d1f;
  background: #fff;
}
body[data-page="customer"] .stepper span,
body[data-page="customer"] .guard-card,
body[data-page="customer"] .customer-task-card,
body[data-page="customer"] .customer-history-row,
body[data-page="customer"] .history-progress {
  border-color: rgba(0,0,0,.06);
  border-radius: 18px;
  background: #fff;
}
body[data-page="customer"] .stepper span.active,
body[data-page="customer"] .stepper span.done {
  border-color: rgba(48,209,88,.22);
  background: rgba(48,209,88,.10);
}
body[data-page="customer"] .stepper span.active i,
body[data-page="customer"] .stepper span.done i {
  background: #30d158;
  color: #07190b;
}
body[data-page="customer"] .progress-track,
body[data-page="customer"] .mini-progress {
  background: #e5e5ea;
}
body[data-page="customer"] .progress-track i,
body[data-page="customer"] .mini-progress i {
  background: linear-gradient(90deg, #30d158, #007aff);
}
body[data-page="customer"] .progress-ring {
  background: conic-gradient(#30d158 var(--value, 0%), #e5e5ea 0);
}
body[data-page="customer"] .progress-card .timeline {
  max-height: 148px;
  border-color: rgba(0,0,0,.06);
  background: #fbfbfd;
}
body[data-page="customer"] .pill.success { color: #0b6b28; }
body[data-page="customer"] .pill.warning { color: #8a5200; background: rgba(255,159,10,.12); border-color: rgba(255,159,10,.20); }
body[data-page="customer"] .pill.danger { color: #b42318; background: rgba(255,69,58,.10); border-color: rgba(255,69,58,.20); }
body[data-page="customer"] ::-webkit-scrollbar-thumb { background: #d2d2d7; }

@media (max-width: 1080px) {
  body[data-page="customer"] .hero-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body[data-page="customer"] .customer-shell { width: min(100% - 24px, 1180px); }
  body[data-page="customer"] .hero-panel { padding: 22px; border-radius: 22px; }
  body[data-page="customer"] .hero-copy h1 { font-size: 40px; }
  body[data-page="customer"] .rate-card { grid-template-columns: 1fr; }
}

/* Customer page visual refresh: black-gold comfort edition */
body[data-page="customer"] {
  color-scheme: dark;
  --bg: #0f0f0d;
  --panel: #171714;
  --panel-2: #1d1b16;
  --ink: #f4efe2;
  --muted: #b7ad99;
  --faint: #847968;
  --line: rgba(219, 190, 127, .18);
  --line-2: rgba(219, 190, 127, .28);
  --green: #6ee7a8;
  --green-ink: #07180f;
  --blue: #9bbcff;
  --amber: #d8b46a;
  --red: #ff7b7b;
  --shadow: 0 24px 80px rgba(0, 0, 0, .34);
  background:
    radial-gradient(circle at 16% 0%, rgba(216, 180, 106, .14), transparent 30%),
    radial-gradient(circle at 94% 12%, rgba(110, 231, 168, .08), transparent 24%),
    linear-gradient(180deg, #12120f 0%, #0b0b0a 100%);
  color: var(--ink);
}

body[data-page="customer"] .topbar {
  border-bottom: 1px solid rgba(216, 180, 106, .14);
  background: rgba(15, 15, 13, .76);
  backdrop-filter: saturate(150%) blur(22px);
}

body[data-page="customer"] .brand-mark {
  background: linear-gradient(135deg, #f3d48a, #a77b2f);
  color: #15110a;
}

body[data-page="customer"] .brand b,
body[data-page="customer"] h1,
body[data-page="customer"] h2 {
  color: #f7f0df;
}

body[data-page="customer"] .brand small,
body[data-page="customer"] .nav a {
  color: #9e927d;
}

body[data-page="customer"] .nav a.active {
  color: #f1d28b;
  background: rgba(216, 180, 106, .12);
}

body[data-page="customer"] .hero-panel,
body[data-page="customer"] .panel {
  border-color: rgba(216, 180, 106, .16);
  background:
    linear-gradient(145deg, rgba(28, 27, 23, .94), rgba(18, 18, 16, .96)),
    radial-gradient(circle at top right, rgba(216, 180, 106, .08), transparent 32%);
  box-shadow: var(--shadow);
}

body[data-page="customer"] .hero-panel {
  border-radius: 30px;
}

body[data-page="customer"] .hero-copy h1 {
  color: #f7f0df;
  text-shadow: 0 18px 60px rgba(0,0,0,.22);
}

body[data-page="customer"] .hero-copy p,
body[data-page="customer"] .rate-card small,
body[data-page="customer"] .field span,
body[data-page="customer"] .progress-stage,
body[data-page="customer"] .timeline-item,
body[data-page="customer"] .task-meta,
body[data-page="customer"] .history-meta {
  color: #b7ad99;
}

body[data-page="customer"] .exchange-identity {
  border-color: rgba(216, 180, 106, .20);
  background: rgba(255, 255, 255, .035);
}

body[data-page="customer"] .exchange-logo {
  background: linear-gradient(135deg, #f3d48a, #9e6f25);
  color: #15110a;
}

body[data-page="customer"] .exchange-identity b {
  color: #f7f0df;
}

body[data-page="customer"] .exchange-identity small {
  color: #a89c87;
}

body[data-page="customer"] .candy-dashboard {
  border-color: rgba(216, 180, 106, .18);
  background:
    linear-gradient(180deg, rgba(35, 33, 28, .92), rgba(22, 21, 18, .94)),
    radial-gradient(circle at top right, rgba(216, 180, 106, .12), transparent 32%);
}

body[data-page="customer"] .service-pill,
body[data-page="customer"] .candy-dashboard > .pill {
  border-color: rgba(110, 231, 168, .20);
  background: rgba(110, 231, 168, .09);
  color: #e9f7ed;
}

body[data-page="customer"] .service-pill i {
  background: #6ee7a8;
  box-shadow: 0 0 0 5px rgba(110, 231, 168, .12);
}

body[data-page="customer"] .rate-card strong,
body[data-page="customer"] .summary-metrics b {
  color: #f3d48a;
}

body[data-page="customer"] .summary-metrics span,
body[data-page="customer"] .activity-feed div,
body[data-page="customer"] .stepper span,
body[data-page="customer"] .guard-card,
body[data-page="customer"] .customer-task-card,
body[data-page="customer"] .customer-history-row,
body[data-page="customer"] .history-progress,
body[data-page="customer"] .progress-card .timeline {
  border-color: rgba(216, 180, 106, .14);
  background: rgba(255, 255, 255, .045);
}

body[data-page="customer"] .summary-metrics span,
body[data-page="customer"] .activity-feed div {
  color: #b7ad99;
}

body[data-page="customer"] .kicker,
body[data-page="customer"] .activity-title {
  color: #d8b46a;
}

body[data-page="customer"] input,
body[data-page="customer"] textarea {
  border-color: rgba(216, 180, 106, .18);
  background: rgba(7, 7, 6, .48);
  color: #f4efe2;
}

body[data-page="customer"] input::placeholder,
body[data-page="customer"] textarea::placeholder {
  color: #756b5b;
}

body[data-page="customer"] input:focus,
body[data-page="customer"] textarea:focus {
  border-color: rgba(216, 180, 106, .65);
  box-shadow: 0 0 0 4px rgba(216, 180, 106, .12);
}

body[data-page="customer"] .button.primary {
  background: linear-gradient(135deg, #f3d48a, #b38135);
  color: #171107;
}

body[data-page="customer"] .button.secondary {
  background: rgba(216, 180, 106, .14);
  color: #f3d48a;
  border-color: rgba(216, 180, 106, .24);
}

body[data-page="customer"] .button.ghost {
  color: #cdbf9f;
  background: rgba(255,255,255,.035);
  border-color: rgba(216, 180, 106, .14);
}

body[data-page="customer"] .stepper i {
  background: rgba(255,255,255,.06);
  color: #9e927d;
}

body[data-page="customer"] .stepper span.active,
body[data-page="customer"] .stepper span.done {
  border-color: rgba(216, 180, 106, .24);
  background: rgba(216, 180, 106, .10);
}

body[data-page="customer"] .stepper span.active i,
body[data-page="customer"] .stepper span.done i {
  background: linear-gradient(135deg, #f3d48a, #b38135);
  color: #171107;
}

body[data-page="customer"] .progress-track,
body[data-page="customer"] .mini-progress {
  background: rgba(255,255,255,.09);
}

body[data-page="customer"] .progress-track i,
body[data-page="customer"] .mini-progress i {
  background: linear-gradient(90deg, #f3d48a, #6ee7a8);
}

body[data-page="customer"] .progress-ring {
  background: conic-gradient(#d8b46a var(--value, 0%), rgba(255,255,255,.10) 0);
}

body[data-page="customer"] .progress-ring::before {
  background: #171714;
}

body[data-page="customer"] .pill {
  border-color: rgba(216, 180, 106, .22);
  color: #f3d48a;
  background: rgba(216, 180, 106, .10);
}

body[data-page="customer"] .pill.muted {
  color: #a89c87;
  background: rgba(255,255,255,.035);
}

body[data-page="customer"] .pill.success {
  color: #8df0b9;
  border-color: rgba(110, 231, 168, .24);
  background: rgba(110, 231, 168, .09);
}

body[data-page="customer"] .pill.warning {
  color: #ffd28a;
  background: rgba(216, 180, 106, .10);
  border-color: rgba(216, 180, 106, .22);
}

body[data-page="customer"] .pill.danger {
  color: #ff9b9b;
  background: rgba(255, 123, 123, .08);
  border-color: rgba(255, 123, 123, .20);
}

body[data-page="customer"] .notice {
  color: #b7ad99;
  background: rgba(255,255,255,.035);
  border-color: rgba(216, 180, 106, .16);
}

body[data-page="customer"] .notice.ok {
  color: #8df0b9;
  border-color: rgba(110, 231, 168, .22);
}

body[data-page="customer"] .notice.error {
  color: #ff9b9b;
}

body[data-page="customer"] .timeline-item.is-current i {
  background: #d8b46a;
  box-shadow: 0 0 0 5px rgba(216, 180, 106, .12);
}

body[data-page="customer"] .timeline-item.is-done i {
  background: #6ee7a8;
}

body[data-page="customer"] .customer-history-row code,
body[data-page="customer"] .task-card-head code {
  color: #f4efe2;
}

body[data-page="customer"] ::-webkit-scrollbar-thumb {
  background: rgba(216, 180, 106, .32);
}

/* Hero typography refinement */
body[data-page="customer"] .hero-copy {
  max-width: 720px;
  gap: 22px;
}

body[data-page="customer"] .hero-copy h1 {
  display: grid;
  gap: 8px;
  max-width: 680px;
  font-size: clamp(54px, 6vw, 82px);
  line-height: .96;
  letter-spacing: -.058em;
}

body[data-page="customer"] .hero-copy h1 span {
  display: block;
  white-space: nowrap;
}

body[data-page="customer"] .hero-copy p {
  max-width: 640px;
  font-size: 20px;
  line-height: 1.72;
  letter-spacing: -.02em;
}

body[data-page="customer"] .exchange-identity {
  margin-bottom: 4px;
}

@media (max-width: 900px) {
  body[data-page="customer"] .hero-copy h1 span {
    white-space: normal;
  }
}

@media (max-width: 700px) {
  body[data-page="customer"] .hero-copy h1 {
    font-size: 42px;
    letter-spacing: -.045em;
  }
  body[data-page="customer"] .hero-copy p {
    font-size: 16px;
  }
}

/* Customer page final palette: deep teal + emerald, matching operations console */
body[data-page="customer"] {
  color-scheme: dark;
  --bg: #071111;
  --panel: #121c26;
  --panel-2: #0d151d;
  --ink: #f4f7fb;
  --muted: #9fb5ca;
  --faint: #6f8296;
  --line: #263746;
  --line-2: #31485a;
  --green: #35e28b;
  --green-ink: #03150c;
  --blue: #7fc7ff;
  --amber: #f0bf5a;
  --red: #ff7188;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  background:
    radial-gradient(circle at 12% 0%, rgba(53, 226, 139, .10), transparent 28%),
    radial-gradient(circle at 92% 8%, rgba(127, 199, 255, .07), transparent 28%),
    linear-gradient(180deg, #0a1516 0%, #061011 100%);
  color: var(--ink);
}

body[data-page="customer"] .topbar {
  border-bottom: 1px solid rgba(80, 117, 141, .24);
  background: rgba(7, 17, 17, .82);
  backdrop-filter: saturate(150%) blur(18px);
}

body[data-page="customer"] .brand-mark {
  background: linear-gradient(135deg, #35e28b, #8df6bd);
  color: #03150c;
}

body[data-page="customer"] .brand b,
body[data-page="customer"] h1,
body[data-page="customer"] h2 {
  color: #f4f7fb;
}

body[data-page="customer"] .brand small,
body[data-page="customer"] .nav a {
  color: #7f95aa;
}

body[data-page="customer"] .nav a.active {
  border-color: rgba(53, 226, 139, .28);
  color: #35e28b;
  background: rgba(53, 226, 139, .08);
}

body[data-page="customer"] .hero-panel,
body[data-page="customer"] .panel {
  border-color: #263746;
  background:
    linear-gradient(145deg, rgba(18, 28, 38, .97), rgba(10, 17, 23, .98)),
    radial-gradient(circle at top right, rgba(53, 226, 139, .08), transparent 34%);
  box-shadow: var(--shadow);
}

body[data-page="customer"] .hero-panel {
  border-radius: 26px;
}

body[data-page="customer"] .hero-copy h1 {
  color: #f4f7fb;
  text-shadow: none;
}

body[data-page="customer"] .hero-copy p,
body[data-page="customer"] .rate-card small,
body[data-page="customer"] .field span,
body[data-page="customer"] .progress-stage,
body[data-page="customer"] .timeline-item,
body[data-page="customer"] .task-meta,
body[data-page="customer"] .history-meta {
  color: #9fb5ca;
}

body[data-page="customer"] .exchange-identity {
  border-color: #31485a;
  background: rgba(255, 255, 255, .035);
}

body[data-page="customer"] .exchange-logo {
  background: linear-gradient(135deg, #35e28b, #8df6bd);
  color: #03150c;
}

body[data-page="customer"] .exchange-identity b {
  color: #f4f7fb;
}

body[data-page="customer"] .exchange-identity small {
  color: #8fa6ba;
}

body[data-page="customer"] .candy-dashboard {
  border-color: #263746;
  background:
    linear-gradient(180deg, rgba(18, 28, 38, .97), rgba(12, 19, 27, .98)),
    radial-gradient(circle at top right, rgba(53, 226, 139, .09), transparent 35%);
}

body[data-page="customer"] .service-pill,
body[data-page="customer"] .candy-dashboard > .pill {
  border-color: rgba(53, 226, 139, .28);
  background: rgba(53, 226, 139, .08);
  color: #caffdf;
}

body[data-page="customer"] .service-pill i {
  background: #35e28b;
  box-shadow: 0 0 0 5px rgba(53, 226, 139, .12);
}

body[data-page="customer"] .rate-card strong,
body[data-page="customer"] .summary-metrics b {
  color: #f4f7fb;
}

body[data-page="customer"] .summary-metrics span,
body[data-page="customer"] .activity-feed div,
body[data-page="customer"] .stepper span,
body[data-page="customer"] .guard-card,
body[data-page="customer"] .customer-task-card,
body[data-page="customer"] .customer-history-row,
body[data-page="customer"] .history-progress,
body[data-page="customer"] .progress-card .timeline {
  border-color: #263746;
  background: rgba(255, 255, 255, .025);
}

body[data-page="customer"] .summary-metrics span,
body[data-page="customer"] .activity-feed div {
  color: #9fb5ca;
}

body[data-page="customer"] .kicker,
body[data-page="customer"] .activity-title {
  color: #35e28b;
}

body[data-page="customer"] input,
body[data-page="customer"] textarea {
  border-color: #263746;
  background: #0a1219;
  color: #f4f7fb;
}

body[data-page="customer"] input::placeholder,
body[data-page="customer"] textarea::placeholder {
  color: #687b8e;
}

body[data-page="customer"] input:focus,
body[data-page="customer"] textarea:focus {
  border-color: #35e28b;
  box-shadow: 0 0 0 4px rgba(53, 226, 139, .12);
}

body[data-page="customer"] .button.primary,
body[data-page="customer"] .button.secondary {
  background: #35e28b;
  color: #03150c;
  border-color: transparent;
}

body[data-page="customer"] .button.ghost {
  color: #9fb5ca;
  background: rgba(255,255,255,.025);
  border-color: #263746;
}

body[data-page="customer"] .stepper i {
  background: #0a1219;
  color: #6f8296;
}

body[data-page="customer"] .stepper span.active,
body[data-page="customer"] .stepper span.done {
  border-color: rgba(53, 226, 139, .28);
  background: rgba(53, 226, 139, .07);
}

body[data-page="customer"] .stepper span.active i,
body[data-page="customer"] .stepper span.done i {
  background: #35e28b;
  color: #03150c;
}

body[data-page="customer"] .progress-track,
body[data-page="customer"] .mini-progress {
  background: rgba(255,255,255,.08);
}

body[data-page="customer"] .progress-track i,
body[data-page="customer"] .mini-progress i {
  background: linear-gradient(90deg, #35e28b, #7fc7ff);
}

body[data-page="customer"] .progress-ring {
  background: conic-gradient(#35e28b var(--value, 0%), rgba(255,255,255,.08) 0);
}

body[data-page="customer"] .progress-ring::before {
  background: #121c26;
}

body[data-page="customer"] .pill {
  border-color: rgba(53, 226, 139, .28);
  color: #35e28b;
  background: rgba(53, 226, 139, .08);
}

body[data-page="customer"] .pill.muted {
  color: #9fb5ca;
  background: rgba(255,255,255,.025);
  border-color: #263746;
}

body[data-page="customer"] .pill.success {
  color: #35e28b;
  border-color: rgba(53, 226, 139, .28);
  background: rgba(53, 226, 139, .08);
}

body[data-page="customer"] .pill.warning {
  color: #f0bf5a;
  background: rgba(240, 191, 90, .08);
  border-color: rgba(240, 191, 90, .28);
}

body[data-page="customer"] .pill.danger {
  color: #ff9aac;
  background: rgba(255, 113, 136, .08);
  border-color: rgba(255, 113, 136, .24);
}

body[data-page="customer"] .notice {
  color: #9fb5ca;
  background: rgba(255,255,255,.025);
  border-color: #263746;
}

body[data-page="customer"] .notice.ok {
  color: #35e28b;
  border-color: rgba(53, 226, 139, .28);
}

body[data-page="customer"] .notice.error {
  color: #ff9aac;
}

body[data-page="customer"] .timeline-item.is-current i {
  background: #f0bf5a;
  box-shadow: 0 0 0 5px rgba(240, 191, 90, .12);
}

body[data-page="customer"] .timeline-item.is-done i {
  background: #35e28b;
}

body[data-page="customer"] .customer-history-row code,
body[data-page="customer"] .task-card-head code {
  color: #f4f7fb;
}

body[data-page="customer"] ::-webkit-scrollbar-thumb {
  background: #31485a;
}

/* Final customer batch navigator: compact premium status chips */
body[data-page="customer"] .task-quick-nav {
  display: grid;
  grid-template-columns: repeat(5, 44px);
  grid-auto-flow: row;
  grid-auto-rows: 44px;
  gap: 8px;
  justify-content: center;
  margin: 14px 0 8px;
  padding: 8px 10px;
  overflow: visible;
  border: 1px solid rgba(110, 231, 168, .12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.015));
}

body[data-page="customer"] .task-dot {
  min-width: 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  color: var(--muted);
  background: rgba(255,255,255,.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

body[data-page="customer"] .task-dot b {
  font: 950 16px/1 ui-monospace, Consolas, monospace;
  letter-spacing: -.05em;
}

body[data-page="customer"] .task-dot small {
  display: none;
}

body[data-page="customer"] .task-dot:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.12);
}

body[data-page="customer"] .task-dot.selected {
  outline: 2px solid rgba(255,255,255,.88);
  outline-offset: 3px;
  box-shadow: 0 10px 22px rgba(0,0,0,.22), 0 0 0 6px rgba(110,231,168,.08), inset 0 1px 0 rgba(255,255,255,.18);
}

body[data-page="customer"] .task-dot.active {
  color: #062016;
  background: linear-gradient(145deg, #6ee7a8, #4fe0cf);
}

body[data-page="customer"] .task-dot.pay-ready {
  color: #181004;
  background: linear-gradient(145deg, #ffd16a, #d8b46a);
}

body[data-page="customer"] .task-dot.done {
  color: #062016;
  background: linear-gradient(145deg, #7af0b3, #3be48e);
}

body[data-page="customer"] .task-dot.error {
  color: #fff;
  background: linear-gradient(145deg, #ff7291, #ff4d6d);
}

body[data-page="customer"] .task-inline-status {
  color: #9fb5ca;
}

/* Batch navigator: compact task slots with explicit interaction hint */
body[data-page="customer"] .task-quick-nav {
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  grid-auto-rows: 48px;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border-radius: 22px;
}

body[data-page="customer"] .task-dot {
  min-width: 0;
  width: 100%;
  height: 48px;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border-radius: 16px;
  color: #c9d8e8;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border-color: rgba(159, 181, 202, .22);
}

body[data-page="customer"] .task-dot b {
  font: 950 17px/1 ui-monospace, Consolas, monospace;
}

body[data-page="customer"] .task-dot small {
  display: block;
  max-width: 100%;
  color: currentColor;
  font: 800 9px/1 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: .02em;
  opacity: .74;
  transform: translateY(-1px);
}

body[data-page="customer"] .task-dot.selected {
  outline: none;
  box-shadow:
    0 0 0 2px rgba(244, 247, 251, .9),
    0 0 0 6px rgba(110,231,168,.08),
    inset 0 1px 0 rgba(255,255,255,.18);
}

body[data-page="customer"] .task-dot.idle {
  color: #d6e3f1;
  background: linear-gradient(180deg, rgba(159,181,202,.12), rgba(159,181,202,.045));
  border-color: rgba(159,181,202,.30);
}

body[data-page="customer"] .task-nav-help {
  margin: 8px 0 14px;
  color: #7f96ab;
  text-align: center;
  font-size: 12px;
  letter-spacing: .02em;
}

@media (max-width: 520px) {
  body[data-page="customer"] .task-quick-nav {
    grid-template-columns: repeat(5, minmax(42px, 1fr));
    grid-auto-rows: 44px;
    gap: 7px;
  }
  body[data-page="customer"] .task-dot {
    height: 44px;
  }
}

/* Scanner v2: bilingual, mobile-first workbench */
body[data-page="scan"] {
  background:
    radial-gradient(circle at 16% 0%, rgba(54, 226, 138, .12), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(105, 185, 255, .09), transparent 30%),
    linear-gradient(180deg, #07110f 0%, #090d12 42%, #070a0e 100%);
}

.scan-topbar {
  min-height: 76px;
}

.scan-top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.button.compact {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
}

.button.compact.active {
  border-color: rgba(54,226,138,.42);
  background: rgba(54,226,138,.12);
  color: var(--green);
}

.scan-entry-card,
.scan-workbench {
  border-color: rgba(54,226,138,.16);
  background:
    linear-gradient(180deg, rgba(20, 30, 40, .96), rgba(10, 16, 22, .98)),
    radial-gradient(circle at 96% 4%, rgba(54,226,138,.07), transparent 34%);
}

.scan-entry-card .panel-head p {
  max-width: 760px;
  margin: 9px 0 0;
  color: var(--muted);
}

.scan-worker-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .62fr);
  gap: 12px;
}

.scan-id-field input {
  font: 900 clamp(28px, 7vw, 54px)/1 ui-monospace, Consolas, monospace;
  letter-spacing: .08em;
}

.scan-desk-top {
  display: grid;
  grid-template-columns: minmax(170px, .72fr) minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 14px;
}

.scan-worker-card {
  display: grid;
  gap: 8px;
  align-content: center;
  padding: 16px;
  border: 1px solid rgba(54,226,138,.18);
  border-radius: 18px;
  background: rgba(54,226,138,.07);
}

.scan-worker-card small {
  color: var(--muted);
  font-weight: 800;
}

.scan-worker-card b {
  font: 900 32px/1 ui-monospace, Consolas, monospace;
  color: var(--green);
  letter-spacing: .06em;
}

.worker-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  margin: 0;
}

.worker-metrics span {
  display: grid;
  gap: 3px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.035);
}

.worker-metrics b {
  font: 900 28px/1 ui-monospace, Consolas, monospace;
  color: var(--ink);
}

.worker-metrics small {
  color: var(--muted);
}

.scan-primary-actions .button {
  min-height: 54px;
  border-radius: 16px;
}

.scan-stop-button {
  min-width: 150px;
  min-height: 100%;
  border-radius: 18px;
}

.scan-workbench .panel-head h1,
.scan-entry-card .panel-head h1 {
  font-size: clamp(36px, 6vw, 76px);
  letter-spacing: -.055em;
}

.scan-start-button {
  background: linear-gradient(135deg, var(--green), #6ff7c2);
  box-shadow: 0 16px 42px rgba(54, 226, 138, .18);
}

body[data-page="scan"] input {
  min-height: 58px;
  border-radius: 14px;
  font-size: 18px;
}

body[data-page="scan"] .notice {
  font-size: 14px;
  line-height: 1.7;
}

body[data-page="scan"] .qr-frame.large {
  min-height: 360px;
}

body[data-page="scan"] .qr-frame img {
  width: min(300px, 92%);
}

/* Admin command center layout */
body[data-page="admin"] {
  background:
    radial-gradient(circle at 9% 0%, rgba(54, 226, 138, .10), transparent 28%),
    radial-gradient(circle at 91% 8%, rgba(240, 191, 90, .08), transparent 28%),
    linear-gradient(180deg, #080d12 0%, #0a0f14 46%, #070a0e 100%);
}

.admin-shell {
  width: min(1440px, calc(100% - 40px));
}

.admin-hero {
  align-items: center;
  border-radius: 22px;
}

.admin-hero h1 {
  max-width: 920px;
  font-size: clamp(38px, 5vw, 72px);
}

.admin-hero p {
  max-width: 860px;
}

.admin-status-strip {
  min-width: 330px;
}

.admin-zone-map {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 16px;
}

.admin-zone-map a {
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(54,226,138,.15);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  color: var(--muted);
}

.admin-zone-map b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: rgba(54,226,138,.10);
  color: var(--green);
  font: 900 12px/1 ui-monospace, Consolas, monospace;
}

.admin-zone-map span {
  color: var(--ink);
  font-weight: 900;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(300px, .78fr) minmax(420px, 1.16fr) minmax(340px, .9fr);
  gap: 16px;
  align-items: start;
}

.admin-notice-panel {
  margin: 0 0 16px;
  border-color: rgba(240,191,90,.20);
  background:
    radial-gradient(circle at 100% 0%, rgba(240,191,90,.10), transparent 30%),
    linear-gradient(180deg, rgba(16,22,29,.92), rgba(9,14,20,.94));
}

.admin-collapsible-panel {
  padding: 0;
  overflow: hidden;
}

.admin-collapse-summary {
  padding: 28px 30px;
  cursor: pointer;
  list-style: none;
}

.admin-collapse-summary::-webkit-details-marker {
  display: none;
}

.admin-collapse-summary .collapse-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-collapse-summary .collapse-actions em {
  min-width: 86px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  background: rgba(255,255,255,.03);
}

.admin-collapsible-panel[open] .collapse-actions em {
  color: var(--green);
  border-color: rgba(54,226,138,.28);
  background: rgba(54,226,138,.08);
}

.admin-collapsible-panel[open] .collapse-actions em::before {
  content: "收起";
}

.admin-collapsible-panel[open] .collapse-actions em {
  font-size: 0;
}

.admin-collapsible-panel[open] .collapse-actions em::before {
  font-size: 12px;
}

.admin-collapsible-body {
  padding: 0 30px 30px;
}

.notice-editor-grid {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(180px, .55fr) minmax(280px, 1fr) minmax(160px, .55fr);
  gap: 12px;
}

.notice-body-input {
  min-height: 130px;
}

.switch-line {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid rgba(159,181,202,.18);
  border-radius: 16px;
  background: rgba(5, 10, 15, .52);
  cursor: pointer;
}

.switch-line input {
  width: 20px;
  height: 20px;
  accent-color: #36e28a;
}

.switch-line b {
  color: var(--ink);
  font-size: 14px;
}

.admin-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.admin-zone-card {
  position: relative;
  overflow: hidden;
  min-height: 0;
}

.admin-zone-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, rgba(54,226,138,.75), rgba(105,185,255,.38), transparent);
}

.admin-zone-card .panel-head p,
.admin-records-panel .panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.admin-zone-card-config,
.admin-zone-card-workers,
.admin-records-panel {
  border-color: rgba(54,226,138,.18);
}

.admin-zone-card-cdk {
  border-color: rgba(105,185,255,.20);
}

.admin-zone-card-lookup,
.admin-zone-card-complete {
  border-color: rgba(240,191,90,.18);
}

.admin-zone-card-cdk textarea {
  min-height: 210px;
}

.cdk-generator-row {
  display: grid;
  grid-template-columns: minmax(160px, .38fr) minmax(220px, .62fr);
  gap: 12px;
  align-items: end;
}

.cdk-generator-row .button {
  min-height: 52px;
}

.cdk-generator-actions {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, .72fr);
  gap: 10px;
}

.cdk-generator-actions .button {
  width: 100%;
}

.admin-cdk-copy {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid rgba(54,226,138,.22);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(54,226,138,.08);
  cursor: pointer;
}

.admin-cdk-copy:hover {
  border-color: rgba(54,226,138,.46);
  background: rgba(54,226,138,.12);
}

@media (max-width: 760px) {
  .cdk-generator-row,
  .cdk-generator-actions {
    grid-template-columns: 1fr;
  }
}

.admin-zone-card-workers .record-list {
  max-height: 460px;
  overflow: auto;
  padding-right: 4px;
}

.admin-search-box {
  position: sticky;
  top: 88px;
  z-index: 2;
  padding: 4px;
  border-radius: 14px;
  background: rgba(10, 16, 22, .72);
  backdrop-filter: blur(14px);
}

.admin-records-panel {
  margin-top: 16px;
}

.admin-records-panel .record-list {
  max-height: 680px;
  overflow: auto;
  padding-right: 4px;
}

.admin-worker-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(159,181,202,.18);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(11,17,24,.86), rgba(8,13,18,.94)),
    radial-gradient(circle at 100% 0%, rgba(54,226,138,.06), transparent 34%);
}

.worker-card-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.worker-id-block {
  min-width: 0;
}

.worker-id-block code {
  display: inline-flex;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgba(54,226,138,.20);
  border-radius: 999px;
  background: rgba(54,226,138,.07);
  color: var(--ink);
  font: 900 14px/1 ui-monospace, Consolas, monospace;
  overflow-wrap: anywhere;
}

.worker-id-block small {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  margin-top: 8px;
  color: var(--faint);
}

.worker-id-block .pill {
  min-height: 24px;
  padding: 0 8px;
  font-size: 10px;
}

.worker-mini-stats {
  display: grid;
  grid-template-columns: repeat(2, 70px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.03);
}

.worker-mini-stats span {
  display: grid;
  gap: 3px;
  padding: 10px;
  text-align: center;
}

.worker-mini-stats span + span {
  border-left: 1px solid var(--line);
}

.worker-mini-stats b {
  font: 900 22px/1 ui-monospace, Consolas, monospace;
  color: var(--ink);
}

.worker-mini-stats small {
  color: var(--muted);
  font-size: 11px;
}

.worker-note-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.worker-note-line small {
  color: var(--faint);
}

.worker-card-actions {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(3, auto);
  gap: 8px;
  align-items: center;
}

.worker-note-input {
  width: 100%;
  min-width: 0;
}

.worker-action-button {
  min-height: 40px;
  padding-inline: 12px;
  border-radius: 12px;
  white-space: nowrap;
}

.admin-advanced-patch {
  padding: 0;
}

.admin-advanced-patch summary {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 20px;
  cursor: pointer;
  list-style: none;
}

.admin-advanced-patch summary::-webkit-details-marker {
  display: none;
}

.admin-advanced-patch summary span {
  display: grid;
  gap: 5px;
}

.admin-advanced-patch summary b {
  color: var(--ink);
  font-size: 22px;
  line-height: 1.15;
}

.admin-advanced-patch summary small {
  color: var(--muted);
}

.admin-advanced-patch summary em {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(240,191,90,.28);
  border-radius: 999px;
  color: var(--amber);
  background: rgba(240,191,90,.08);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.admin-advanced-patch[open] summary em {
  color: var(--green);
  border-color: rgba(54,226,138,.28);
  background: rgba(54,226,138,.08);
}

.admin-advanced-patch[open] summary em::before {
  content: "已";
}

.advanced-patch-body {
  display: grid;
  gap: 12px;
  padding: 0 20px 20px;
}

.select-input {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 50% / 7px 7px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 50% / 7px 7px no-repeat,
    #0b1118;
}

.paylink-shell .customer-grid {
  grid-template-columns: minmax(0, .95fr) minmax(340px, .62fr);
}

.paylink-hero {
  border-color: rgba(105,185,255,.20);
}

.paylink-card,
.paylink-guide {
  border-color: rgba(105,185,255,.16);
}

.paylink-card .panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.paylink-url-input {
  min-height: 170px;
}

.paylink-steps {
  grid-template-columns: 1fr;
}

.paylink-steps span {
  min-height: 58px;
}

body[data-page="paylink"] {
  background:
    radial-gradient(circle at 14% 0%, rgba(105,185,255,.12), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(54,226,138,.10), transparent 30%),
    linear-gradient(180deg, #07110f 0%, #090d12 42%, #070a0e 100%);
}

@media (max-width: 900px) {
  .paylink-shell .customer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1180px) {
  .admin-dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }

  .admin-column-main {
    grid-column: span 2;
    order: -1;
  }

  .admin-zone-map {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .admin-shell {
    width: min(100% - 24px, 1440px);
  }

  .admin-hero {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .admin-status-strip,
  .admin-status-strip span {
    width: 100%;
  }

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

  .admin-zone-map,
  .admin-dashboard-grid,
  .admin-column-main {
    grid-template-columns: 1fr;
  }

  .admin-column-main {
    grid-column: auto;
  }

  .admin-zone-map a {
    min-height: 50px;
  }

  .admin-search-box {
    position: static;
  }

  .worker-card-top,
  .worker-card-actions {
    grid-template-columns: 1fr;
  }

  .worker-mini-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .scan-topbar {
    position: sticky;
    flex-direction: row;
    align-items: center;
    padding: 12px max(14px, env(safe-area-inset-left));
  }

  .scan-topbar .brand b {
    font-size: 14px;
  }

  .scan-shell {
    width: min(100% - 20px, 980px);
    padding: 18px 0 calc(34px + env(safe-area-inset-bottom));
  }

  .scan-worker-grid,
  .scan-desk-top,
  .worker-metrics,
  .scan-payment-card {
    grid-template-columns: 1fr;
  }

  .scan-entry-card,
  .scan-workbench {
    padding: 18px;
    border-radius: 18px;
  }

  .scan-entry-card .panel-head,
  .scan-workbench .panel-head {
    gap: 12px;
    margin-bottom: 16px;
  }

  .scan-workbench .panel-head h1,
  .scan-entry-card .panel-head h1 {
    font-size: clamp(34px, 12vw, 58px);
  }

  .scan-start-button {
    min-height: 64px;
    border-radius: 18px;
    font-size: clamp(20px, 6vw, 28px);
  }

  .scan-stop-button {
    min-height: 56px;
  }

  .scan-primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .scan-primary-actions .button,
  .pay-actions .button {
    min-height: 56px;
  }

  .pay-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  body[data-page="scan"] .qr-frame.large {
    min-height: min(78vw, 360px);
  }
}

@media (max-width: 430px) {
  .scan-top-actions {
    gap: 5px;
  }

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

  .scan-primary-actions { grid-template-columns: 1fr; }
  .scan-desk-top { grid-template-columns: 1fr; }

  .scan-workbench .panel-head,
  .scan-entry-card .panel-head {
    flex-direction: column;
  }

  .scan-workbench .panel-head .pill,
  .scan-entry-card .panel-head .pill {
    align-self: flex-start;
  }
}
