:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f1f5f3;
  --ink: #17201d;
  --muted: #66716d;
  --line: #dce4df;
  --line-strong: #b7c9c1;
  --brand: #1f8a70;
  --brand-2: #3158a8;
  --focus: rgba(31, 138, 112, 0.18);
  --warn: #b7791f;
  --danger: #c2413b;
  --ok: #218a4f;
  --shadow: 0 18px 50px rgba(22, 35, 31, 0.1);
  --shadow-strong: 0 22px 60px rgba(22, 35, 31, 0.14);
}

.dark {
  color-scheme: dark;
  --bg: #101413;
  --surface: #171d1b;
  --surface-2: #202824;
  --ink: #eef4f1;
  --muted: #a7b4ae;
  --line: #303b37;
  --line-strong: #52615b;
  --brand: #49b99e;
  --brand-2: #8ea8ff;
  --focus: rgba(73, 185, 158, 0.18);
  --warn: #e4b45f;
  --danger: #ff8d86;
  --ok: #63d294;
  --shadow: none;
  --shadow-strong: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 5%, var(--bg)) 0, var(--bg) 240px);
  color: var(--ink);
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

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

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 44px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--brand);
  color: white;
  font-weight: 800;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.nav a,
.sidebar a {
  border-radius: 8px;
  color: var(--muted);
  font-weight: 600;
}

.nav a {
  padding: 9px 12px;
}

.nav a.active,
.sidebar a.active {
  background: var(--surface-2);
  color: var(--ink);
}

.main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  min-width: 0;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(28px, 4vw, 48px);
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 18px;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

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

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

.grid > * {
  min-width: 0;
}

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

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

.panel,
.card,
.auth-box {
  min-width: 0;
  max-width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: 20px;
}

.card {
  padding: 18px;
}

.service-card {
  display: grid;
  gap: 14px;
  min-height: 210px;
}

.service-points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-points li {
  color: var(--muted);
}

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

.step {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--brand) 6%);
  box-shadow: 0 10px 24px rgba(22, 35, 31, 0.04);
}

.step .num {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--brand);
  font-weight: 800;
}

.step.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus), 0 14px 28px rgba(22, 35, 31, 0.08);
}

.step.done .num {
  background: var(--brand);
  color: white;
}

.recharge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.recharge-card {
  position: relative;
  gap: 18px;
  padding: 26px;
  border-width: 2px;
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line-strong));
  box-shadow: var(--shadow-strong);
}

.recharge-card::before {
  content: "";
  position: absolute;
  inset: -2px auto -2px -2px;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: var(--brand);
}

.recharge-steps {
  margin: 0;
}

.recharge-steps .step {
  min-height: 96px;
}

.input-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
}

.code-input {
  min-height: 48px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
}

.session-url-row {
  display: grid;
  grid-template-columns: auto auto auto minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 62%, var(--surface));
}

.session-textarea {
  min-height: 220px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.6;
}

.recharge-aside {
  position: sticky;
  top: 84px;
  display: grid;
  gap: 14px;
}

.aside-block {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.aside-block h3 {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

.success-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--ok) 12%, var(--surface));
}

.success-head p {
  margin: 6px 0 0;
}

.success-head.failed {
  border: 2px solid color-mix(in srgb, var(--danger) 60%, var(--line-strong));
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
}

.success-head.failed h2,
.success-head.failed p {
  color: var(--danger);
}

.success-head.failed .success-mark {
  background: var(--danger);
}

.success-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--ok);
  color: white;
  font-weight: 900;
}

.recharge-progress-spinner {
  display: block;
  width: 20px;
  height: 20px;
  box-sizing: border-box;
  border: 3px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: recharge-progress-spin .85s linear infinite;
  will-change: transform;
}

@keyframes recharge-progress-spin {
  to { transform: rotate(360deg); }
}

.history-result-progress {
  display: flex;
  align-items: center;
  gap: 7px;
}

.history-result-progress .recharge-progress-spinner {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  border-width: 2px;
  border-color: var(--brand);
  border-right-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  /* This small activity indicator conveys an ongoing recharge. Keep it moving
     gently even when decorative motion is reduced. */
  .recharge-progress-spinner { animation-duration: 2.4s; }
}

.summary-box {
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  padding: 6px 14px;
  background: var(--surface-2);
}

.announcement {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding: 12px 14px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--warn) 36%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--warn) 10%, var(--surface));
}

.announcement strong {
  color: var(--warn);
  white-space: nowrap;
}

.announcement span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn,
.ghost,
.danger,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.btn {
  background: var(--brand);
  color: white;
  box-shadow: 0 10px 22px rgba(31, 138, 112, 0.2);
}

.btn.secondary {
  background: var(--brand-2);
  box-shadow: 0 10px 22px rgba(49, 88, 168, 0.18);
}

.ghost {
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
}

.btn:hover,
.ghost:hover,
.danger:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: var(--brand);
  box-shadow: 0 12px 26px rgba(22, 35, 31, 0.12);
}

.danger {
  background: color-mix(in srgb, var(--danger) 14%, var(--surface));
  color: var(--danger);
}

.icon-btn {
  width: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

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

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 11px 12px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus);
  background: color-mix(in srgb, var(--surface) 94%, var(--brand) 6%);
}

textarea {
  min-height: 140px;
  resize: vertical;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.checkbox input {
  width: 18px;
  height: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.status.available,
.status.completed,
.status.valid {
  background: color-mix(in srgb, var(--ok) 16%, var(--surface));
  color: var(--ok);
}

.status.pending,
.status.processing,
.status.waiting_confirm {
  background: color-mix(in srgb, var(--warn) 16%, var(--surface));
  color: var(--warn);
}

.status.failed,
.status.used,
.status.disabled,
.status.not_found {
  background: color-mix(in srgb, var(--danger) 14%, var(--surface));
  color: var(--danger);
}

.notice {
  padding: 12px 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--muted);
}

.notice.ok {
  border-color: color-mix(in srgb, var(--ok) 38%, var(--line-strong));
  background: color-mix(in srgb, var(--ok) 12%, var(--surface));
  color: var(--ok);
}

.notice.err {
  border-color: color-mix(in srgb, var(--danger) 38%, var(--line-strong));
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: var(--danger);
}

.buyer-shell .buyer-submit-notice {
  border-left: 4px solid var(--brand);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.6;
}

#confirmForm[aria-busy="true"] .buyer-submit-notice::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  vertical-align: -2px;
  animation: buyer-submit-spin 0.8s linear infinite;
}

@keyframes buyer-submit-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  #confirmForm[aria-busy="true"] .buyer-submit-notice::before { animation: none; }
}

.table-wrap {
  min-width: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

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

.admin-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  width: min(1320px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0 48px;
}

.sidebar {
  position: sticky;
  top: 82px;
  align-self: start;
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.sidebar a {
  padding: 10px 12px;
}

.admin-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}

.admin-content.is-route-loading {
  pointer-events: none;
  opacity: 0.84;
  transition: opacity 0.12s ease;
}

.admin-content.is-route-loading::after {
  content: '';
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 0;
  width: 34vw;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--brand), var(--accent), transparent);
  animation: admin-route-progress 0.85s ease-in-out infinite;
}

@keyframes admin-route-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(400%); }
}

@media (prefers-reduced-motion: reduce) {
  .admin-content.is-route-loading::after {
    animation: none;
    width: 100vw;
    opacity: 0.65;
  }
}

.admin-content.is-refreshing {
  pointer-events: none;
  opacity: 0.62;
  transition: opacity 0.12s ease;
}

.admin-content > * {
  min-width: 0;
}

.admin-loading-panel {
  min-height: 220px;
  display: grid;
  place-items: center;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  min-width: 0;
}

.filters > * {
  min-width: 0;
}

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

.list {
  display: grid;
  gap: 8px;
}

.list-item {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.list-item.active {
  border-color: var(--brand);
}

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

.task-metric {
  min-width: 0;
  padding: 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: var(--shadow);
}

.task-metric strong {
  font-size: 28px;
}

.task-metric.active {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
}

.task-filter-panel .filters {
  grid-template-columns: minmax(180px, 1fr) minmax(160px, 250px) minmax(130px, 180px) minmax(130px, 180px);
}

.task-workbench {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.task-table-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.task-table-wrap {
  max-height: min(650px, calc(100vh - 290px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  scrollbar-gutter: stable;
}

.task-table {
  min-width: 1320px;
  table-layout: fixed;
}

.task-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-2);
}

.task-table th,
.task-table td {
  padding: 10px 9px;
  font-size: 12px;
  vertical-align: middle;
}

.task-table th:nth-child(1) { width: 46px; }
.task-table th:nth-child(2) { width: 154px; }
.task-table th:nth-child(3) { width: 110px; }
.task-table th:nth-child(4) { width: 80px; }
.task-table th:nth-child(5) { width: 96px; }
.task-table th:nth-child(6) { width: 180px; }
.task-table th:nth-child(7) { width: 94px; }
.task-table th:nth-child(8) { width: 90px; }
.task-table th:nth-child(9) { width: 120px; }
.task-table th:nth-child(10) { width: 140px; }
.task-table th:nth-child(11) { width: 80px; }
.task-table th:nth-child(12) { width: 130px; }

.task-table-row {
  transition: background 100ms ease;
}

.task-table-row:hover,
.task-table-row.active {
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}

.truncate-cell {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-code {
  font-size: 11px;
  word-break: normal;
}

.order-type,
.plan-pill,
.mini-state {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 11%, var(--surface));
  color: var(--brand);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.order-type.direct {
  background: color-mix(in srgb, var(--brand-2) 12%, var(--surface));
  color: var(--brand-2);
}

.mini-state.completed {
  background: color-mix(in srgb, var(--ok) 12%, var(--surface));
  color: var(--ok);
}

.mini-state.failed {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  color: var(--danger);
}

.mini-state.processing {
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  color: var(--warn);
}

.table-link {
  padding: 4px 2px;
  background: transparent;
  color: var(--brand-2);
  font-weight: 850;
}

.table-link:hover {
  text-decoration: underline;
}

.empty-table-cell {
  padding: 36px !important;
  color: var(--muted);
  text-align: center;
}

.task-list-panel {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 104px);
  min-width: 0;
}

.task-list-head,
.task-pager,
.task-detail-head,
.task-save-row,
.session-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.task-list {
  max-height: min(680px, calc(100vh - 220px));
  overflow: auto;
  padding-right: 4px;
}

.task-list-item {
  gap: 10px;
  padding: 14px;
}

.task-list-top,
.task-list-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.task-list-main {
  overflow: hidden;
  color: var(--ink);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-list-meta {
  color: var(--muted);
  font-size: 13px;
}

.task-detail {
  position: sticky;
  top: 82px;
  align-self: start;
}

.task-detail-head {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.automation-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}

.automation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.automation-head > div {
  display: grid;
  gap: 3px;
}

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

.automation-grid > div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.automation-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.automation-grid strong {
  overflow-wrap: anywhere;
}

.integration-panel {
  margin-bottom: 18px;
}

.form-subsection {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}

.automation-head.compact h3 {
  margin: 0;
}

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

.task-info-grid > div {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.task-info-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.task-info-grid strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.task-info-grid small {
  color: var(--muted);
  line-height: 1.45;
}

.funding-price-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 10px;
}

.task-action-grid,
.task-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.task-status-grid {
  grid-template-columns: minmax(150px, .8fr) minmax(150px, .7fr) minmax(220px, 1fr);
}

#copySessionDirect {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--brand);
  font-weight: 800;
}

.session-box textarea {
  min-height: 220px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
}

.task-pager .ghost,
.task-save-row .btn,
.task-save-row .ghost,
.task-save-row .danger {
  flex: 1 1 auto;
}

.kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.kv:last-child {
  border-bottom: 0;
}

.metric {
  display: grid;
  gap: 10px;
}

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

.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 60px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.auth-page {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 70px);
  padding: 24px;
}

.auth-box {
  width: min(420px, 100%);
  padding: 24px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.loading {
  display: grid;
  place-items: center;
  min-height: 220px;
  color: var(--muted);
}

.code {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  word-break: break-all;
}

.url-copy-input {
  width: min(360px, 100%);
}

@media (max-width: 900px) {
  .topbar,
  .page-head,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .grid.two,
  .grid.three,
  .steps,
  .admin-layout,
  .split,
  .task-summary-grid,
  .task-workbench,
  .recharge-layout {
    grid-template-columns: 1fr;
  }

  .task-list-panel,
  .task-detail {
    position: static;
    max-height: none;
  }

  .task-list {
    max-height: none;
  }

  .task-filter-panel .filters,
  .task-action-grid,
  .task-status-grid {
    grid-template-columns: 1fr;
  }

  .recharge-aside {
    position: static;
  }

  .session-url-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .url-copy-input {
    width: 100%;
  }

  .sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .toolbar {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .main,
  .admin-layout {
    width: min(100% - 20px, 1180px);
  }

  .nav {
    width: 100%;
  }

  .nav a {
    flex: 1 1 auto;
    text-align: center;
  }

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

  .input-action {
    grid-template-columns: 1fr;
  }

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

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

  .automation-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-save-row {
    align-items: stretch;
    flex-direction: column;
  }

  .recharge-card {
    padding: 18px;
  }
}

.buyer-shell {
  --bg: #030914;
  --surface: rgba(10, 17, 31, 0.88);
  --surface-2: rgba(11, 35, 45, 0.76);
  --ink: #f3fbff;
  --muted: #8ea0ad;
  --line: rgba(0, 229, 255, 0.18);
  --line-strong: rgba(0, 229, 255, 0.54);
  --brand: #00e5ff;
  --brand-2: #8a5cff;
  --focus: rgba(0, 229, 255, 0.22);
  --ok: #1ee6a3;
  --warn: #ffd166;
  --danger: #ff6b8a;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --shadow-strong: 0 26px 90px rgba(0, 0, 0, 0.55);
  min-height: 100vh;
  background:
    radial-gradient(circle at 24% 18%, rgba(0, 229, 255, 0.14), transparent 26%),
    radial-gradient(circle at 78% 12%, rgba(138, 92, 255, 0.16), transparent 26%),
    linear-gradient(90deg, rgba(0, 229, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(0, 229, 255, 0.07) 1px, transparent 1px),
    linear-gradient(115deg, #061521 0%, #030816 44%, #0b0718 100%);
  background-size:
    auto,
    auto,
    64px 64px,
    64px 64px,
    auto;
  color: var(--ink);
}

.buyer-main {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(52px, 11vh, 128px) 0 64px;
}

.buyer-hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.buyer-hero-tools {
  position: absolute;
  top: 4px;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: #dbe7ee;
  font-size: 13px;
  font-weight: 800;
}

.theme-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #dbe7ee;
  font-weight: 800;
}

.theme-dot:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 24px rgba(0, 229, 255, 0.24);
}

.buyer-hero h1 {
  margin: 0;
  max-width: 100%;
  background: linear-gradient(90deg, #00f0ff 0%, #4da0ff 55%, #a85cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 900;
  line-height: 1.02;
  text-align: center;
  text-shadow: 0 0 38px rgba(0, 229, 255, 0.2);
}

.buyer-hero p {
  margin: 0;
  color: #c1ced8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
}

.buyer-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: min(420px, 100%);
  margin-top: 12px;
  padding: 7px;
  border: 1.5px solid var(--line-strong);
  border-radius: 16px;
  background: rgba(5, 12, 25, 0.84);
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.08);
}

.buyer-tabs a {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #d8e7ef;
  font-weight: 800;
}

.buyer-tabs a.active {
  border-color: rgba(138, 92, 255, 0.86);
  background: rgba(0, 229, 255, 0.12);
  color: var(--brand);
  box-shadow: inset 0 0 20px rgba(0, 229, 255, 0.09), 0 0 24px rgba(138, 92, 255, 0.16);
}

.queue-pill {
  display: grid;
  grid-template-columns: auto auto auto auto 1fr;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  min-height: 48px;
  margin-top: 2px;
  padding: 0 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(5, 12, 25, 0.82);
  color: #dceaf0;
  text-align: left;
}

.queue-pill strong {
  color: var(--brand);
  font-size: 24px;
  line-height: 1;
  text-shadow: 0 0 18px rgba(0, 229, 255, 0.45);
}

.queue-pill em {
  justify-self: end;
  color: #7f8e9b;
  font-size: 12px;
  font-style: normal;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 16px rgba(30, 230, 163, 0.75);
}

.cyber-progress {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(80px, 170px) minmax(86px, 1fr) minmax(80px, 170px) minmax(86px, 1fr);
  align-items: center;
  gap: 20px;
  margin: 28px 0 28px;
}

.cyber-progress i {
  height: 5px;
  border-radius: 999px;
  background: rgba(119, 143, 156, 0.22);
}

.cyber-progress-item {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #7f8e9b;
  font-size: 13px;
}

.cyber-progress-item span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgba(0, 229, 255, 0.4);
  border-radius: 999px;
  background: rgba(9, 17, 31, 0.92);
  color: #b5c5cf;
  font-weight: 900;
}

.cyber-progress-item strong {
  font-size: 13px;
  font-weight: 800;
}

.cyber-progress-item.active {
  color: var(--brand);
}

.cyber-progress-item.active span,
.cyber-progress-item.done span {
  border-color: var(--brand);
  color: var(--brand);
  box-shadow: 0 0 26px rgba(0, 229, 255, 0.25);
}

.buyer-shell .recharge-layout {
  display: block;
}

.buyer-shell .recharge-card,
.buyer-shell .panel,
.buyer-shell .card,
.buyer-shell .list-item {
  border-color: var(--line-strong);
  background: linear-gradient(135deg, rgba(9, 16, 29, 0.94), rgba(13, 17, 34, 0.9));
  box-shadow: var(--shadow-strong);
}

.buyer-shell .recharge-card {
  width: 100%;
  padding: clamp(22px, 3.6vw, 38px);
  border-width: 1.5px;
  border-radius: 14px;
}

.buyer-shell .recharge-card::before {
  display: none;
}

.buyer-shell .recharge-card h2 {
  color: #ffffff;
  font-size: clamp(22px, 3vw, 28px);
}

.buyer-shell .recharge-card p,
.buyer-shell .buyer-section-head p {
  color: #96a7b3;
}

.buyer-shell .field label,
.buyer-shell .recharge-card h3 {
  color: #f3fbff;
}

.buyer-shell input,
.buyer-shell select,
.buyer-shell textarea {
  min-height: 58px;
  border-color: rgba(0, 229, 255, 0.62);
  background: rgba(8, 35, 45, 0.58);
  color: #f3fbff;
}

.buyer-shell textarea {
  min-height: 220px;
}

.buyer-shell input::placeholder,
.buyer-shell textarea::placeholder {
  color: #8ea0ad;
}

.buyer-shell input:focus,
.buyer-shell select:focus,
.buyer-shell textarea:focus {
  border-color: var(--brand);
  background: rgba(8, 35, 45, 0.72);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.13), 0 0 30px rgba(0, 229, 255, 0.12);
}

.buyer-shell .btn,
.buyer-shell .ghost {
  min-height: 56px;
  border: 1.5px solid rgba(0, 229, 255, 0.72);
  border-radius: 10px;
  background: rgba(9, 55, 66, 0.72);
  color: var(--brand);
  box-shadow: none;
}

.buyer-shell .btn:hover,
.buyer-shell .ghost:hover {
  background: rgba(0, 229, 255, 0.16);
  box-shadow: 0 0 32px rgba(0, 229, 255, 0.18);
}

.buyer-shell .btn.secondary {
  border-color: rgba(138, 92, 255, 0.86);
  background: rgba(0, 229, 255, 0.14);
  color: var(--brand);
}

.buyer-shell .notice {
  border-color: rgba(0, 229, 255, 0.5);
  background: rgba(5, 24, 36, 0.78);
}

.buyer-shell .notice.ok {
  color: #35f2b2;
  border-color: rgba(30, 230, 163, 0.45);
  background: rgba(30, 230, 163, 0.08);
}

.buyer-shell .notice.err {
  color: #ff8ea3;
  border-color: rgba(255, 107, 138, 0.5);
  background: rgba(255, 107, 138, 0.08);
}

.buyer-shell .session-url-row {
  border-color: rgba(0, 229, 255, 0.5);
  background: rgba(5, 24, 36, 0.62);
}

.buyer-shell .summary-box {
  border-color: rgba(0, 229, 255, 0.48);
  background: rgba(5, 24, 36, 0.62);
}

.buyer-shell .status {
  background: rgba(0, 229, 255, 0.12);
  color: var(--brand);
}

.buyer-section-head {
  display: grid;
  gap: 8px;
  margin: 30px 0 18px;
  text-align: center;
}

.buyer-section-head h2 {
  color: #ffffff;
  font-size: 28px;
}

@media (max-width: 760px) {
  .buyer-main {
    width: min(100% - 24px, 960px);
    padding-top: 42px;
  }

  .buyer-hero-tools {
    position: static;
    justify-self: end;
    margin-bottom: 8px;
  }

  .buyer-hero h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .buyer-tabs,
  .queue-pill {
    width: 100%;
  }

  .queue-pill {
    grid-template-columns: auto auto auto auto;
  }

  .queue-pill em {
    grid-column: 1 / -1;
    justify-self: start;
    padding-bottom: 10px;
  }

  .cyber-progress {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .cyber-progress i {
    display: none;
  }

  .session-url-row {
    grid-template-columns: 1fr;
  }
}

/* Admin workspace refresh: compact, persistent and responsive like the reference card console. */
.admin-layout {
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 24px;
  width: min(1440px, calc(100% - 32px));
  padding-top: 24px;
}

.admin-layout .sidebar {
  top: 78px;
  gap: 4px;
  padding: 12px;
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(22, 35, 31, 0.06);
}

.admin-layout .sidebar a,
.admin-layout .sidebar .ghost {
  position: relative;
  padding: 10px 12px;
  border-radius: 9px;
  transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.admin-layout .sidebar a:hover {
  color: var(--ink);
  background: var(--surface-2);
  transform: translateX(2px);
}

.admin-layout .sidebar a.active {
  color: var(--brand);
  background: color-mix(in srgb, var(--brand) 11%, var(--surface));
}

.admin-layout .sidebar a.active::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 18px;
  border-radius: 999px;
  background: var(--brand);
  content: '';
  transform: translateY(-50%);
}

.admin-content {
  gap: 20px;
  animation: admin-content-in .18s ease-out;
}

.admin-content .page-head {
  align-items: center;
  margin-bottom: 2px;
}

.admin-content .page-head h1 {
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -.025em;
}

.admin-content .page-head p:not(.eyebrow) {
  max-width: 780px;
  margin: 6px 0 0;
}

.admin-content .panel,
.admin-content .card,
.admin-content .task-metric {
  border-width: 1px;
  border-radius: 14px;
  box-shadow: 0 10px 34px rgba(22, 35, 31, 0.055);
}

.admin-content button {
  transition: transform .14s ease, background-color .14s ease, border-color .14s ease, opacity .14s ease;
}

.admin-content button:not(:disabled):active {
  transform: scale(.98);
}

.admin-content tbody tr {
  transition: background-color .14s ease;
}

.admin-content tbody tr:hover {
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
}

.admin-loading-panel {
  overflow: hidden;
  border-color: var(--line);
}

.admin-loading-panel .loading::before {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 9px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--brand);
  border-radius: 999px;
  content: '';
  vertical-align: -3px;
  animation: admin-spin .75s linear infinite;
}

.card-pool-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.pool-stat {
  display: grid;
  gap: 7px;
  min-height: 124px;
  padding: 17px;
}

.pool-stat span,
.pool-stat small {
  color: var(--muted);
  font-size: 12px;
}

.pool-stat strong {
  white-space: nowrap;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.025em;
}

.pool-stat.accent strong {
  color: var(--ok);
}

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

.pool-health {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.pool-health.ok {
  border-color: color-mix(in srgb, var(--ok) 34%, var(--line));
  background: color-mix(in srgb, var(--ok) 6%, var(--surface));
}

.pool-health.warn {
  border-color: color-mix(in srgb, var(--warn) 38%, var(--line));
  background: color-mix(in srgb, var(--warn) 7%, var(--surface));
}

.pool-health-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--warn);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--warn) 14%, transparent);
}

.pool-health.ok .pool-health-dot {
  background: var(--ok);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--ok) 14%, transparent);
}

.pool-health > div {
  display: grid;
  gap: 2px;
}

.pool-health small,
.pool-sync-time {
  color: var(--muted);
  font-size: 12px;
}

.pool-sync-time {
  margin-left: auto;
}

.card-pool-panel {
  display: grid;
  gap: 18px;
}

.card-pool-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.card-pool-toolbar .eyebrow {
  margin-bottom: 4px;
}

.card-pool-filters {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(140px, 180px);
  gap: 10px;
}

.bank-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.bank-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 276px;
  flex-direction: column;
  gap: 13px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0, color-mix(in srgb, var(--brand) 16%, transparent), transparent 42%),
    linear-gradient(145deg, color-mix(in srgb, var(--brand) 5%, var(--surface)), var(--surface));
  box-shadow: 0 12px 30px rgba(22, 35, 31, .065);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.bank-card:hover {
  border-color: color-mix(in srgb, var(--brand) 48%, var(--line));
  box-shadow: 0 18px 42px rgba(22, 35, 31, .105);
  transform: translateY(-2px);
}

.bank-card[hidden] {
  display: none !important;
}

.bank-card-head,
.bank-card-balance,
.bank-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bank-card-head > div {
  display: grid;
  gap: 2px;
}

.bank-network {
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
  letter-spacing: .03em;
}

.bank-card-head small,
.bank-card-meta,
.bank-usage small,
.bank-card-balance span {
  color: var(--muted);
  font-size: 12px;
}

.bank-chip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 38px;
  height: 29px;
  overflow: hidden;
  border: 1px solid #b89139;
  border-radius: 7px;
  background: linear-gradient(135deg, #f4d889, #c59b3b);
}

.bank-chip i {
  border-right: 1px solid rgba(103, 73, 19, .35);
  border-bottom: 1px solid rgba(103, 73, 19, .35);
}

.bank-number {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: clamp(15px, 1.8vw, 18px);
  letter-spacing: .055em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.bank-card-balance strong {
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.bank-usage {
  display: grid;
  gap: 6px;
}

.bank-usage > div {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
}

.bank-usage > div span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.bank-detail-toggle {
  width: 100%;
  margin-top: auto;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 72%, transparent);
  color: var(--ink);
  font-size: 12px;
}

.bank-card-detail {
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.bank-card-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.bank-card-detail dl div {
  min-width: 0;
}

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

.bank-card-detail dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  font-weight: 700;
}

.card-pool-result {
  margin: -4px 0 0;
  font-size: 12px;
}

.empty-state {
  display: grid;
  grid-column: 1 / -1;
  place-items: center;
  min-height: 220px;
  gap: 7px;
  color: var(--muted);
  text-align: center;
}

.skeleton-card,
.skeleton-line {
  overflow: hidden;
  background: linear-gradient(100deg, var(--surface-2) 30%, color-mix(in srgb, var(--surface-2) 50%, var(--surface)) 50%, var(--surface-2) 70%);
  background-size: 260% 100%;
  animation: skeleton-shimmer 1.25s ease infinite;
}

.skeleton-card span,
.skeleton-card strong,
.skeleton-card small {
  display: block;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line) 70%, transparent);
}

.skeleton-card strong {
  width: 56%;
  height: 26px;
}

.skeleton-card small {
  width: 72%;
}

.skeleton-line {
  width: 52%;
  height: 34px;
  border-radius: 9px;
}

@keyframes admin-spin {
  to { transform: rotate(360deg); }
}

@keyframes admin-content-in {
  from { opacity: .55; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes skeleton-shimmer {
  to { background-position-x: -160%; }
}

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

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

@media (max-width: 760px) {
  .admin-layout {
    gap: 14px;
  }

  .admin-content .page-head,
  .card-pool-toolbar,
  .pool-health {
    align-items: stretch;
    flex-direction: column;
  }

  .pool-sync-time {
    margin-left: 21px;
  }

  .card-pool-stat-grid,
  .bank-card-grid,
  .card-pool-filters {
    grid-template-columns: 1fr;
  }

  .page-actions > button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-content,
  .skeleton-card,
  .skeleton-line,
  .admin-loading-panel .loading::before {
    animation: none;
  }
}

/* 20260625a buyer light grid refresh */
.buyer-shell {
  --bg: #f8fcff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-2: rgba(245, 252, 255, 0.86);
  --ink: #102033;
  --muted: #6c7c91;
  --line: rgba(28, 174, 190, 0.18);
  --line-strong: rgba(24, 190, 198, 0.58);
  --brand: #12bcc2;
  --brand-2: #5e9df6;
  --focus: rgba(18, 188, 194, 0.16);
  --ok: #25c99a;
  --warn: #d99b1e;
  --danger: #e85b77;
  --shadow: 0 14px 40px rgba(79, 128, 145, 0.12);
  --shadow-strong: 0 18px 55px rgba(76, 128, 150, 0.16);
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 28%, rgba(72, 207, 210, 0.22), transparent 30%),
    linear-gradient(90deg, rgba(32, 126, 145, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(32, 126, 145, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, #ffffff 0%, #eefbfc 52%, #f9fdff 100%);
  background-size: auto, 64px 64px, 64px 64px, auto;
  color: var(--ink);
}

.buyer-main {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(80px, 16vh, 170px) 0 72px;
}

.buyer-hero {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 13px;
  text-align: center;
}

.buyer-hero-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: #52657c;
  font-size: 13px;
  font-weight: 900;
}

.theme-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #52657c;
  font-weight: 900;
}

.theme-dot:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 24px rgba(24, 190, 198, 0.16);
}

.buyer-hero h1 {
  margin: 0;
  max-width: 100%;
  background: linear-gradient(90deg, #11c6ba 0%, #09b3d4 55%, #648ff0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: clamp(38px, 5.2vw, 58px);
  font-weight: 950;
  line-height: 1;
  text-align: center;
  text-shadow: 0 12px 32px rgba(42, 193, 204, 0.15);
}

.buyer-hero p {
  margin: 0;
  color: #40536a;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.buyer-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: min(520px, 100%);
  margin-top: 18px;
  padding: 7px;
  border: 1px solid rgba(89, 153, 170, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 28px rgba(64, 112, 133, 0.14);
  backdrop-filter: blur(16px);
}

.buyer-tabs a {
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #263b52;
  font-weight: 900;
}

.buyer-tabs a.active {
  border-color: rgba(18, 188, 194, 0.7);
  background: rgba(224, 250, 250, 0.84);
  color: #08aeb8;
  box-shadow: inset 0 0 18px rgba(18, 188, 194, 0.08);
}

.queue-pill {
  display: grid;
  grid-template-columns: auto auto auto auto 1fr;
  align-items: center;
  gap: 10px;
  width: min(520px, 100%);
  min-height: 48px;
  margin-top: 2px;
  padding: 0 14px;
  border: 1px solid rgba(24, 190, 198, 0.42);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.86);
  color: #344b62;
  text-align: left;
  box-shadow: 0 12px 34px rgba(69, 126, 145, 0.14);
  backdrop-filter: blur(16px);
}

.queue-pill strong {
  color: #06b8c6;
  font-size: 25px;
  line-height: 1;
  text-shadow: 0 8px 20px rgba(18, 188, 194, 0.18);
}

.queue-pill em {
  justify-self: end;
  color: #7f90a4;
  font-size: 12px;
  font-style: normal;
}

.pulse-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--ok);
  box-shadow: 0 0 0 6px rgba(37, 201, 154, 0.12), 0 0 16px rgba(37, 201, 154, 0.55);
}

.cyber-progress {
  display: grid;
  grid-template-columns: minmax(86px, 1fr) minmax(80px, 170px) minmax(86px, 1fr) minmax(80px, 170px) minmax(86px, 1fr);
  align-items: center;
  gap: 20px;
  margin: 30px 0 28px;
}

.cyber-progress i {
  height: 6px;
  border-radius: 999px;
  background: rgba(128, 149, 166, 0.18);
}

.cyber-progress-item {
  display: grid;
  justify-items: center;
  gap: 12px;
  color: #8595a8;
  font-size: 13px;
}

.cyber-progress-item span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(24, 190, 198, 0.5);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #8292a6;
  font-weight: 950;
  box-shadow: 0 10px 24px rgba(69, 126, 145, 0.12);
}

.cyber-progress-item strong {
  font-size: 13px;
  font-weight: 900;
}

.cyber-progress-item.active {
  color: #06aeb9;
}

.cyber-progress-item.active span,
.cyber-progress-item.done span {
  border-color: #10bdc4;
  color: #08aeb8;
  background: rgba(228, 252, 252, 0.92);
  box-shadow: 0 12px 30px rgba(24, 190, 198, 0.18);
}

.buyer-shell .recharge-layout {
  display: block;
}

.buyer-shell .recharge-card,
.buyer-shell .panel,
.buyer-shell .card,
.buyer-shell .list-item {
  border-color: rgba(24, 190, 198, 0.28);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(18px);
}

.buyer-shell .recharge-card {
  width: 100%;
  padding: clamp(28px, 4vw, 42px);
  border-width: 1px;
  border-radius: 16px;
}

.buyer-shell .recharge-card h2,
.buyer-section-head h2 {
  color: #102033;
  font-size: clamp(22px, 3vw, 28px);
}

.buyer-shell .recharge-card p,
.buyer-shell .buyer-section-head p {
  color: #697b90;
}

.buyer-shell .field label,
.buyer-shell .recharge-card h3 {
  color: #102033;
}

.buyer-shell input,
.buyer-shell select,
.buyer-shell textarea {
  min-height: 58px;
  border-color: rgba(142, 187, 201, 0.42);
  background: rgba(248, 251, 255, 0.86);
  color: #102033;
}

.buyer-shell textarea {
  min-height: 220px;
}

.buyer-shell input::placeholder,
.buyer-shell textarea::placeholder {
  color: #8090a4;
}

.buyer-shell input:focus,
.buyer-shell select:focus,
.buyer-shell textarea:focus {
  border-color: #14bdc5;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 3px rgba(18, 188, 194, 0.14), 0 12px 30px rgba(69, 126, 145, 0.1);
}

.buyer-shell .btn,
.buyer-shell .ghost {
  min-height: 56px;
  border: 1px solid rgba(18, 188, 194, 0.66);
  border-radius: 10px;
  background: rgba(229, 250, 250, 0.78);
  color: #08aeb8;
  box-shadow: none;
  font-weight: 900;
}

.buyer-shell .btn:hover,
.buyer-shell .ghost:hover {
  background: rgba(211, 248, 248, 0.9);
  box-shadow: 0 12px 30px rgba(18, 188, 194, 0.15);
}

.buyer-shell .notice {
  border-color: rgba(24, 190, 198, 0.3);
  background: rgba(255, 255, 255, 0.72);
}

.buyer-shell .notice.ok {
  color: #079d73;
  border-color: rgba(37, 201, 154, 0.38);
  background: rgba(37, 201, 154, 0.08);
}

.buyer-shell .notice.err {
  color: #c8425f;
  border-color: rgba(232, 91, 119, 0.35);
  background: rgba(232, 91, 119, 0.08);
}

.buyer-shell .session-url-row,
.buyer-shell .summary-box {
  border-color: rgba(24, 190, 198, 0.28);
  background: rgba(255, 255, 255, 0.7);
}

.buyer-shell .status {
  background: rgba(18, 188, 194, 0.12);
  color: #08aeb8;
}

@media (max-width: 760px) {
  .buyer-main {
    width: min(100% - 24px, 960px);
    padding-top: 44px;
  }

  .buyer-hero-tools {
    position: static;
    justify-self: end;
    margin-bottom: 8px;
  }

  .buyer-hero h1 {
    font-size: clamp(34px, 12vw, 48px);
  }

  .buyer-tabs,
  .queue-pill {
    width: 100%;
  }

  .queue-pill {
    grid-template-columns: auto auto auto auto;
  }

  .queue-pill em {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

/* 20260625b reference-style lookup pages */
.buyer-query-main {
  width: min(1180px, calc(100% - 32px));
  padding-top: clamp(72px, 10vh, 118px);
}

.buyer-query-main .buyer-hero h1 {
  font-size: clamp(42px, 5.4vw, 64px);
}

.buyer-lookup-card {
  width: min(960px, 100%);
  margin: 28px auto 0;
  padding: clamp(24px, 3.2vw, 40px);
  border-radius: 16px;
}

.buyer-lookup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.buyer-lookup-head h2,
.buyer-result-title h2 {
  margin: 0;
  color: #102033;
  font-size: 20px;
  font-weight: 900;
}

.buyer-lookup-form {
  display: grid;
  gap: 18px;
}

.buyer-lookup-form textarea {
  min-height: 96px;
  border-radius: 12px;
  resize: vertical;
}

.buyer-lookup-hint {
  margin: 0;
  color: #71849b;
  font-size: 13px;
  line-height: 1.75;
}

.buyer-lookup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 12px;
}

.buyer-result-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin: 18px auto 0;
  width: min(960px, 100%);
}

.buyer-result-stats .metric {
  min-height: 90px;
  padding: 16px;
  border-radius: 14px;
}

.buyer-result-stats .metric strong {
  color: #08aeb8;
  font-size: 28px;
}

.buyer-result-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: min(960px, 100%);
  margin: 16px auto 0;
}

.buyer-result-list,
.buyer-result-layout > .panel {
  border-radius: 16px;
}

.buyer-result-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.buyer-result-title span {
  color: #71849b;
  font-size: 13px;
  font-weight: 800;
}

.buyer-result-list .list {
  display: grid;
  gap: 10px;
}

.buyer-result-list .list-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  text-align: left;
}

.buyer-result-list .list-item.active {
  border-color: rgba(18, 188, 194, 0.68);
  background: rgba(229, 250, 250, 0.78);
  box-shadow: 0 12px 30px rgba(18, 188, 194, 0.13);
}

.buyer-result-layout .kv {
  border-color: rgba(24, 190, 198, 0.18);
}

@media (max-width: 900px) {
  .buyer-result-stats,
  .buyer-result-layout,
  .buyer-lookup-actions {
    grid-template-columns: 1fr;
  }

  .buyer-query-main {
    width: min(100% - 24px, 960px);
  }
}

/* 20260625c compact recharge page */
.buyer-recharge-compact {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  padding: clamp(18px, 3vh, 32px) 0 28px;
}

.buyer-recharge-compact .buyer-hero {
  gap: 8px;
}

.buyer-recharge-compact .buyer-hero-tools {
  top: 0;
  right: 0;
  gap: 12px;
}

.buyer-recharge-compact .buyer-hero h1 {
  font-size: clamp(34px, 4.4vw, 54px);
  line-height: .96;
}

.buyer-recharge-compact .buyer-hero p {
  font-size: 12px;
}

.buyer-recharge-compact .buyer-tabs {
  width: min(520px, 100%);
  margin-top: 8px;
  padding: 6px;
}

.buyer-recharge-compact .buyer-tabs a {
  min-height: 40px;
}

.buyer-recharge-compact .queue-pill {
  min-height: 40px;
  width: min(520px, 100%);
  padding: 0 12px;
}

.buyer-recharge-compact .queue-pill strong {
  font-size: 22px;
}

.buyer-recharge-compact .cyber-progress {
  grid-template-columns: minmax(96px, 1fr) minmax(48px, 120px) minmax(96px, 1fr) minmax(48px, 120px) minmax(96px, 1fr);
  gap: 12px;
  margin: 16px 0 14px;
}

.buyer-recharge-compact .cyber-progress-item {
  gap: 7px;
  font-size: 12px;
}

.buyer-recharge-compact .cyber-progress-item span {
  width: 36px;
  height: 36px;
}

.buyer-recharge-compact .cyber-progress i {
  height: 5px;
}

.buyer-recharge-compact .recharge-layout {
  width: min(820px, 100%);
  margin: 0 auto;
}

.buyer-recharge-compact .recharge-card {
  padding: clamp(18px, 2.4vw, 26px);
  border-radius: 16px;
}

.buyer-recharge-compact .recharge-card > .notice {
  min-height: 0;
  padding: 10px 14px;
  margin: 0;
}

.buyer-recharge-compact .recharge-card .form,
.buyer-recharge-compact .recharge-card form {
  gap: 14px;
}

.buyer-recharge-compact .recharge-card h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 26px);
  line-height: 1.15;
}

.buyer-recharge-compact .recharge-card p {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.55;
}

.buyer-recharge-compact .field {
  gap: 8px;
}

.buyer-recharge-compact input,
.buyer-recharge-compact select,
.buyer-recharge-compact textarea,
.buyer-recharge-compact .btn,
.buyer-recharge-compact .ghost {
  min-height: 46px;
}

.buyer-recharge-compact .session-url-row {
  grid-template-columns: minmax(220px, 1.1fr) auto minmax(230px, .9fr) auto;
  gap: 8px;
  padding: 8px;
}

.buyer-recharge-compact .session-url-row > .muted:first-of-type {
  display: none;
}

.buyer-recharge-compact .session-url-row .btn,
.buyer-recharge-compact .session-url-row .ghost {
  min-height: 42px;
  padding: 0 12px;
}

.buyer-recharge-compact .session-textarea {
  min-height: clamp(112px, 18vh, 160px);
}

.buyer-recharge-compact .btn-row {
  margin-top: 0;
}

.buyer-recharge-compact .grid.two {
  gap: 12px;
}

.buyer-recharge-compact .card {
  padding: 14px;
}

.buyer-recharge-compact .kv {
  padding: 6px 0;
}

@media (min-width: 1100px) and (max-height: 820px) {
  .buyer-recharge-compact {
    padding-top: 14px;
  }

  .buyer-recharge-compact .buyer-hero h1 {
    font-size: 42px;
  }

  .buyer-recharge-compact .cyber-progress {
    margin: 12px 0;
  }

  .buyer-recharge-compact .session-textarea {
    min-height: 108px;
  }
}

@media (max-width: 760px) {
  .buyer-recharge-compact {
    width: min(100% - 20px, 1040px);
    padding-top: 18px;
  }

  .buyer-recharge-compact .buyer-hero-tools {
    position: static;
    justify-self: end;
  }

  .buyer-recharge-compact .cyber-progress {
    grid-template-columns: 1fr;
  }

  .buyer-recharge-compact .cyber-progress i {
    display: none;
  }

  .buyer-recharge-compact .session-url-row {
    grid-template-columns: 1fr;
  }
}

/* 20260625c step emphasis */
.buyer-recharge-compact .cyber-progress-item.active strong {
  color: #06aeb9;
  font-size: 14px;
}

.buyer-recharge-compact .cyber-progress-item:not(.active):not(.done) {
  opacity: .72;
}

.buyer-recharge-compact .cyber-progress-item.done strong {
  color: #25a98b;
}

.buyer-recharge-compact .cyber-progress-item.active span {
  transform: scale(1.04);
  background: #e5ffff;
}

/* 20260625d highlighted session guide */
.buyer-recharge-compact .session-guide {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(18, 188, 194, 0.34);
  border-radius: 10px;
  background: rgba(229, 250, 250, 0.72);
  color: #17324a;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.65;
}

.buyer-recharge-compact .session-guide strong {
  color: #06aeb9;
  font-weight: 950;
}

/* 20260625e compact buyer navigation */
.buyer-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(520px, 100%);
}

.buyer-tabs a.tutorial-tab {
  color: #fff;
  background: linear-gradient(135deg, #ff9a22 0%, #ff5b45 48%, #f53678 100%);
  border: 1.5px solid rgba(255, 101, 67, .92);
  box-shadow: 0 8px 22px rgba(245, 54, 120, .26), inset 0 1px 0 rgba(255, 255, 255, .32);
  font-weight: 950;
  letter-spacing: .02em;
  text-shadow: 0 1px 2px rgba(110, 20, 35, .34);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.buyer-tabs a.tutorial-tab:hover {
  color: #fff;
  border-color: rgba(255, 181, 89, 1);
  box-shadow: 0 11px 28px rgba(245, 54, 120, .36), 0 0 0 3px rgba(255, 139, 46, .14);
  filter: saturate(1.08) brightness(1.04);
  transform: translateY(-2px);
}

.tutorial-tab-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 15px;
  line-height: 1;
}

.tutorial-tab-label strong {
  color: inherit;
  font-weight: 950;
}

.tutorial-play {
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38);
  font-size: 10px;
  text-shadow: none;
}

.buyer-query-main {
  width: min(1040px, calc(100% - 32px));
  min-height: 100vh;
  padding: clamp(14px, 2.4vh, 26px) 0 22px;
}

.buyer-query-main .buyer-hero {
  gap: 7px;
}

.buyer-query-main .buyer-hero-tools {
  top: 0;
  right: 0;
}

.buyer-query-main .buyer-hero h1 {
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: .96;
}

.buyer-query-main .buyer-hero p {
  font-size: 12px;
}

.buyer-query-main .buyer-tabs {
  margin-top: 8px;
  padding: 6px;
}

.buyer-query-main .buyer-tabs a {
  min-height: 40px;
}

.buyer-query-main .queue-pill {
  width: min(520px, 100%);
  min-height: 40px;
  padding: 0 12px;
}

.buyer-query-main .queue-pill strong {
  font-size: 22px;
}

.buyer-query-main .buyer-lookup-card {
  width: min(860px, 100%);
  margin: 14px auto 0;
  padding: 18px 22px;
}

.buyer-query-main .buyer-lookup-head {
  margin-bottom: 10px;
}

.buyer-query-main .buyer-lookup-head h2 {
  font-size: 20px;
}

.buyer-query-main .buyer-lookup-form {
  gap: 10px;
}

.buyer-query-main .buyer-lookup-form textarea {
  min-height: 74px;
  max-height: 90px;
}

.buyer-query-main .buyer-lookup-hint {
  font-size: 12px;
  line-height: 1.45;
}

.buyer-query-main .buyer-lookup-actions {
  gap: 12px;
  margin-top: 6px;
}

.buyer-query-main .buyer-lookup-actions .btn,
.buyer-query-main .buyer-lookup-actions .ghost {
  min-height: 44px;
}

.buyer-query-main .buyer-result-stats {
  width: min(860px, 100%);
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.buyer-query-main .buyer-result-stats .metric {
  min-height: 72px;
  padding: 12px 14px;
  gap: 6px;
}

.buyer-query-main .buyer-result-stats .metric strong {
  font-size: 24px;
}

.buyer-query-main .buyer-result-layout {
  width: min(860px, 100%);
  grid-template-columns: minmax(250px, 330px) minmax(0, 1fr);
  gap: 14px;
  margin-top: 12px;
}

.buyer-query-main .buyer-result-list,
.buyer-query-main .buyer-result-layout > .panel {
  padding: 16px 18px;
}

.buyer-query-main .buyer-result-list {
  max-height: min(310px, calc(100vh - 500px));
  overflow: auto;
}

.buyer-query-main .buyer-result-layout > .history-detail-panel {
  max-height: none;
  overflow: visible;
}

.buyer-query-main .history-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 6px;
}

.buyer-query-main .history-detail-head h2 {
  margin: 0;
}

.buyer-query-main .history-refresh-status {
  min-height: 34px;
  padding: 0 11px;
  white-space: nowrap;
}

.history-status-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 8px 0 10px;
  padding: 11px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface-2);
}

.history-status-banner.completed {
  border-color: color-mix(in srgb, var(--ok) 48%, var(--line-strong));
  background: color-mix(in srgb, var(--ok) 10%, var(--surface));
}

.history-status-banner.pending,
.history-status-banner.processing,
.history-status-banner.waiting-confirm {
  border-color: color-mix(in srgb, var(--warn) 48%, var(--line-strong));
  background: color-mix(in srgb, var(--warn) 9%, var(--surface));
}

.history-status-banner.failed {
  border-color: color-mix(in srgb, var(--danger) 48%, var(--line-strong));
  background: color-mix(in srgb, var(--danger) 8%, var(--surface));
}

.history-status-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--line);
  color: var(--muted);
  font-size: 21px;
  font-weight: 950;
  line-height: 1;
}

.history-status-banner.completed .history-status-icon {
  background: var(--ok);
  color: #fff;
}

.history-status-banner.pending .history-status-icon,
.history-status-banner.processing .history-status-icon,
.history-status-banner.waiting-confirm .history-status-icon {
  background: var(--warn);
  color: #fff;
}

.history-status-banner.failed .history-status-icon {
  background: var(--danger);
  color: #fff;
}

.history-status-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.history-status-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.history-status-copy strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
}

.history-status-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.history-status-banner > .status {
  justify-self: end;
  font-size: 12px;
  white-space: nowrap;
}

.buyer-query-main .history-detail-panel .kv {
  padding: 4px 0;
}

.failure-reason-alert {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin: 10px 0 8px;
  padding: 12px 14px;
  border: 2px solid #f04444;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 241, 241, .98), rgba(255, 250, 245, .98));
  box-shadow: 0 7px 20px rgba(224, 55, 55, .14);
}

.failure-reason-alert strong {
  color: #c81e1e;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: .04em;
}

.failure-reason-alert strong::before {
  content: "!";
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 7px;
  border-radius: 50%;
  background: #df2f2f;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}

.failure-reason-alert span {
  color: #981b1b;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.recharge-failure-reason {
  margin: 0;
}

.buyer-query-main .buyer-result-title {
  margin-bottom: 10px;
}

.buyer-query-main .buyer-result-title h2,
.buyer-query-main .buyer-result-layout h2 {
  font-size: 20px;
}

.buyer-query-main .buyer-result-list .list {
  gap: 8px;
}

.buyer-query-main .buyer-result-list .list-item {
  padding: 12px;
}

.buyer-query-main .buyer-result-layout .kv {
  grid-template-columns: 110px 1fr;
  padding: 5px 0;
}

.buyer-query-main .buyer-result-layout p {
  margin: 8px 0;
  font-size: 13px;
  line-height: 1.5;
}

.buyer-query-main .buyer-result-layout .btn-row {
  margin-top: 8px;
}

/* Keep the desktop task lookup result visible in one compact viewport. */
@media (min-width: 901px) and (max-height: 1000px) {
  .buyer-query-main {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .buyer-query-main .buyer-hero {
    gap: 4px;
  }

  .buyer-query-main .buyer-hero h1 {
    font-size: 38px;
  }

  .buyer-query-main .buyer-hero p {
    margin: 0;
    font-size: 10px;
  }

  .buyer-query-main .buyer-tabs {
    margin-top: 4px;
    padding: 4px;
  }

  .buyer-query-main .buyer-tabs a {
    min-height: 34px;
  }

  .buyer-query-main .queue-pill {
    min-height: 34px;
    padding: 0 10px;
  }

  .buyer-query-main .queue-pill strong {
    font-size: 19px;
  }

  .buyer-query-main .buyer-lookup-card {
    margin-top: 8px;
    padding: 10px 16px;
  }

  .buyer-query-main .buyer-lookup-head {
    margin-bottom: 5px;
  }

  .buyer-query-main .buyer-lookup-form {
    gap: 6px;
  }

  .buyer-query-main .buyer-lookup-form textarea {
    min-height: 58px;
    max-height: 68px;
  }

  .buyer-query-main .buyer-lookup-actions {
    gap: 8px;
    margin-top: 3px;
  }

  .buyer-query-main .buyer-lookup-actions .btn,
  .buyer-query-main .buyer-lookup-actions .ghost {
    min-height: 36px;
  }

  .buyer-query-main .buyer-result-layout {
    gap: 10px;
    margin-top: 8px;
  }

  .buyer-query-main .buyer-result-list,
  .buyer-query-main .buyer-result-layout > .panel {
    padding: 10px 12px;
  }

  .buyer-query-main .buyer-result-list {
    max-height: calc(100vh - 330px);
  }

  .buyer-query-main .buyer-result-title {
    margin-bottom: 5px;
  }

  .buyer-query-main .buyer-result-list .list {
    gap: 5px;
  }

  .buyer-query-main .buyer-result-list .list-item {
    gap: 5px;
    padding: 8px;
  }

  .buyer-query-main .history-status-banner {
    margin: 4px 0 6px;
    padding: 8px 10px;
  }

  .buyer-query-main .history-status-icon {
    width: 28px;
    height: 28px;
    font-size: 18px;
  }

  .buyer-query-main .history-status-copy strong {
    font-size: 15px;
  }

  .buyer-query-main .history-status-copy p {
    font-size: 11px;
  }

  .buyer-query-main .buyer-result-layout .kv {
    padding: 3px 0;
  }

  .buyer-query-main .buyer-result-layout p {
    margin: 4px 0;
  }

  .buyer-query-main .buyer-result-layout .btn-row {
    margin-top: 4px;
  }
}

@media (min-width: 1100px) and (max-height: 820px) {
  .buyer-query-main .buyer-hero h1 {
    font-size: 40px;
  }

  .buyer-query-main .buyer-lookup-card {
    padding: 14px 20px;
  }

  .buyer-query-main .buyer-result-stats .metric {
    min-height: 62px;
  }

  .buyer-query-main .buyer-result-list,
  .buyer-query-main .buyer-result-layout > .panel {
    max-height: 270px;
  }
}

@media (max-width: 900px) {
  .buyer-query-main .buyer-result-stats,
  .buyer-query-main .buyer-result-layout,
  .buyer-query-main .buyer-lookup-actions {
    grid-template-columns: 1fr;
  }

  .buyer-query-main .history-status-banner {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .buyer-query-main .history-status-banner > .status {
    grid-column: 2;
    justify-self: start;
  }

  .buyer-query-main .buyer-result-list,
  .buyer-query-main .buyer-result-layout > .panel {
    max-height: none;
  }

  .failure-reason-alert {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* 20260625f clearer session step layout */
.buyer-recharge-compact .session-ready {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
}

.buyer-recharge-compact .session-step-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 2px 0 4px;
}

.buyer-recharge-compact .session-step-badge {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(18, 188, 194, 0.55);
  border-radius: 999px;
  background: rgba(229, 250, 250, 0.9);
  color: #06aeb9;
  font-size: 13px;
  font-weight: 950;
}

.buyer-recharge-compact .session-step-head h2 {
  font-size: clamp(22px, 2.6vw, 30px);
}

.buyer-recharge-compact .session-guide {
  margin-top: 8px;
  padding: 9px 12px;
  border-color: rgba(18, 188, 194, 0.48);
  background: linear-gradient(90deg, rgba(229, 250, 250, 0.94), rgba(255, 255, 255, 0.74));
  color: #17324a;
  font-size: 15px;
  font-weight: 850;
}

.buyer-recharge-compact .session-url-row {
  grid-template-columns: minmax(210px, .95fr) auto minmax(220px, 1fr) auto;
  border-width: 1px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.buyer-recharge-compact .session-url-row .url-copy-input {
  min-height: 42px;
  font-size: 13px;
}

.buyer-recharge-compact .session-textarea {
  border-width: 1.5px;
  font-size: 14px;
  line-height: 1.65;
}

.buyer-recharge-compact .session-textarea::placeholder {
  color: #526982;
  font-size: 14px;
  font-weight: 850;
}

.buyer-recharge-compact label[for="sessionJson"] {
  color: #102033;
  font-size: 15px;
  font-weight: 950;
}

@media (max-width: 760px) {
  .buyer-recharge-compact .session-step-head {
    grid-template-columns: 1fr;
  }
}

/* 20260625i mobile fit and lookup cleanup */
@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .buyer-main,
  .buyer-recharge-compact,
  .buyer-query-main {
    width: calc(100% - 20px);
    min-height: 100svh;
    padding-top: 12px;
    padding-bottom: 18px;
  }

  .buyer-hero,
  .buyer-recharge-compact .buyer-hero,
  .buyer-query-main .buyer-hero {
    gap: 8px;
  }

  .buyer-hero-tools,
  .buyer-recharge-compact .buyer-hero-tools,
  .buyer-query-main .buyer-hero-tools {
    position: static;
    justify-self: end;
    gap: 10px;
    margin-bottom: 0;
    color: #50647a;
    font-size: 12px;
  }

  .theme-dot {
    width: 30px;
    height: 30px;
    color: #50647a;
  }

  .buyer-hero h1,
  .buyer-recharge-compact .buyer-hero h1,
  .buyer-query-main .buyer-hero h1 {
    max-width: 100%;
    font-size: clamp(34px, 13vw, 48px);
    line-height: .92;
  }

  .buyer-hero p,
  .buyer-recharge-compact .buyer-hero p,
  .buyer-query-main .buyer-hero p {
    font-size: 11px;
  }

  .buyer-tabs,
  .buyer-recharge-compact .buyer-tabs,
  .buyer-query-main .buyer-tabs {
    width: 100%;
    gap: 6px;
    margin-top: 6px;
    padding: 5px;
    border-radius: 14px;
  }

  .buyer-tabs a,
  .buyer-recharge-compact .buyer-tabs a,
  .buyer-query-main .buyer-tabs a {
    min-height: 42px;
    font-size: 15px;
  }

  .queue-pill,
  .buyer-recharge-compact .queue-pill,
  .buyer-query-main .queue-pill {
    grid-template-columns: auto auto auto auto auto;
    width: 100%;
    min-height: 40px;
    gap: 7px;
    padding: 0 10px;
    border-radius: 14px;
    font-size: 13px;
  }

  .queue-pill strong,
  .buyer-recharge-compact .queue-pill strong,
  .buyer-query-main .queue-pill strong {
    font-size: 21px;
  }

  .queue-pill em {
    grid-column: auto;
    justify-self: end;
    font-size: 11px;
    white-space: nowrap;
  }

  .pulse-dot {
    width: 11px;
    height: 11px;
  }

  .buyer-recharge-compact .cyber-progress,
  .cyber-progress {
    grid-template-columns: minmax(62px, 1fr) minmax(22px, 48px) minmax(72px, 1fr) minmax(22px, 48px) minmax(62px, 1fr);
    gap: 6px;
    margin: 12px 0 12px;
  }

  .buyer-recharge-compact .cyber-progress i,
  .cyber-progress i {
    display: block;
    height: 3px;
  }

  .buyer-recharge-compact .cyber-progress-item,
  .cyber-progress-item {
    gap: 6px;
    font-size: 11px;
  }

  .buyer-recharge-compact .cyber-progress-item span,
  .cyber-progress-item span {
    width: 34px;
    height: 34px;
  }

  .buyer-recharge-compact .cyber-progress-item strong,
  .cyber-progress-item strong {
    font-size: 12px;
    white-space: nowrap;
  }

  .buyer-recharge-compact .recharge-layout,
  .buyer-query-main .buyer-lookup-card,
  .buyer-query-main .buyer-result-layout {
    width: 100%;
  }

  .buyer-recharge-compact .recharge-card,
  .buyer-query-main .buyer-lookup-card,
  .buyer-query-main .buyer-result-list,
  .buyer-query-main .buyer-result-layout > .panel {
    padding: 16px;
    border-radius: 14px;
  }

  .buyer-recharge-compact .recharge-card h2,
  .buyer-query-main .buyer-lookup-head h2,
  .buyer-query-main .buyer-result-title h2,
  .buyer-query-main .buyer-result-layout h2 {
    font-size: 20px;
    line-height: 1.2;
  }

  .buyer-recharge-compact .recharge-card p,
  .buyer-query-main .buyer-lookup-hint,
  .buyer-query-main .buyer-result-layout p {
    font-size: 13px;
    line-height: 1.55;
  }

  .buyer-query-main .buyer-lookup-card {
    margin-top: 12px;
  }

  .buyer-query-main .buyer-lookup-form textarea {
    min-height: 78px;
    max-height: 110px;
  }

  .buyer-query-main .buyer-result-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 12px;
  }

  .buyer-query-main .buyer-result-list,
  .buyer-query-main .buyer-result-layout > .panel {
    max-height: none;
  }

  .buyer-query-main .buyer-result-list .list-item {
    padding: 12px;
  }

  .buyer-query-main .buyer-result-layout .kv {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 8px;
  }

  .session-url-row,
  .buyer-recharge-compact .session-url-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .buyer-recharge-compact .session-textarea {
    min-height: 132px;
  }

  .buyer-recharge-compact .session-guide {
    font-size: 14px;
    line-height: 1.55;
  }

  .buyer-recharge-compact .btn-row,
  .buyer-lookup-actions,
  .buyer-query-main .buyer-lookup-actions {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .topbar {
    position: static;
    gap: 10px;
    padding: 10px;
  }

  .brand {
    min-width: 0;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .nav a {
    padding: 9px 8px;
    text-align: center;
  }

  .main,
  .admin-layout {
    width: calc(100% - 20px);
    padding-top: 12px;
    padding-bottom: 22px;
  }

  .admin-layout {
    gap: 12px;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px;
    border-radius: 10px;
  }

  .sidebar a,
  .sidebar .ghost {
    flex: 0 0 auto;
    min-width: 86px;
    text-align: center;
    white-space: nowrap;
  }

  .page-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  .page-head h1 {
    font-size: 28px;
  }

  .toolbar,
  .filters,
  .task-filter-panel .filters,
  .task-action-grid,
  .task-status-grid,
  .task-info-grid,
  .task-workbench,
  .task-summary-grid,
  .split,
  .grid.two,
  .grid.three {
    grid-template-columns: 1fr;
  }

  .task-summary-grid {
    gap: 10px;
  }

  .task-metric {
    min-height: 74px;
    padding: 14px;
  }

  .task-list-panel,
  .task-detail {
    position: static;
    max-height: none;
  }

  .task-list {
    max-height: none;
    padding-right: 0;
  }

  .task-list-top,
  .task-list-meta,
  .task-detail-head,
  .task-save-row,
  .session-box-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-list-meta {
    gap: 4px;
  }

  .task-action-grid .btn,
  .task-action-grid .ghost,
  .task-save-row .btn,
  .task-save-row .ghost,
  .task-save-row .danger {
    width: 100%;
  }

  .session-box textarea {
    min-height: 160px;
  }

  .table-wrap {
    max-width: 100%;
  }

  table {
    min-width: 680px;
  }
}

@media (max-width: 380px) {
  .buyer-hero h1,
  .buyer-recharge-compact .buyer-hero h1,
  .buyer-query-main .buyer-hero h1 {
    font-size: 32px;
  }

  .buyer-tabs a,
  .buyer-recharge-compact .buyer-tabs a,
  .buyer-query-main .buyer-tabs a {
    font-size: 14px;
  }

  .queue-pill,
  .buyer-recharge-compact .queue-pill,
  .buyer-query-main .queue-pill {
    gap: 5px;
    font-size: 12px;
  }

  .queue-pill em {
    display: none;
  }
}

@media (max-width: 760px) {
  .task-summary-grid,
  .task-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

/* 20260625j show session alternative label */
.buyer-recharge-compact .session-url-row {
  grid-template-columns: minmax(210px, .95fr) auto auto minmax(220px, 1fr) auto;
}

.buyer-recharge-compact .session-url-row > .muted:first-of-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #526982;
  font-weight: 900;
}

.buyer-recharge-compact .session-url-row > .muted {
  align-self: center;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .buyer-recharge-compact .session-url-row {
    grid-template-columns: 1fr;
  }

  .buyer-recharge-compact .session-url-row > .muted:first-of-type {
    justify-content: flex-start;
  }
}

/* 20260625k session copy wording */
.buyer-recharge-compact .session-url-row {
  grid-template-columns: minmax(210px, .95fr) auto minmax(220px, 1fr) auto;
}

/* 20260626c refined session paste layout */
.buyer-recharge-compact .session-step-head {
  align-items: stretch;
  padding-bottom: 2px;
}

.buyer-recharge-compact .session-guide {
  display: block;
  margin-top: 10px;
  padding: 13px 15px;
  border: 1px solid rgba(18, 188, 194, 0.38);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(229, 250, 250, 0.96), rgba(255, 255, 255, 0.76));
  color: #16304a;
  line-height: 1.75;
}

.buyer-recharge-compact .session-inline-link {
  color: #04aeb9;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.buyer-recharge-compact .session-paste-field {
  margin-top: 2px;
  padding: 10px;
  border: 1px solid rgba(18, 188, 194, 0.32);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.buyer-recharge-compact .session-paste-field .session-textarea {
  min-height: clamp(150px, 23vh, 210px);
  margin: 0;
  border-color: rgba(18, 188, 194, 0.5);
  background: rgba(255, 255, 255, 0.86);
}

.buyer-recharge-compact .session-paste-field .session-textarea:focus {
  border-color: #08b7c0;
  box-shadow: 0 0 0 4px rgba(18, 188, 194, 0.12);
}

@media (max-width: 760px) {
  .buyer-recharge-compact .session-guide {
    padding: 11px 12px;
    font-size: 13px;
  }

  .buyer-recharge-compact .session-paste-field {
    padding: 8px;
  }

  .buyer-recharge-compact .session-paste-field .session-textarea {
    min-height: 150px;
  }
}

/* 20260626g smoother announcement and task actions */
.buyer-announcement {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: min(820px, 100%);
  margin: 12px auto 0;
  padding: 11px 14px;
  border: 1px solid rgba(210, 140, 35, 0.38);
  border-radius: 14px;
  background: linear-gradient(90deg, rgba(255, 248, 232, 0.94), rgba(255, 255, 255, 0.78));
  color: #6f4b12;
  box-shadow: 0 14px 36px rgba(210, 140, 35, 0.10);
}

.buyer-announcement strong {
  color: #b7791f;
  font-weight: 950;
  white-space: nowrap;
}

.buyer-announcement span {
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.buyer-recharge-compact .buyer-announcement + .cyber-progress,
.buyer-query-main .buyer-announcement + .buyer-lookup-card {
  margin-top: 14px;
}

.announcement-panel {
  gap: 14px;
}

.announcement-preview span {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: pre-wrap;
}

.task-save-row [data-quick-task-status="completed"] {
  border-color: rgba(31, 138, 112, 0.46);
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
  color: var(--brand);
  font-weight: 900;
}

@media (max-width: 760px) {
  .buyer-announcement {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 10px 12px;
  }

  .buyer-announcement span {
    overflow: visible;
    font-size: 13px;
    line-height: 1.55;
    text-overflow: clip;
    white-space: normal;
  }
}

/* 20260702a selected CDK text export */
.cdk-export-panel {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
}

.cdk-export-panel[hidden] {
  display: none;
}

.cdk-export-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cdk-export-panel textarea {
  min-height: 150px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
}

/* 20260715 emphasized Session instructions */
.buyer-recharge-compact .session-guide {
  position: relative;
  margin-top: 12px;
  padding: 15px 18px 15px 20px;
  border: 2px solid color-mix(in srgb, var(--brand) 58%, var(--line));
  border-left: 6px solid var(--warn);
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--warn) 12%, var(--surface)),
    color-mix(in srgb, var(--brand) 9%, var(--surface)) 56%,
    var(--surface)
  );
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.8;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--brand) 14%, transparent);
}

.buyer-recharge-compact .session-guide::before {
  content: "重要提示";
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--warn);
  color: #fff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.6;
  letter-spacing: .05em;
  vertical-align: 2px;
}

.buyer-recharge-compact .session-guide strong {
  color: var(--brand);
  font-weight: 950;
}

.buyer-recharge-compact .session-guide .session-inline-link {
  padding: 1px 4px;
  border-radius: 5px;
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
  font-weight: 950;
  text-decoration-thickness: 2px;
}

@media (max-width: 760px) {
  .buyer-recharge-compact .session-guide {
    padding: 13px 14px 13px 16px;
    font-size: 14px;
    line-height: 1.7;
  }

  .buyer-recharge-compact .session-guide::before {
    margin-bottom: 4px;
  }
}

/* 20260715 show the complete buyer announcement */
.buyer-announcement {
  align-items: start;
}

.buyer-announcement span {
  overflow: visible;
  line-height: 1.6;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: pre-wrap;
}

.announcement:not(.buyer-announcement) span {
  overflow: visible;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: pre-wrap;
}

/* 20260715 two-step Session submission guide */
.session-submit-guide {
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 96%, var(--brand) 4%);
  box-shadow: 0 12px 30px color-mix(in srgb, var(--brand) 10%, transparent);
}

.session-submit-guide-title {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
}

.session-submit-guide-title::before {
  content: "▤";
  color: var(--brand);
  font-size: 16px;
  line-height: 1;
}

.session-submit-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 11px 14px 13px;
  list-style: none;
  counter-reset: session-submit-step;
}

.session-submit-step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
  counter-increment: session-submit-step;
}

.session-submit-step::before {
  content: counter(session-submit-step);
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  color: var(--brand);
  font-size: 12px;
  font-weight: 950;
}

.session-submit-step-content > strong {
  display: block;
  margin-top: 1px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 950;
  line-height: 1.45;
}

.session-submit-step-content p {
  margin: 2px 0 6px;
  color: color-mix(in srgb, var(--ink) 68%, var(--muted));
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.session-guide-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-decoration: none;
  box-shadow: 0 7px 16px color-mix(in srgb, var(--brand) 20%, transparent);
  transition: transform .16s ease, filter .16s ease;
}

.session-guide-action::after {
  content: "↗";
  font-size: 13px;
}

.session-guide-action:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.session-guide-action:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .session-submit-guide-title {
    padding: 12px 14px;
  }

  .session-submit-steps {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 15px 14px 17px;
  }

  .session-submit-step {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
  }

  .session-submit-step::before {
    width: 28px;
    height: 28px;
  }

  .session-submit-step-content > strong {
    font-size: 15px;
  }

  .session-submit-step-content p {
    font-size: 13px;
  }

  .session-guide-action {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* 20260715 keep the recharge flow inside one desktop viewport when possible */
@media (min-width: 761px) and (max-height: 1050px) {
  .buyer-recharge-compact {
    padding: 8px 0 14px;
  }

  .buyer-recharge-compact .buyer-hero {
    gap: 4px;
  }

  .buyer-recharge-compact .buyer-hero h1 {
    font-size: clamp(36px, 3.5vw, 46px);
  }

  .buyer-recharge-compact .buyer-hero p {
    font-size: 10px;
  }

  .buyer-recharge-compact .buyer-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: min(520px, 100%);
    margin-top: 2px;
    padding: 4px;
  }

  .buyer-recharge-compact .buyer-tabs a {
    min-height: 34px;
    font-size: 14px;
  }

  .buyer-recharge-compact .queue-pill {
    width: min(620px, 100%);
    min-height: 34px;
    padding: 0 11px;
  }

  .buyer-recharge-compact .queue-pill strong {
    font-size: 18px;
  }

  .buyer-recharge-compact .buyer-announcement {
    margin-top: 7px;
    padding: 7px 12px;
    border-radius: 11px;
    line-height: 1.35;
  }

  .buyer-recharge-compact .buyer-announcement strong,
  .buyer-recharge-compact .buyer-announcement span {
    font-size: 15px;
  }

  .buyer-recharge-compact .buyer-announcement + .cyber-progress {
    margin-top: 7px;
  }

  .buyer-recharge-compact .cyber-progress {
    gap: 8px;
    margin: 7px 0;
  }

  .buyer-recharge-compact .cyber-progress-item {
    gap: 3px;
  }

  .buyer-recharge-compact .cyber-progress-item span {
    width: 30px;
    height: 30px;
  }

  .buyer-recharge-compact .cyber-progress-item strong,
  .buyer-recharge-compact .cyber-progress-item.active strong {
    font-size: 12px;
  }

  .buyer-recharge-compact .recharge-card {
    gap: 8px;
    padding: 13px 16px;
  }

  .buyer-recharge-compact .recharge-card > .notice {
    padding: 7px 11px;
    font-size: 13px;
  }

  .buyer-recharge-compact .recharge-card .form,
  .buyer-recharge-compact .recharge-card form {
    gap: 8px;
  }

  .buyer-recharge-compact .session-step-head {
    align-items: start;
    gap: 9px;
    padding: 0;
  }

  .buyer-recharge-compact .session-step-badge {
    min-width: 50px;
    min-height: 28px;
    padding: 0 8px;
  }

  .buyer-recharge-compact .session-step-head h2 {
    font-size: 21px;
  }

  .buyer-recharge-compact .session-paste-field {
    margin-top: 0;
    padding: 6px;
  }

  .buyer-recharge-compact .session-paste-field .session-textarea {
    min-height: 96px;
    height: 96px;
    line-height: 1.45;
  }

  .buyer-recharge-compact .btn-row {
    gap: 8px;
  }

  .buyer-recharge-compact .btn-row .btn,
  .buyer-recharge-compact .btn-row .ghost {
    min-height: 38px;
  }
}

/* 20260715 align and simplify the Session submission card */
.buyer-recharge-compact #sessionForm {
  gap: 10px;
}

.buyer-recharge-compact .session-step-head {
  display: block;
  padding: 0;
}

.session-step-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 9px;
}

.session-step-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.buyer-recharge-compact .session-step-title h2 {
  margin: 0;
  white-space: nowrap;
}

.buyer-recharge-compact .session-step-titlebar .session-ready {
  flex: 0 0 auto;
  margin: 0;
  padding: 6px 11px;
  font-size: 12px;
}

.buyer-recharge-compact .session-submit-guide {
  margin-top: 0;
}

.buyer-recharge-compact .session-submit-steps,
.buyer-recharge-compact .session-submit-step {
  align-items: stretch;
}

.buyer-recharge-compact .session-submit-step + .session-submit-step {
  padding-left: 14px;
  border-left: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
}

.buyer-recharge-compact .session-submit-step-content {
  display: grid;
  min-width: 0;
  grid-template-rows: auto 1fr auto;
}

.buyer-recharge-compact .session-guide-action {
  width: 100%;
  justify-content: center;
  align-self: end;
  text-align: center;
}

.buyer-recharge-compact .session-paste-field {
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.buyer-recharge-compact .session-paste-field .session-textarea {
  border: 2px solid color-mix(in srgb, var(--brand) 78%, #0aa6b3);
  width: 100%;
  min-height: 105px;
  height: 120px;
  padding: 14px;
  resize: vertical;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 97%, var(--brand) 3%);
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 80%, transparent);
}

.session-highlight-editor {
  position: relative;
  width: 100%;
}

.buyer-recharge-compact .session-paste-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.buyer-recharge-compact .session-paste-actions .ghost {
  flex: 0 0 auto;
  min-width: 96px;
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.4;
}

@media (max-width: 600px) {
  .buyer-recharge-compact .session-paste-actions .ghost {
    min-height: 44px;
  }
}

.buyer-recharge-compact .session-expired-hint {
  margin: 0;
  padding: 6px 9px;
  border-left: 3px solid #e9a526;
  border-radius: 5px;
  background: #fff7e5;
  color: #805000;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.session-expired-hint code {
  color: #924300;
  font-size: inherit;
  font-weight: 700;
}

.buyer-recharge-compact .session-highlight-editor .session-highlight-layer,
.buyer-recharge-compact .session-highlight-editor .session-textarea {
  box-sizing: border-box;
  margin: 0;
  padding: 14px;
  font: 14px/1.6 monospace;
  letter-spacing: normal;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  tab-size: 8;
}

.buyer-recharge-compact .session-highlight-editor .session-highlight-layer {
  position: absolute;
  inset: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: auto;
  pointer-events: none;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 97%, var(--brand) 3%);
}

.session-highlight-layer mark {
  color: #542d00;
  background: #ffe071;
  border-radius: 3px;
}

.buyer-recharge-compact .session-highlight-editor .session-textarea {
  position: relative;
  display: block;
  background: transparent;
  color: transparent;
  caret-color: var(--ink);
}

.buyer-recharge-compact .session-paste-field .session-textarea::placeholder {
  color: color-mix(in srgb, var(--ink) 78%, var(--muted));
  font-size: 14px;
  font-weight: 850;
  opacity: 1;
}

.buyer-recharge-compact #sessionForm .btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.buyer-recharge-compact #sessionForm .btn-row .btn,
.buyer-recharge-compact #sessionForm .btn-row .ghost {
  width: auto;
  min-width: 124px;
  border-width: 1.5px;
  border-color: color-mix(in srgb, var(--brand) 78%, var(--line));
  font-weight: 950;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--brand) 10%, transparent);
}

@media (max-width: 760px) {
  .session-step-titlebar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .buyer-recharge-compact .session-step-title h2 {
    white-space: normal;
  }

  .buyer-recharge-compact .session-submit-step + .session-submit-step {
    padding-top: 14px;
    padding-left: 0;
    border-top: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
    border-left: 0;
  }

  .buyer-recharge-compact .session-paste-field .session-textarea {
    min-height: 120px;
    height: 135px;
  }

  .buyer-recharge-compact .session-highlight-editor {
    width: calc(100% + 12px);
    margin-left: -6px;
  }

  .buyer-recharge-compact #sessionForm .btn-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .buyer-recharge-compact #sessionForm .btn-row .btn,
  .buyer-recharge-compact #sessionForm .btn-row .ghost {
    width: 100%;
  }
}

/* 20260715 emphasize the CDK input without a separate label */
.buyer-recharge-compact #cdkCode {
  border: 2px solid color-mix(in srgb, var(--brand) 78%, #0aa6b3);
  background: color-mix(in srgb, var(--surface) 97%, var(--brand) 3%);
  color: var(--ink);
  font-weight: 850;
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent),
    inset 0 1px 0 color-mix(in srgb, #fff 80%, transparent);
}

.buyer-recharge-compact #cdkCode::placeholder {
  color: color-mix(in srgb, var(--ink) 64%, var(--muted));
  font-weight: 800;
  opacity: 1;
}

/* 20260811 streamlined task workbench */
@media (min-width: 901px) {
  .admin-layout {
    width: min(1840px, calc(100% - 24px));
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 12px;
    padding-top: 14px;
  }

  .sidebar {
    padding: 10px;
  }

  .sidebar a {
    padding: 8px 10px;
  }
}

.admin-content {
  gap: 12px;
}

.admin-content .page-head {
  margin-bottom: 4px;
}

.task-refresh-button {
  min-width: 118px;
  min-height: 46px;
  padding: 11px 22px;
  border-width: 1.5px;
  font-size: 16px;
  letter-spacing: .02em;
}

.task-refresh-button:not(:disabled) {
  border-color: color-mix(in srgb, var(--brand) 72%, var(--line-strong));
  color: var(--brand);
}

.task-refresh-button:disabled {
  cursor: wait;
}

/* Compact CDK tools: keep the task list visible until an operation is needed. */
.cdk-page-head .page-head {
  margin-bottom: 0;
}

.cdk-page-head .page-head h1 {
  font-size: clamp(23px, 2.2vw, 28px);
}

.cdk-page-head .page-head p:not(.eyebrow) {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.45;
}

.cdk-control-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.cdk-automation-switch {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(380px, 0.9fr);
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  padding: 15px 18px;
}

.cdk-automation-switch .eyebrow {
  margin: 0 0 3px;
}

.cdk-automation-switch h2 {
  margin: 0;
  font-size: 18px;
}

.cdk-automation-switch p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.cdk-provider-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cdk-provider-options button {
  display: grid;
  min-height: 62px;
  gap: 4px;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
}

.cdk-provider-options button:hover:not(:disabled),
.cdk-provider-options button:focus-visible {
  border-color: var(--line-strong);
}

.cdk-provider-options button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.cdk-provider-options button.active {
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
}

.cdk-provider-options button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.cdk-provider-options strong {
  font-size: 13px;
}

.cdk-provider-options small {
  color: var(--muted);
  font-size: 11px;
}

.cdk-provider-options button.active small {
  color: color-mix(in srgb, var(--surface) 76%, transparent);
}

.cdk-pro5-region-switch {
  grid-column: auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cdk-pro5-mode-switch {
  grid-column: auto;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cdk-pro5-mode-switch > div:first-child {
  display: grid;
  gap: 3px;
}

.cdk-pro5-mode-switch strong {
  font-size: 13px;
}

.cdk-pro5-mode-switch small {
  color: var(--muted);
  font-size: 11px;
}

.cdk-pro5-mode-switch .cdk-provider-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cdk-region-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cdk-pro5-region-switch > div:first-child {
  display: grid;
  gap: 3px;
}

.cdk-pro5-region-switch strong {
  font-size: 13px;
}

.cdk-pro5-region-switch small {
  color: var(--muted);
  font-size: 11px;
}

.cdk-pro5-region-switch select {
  min-width: 150px;
}

@media (max-width: 780px) {
  .cdk-automation-switch {
    grid-template-columns: 1fr;
  }

  .cdk-pro5-region-switch {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .cdk-pro5-mode-switch {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .cdk-provider-options {
    grid-template-columns: 1fr;
  }
}

.cdk-control-panel .filters {
  grid-template-columns: minmax(260px, 1fr) 150px 150px 108px;
  gap: 8px;
}

.cdk-control-panel .filters > * {
  min-height: 40px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.cdk-tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.cdk-tool-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 60%, var(--surface));
}

.cdk-tool-card > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.cdk-tool-card > summary::-webkit-details-marker {
  display: none;
}

.cdk-tool-card > summary > span {
  display: grid;
  gap: 2px;
}

.cdk-tool-card > summary strong {
  font-size: 14px;
}

.cdk-tool-card > summary small {
  color: var(--muted);
  font-size: 11px;
}

.cdk-tool-card > summary::after {
  content: '展开';
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
}

.cdk-tool-card[open] > summary {
  border-bottom: 1px solid var(--line);
}

.cdk-tool-card[open] > summary::after {
  content: '收起';
}

.cdk-tool-form {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.cdk-tool-form .grid.two {
  gap: 8px;
}

#generateForm .grid.two {
  grid-template-columns: minmax(84px, 0.55fr) minmax(112px, 0.8fr) minmax(112px, 0.8fr) minmax(190px, 1.45fr) minmax(150px, 1.1fr);
}

.cdk-tool-form p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.cdk-tool-form textarea {
  min-height: 122px;
  resize: vertical;
}

.cdk-tool-form .btn-row {
  gap: 8px;
}

.cdk-tail-code {
  white-space: nowrap;
  word-break: normal;
}

.task-detail-page-head .page-head {
  align-items: end;
}

.task-detail-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
}

.task-summary-grid {
  gap: 6px;
}

.task-metric {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  box-shadow: none;
}

.task-metric strong {
  font-size: 20px;
}

.task-filter-panel {
  padding: 10px 12px;
}

.task-filter-panel .filters {
  grid-template-columns: minmax(220px, 1fr) 150px 130px 96px 118px 156px;
  gap: 8px;
}

.task-filter-panel .filters > * {
  min-width: 0;
  min-height: 40px;
  padding-top: 7px;
  padding-bottom: 7px;
}

.task-table-wrap {
  max-height: min(720px, calc(100vh - 245px));
  overflow-x: hidden;
  overflow-y: auto;
}

.task-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.task-table th,
.task-table td {
  min-width: 0;
  padding: 8px 6px;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.task-table th:nth-child(1) { width: 3%; }
.task-table th:nth-child(2) { width: 8%; }
.task-table th:nth-child(3) { width: 7%; }
.task-table th:nth-child(4) { width: 5%; }
.task-table th:nth-child(5) { width: 6%; }
.task-table th:nth-child(6) { width: 16%; }
.task-table th:nth-child(7) { width: 8%; }
.task-table th:nth-child(8) { width: 7%; }
.task-table th:nth-child(9) { width: 10%; }
.task-table th:nth-child(10) { width: 11%; }
.task-table th:nth-child(11) { width: 6%; }
.task-table th:nth-child(12) { width: 13%; }

.task-table-copy-field,
.task-row-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 4px;
}

.task-table-copy-field .truncate-cell {
  min-width: 0;
  flex: 1 1 auto;
}

.table-copy-button {
  flex: 0 0 auto;
  min-height: 23px;
  padding: 3px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--brand-2);
  font-size: 10px;
  font-weight: 800;
}

.table-copy-button:hover,
.table-copy-button:focus-visible {
  border-color: var(--brand);
  color: var(--brand);
}

.task-row-actions {
  justify-content: center;
  gap: 7px;
}

.task-row-actions .table-link {
  min-height: 24px;
  padding: 3px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-2);
  white-space: nowrap;
}

.task-row-actions .table-link:hover,
.task-row-actions .table-link:focus-visible {
  border-color: var(--brand);
  text-decoration: none;
}

.task-row-actions .table-link.danger {
  color: #c6283d;
  border-color: #e7a5af;
  background: #fff1f3;
}

.task-row-actions .table-link.danger:hover,
.task-row-actions .table-link.danger:focus-visible {
  color: #fff;
  border-color: #c6283d;
  background: #c6283d;
}

.task-row-actions .task-detail-link {
  border-color: color-mix(in srgb, var(--brand) 52%, var(--line-strong));
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
  color: var(--brand);
  font-weight: 900;
}

.task-table .task-order-cell,
.task-table .task-date-cell {
  overflow-wrap: anywhere;
  white-space: normal;
}

.task-table .status,
.task-table .tag,
.task-table .pill {
  max-width: 100%;
  padding-right: 6px;
  padding-left: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-workbench {
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 12px;
}

.task-list-item {
  content-visibility: auto;
  contain-intrinsic-size: 110px;
  padding: 12px;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.task-list-item:hover {
  transform: translateY(-1px);
}

.task-detail {
  position: static;
  max-height: none;
  overflow: visible;
}

.task-detail-head h2 {
  max-width: min(58vw, 680px);
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-primary-info,
.automation-overview,
.funding-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.automation-overview,
.funding-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.task-primary-info > div,
.automation-overview > div,
.funding-overview > div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.task-primary-info span,
.automation-overview span,
.funding-overview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.task-primary-info strong,
.automation-overview strong,
.funding-overview strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automation-box.compact {
  gap: 10px;
  padding: 13px;
}

.subscription-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
}

.subscription-check > div {
  display: grid;
  gap: 3px;
}

.subscription-check span,
.subscription-check small {
  color: var(--muted);
  font-size: 12px;
}

.subscription-check.completed {
  border-color: color-mix(in srgb, var(--ok) 52%, var(--line));
  background: color-mix(in srgb, var(--ok) 8%, var(--surface));
}

.subscription-check.failed {
  border-color: color-mix(in srgb, var(--danger) 50%, var(--line));
  background: color-mix(in srgb, var(--danger) 7%, var(--surface));
}

.subscription-check.processing {
  border-color: color-mix(in srgb, var(--warn) 50%, var(--line));
}

.task-more-details,
.task-manual-editor {
  border: 1px solid var(--line);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 62%, var(--surface));
}

.task-more-details > summary,
.task-manual-editor > summary {
  padding: 11px 13px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  user-select: none;
}

.task-more-details[open] > summary,
.task-manual-editor[open] > summary {
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

.task-more-details .automation-grid,
.task-technical-details .task-info-grid,
.task-manual-editor form,
.protocol-retry-editor form {
  margin: 12px;
}

.task-manual-editor form {
  gap: 8px;
  margin: 8px 10px 10px;
}

.task-manual-editor textarea {
  min-height: 58px;
  max-height: 80px;
  padding: 8px 10px;
  line-height: 1.4;
}

.protocol-retry-editor {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-2) 62%, var(--surface));
}

.protocol-retry-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line);
}

.protocol-retry-title span,
.protocol-retry-ready {
  color: var(--muted);
  font-size: 12px;
}

.protocol-retry-editor form {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(475px, .85fr);
  align-items: end;
  gap: 10px;
  margin: 9px 11px 10px;
}

.protocol-retry-session {
  gap: 5px;
}

.protocol-retry-session label {
  font-size: 12px;
}

.protocol-retry-editor textarea {
  min-height: 58px;
  max-height: 92px;
  padding: 8px 10px;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 12px;
}

.protocol-retry-controls {
  display: grid;
  gap: 8px;
}

.protocol-retry-confirmation {
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.4;
}

.protocol-retry-confirmation input {
  flex: 0 0 auto;
  margin-top: 1px;
}

.protocol-retry-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.protocol-retry-actions > button {
  width: 100%;
}

.task-secondary-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-secondary-panels > details[open] {
  grid-column: 1 / -1;
}

.task-secondary-panels .task-technical-details {
  grid-column: 1 / -1;
}

/* The task detail is an operating console: keep the retry controls and the
   two execution paths visible in a standard desktop viewport. */
@media (min-width: 1101px) {
  .task-detail {
    gap: 9px;
    padding: 13px 20px;
  }

  .task-detail-head {
    padding-bottom: 8px;
  }

  .task-detail-head .eyebrow {
    margin-bottom: 3px;
  }

  .task-detail-head h2 {
    margin-top: 0;
    font-size: 20px;
  }

  .task-primary-info,
  .task-action-grid {
    gap: 7px;
  }

  .task-primary-info > div,
  .automation-overview > div,
  .funding-overview > div {
    gap: 2px;
    padding: 7px 9px;
  }

  .task-action-grid .ghost {
    min-height: 34px;
    padding: 6px 10px;
  }

  .automation-box.compact {
    gap: 8px;
    padding: 10px 12px;
  }

  .automation-head > div {
    gap: 1px;
  }

  .automation-head .muted {
    font-size: 12px;
  }

  .automation-box .notice {
    margin: 0;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.42;
  }

  .task-more-details > summary,
  .task-manual-editor > summary {
    padding: 8px 11px;
  }

  .task-manual-editor form {
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr);
    align-items: stretch;
  }

  .task-manual-editor .task-status-grid {
    gap: 7px;
  }

  .task-manual-editor .task-status-grid > * {
    min-height: 40px;
    padding: 8px 10px;
  }

  .task-manual-editor textarea {
    min-height: 40px;
    max-height: 58px;
  }

  .task-manual-editor .task-save-row {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .task-manual-editor .task-save-row > * {
    min-height: 34px;
    padding: 6px 10px;
  }
}

@media (max-width: 1100px) {
  .protocol-retry-editor form,
  .task-manual-editor form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .protocol-retry-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .protocol-retry-actions,
  .task-secondary-panels {
    grid-template-columns: 1fr;
  }
}

/* Give customer submissions an immediate, lightweight busy state instead of
   leaving the page looking frozen while the server validates the request. */
.buyer-shell form[aria-busy="true"] .btn[type="submit"] {
  cursor: wait;
  gap: 8px;
}

.buyer-shell form[aria-busy="true"] .btn[type="submit"]::before {
  width: 13px;
  height: 13px;
  border: 2px solid color-mix(in srgb, currentColor 35%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  content: '';
  animation: buyer-submit-spin .7s linear infinite;
}

@keyframes buyer-submit-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .buyer-shell form[aria-busy="true"] .btn[type="submit"]::before {
    animation: none;
  }
}

.compact-actions:empty {
  display: none;
}

.detail-loading-line {
  width: 100%;
  height: 54px;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--surface-2), color-mix(in srgb, var(--surface-2) 54%, var(--surface)), var(--surface-2));
  background-size: 220% 100%;
  animation: task-detail-loading 1.1s ease infinite;
}

.detail-loading-line.short {
  width: 68%;
}

@keyframes task-detail-loading {
  to { background-position: -220% 0; }
}

.admin-content.is-refreshing {
  opacity: 0.82;
}

@media (max-width: 1100px) {
  .automation-overview,
  .funding-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 901px) and (max-width: 1350px) {
  .admin-layout {
    width: calc(100% - 16px);
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 8px;
  }

  .task-filter-panel .filters {
    grid-template-columns: minmax(200px, 1fr) 128px 128px;
    gap: 8px;
  }

  .task-filter-panel .filters > * {
    min-height: 42px;
  }

  .task-table th,
  .task-table td {
    padding-right: 4px;
    padding-left: 4px;
    font-size: 10px;
  }

  /* Reserve enough room for the two values that operators identify tasks by.
     Less frequently scanned status and timing columns give up that space. */
  .task-table th:nth-child(1) { width: 3%; }
  .task-table th:nth-child(2) { width: 10%; }
  .task-table th:nth-child(3) { width: 10%; }
  .task-table th:nth-child(4) { width: 6%; }
  .task-table th:nth-child(5) { width: 6%; }
  .task-table th:nth-child(6) { width: 16%; }
  .task-table th:nth-child(7) { width: 8%; }
  .task-table th:nth-child(8) { width: 7%; }
  .task-table th:nth-child(9) { width: 8%; }
  .task-table th:nth-child(10) { width: 8%; }
  .task-table th:nth-child(11) { width: 4%; }
  .task-table th:nth-child(12) { width: 14%; }

  /* Mobile browsers in "desktop site" mode keep the same information as the
     computer table. The values are compacted instead of hiding columns. */
  .task-table th:nth-child(12),
  .task-table td:nth-child(12) {
    padding-right: 14px;
    padding-left: 8px;
  }

  .task-table td:nth-child(2),
  .task-table td:nth-child(3),
  .task-table td:nth-child(5) {
    white-space: nowrap;
  }

  .task-table td:nth-child(3) .task-table-copy-field {
    gap: 2px;
  }

  .task-table td:nth-child(3) .truncate-cell {
    flex: 0 0 4ch;
    overflow: visible;
    text-overflow: clip;
  }

  .task-table td:nth-child(5) .code {
    display: inline-block;
    min-width: 4ch;
    overflow: visible;
    font-weight: 800;
    letter-spacing: .02em;
  }

  .task-row-actions {
    display: flex;
    justify-content: flex-start;
    gap: 3px;
  }

  .task-row-actions .table-link {
    width: auto;
    min-height: 28px;
    padding: 3px 4px;
    font-size: 10px;
  }

  .table-copy-button {
    padding-right: 4px;
    padding-left: 4px;
  }
}

/* Wide desktops use a calmer reading rhythm: filters are easier to scan and
   each task has enough vertical room to distinguish status, account and actions. */
@media (min-width: 1351px) {
  .task-summary-grid {
    gap: 12px;
  }

  .task-metric {
    min-height: 62px;
    padding: 11px 14px;
  }

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

  .task-filter-panel {
    padding: 14px 16px;
  }

  .task-filter-panel .filters {
    grid-template-columns: minmax(300px, 1fr) 170px 150px 104px 128px 156px;
    gap: 10px;
  }

  .task-filter-panel .filters > * {
    min-height: 44px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .task-table-panel {
    gap: 14px;
    padding: 16px;
  }

  .task-table-wrap {
    border-radius: 10px;
  }

  .task-table th,
  .task-table td {
    padding: 13px 10px;
    font-size: 13px;
    line-height: 1.45;
  }

  .task-table th {
    color: color-mix(in srgb, var(--muted) 88%, var(--ink));
    font-size: 12px;
    letter-spacing: .01em;
  }

  .task-table-row {
    min-height: 62px;
  }

  .task-table-row:nth-child(even) {
    background: color-mix(in srgb, var(--surface-2) 38%, var(--surface));
  }

  .task-table-copy-field {
    gap: 6px;
  }

  .table-copy-button {
    min-height: 28px;
    padding: 4px 7px;
    font-size: 12px;
  }

  .task-row-actions {
    gap: 8px;
  }

  .task-row-actions .table-link {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .task-table .status,
  .task-table .tag,
  .task-table .pill {
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
  }

  .task-table .order-type,
  .task-table .plan-pill,
  .task-table .mini-state {
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .cdk-control-panel .filters,
  .cdk-tool-grid {
    grid-template-columns: 1fr;
  }
}

/* Task ownership is a first-class filter. Keep the search field compact so
   the ownership and status controls remain visible beside it on desktop. */
@media (min-width: 901px) {
  .task-filter-panel .filters {
    grid-template-columns: minmax(190px, .9fr) 130px 130px 130px 112px 120px 128px;
  }

  .task-filter-panel #taskQ {
    max-width: 360px;
  }
}

@media (max-width: 900px) {
  .task-filter-panel .filters {
    grid-template-columns: 1fr 1fr;
  }

  .task-filter-panel #taskQ {
    grid-column: 1 / -1;
    width: 100%;
  }

  .task-filter-panel .filters button[type="submit"] {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .task-detail {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .task-primary-info,
  .automation-overview,
  .funding-overview {
    grid-template-columns: 1fr;
  }

  .subscription-check {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Keep the ownership column compact: the table needs only the two ownership
   labels, while the order type remains available from the task detail view. */
.task-owner-cell {
  white-space: nowrap;
}

.task-owner-cell .task-owner-tag {
  margin-right: 0;
}

.task-table th:nth-child(2) {
  width: 88px;
}

/* 20260811 seller-only Session recharge */
.seller-recharge-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.75fr);
  gap: 18px;
  align-items: start;
}

.seller-recharge-form {
  gap: 20px;
}

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

.zovo-plan-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.seller-plan-card {
  position: relative;
  cursor: pointer;
}

.seller-plan-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.seller-plan-card-body {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.seller-plan-card:hover .seller-plan-card-body {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.seller-plan-card input:focus-visible + .seller-plan-card-body {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.seller-plan-card input:checked + .seller-plan-card-body {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 9%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--brand), 0 10px 26px color-mix(in srgb, var(--brand) 11%, transparent);
}

.seller-plan-card-body strong {
  font-size: 19px;
}

.seller-plan-card-body small {
  color: var(--muted);
  font-size: 13px;
}

.seller-plan-card-body em {
  align-self: end;
  color: var(--brand);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.protocol-automate-form {
  padding: 18px 20px;
}

.protocol-recharge-page .seller-recharge-layout {
  grid-template-columns: minmax(0, 1fr);
}

.protocol-recharge-page > .page-head {
  display: none;
}

.protocol-recharge-page .seller-recharge-guide {
  margin-top: 0;
}

.protocol-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.protocol-task-head > div {
  display: grid;
  gap: 3px;
}

.protocol-task-head span,
.protocol-fieldset legend,
.protocol-option-group > b {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .04em;
}

.protocol-task-head h2,
.protocol-task-head p {
  margin: 0;
}

.protocol-task-head h2 {
  font-size: 21px;
}

.protocol-task-head p {
  color: var(--muted);
  font-size: 13px;
}

.protocol-fieldset {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.protocol-fieldset legend {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.protocol-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.protocol-choice-card {
  min-width: 0;
  min-height: 58px;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 9px 10px;
  text-align: left;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  cursor: pointer;
}

.protocol-choice-card:hover {
  border-color: var(--line-strong);
}

.protocol-choice-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.protocol-choice-card.active {
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
}

.protocol-choice-card strong,
.protocol-choice-card small,
.protocol-choice-card em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-choice-card strong {
  font-size: 13px;
}

.protocol-choice-card small {
  color: var(--muted);
  font-size: 11px;
}

.protocol-choice-card em {
  margin-top: auto;
  color: var(--brand);
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.protocol-choice-card.active small,
.protocol-choice-card.active em {
  color: color-mix(in srgb, var(--surface) 76%, transparent);
}

.protocol-option-stack,
.protocol-option-group {
  display: grid;
  gap: 8px;
}

.protocol-option-stack {
  gap: 12px;
}

.protocol-option-choice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.protocol-field-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.protocol-field-actions button {
  min-width: 96px;
  min-height: 42px;
  padding: 0 18px;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.protocol-field-actions button:disabled {
  opacity: .45;
}

.protocol-auth-status {
  display: flex;
  align-items: center;
  min-height: 34px;
  margin-top: 6px;
  padding: 7px 9px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.protocol-card-recognized {
  min-height: 24px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
}

.protocol-automate-submit {
  margin-top: 16px;
}

.protocol-card-fields {
  display: grid;
  gap: 7px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-2);
}

.protocol-card-fields:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent);
}

.protocol-card-fields input {
  min-width: 0;
  font-family: "Cascadia Mono", Consolas, monospace;
  letter-spacing: .01em;
}

.protocol-card-format {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.protocol-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.protocol-progress-head strong {
  font-size: 14px;
}

.protocol-progress-head span {
  color: var(--muted);
  font-size: 11px;
}

.protocol-progress-list {
  display: grid;
  gap: 0;
  margin-top: 12px;
}

.protocol-progress-step {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  min-height: 46px;
  gap: 10px;
  padding: 0 0 9px;
}

.protocol-progress-step:not(:last-child)::after {
  position: absolute;
  top: 12px;
  bottom: -1px;
  left: 6px;
  width: 1px;
  background: var(--line);
  content: '';
}

.protocol-progress-step i {
  z-index: 1;
  width: 10px;
  height: 10px;
  margin-top: 2px;
  background: var(--line-strong);
  border: 3px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.protocol-progress-step > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.protocol-progress-step strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-progress-step span {
  color: var(--muted);
  font-size: 11px;
}

.protocol-progress-step.current i,
.protocol-progress-step.running i,
.protocol-progress-step.queued i {
  background: #26323e;
  box-shadow: 0 0 0 1px color-mix(in srgb, #26323e 42%, var(--line));
}

.protocol-progress-step.succeeded i,
.protocol-progress-step.completed i {
  background: #22a06b;
  box-shadow: 0 0 0 1px color-mix(in srgb, #22a06b 44%, var(--line));
}

.protocol-progress-step.failed i,
.protocol-progress-step.manual_review i,
.protocol-progress-step.cancelled i {
  background: #ce4b4b;
  box-shadow: 0 0 0 1px color-mix(in srgb, #ce4b4b 44%, var(--line));
}

@media (max-width: 760px) {
  .protocol-automate-form {
    padding: 15px;
  }

  .protocol-task-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .protocol-option-choice-grid {
    grid-template-columns: 1fr;
  }

  .protocol-progress-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 440px) {
  .protocol-choice-grid {
    grid-template-columns: 1fr;
  }
}

.seller-session-preview {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.recognized-account-preview {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.recognized-account-preview .seller-session-preview {
  min-width: 0;
}

.recognized-account-copy {
  flex: 0 0 auto;
  min-height: 30px;
  padding: 4px 10px;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 560px) {
  .recognized-account-preview {
    align-items: flex-start;
    flex-direction: column;
  }
}

.seller-recharge-safety {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 34%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  font-size: 13px;
  line-height: 1.65;
}

.seller-recharge-safety span,
.seller-recharge-guide li span {
  color: var(--muted);
}

.seller-recharge-submit {
  min-height: 48px;
}

.seller-recharge-guide {
  position: sticky;
  top: 92px;
}

.seller-recharge-guide ol {
  display: grid;
  gap: 16px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.seller-recharge-guide li {
  padding-left: 4px;
  line-height: 1.55;
}

.seller-recharge-guide li strong,
.seller-recharge-guide li span {
  display: block;
}

.seller-recharge-guide li::marker {
  color: var(--brand);
  font-weight: 900;
}

.seller-recharge-result {
  margin-top: 18px;
}

/* Keep the seller direct-recharge form within a desktop viewport without
   disabling scroll globally. Results and small screens retain their natural
   layout so no information is ever clipped. */
@media (min-width: 1100px) and (min-height: 880px) {
  .seller-recharge-page.is-form {
    display: grid;
    gap: 10px;
  }

  .seller-recharge-page.is-form .page-head {
    margin-bottom: 0;
  }

  .seller-recharge-page.is-form .page-head .eyebrow {
    margin-bottom: 3px;
  }

  .seller-recharge-page.is-form .page-head h1 {
    font-size: clamp(24px, 2vw, 29px);
  }

  .seller-recharge-page.is-form .page-head p:not(.eyebrow) {
    margin: 3px 0 0;
    font-size: 13px;
    line-height: 1.4;
  }

  .seller-recharge-page.is-form .seller-recharge-layout {
    grid-template-columns: minmax(0, 1.72fr) minmax(330px, 0.78fr);
    gap: 14px;
    align-items: stretch;
  }

  .seller-recharge-page.is-form .seller-recharge-form {
    gap: 10px;
    padding: 16px 20px;
  }

  .seller-recharge-page.is-form .seller-recharge-form > :first-child {
    display: flex;
    align-items: baseline;
    gap: 10px;
  }

  .seller-recharge-page.is-form .seller-recharge-form > :first-child .eyebrow {
    margin: 0;
  }

  .seller-recharge-page.is-form .seller-recharge-form h2 {
    font-size: 21px;
  }

  .seller-recharge-page.is-form .seller-plan-grid {
    gap: 10px;
  }

  .seller-recharge-page.is-form .seller-plan-card-body {
    min-height: 92px;
    gap: 4px;
    padding: 12px 16px;
  }

  .seller-recharge-page.is-form .seller-plan-card-body strong {
    font-size: 17px;
  }

  .seller-recharge-page.is-form .seller-plan-card-body small,
  .seller-recharge-page.is-form .seller-plan-card-body em {
    font-size: 12px;
  }

  .seller-recharge-page.is-form .field {
    gap: 5px;
  }

  .seller-recharge-page.is-form .session-textarea {
    min-height: clamp(130px, 18vh, 165px);
    height: clamp(130px, 18vh, 165px);
    line-height: 1.45;
  }

  .seller-recharge-page.is-form .seller-session-preview {
    font-size: 12px;
    line-height: 1.35;
  }

  .seller-recharge-page.is-form .seller-recharge-form input {
    min-height: 40px;
    padding-block: 9px;
  }

  .seller-recharge-page.is-form .seller-recharge-safety {
    gap: 3px;
    padding: 10px 13px;
    line-height: 1.4;
  }

  .seller-recharge-page.is-form .seller-recharge-submit {
    min-height: 43px;
    padding-block: 9px;
  }

  .seller-recharge-page.is-form .seller-recharge-guide {
    position: static;
    padding: 18px 20px;
  }

  .seller-recharge-page.is-form .seller-recharge-guide .eyebrow {
    margin-bottom: 4px;
  }

  .seller-recharge-page.is-form .seller-recharge-guide h2 {
    font-size: 21px;
  }

  .seller-recharge-page.is-form .seller-recharge-guide ol {
    gap: 10px;
    margin-top: 12px;
  }

  .seller-recharge-page.is-form .seller-recharge-guide li {
    line-height: 1.35;
  }

  .seller-recharge-page.is-form .seller-recharge-guide li span {
    font-size: 13px;
    line-height: 1.42;
  }
}

/* Protocol automation has more steps than direct recharge. On desktop, use the
   available width so its whole form remains visible without a side panel. */
@media (min-width: 1100px) and (min-height: 880px) {
  .seller-recharge-page.is-form.protocol-recharge-page .seller-recharge-layout {
    display: block;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .seller-recharge-guide {
    display: none;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .seller-recharge-form {
    gap: 0;
    padding: 12px 16px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-task-head h2 {
    font-size: 19px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-task-head p {
    font-size: 12px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-fieldset {
    margin-top: 9px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-fieldset legend {
    margin-bottom: 6px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-choice-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-choice-card {
    min-height: 52px;
    gap: 2px;
    padding: 7px 8px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-choice-card strong {
    font-size: 12px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-choice-card small,
  .seller-recharge-page.is-form.protocol-recharge-page .protocol-choice-card em {
    font-size: 10px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-option-stack {
    grid-template-columns: minmax(170px, .56fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-option-choice-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .seller-recharge-page.is-form.protocol-recharge-page .session-textarea {
    min-height: 88px;
    height: 88px;
    padding: 8px 10px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-auth-status {
    min-height: 28px;
    margin-top: 4px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-card-fields {
    gap: 4px;
    padding: 8px 10px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-card-format {
    font-size: 11px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .seller-recharge-safety {
    min-height: 0;
    margin-top: 9px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .seller-recharge-submit {
    min-height: 40px;
    margin-top: 9px;
  }
}

/* Protocol automation mirrors the compact two-column Automate layout: the
   submit form stays on the left while its latest server-backed progress is
   immediately visible on the right. */
.protocol-card-source {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}

.protocol-card-source button {
  display: grid;
  gap: 3px;
  min-height: 54px;
  padding: 8px 10px;
  color: var(--text);
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.protocol-card-source button:hover,
.protocol-card-source button:focus-visible {
  border-color: var(--line-strong);
}

.protocol-card-source button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.protocol-card-source button.active {
  color: var(--surface);
  background: var(--brand);
  border-color: var(--brand);
}

.protocol-card-source strong {
  font-size: 12px;
}

.protocol-card-source small {
  color: var(--muted);
  font-size: 10px;
}

.protocol-card-source button.active small {
  color: color-mix(in srgb, var(--surface) 76%, transparent);
}

.protocol-platform-card-note {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  color: var(--muted);
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  border-radius: 8px;
  font-size: 11px;
  line-height: 1.45;
}

.protocol-platform-card-note strong {
  color: var(--text);
}

.protocol-live-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}

.protocol-live-head,
.protocol-live-detail-head,
.protocol-live-task-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.protocol-live-head .eyebrow {
  margin: 0 0 3px;
}

.protocol-live-head h2 {
  margin: 0;
  font-size: 19px;
}

.protocol-live-head p:not(.eyebrow) {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.protocol-live-refresh {
  min-height: 30px;
  padding-inline: 9px;
  font-size: 11px;
}

.protocol-live-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  flex-shrink: 0;
  max-width: 155px;
}

.protocol-live-actions .protocol-live-cancel {
  min-height: 30px;
  padding: 7px 10px;
  font-size: 11px;
  white-space: nowrap;
  color: #fff;
  background: #c6283d;
  border: 1px solid #c6283d;
}

.protocol-live-actions .protocol-live-cancel:not(:disabled):hover,
.protocol-live-actions .protocol-live-cancel:focus-visible {
  background: #a51d30;
  border-color: #a51d30;
}

.protocol-live-list {
  display: grid;
  gap: 6px;
  max-height: 168px;
  overflow: auto;
  padding-right: 2px;
}

.protocol-live-task {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
}

.protocol-live-task:hover,
.protocol-live-task.active {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, var(--surface));
}

.protocol-live-task:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.protocol-live-task-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

.protocol-live-task .status,
.protocol-live-detail-head .status {
  flex: 0 0 auto;
  font-size: 10px;
}

.protocol-live-task small,
.protocol-live-empty {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-live-empty {
  padding: 12px 8px;
  text-align: center;
  white-space: normal;
}

.protocol-live-detail {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.protocol-live-detail-focused {
  gap: 12px;
  padding-top: 0;
  border-top: 0;
}

.protocol-live-account {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.protocol-live-account > div {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 8px 9px;
  border-right: 1px solid var(--line);
}

.protocol-live-account span {
  color: var(--muted);
  font-size: 10px;
}

.protocol-live-account strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-live-account .status {
  margin-inline: 8px;
  font-size: 10px;
}

.protocol-live-progress-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.protocol-live-progress-label strong {
  font-size: 12px;
}

.protocol-live-progress-label span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-live-detail-head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.protocol-live-detail-head span,
.protocol-live-detail-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-live-detail-head span {
  color: var(--muted);
  font-size: 10px;
}

.protocol-live-detail-head strong {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11px;
}

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

.protocol-live-metrics span {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 7px 8px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 10px;
}

.protocol-live-metrics span:nth-child(2n) {
  border-right: 0;
}

.protocol-live-metrics span:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.protocol-live-metrics strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-live-message {
  margin: 0;
  padding: 7px 8px;
  color: var(--muted);
  background: var(--surface-2);
  border-radius: 7px;
  font-size: 11px;
  line-height: 1.4;
}

.protocol-live-error {
  margin: 0;
  padding: 7px 8px;
  font-size: 11px;
  line-height: 1.35;
}

.protocol-live-timeline {
  display: grid;
  gap: 5px;
  max-height: none;
  overflow: visible;
  padding: 1px 0;
}

.protocol-live-step {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.protocol-live-step i {
  display: grid;
  place-items: center;
  width: 7px;
  height: 7px;
  margin-top: 1px;
  background: var(--line-strong);
  border: 2px solid var(--surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
  color: white;
  font-size: 11px;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.protocol-live-step.current i,
.protocol-live-step.running i,
.protocol-live-step.queued i {
  background: var(--brand);
}

.protocol-live-step.succeeded i,
.protocol-live-step.completed i {
  width: 14px;
  height: 14px;
  margin-top: 0;
  background: #22a06b;
  border: 0;
  box-shadow: 0 0 0 1px color-mix(in srgb, #22a06b 28%, var(--surface));
}

.protocol-live-step.failed i,
.protocol-live-step.cancelled i,
.protocol-live-step.manual_review i {
  background: #ce4b4b;
}

.protocol-live-step > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  min-width: 0;
  gap: 8px;
}

.protocol-live-step strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.protocol-live-step span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  white-space: nowrap;
}

@media (min-width: 1050px) {
  .seller-recharge-page.is-form.protocol-recharge-page .seller-recharge-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(300px, .82fr);
    gap: 12px;
    align-items: stretch;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-choice-grid {
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-option-choice-grid {
    grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-card-source {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-live-panel {
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 82px;
    height: auto;
    min-height: 0;
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-live-detail-focused {
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .seller-recharge-page.is-form.protocol-recharge-page .protocol-live-timeline {
    min-height: 0;
    overflow-y: auto;
    padding-right: 4px;
  }
}

@media (max-width: 1049px) {
  .protocol-recharge-page .seller-recharge-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .protocol-card-source,
  .protocol-live-metrics {
    grid-template-columns: 1fr;
  }

  .protocol-live-account {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .protocol-live-account > div:nth-child(2) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .protocol-live-metrics span,
  .protocol-live-metrics span:nth-child(2n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .protocol-live-metrics span:last-child {
    border-bottom: 0;
  }
}

.seller-confirmation-panel {
  display: grid;
  gap: 22px;
  max-width: 1180px;
}

.seller-confirmation-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.seller-confirmation-head h2 {
  margin: 4px 0 6px;
}

.seller-confirmation-head p {
  margin: 0;
  color: var(--muted);
}

.seller-confirmation-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 4px 12px;
}

.seller-confirmation-steps::before {
  position: absolute;
  top: 19px;
  right: 16.666%;
  left: 16.666%;
  height: 2px;
  background: var(--brand);
  content: '';
}

.seller-confirmation-steps > div {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.seller-confirmation-steps strong {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--brand) 24%, transparent);
}

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

.seller-confirmation-grid > div {
  display: grid;
  gap: 6px;
  min-height: 86px;
  align-content: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
}

.seller-confirmation-grid span,
.seller-confirmation-grid small {
  color: var(--muted);
  font-size: 12px;
}

.seller-confirmation-grid strong {
  overflow-wrap: anywhere;
}

.seller-confirmation-grid .seller-confirmation-note {
  grid-column: 1 / -1;
  min-height: 70px;
}

.seller-confirmation-warning {
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 6%, var(--surface));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.seller-confirmation-actions {
  display: grid;
  grid-template-columns: minmax(160px, 0.4fr) minmax(260px, 1.6fr);
  gap: 12px;
}

.seller-confirmation-actions button {
  min-height: 48px;
}

.success-text {
  color: var(--brand) !important;
}

.compact-link {
  display: inline-flex;
  width: auto;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  font-size: 12px;
}

/* Keep the submission controls visible on shorter screens. */
@media (max-height: 1050px) {
  .buyer-recharge-compact .online-group-join { margin-top: 8px; padding: 8px 12px; }
  .buyer-recharge-compact .online-group-join-button { min-height: 40px; padding: 8px 18px; }
  .buyer-recharge-compact .online-group-join strong { padding: 6px 8px; }
  .buyer-recharge-compact .session-submit-steps { padding: 8px 12px; gap: 10px; }
  .buyer-recharge-compact .session-submit-step-content p { margin: 4px 0; }
  .buyer-recharge-compact .session-step-titlebar { margin-bottom: 5px; }
  .buyer-recharge-compact .buyer-announcement span { font-size: 13px; line-height: 1.45; }
  .buyer-recharge-compact .buyer-hero h1 { font-size: clamp(24px, 3vw, 38px); }
}

/* 20260913: make the chongzhiw.online anti-loss entry easy to notice. */
.online-group-join {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  width: fit-content;
  max-width: calc(100% - 24px);
  margin: 18px auto 0;
  padding: 14px 16px;
  border: 2px solid #24c4ca;
  border-radius: 18px;
  background: linear-gradient(110deg, color-mix(in srgb, #24c4ca 10%, var(--surface)), var(--surface));
  box-shadow: 0 8px 24px rgba(0, 132, 142, 0.16);
}

.online-group-join > div {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.online-group-join strong {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 76, 94, 0.08);
  color: #d92d3f;
  font-size: 21px;
  font-weight: 950;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.online-group-join strong::before {
  content: '⚠';
  font-size: 16px;
}

.online-group-join span {
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-group-join-button {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 11px 24px;
  border: 0;
  border-radius: 10px;
  background: #007f89;
  box-shadow: 0 5px 12px rgba(0, 127, 137, 0.22);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 950;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.online-group-join-button:focus-visible {
  outline: 3px solid #007f89;
  outline-offset: 4px;
}

.online-group-join-button:hover {
  filter: brightness(1.06);
}

.online-group-qr-dialog {
  width: min(390px, calc(100% - 32px));
  margin: auto;
  padding: 18px;
  border: 0;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 72px rgba(10, 26, 50, 0.34);
  color: var(--text);
}

.online-group-qr-dialog::backdrop {
  background: rgba(9, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

.online-group-qr-dialog-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.online-group-qr-dialog .eyebrow {
  margin: 0 0 5px;
}

.online-group-qr-dialog h2 {
  margin: 0;
  color: var(--text);
  font-size: 24px;
}

.online-group-qr-close {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--text) 8%, transparent);
  color: var(--text);
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

.online-group-qr-dialog > p {
  margin: 12px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.online-group-qr-dialog img {
  display: block;
  width: min(100%, 320px);
  max-height: 390px;
  margin: 16px auto 0;
  border: 8px solid #fff;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(22, 35, 61, 0.14);
  object-fit: cover;
  object-position: center 54%;
}

@media (max-width: 900px) {
  .seller-recharge-layout {
    grid-template-columns: 1fr;
  }

  .seller-recharge-guide {
    position: static;
  }
}

@media (max-width: 560px) {
  .online-group-join {
    width: fit-content;
    max-width: calc(100% - 16px);
    gap: 10px;
    padding: 12px;
  }

  .online-group-join > div {
    display: grid;
    gap: 2px;
  }

  .online-group-join span {
    max-width: none;
    font-size: 12px;
    white-space: normal;
  }

  .online-group-join strong {
    font-size: 18px;
    padding: 9px 8px;
  }

  .online-group-join-button {
    min-height: 44px;
    padding: 9px 14px;
    font-size: 15px;
  }

  .online-group-qr-dialog {
    padding: 16px;
  }

  .online-group-qr-dialog img {
    max-height: 360px;
  }

  .seller-plan-grid {
    grid-template-columns: 1fr;
  }

  .seller-confirmation-head {
    flex-direction: column;
  }

  .seller-confirmation-grid,
  .seller-confirmation-actions {
    grid-template-columns: 1fr;
  }

  .seller-confirmation-grid .seller-confirmation-note {
    grid-column: auto;
  }
}

/* Final desktop-site width override for phone browsers.  The desktop-site
   viewport can be wider than the app root reported by the embedded browser;
   anchor the seller console to the viewport so it cannot leave a blank strip
   on the right. */
@media (min-width: 761px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-shell:not(.buyer-shell) {
    width: 100vw;
    max-width: none;
  }

  .app-shell:not(.buyer-shell) .topbar,
  .app-shell:not(.buyer-shell) .admin-layout {
    width: 100%;
    max-width: none;
  }

  .app-shell:not(.buyer-shell) .admin-layout {
    margin-inline: 0;
    padding-inline: 12px;
  }

  .app-shell:not(.buyer-shell) .admin-content,
  .app-shell:not(.buyer-shell) .task-table-panel,
  .app-shell:not(.buyer-shell) .task-filter-panel {
    min-width: 0;
    width: 100%;
  }
}

/* Make task ownership immediately visible in the all-tasks table without
   changing the table columns or overriding the existing status colors. */
.task-list-head-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  min-width: 0;
}

.task-owner-legend {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.task-owner-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.task-owner-swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.task-owner-swatch.own {
  background: color-mix(in srgb, var(--brand) 68%, var(--surface));
}

.task-owner-swatch.agent {
  background: color-mix(in srgb, var(--warn) 78%, var(--surface));
}

.task-owner-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-right: 3px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.task-owner-tag.own {
  background: color-mix(in srgb, var(--brand) 14%, var(--surface));
  color: var(--brand);
}

.task-owner-tag.agent {
  background: color-mix(in srgb, var(--warn) 17%, var(--surface));
  color: var(--warn);
}

.task-table-row.owner-own > td {
  background: color-mix(in srgb, var(--brand) 4%, var(--surface));
  border-bottom-color: color-mix(in srgb, var(--brand) 16%, var(--line));
}

.task-table-row.owner-agent > td {
  background: color-mix(in srgb, var(--warn) 8%, var(--surface));
  border-bottom-color: color-mix(in srgb, var(--warn) 20%, var(--line));
}

.task-table-row.owner-own:hover > td,
.task-table-row.owner-own.active > td {
  background: color-mix(in srgb, var(--brand) 10%, var(--surface));
}

.task-table-row.owner-agent:hover > td,
.task-table-row.owner-agent.active > td {
  background: color-mix(in srgb, var(--warn) 15%, var(--surface));
}

@media (max-width: 700px) {
  .task-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .task-list-head-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* 20261011 make the long-character input height deterministic.
   Keep this override at the end so older textarea rules cannot expand the
   editor back to the previous tall layout. */
#sessionJson.session-textarea {
  min-height: 112px !important;
  height: 112px !important;
}

@media (max-width: 760px) {
  #sessionJson.session-textarea {
    min-height: 120px !important;
    height: 120px !important;
  }
}

/* 20261011 task table density: keep the ownership label readable while
   giving the account and action columns the space they actually use. */
.task-owner-tag {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 12px;
}

.task-owner-legend {
  font-size: 12px;
}

@media (min-width: 901px) {
  .task-table th:nth-child(1) { width: 3%; }
  .task-table th:nth-child(2) { width: 6%; }
  .task-table th:nth-child(3) { width: 11%; }
  .task-table th:nth-child(4) { width: 5%; }
  .task-table th:nth-child(5) { width: 5%; }
  .task-table th:nth-child(6) { width: 19%; }
  .task-table th:nth-child(7) { width: 8%; }
  .task-table th:nth-child(8) { width: 7%; }
  .task-table th:nth-child(9) { width: 8%; }
  .task-table th:nth-child(10) { width: 10%; }
  .task-table th:nth-child(11) { width: 5%; }
  .task-table th:nth-child(12) { width: 13%; }
}

.task-table td:nth-child(3) .task-table-copy-field {
  min-width: 74px;
}

.task-table td:nth-child(3) .table-copy-button {
  min-width: 28px;
  padding-right: 4px;
  padding-left: 4px;
}

/* 20261011 desktop-site mobile fix: keep the cancellation action reachable.
   On a phone that reports a desktop viewport, the action column is still
   rendered as a compact fixed-layout table. Give it a real share of the row
   and allow the buttons to wrap instead of clipping the red cancel action. */
@media (min-width: 901px) and (max-width: 1350px) {
  .task-table th:nth-child(6) { width: 17%; }
  .task-table th:nth-child(10) { width: 9%; }
  .task-table th:nth-child(11) { width: 4%; }
  .task-table th:nth-child(12) { width: 17%; }

  .task-table th:nth-child(12),
  .task-table td:nth-child(12) {
    padding-right: 4px;
    padding-left: 4px;
  }

  .task-row-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 3px;
  }

  .task-row-actions .table-link {
    flex: 0 0 auto;
  }

  .task-row-actions .table-link.danger {
    min-width: 56px;
  }
}
