/* ==========================================================================
   GPT-PLUS-AUTO interface design system.
   Hand-written, zero external CSS framework / CDN.
   ========================================================================== */

:root {
  --klein: #002fa7;          /* primary blue             */
  --klein-bright: #1e50c8;   /* hover / lighter accent   */
  --klein-deep: #001e6c;     /* sidebar top              */
  --klein-darker: #00103a;   /* sidebar bottom           */
  --klein-50: #eef2fd;
  --klein-100: #dde6fb;
  --klein-200: #bcccf6;

  --ink-900: #0a1330;
  --ink-800: #1b2545;
  --ink-700: #313c5e;
  --ink-500: #5b6486;
  --ink-400: #8a90a8;
  --ink-300: #b9bed0;

  --line: #e4e8f2;
  --line-soft: #eef1f7;
  --bg: #f3f5fb;
  --surface: #ffffff;

  --good: #16a34a;
  --good-bg: #e7f6ec;
  --warn: #d98a00;
  --warn-bg: #fdf3e0;
  --bad: #dc2626;
  --bad-bg: #fdeaea;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(10, 19, 48, 0.05), 0 1px 3px rgba(10, 19, 48, 0.07);
  --shadow-md: 0 8px 24px rgba(10, 19, 48, 0.10);
  --shadow-lg: 0 24px 60px rgba(10, 19, 48, 0.22);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink-800);
  font-size: 14px;
  line-height: 1.5;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--ink-900); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--klein-50);
  color: var(--klein);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 0.85em;
}

/* ============================ Shell layout ============================ */

.shell { display: flex; min-height: 100vh; }

/* ============================ Sidebar ============================ */

.sidebar {
  width: 248px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--klein-deep) 0%, var(--klein-darker) 100%);
  color: #fff;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand__logo {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 11px;
  background: var(--klein);
  box-shadow: 0 6px 18px rgba(0, 47, 167, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0;
}

.brand__title { font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: 0; white-space: nowrap; }
.brand__subtitle {
  font-size: 11px;
  color: var(--klein-200);
  letter-spacing: 0;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidebar__nav { flex: 1; padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; }

.nav__group-label {
  font-size: 11px;
  color: rgba(188, 204, 246, 0.6);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 12px 6px;
}

.nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--klein-200);
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
  position: relative;
}
.nav__item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav__item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav__item__badge {
  margin-left: auto;
  min-width: 22px;
  text-align: center;
  background: var(--klein);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}

.nav__item--active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-weight: 500;
}
.nav__item--active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 22px;
  border-radius: 0 4px 4px 0;
  background: #fff;
}

/* ============================ Main column ============================ */

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar__title { font-size: 20px; }
.topbar__subtitle { font-size: 13px; color: var(--ink-500); margin-top: 2px; }
.topbar__right { display: flex; align-items: center; gap: 18px; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--ink-500);
}
.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--good);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.16);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--klein-50);
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s;
}
.user-chip:hover { background: var(--klein-100); }
.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--klein);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 180px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 30;
}
.dropdown__item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ink-700);
}
.dropdown__item:hover { background: var(--klein-50); }
.dropdown__item--danger { color: var(--bad); }

.page { padding: 28px 32px; display: flex; flex-direction: column; gap: 20px; }

/* ============================ Cards ============================ */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line-soft);
}
.card__header h2 { font-size: 16px; }
.card__header p { font-size: 13px; color: var(--ink-500); margin-top: 3px; }
.card__body { padding: 24px; }
.card__body--tight { padding: 16px 24px; }

/* ============================ Stat cards ============================ */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
}
.stat-card::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--klein);
}
.stat-card--good::after { background: var(--good); }
.stat-card--warn::after { background: var(--warn); }
.stat-card--bad::after { background: var(--bad); }

.stat-card__label {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 500;
}
.stat-card__value {
  font-size: 30px;
  font-weight: 700;
  color: var(--ink-900);
  margin-top: 6px;
  line-height: 1.1;
}
.stat-card__hint { font-size: 12px; color: var(--ink-400); margin-top: 6px; }

.hero-card {
  grid-column: span 4;
  background: linear-gradient(120deg, var(--klein) 0%, var(--klein-bright) 100%);
  color: #fff;
  border: 0;
}
.hero-card .card__body { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.hero-card h2 { color: #fff; font-size: 22px; }
.hero-card p { color: rgba(255, 255, 255, 0.82); margin-top: 8px; max-width: 540px; }

/* ============================ Forms ============================ */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12px; font-weight: 500; color: var(--ink-700); }
.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink-800);
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field-input:focus,
.field-select:focus,
.field-textarea:focus {
  outline: none;
  border-color: var(--klein);
  box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.14);
}
.field-textarea { resize: vertical; min-height: 72px; }
.field-input:disabled { background: var(--bg); color: var(--ink-400); cursor: not-allowed; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .col-span-2 { grid-column: span 2; }

/* ============================ Buttons ============================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn--primary { background: var(--klein); color: #fff; box-shadow: 0 6px 16px rgba(0, 47, 167, 0.28); }
.btn--primary:hover { background: var(--klein-bright); }
.btn--primary:disabled { background: var(--ink-300); box-shadow: none; cursor: not-allowed; }
.btn--ghost { background: #fff; color: var(--ink-700); border-color: var(--line); }
.btn--ghost:hover { background: var(--klein-50); border-color: var(--klein-200); color: var(--klein); }
.btn--danger { background: var(--bad-bg); color: var(--bad); }
.btn--danger:hover { background: #f9d9d9; }
.btn--block { width: 100%; }
.btn--sm { padding: 7px 12px; font-size: 13px; }

.btn-text {
  background: transparent;
  border: 0;
  color: var(--klein);
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 6px;
}
.btn-text:hover { background: var(--klein-50); }
.btn-text--danger { color: var(--bad); }
.btn-text--danger:hover { background: var(--bad-bg); }

/* ============================ Toolbar ============================ */

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.search-input { width: 220px; }

.bulkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 24px;
  background: var(--klein-50);
  border-bottom: 1px solid var(--line-soft);
}
.bulkbar__count { font-size: 13px; color: var(--klein); font-weight: 600; }

/* ============================ Table ============================ */

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table thead th {
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-500);
  background: var(--bg);
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}
.data-table tbody tr:hover td { background: var(--klein-50); }
.data-table .col-checkbox { width: 40px; }
.data-table .col-actions { text-align: right; white-space: nowrap; }
.cell-name { font-weight: 600; color: var(--ink-900); }
.cell-sub { font-size: 12px; color: var(--ink-400); margin-top: 2px; }
.cell-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--ink-500); }

.avatar-cell { display: flex; align-items: center; gap: 12px; }
.avatar-circle {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--klein-100);
  color: var(--klein);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.empty-row { text-align: center; color: var(--ink-400); padding: 56px 0; }

/* ============================ Pills ============================ */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 11px;
  border-radius: 999px;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.pill--active { background: var(--good-bg); color: var(--good); }
.pill--pending { background: var(--warn-bg); color: var(--warn); }
.pill--disabled { background: var(--bad-bg); color: var(--bad); }
.pill--muted { background: var(--line-soft); color: var(--ink-500); }
.pill--muted::before { display: none; }

/* ============================ Pagination ============================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--ink-500);
}
.pagination__pages { display: flex; align-items: center; gap: 8px; }

/* ============================ Segmented ============================ */

.seg-group { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.seg {
  background: #fff;
  border: 0;
  padding: 9px 16px;
  font-size: 13px;
  color: var(--ink-700);
  border-right: 1px solid var(--line);
}
.seg:last-child { border-right: 0; }
.seg:hover { background: var(--klein-50); }
.seg--on { background: var(--klein); color: #fff; }
.seg--on:hover { background: var(--klein); }

/* ============================ Switch ============================ */

.switch {
  position: relative;
  width: 40px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink-300);
  padding: 0;
  transition: background 0.15s;
  flex-shrink: 0;
}
.switch--on { background: var(--klein); }
.switch__knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s;
}
.switch--on .switch__knob { transform: translateX(18px); }

.switch-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.switch-row:last-child { border-bottom: 0; }
.switch-row__label { font-size: 14px; font-weight: 500; color: var(--ink-800); }
.switch-row__hint { font-size: 12px; color: var(--ink-400); margin-top: 2px; }

/* ============================ Modal ============================ */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(10, 19, 48, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}
.modal {
  width: 100%;
  max-width: 560px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modal-in 0.18s ease;
}
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.modal__header h3 { font-size: 16px; }
.modal__close { background: transparent; border: 0; font-size: 18px; color: var(--ink-400); line-height: 1; }
.modal__close:hover { color: var(--ink-700); }
.modal__body { padding: 24px; max-height: 70vh; overflow-y: auto; }
.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

/* ============================ Settings 2-col ============================ */
.settings-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.settings-cols > .card { margin: 0; }

.export-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .settings-cols { grid-template-columns: 1fr; }
}

/* ============================ Dashboard Metrics ============================ */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.metric {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  text-align: center;
}
.metric__value { font-size: 26px; font-weight: 800; color: var(--ink-700); line-height: 1.2; }
.metric__label { margin-top: 6px; font-size: 12px; color: var(--ink-500); }
.metric--good .metric__value { color: #16a34a; }
.metric--bad .metric__value { color: #d23b3b; }
.metric--klein { background: var(--klein-50); border-color: transparent; }
.metric--klein .metric__value { color: var(--klein); }

/* 仪表盘双列布局：趋势图 + 最近记录 */
.dash-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.dash-cols > .card { margin: 0; }
@media (max-width: 1000px) {
  .dash-cols { grid-template-columns: 1fr; }
}

/* 运行进度条 */
.run-progress-track {
  margin-top: 14px;
  height: 8px;
  border-radius: 999px;
  background: var(--klein-50);
  overflow: hidden;
}
.run-progress-track__bar {
  height: 100%;
  border-radius: 999px;
  background: var(--klein);
  transition: width 0.4s ease;
}

/* 近 7 天趋势柱状图 */
.trend-chart {
  display: flex;
  align-items: stretch;
  gap: 10px;
  height: 180px;
}
.trend-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.trend-col__bars {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}
.trend-col__bar {
  width: 16px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
}
.trend-col__date { font-size: 12px; color: var(--ink-500); }
.trend-legend {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--ink-500);
}
.trend-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
}

/* ============================ Account Runner ============================ */
.run-bar {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.run-bar__field { width: 140px; }
.run-bar__actions { display: flex; gap: 10px; margin-left: auto; }

.run-status {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-500);
}
.run-status__item b { color: var(--ink-700); font-size: 14px; }
.run-status__item--ok b { color: #16a34a; }
.run-status__item--err b { color: #d23b3b; }
.run-status__pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink-500);
  font-weight: 600;
}
.run-status__pill--on {
  background: var(--klein-50);
  color: var(--klein);
}

.log-autoscroll { font-size: 12px; color: var(--ink-500); display: inline-flex; align-items: center; gap: 6px; }

.log-panel {
  margin: 0 4px 4px;
  height: 360px;
  overflow-y: auto;
  background: #0b1020;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--mono, ui-monospace, SFMono-Regular, Menlo, monospace);
  font-size: 12.5px;
  line-height: 1.7;
}
.log-line { display: flex; gap: 10px; white-space: pre-wrap; word-break: break-all; }
.log-line__ts { color: #5b6580; flex: 0 0 auto; }
.log-line__msg { color: #c7d0e0; }
.log-line--success .log-line__msg { color: #4ade80; }
.log-line--error .log-line__msg { color: #f87171; }
.log-line--warn .log-line__msg { color: #fbbf24; }

/* ============================ App Dialog ============================ */
.app-dialog { z-index: 80; }
.app-dialog__box { max-width: 400px; }
.app-dialog__box .modal__body { padding: 20px 24px; }
.app-dialog__msg {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-700);
  white-space: pre-wrap;
}
.app-dialog__input { margin-top: 16px; width: 100%; }

/* ============================ Toast ============================ */

.toast-stack {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  min-width: 240px;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--klein);
  box-shadow: var(--shadow-md);
  font-size: 14px;
  color: var(--ink-800);
  animation: toast-in 0.2s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
.toast--success { border-left-color: var(--good); }
.toast--error { border-left-color: var(--bad); }
.toast--info { border-left-color: var(--klein); }

/* ============================ Misc / dashboard ============================ */

.dept-bar { display: flex; flex-direction: column; gap: 14px; }
.dept-bar__row { display: grid; grid-template-columns: 110px 1fr 44px; align-items: center; gap: 12px; }
.dept-bar__name { font-size: 13px; color: var(--ink-700); }
.dept-bar__track { height: 10px; border-radius: 999px; background: var(--klein-50); overflow: hidden; }
.dept-bar__fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--klein), var(--klein-bright)); }
.dept-bar__count { font-size: 13px; font-weight: 600; color: var(--ink-800); text-align: right; }

.checkbox { width: 16px; height: 16px; accent-color: var(--klein); cursor: pointer; }

/* ============================ Proxy groups layout ============================ */

.proxy-layout { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
.group-list { display: flex; flex-direction: column; gap: 2px; }
.group-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink-700);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.group-item:hover { background: var(--klein-50); }
.group-item--active { background: var(--klein); color: #fff; font-weight: 500; }
.group-item--active:hover { background: var(--klein); }
.group-item__name {
  flex: 0 1 auto;
  min-width: 64px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.group-item__count {
  font-size: 12px;
  font-weight: 600;
  min-width: 18px;
  text-align: center;
  color: var(--ink-400);
}
.group-item--active .group-item__count { color: rgba(255, 255, 255, 0.85); }
.group-item__del {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0;
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
  border-radius: 5px;
}
.group-item:hover .group-item__del { opacity: 0.6; }
.group-item__del:hover { opacity: 1; background: rgba(0, 0, 0, 0.12); }

@media (max-width: 880px) {
  .proxy-layout { grid-template-columns: 1fr; }
}

/* ===================== 邮箱：快捷收件 / 导入 / 邮件抽屉 ===================== */

.cell-ellipsis {
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: var(--klein-50);
  border: 1px solid var(--klein-100);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.code-box__label { font-size: 13px; color: var(--ink-500); }
.code-box__value {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--klein);
  font-family: var(--mono, monospace);
  user-select: all;
}
.code-raw-label { font-size: 12px; color: var(--ink-400); margin: 14px 0 6px; }

.count-badge {
  display: inline-block;
  min-width: 24px;
  text-align: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--klein-50);
  color: var(--klein);
  font-size: 12px;
  font-weight: 600;
}
.count-badge--full {
  background: #fdecec;
  color: #d23b3b;
}

.code-usage {
  font-size: 13px;
  color: var(--ink-500);
  margin-bottom: 12px;
}
.code-usage b { color: var(--klein); font-size: 15px; }

.field__hint {
  font-size: 12px;
  color: var(--ink-400);
  margin-top: 6px;
}

.receive-card { margin-bottom: 16px; }
.receive-card__head { padding: 18px 20px 0; }
.receive-card__head h2 { font-size: 16px; }
.receive-card__head p { font-size: 13px; color: var(--ink-500); margin-top: 4px; }
.receive-bar { display: flex; gap: 12px; padding: 16px 20px 20px; }
.receive-bar .field-input { flex: 1; max-width: 420px; }

.modal--lg { max-width: 720px; }
.import-hint {
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.8;
  margin-bottom: 12px;
}
.import-hint code {
  background: var(--klein-50);
  color: var(--klein);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 12px;
}
.import-textarea { width: 100%; min-height: 240px; font-family: var(--mono, monospace); font-size: 12px; }

.mail-drawer { position: fixed; inset: 0; z-index: 70; }
.mail-drawer__mask { position: absolute; inset: 0; background: rgba(10, 19, 48, 0.45); backdrop-filter: blur(2px); }
.mail-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 480px;
  max-width: 92vw;
  background: #fff;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: drawer-in 0.22s ease;
}
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }
.mail-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.mail-drawer__head h3 { font-size: 16px; }
.mail-drawer__account { font-size: 12px; color: var(--ink-500); margin-top: 4px; word-break: break-all; }
.mail-drawer__head__tools { display: flex; align-items: center; gap: 12px; }
.mail-drawer__body { flex: 1; overflow-y: auto; padding: 12px 16px 24px; }

.mail-empty { padding: 48px 16px; text-align: center; color: var(--ink-400); font-size: 14px; }
.mail-empty--error { color: var(--danger, #d92d20); }
.mail-empty__hint { margin-top: 8px; font-size: 12px; color: var(--ink-400); }

.mail-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.mail-item:hover { border-color: var(--klein); }
.mail-item--open { box-shadow: var(--shadow-sm); }
.mail-item__row { display: flex; align-items: center; gap: 8px; }
.mail-item__subject { flex: 1; font-weight: 600; font-size: 14px; color: var(--ink-700); }
.mail-item__folder {
  font-size: 11px;
  color: var(--klein);
  background: var(--klein-50);
  padding: 1px 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.mail-item__meta { font-size: 12px; color: var(--ink-500); margin-top: 4px; word-break: break-all; }
.mail-item__preview { font-size: 13px; color: var(--ink-400); margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-item__full {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--ink-700);
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 360px;
  overflow-y: auto;
  font-family: inherit;
}

[hidden] { display: none !important; }

@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-card { grid-column: span 2; }
}
@media (max-width: 720px) {
  .sidebar { display: none; }
  .stat-grid { grid-template-columns: 1fr; }
  .hero-card { grid-column: span 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .col-span-2 { grid-column: span 1; }
  .page, .topbar { padding-left: 16px; padding-right: 16px; }
  .topbar { gap: 10px; }
  .topbar > div:first-child { min-width: 0; }
  .topbar__right { flex: 0 0 auto; gap: 8px; }
  .topbar__right > .status-pill { display: none; }
}

/* ============================ PayPal BA link tool ============================ */

.link-tool {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.7fr);
  gap: 20px;
  align-items: stretch;
}
.link-tool__form-card { position: relative; }
.link-tool__hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 26px 28px;
  background:
    radial-gradient(circle at 92% 0%, rgba(0, 47, 167, 0.16), transparent 38%),
    linear-gradient(135deg, #f8faff 0%, #eef3ff 100%);
  border-bottom: 1px solid var(--klein-100);
}
.link-tool__hero-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--klein-bright), var(--klein-deep));
  box-shadow: 0 12px 28px rgba(0, 47, 167, 0.28);
}
.link-tool__hero-icon svg { width: 27px; height: 27px; }
.link-tool__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--klein);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.link-tool__hero h2 { font-size: 20px; }
.link-tool__hero p { max-width: 580px; margin-top: 6px; color: var(--ink-500); font-size: 13px; }
.link-tool__form { padding: 26px 28px 28px; }
.link-tool__token {
  min-height: 178px;
  resize: vertical;
  padding: 15px 16px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  line-height: 1.65;
  word-break: break-all;
}
.link-tool__token--ready { border-color: rgba(22, 163, 74, 0.55); }
.link-tool__input-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--ink-400);
  font-size: 11.5px;
}
.link-tool__input-meta span:last-child { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.link-tool__privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
  padding: 11px 13px;
  color: var(--ink-500);
  background: var(--bg);
  border-radius: 9px;
  font-size: 12px;
}
.link-tool__privacy svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--klein); }
.link-tool__submit { min-height: 46px; }
.link-tool__submit svg { width: 18px; height: 18px; }
.link-tool__submit--loading .link-tool__submit-icon { animation: link-pulse 0.9s ease-in-out infinite alternate; }
@keyframes link-pulse { to { opacity: 0.35; transform: scale(0.84); } }

.link-tool__side { display: flex; flex-direction: column; gap: 14px; }
.link-tool__guide { flex: 1; padding: 24px; }
.link-tool__guide-head { display: flex; align-items: center; gap: 12px; }
.link-tool__guide-head h3 { font-size: 16px; }
.link-tool__guide-head p { margin-top: 2px; color: var(--ink-400); font-size: 12px; }
.link-tool__guide-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--klein);
  background: var(--klein-50);
  font-size: 18px;
  font-weight: 800;
}
.link-tool__steps { list-style: none; margin: 24px 0 0; padding: 0; }
.link-tool__steps li { position: relative; display: flex; gap: 13px; padding-bottom: 23px; }
.link-tool__steps li:last-child { padding-bottom: 0; }
.link-tool__steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 35px;
  bottom: 4px;
  border-left: 1px dashed var(--klein-200);
}
.link-tool__steps li > span {
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--klein-100);
  border-radius: 10px;
  color: var(--klein);
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}
.link-tool__steps b { display: block; color: var(--ink-800); font-size: 13px; }
.link-tool__steps small { display: block; margin-top: 3px; color: var(--ink-400); font-size: 11.5px; line-height: 1.45; }
.link-tool__status-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 17px 19px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.link-tool__status-card b { display: block; color: var(--ink-700); font-size: 12.5px; }
.link-tool__status-card small { display: block; margin-top: 2px; color: var(--ink-400); font-size: 11px; }

.link-progress { margin-top: 20px; overflow: hidden; }
.link-progress__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
}
.link-progress__head h2 { font-size: 16px; }
.link-progress__head p { margin-top: 4px; color: var(--ink-500); font-size: 12px; }
.link-progress__percent {
  color: var(--klein);
  font-size: 22px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.link-progress__track {
  height: 4px;
  margin: 0 24px 18px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--klein-50);
}
.link-progress__track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--klein), #2f6fff);
  box-shadow: 0 0 10px rgba(0, 47, 167, 0.36);
  transition: width 0.35s ease;
}
.link-progress--success .link-progress__percent { color: var(--good); }
.link-progress--success .link-progress__track > span { background: var(--good); }
.link-progress--error .link-progress__percent { color: var(--bad); }
.link-progress--error .link-progress__track > span { background: var(--bad); }
.link-progress__console {
  height: 254px;
  margin: 0 24px;
  overflow: auto;
  border: 1px solid #182238;
  border-radius: 11px;
  color: #dbe8ff;
  background: #0b1220;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.link-progress__console ol { margin: 0; padding: 13px 15px; list-style: none; }
.link-progress__log {
  display: grid;
  grid-template-columns: 68px 42px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.55;
}
.link-progress__log time { color: #63738f; font-variant-numeric: tabular-nums; }
.link-progress__log > span { color: #759eff; font-size: 10px; font-weight: 800; }
.link-progress__log p { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #c6d3ea; }
.link-progress__log--success > span,
.link-progress__log--success p { color: #5ee59a; }
.link-progress__log--warning > span,
.link-progress__log--warning p { color: #f7c66b; }
.link-progress__log--error > span,
.link-progress__log--error p { color: #ff7d8c; }
.link-progress__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px 18px;
  color: var(--ink-400);
  font-size: 11px;
}
.link-progress__foot > span { display: flex; align-items: center; gap: 8px; }
.link-progress__foot .status-dot { width: 7px; height: 7px; }
.link-progress__foot b { color: var(--ink-700); font-size: 11.5px; }

.link-result { position: relative; animation: link-result-in 0.3s ease; }
@keyframes link-result-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.link-result__accent { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--good); }
.link-result__head { display: flex; align-items: center; gap: 14px; padding: 22px 26px 16px; }
.link-result__head h2 { font-size: 16px; }
.link-result__head p { margin-top: 3px; color: var(--ink-500); font-size: 12.5px; }
.link-result__success {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--good);
  background: var(--good-bg);
  border-radius: 50%;
}
.link-result__success svg { width: 21px; height: 21px; }
.link-result__pill { margin-left: auto; }
.link-result__url-row { display: flex; align-items: stretch; gap: 9px; padding: 0 26px 18px; }
.link-result__url {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--klein-deep);
  background: var(--klein-50);
}
.link-result__url-row .btn svg { width: 16px; height: 16px; }
.link-result__verification {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 26px 20px;
}
.link-result__check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(22, 163, 74, 0.18);
  border-radius: 10px;
  background: var(--good-bg);
}
.link-result__check > span {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--good);
  font-size: 10px;
  font-weight: 800;
}
.link-result__check b { display: block; overflow: hidden; color: var(--ink-700); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.link-result__check small { display: block; margin-top: 2px; overflow: hidden; color: var(--ink-400); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.link-result__meta {
  display: grid;
  grid-template-columns: 0.7fr 0.7fr 0.8fr 2fr;
  border-top: 1px solid var(--line-soft);
  background: #fafbfe;
}
.link-result__meta > span { min-width: 0; padding: 14px 20px; border-right: 1px solid var(--line-soft); }
.link-result__meta > span:last-child { border-right: 0; }
.link-result__meta i { display: block; color: var(--ink-400); font-size: 10.5px; font-style: normal; }
.link-result__meta b { display: block; margin-top: 2px; color: var(--ink-700); font-size: 12px; }
.link-result__session { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, monospace; }

@media (max-width: 980px) {
  .link-tool { grid-template-columns: 1fr; }
  .link-tool__side { display: grid; grid-template-columns: 1fr 1fr; }
  .link-tool__status-card { align-self: stretch; }
}
@media (max-width: 720px) {
  .link-tool__hero, .link-tool__form { padding-left: 20px; padding-right: 20px; }
  .link-tool__hero { align-items: flex-start; }
  .link-tool__side { display: flex; }
  .link-result__head { align-items: flex-start; padding-left: 20px; padding-right: 20px; }
  .link-result__pill { display: none; }
  .link-result__url-row { flex-wrap: wrap; padding-left: 20px; padding-right: 20px; }
  .link-result__url { flex-basis: 100%; }
  .link-result__url-row .btn { flex: 1; }
  .link-progress__head, .link-progress__foot { padding-left: 20px; padding-right: 20px; }
  .link-progress__track, .link-progress__console { margin-left: 20px; margin-right: 20px; }
  .link-progress__console { height: 280px; }
  .link-progress__log { grid-template-columns: 58px 36px minmax(0, 1fr); gap: 6px; font-size: 10.5px; }
  .link-progress__foot { align-items: flex-start; }
  .link-result__verification { grid-template-columns: 1fr; padding-left: 20px; padding-right: 20px; }
  .link-result__meta { grid-template-columns: repeat(2, 1fr); }
  .link-result__meta > span:nth-child(2) { border-right: 0; }
  .link-result__meta > span:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
}

/* ====================== Public PayPal BA batch page ====================== */

.public-link-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 4%, rgba(30, 80, 200, 0.12), transparent 30rem),
    radial-gradient(circle at 96% 22%, rgba(0, 47, 167, 0.08), transparent 28rem),
    #f5f7fc;
}
.public-link-nav {
  width: min(1180px, calc(100% - 40px));
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(27, 37, 69, 0.08);
}
.public-link-brand { display: inline-flex; align-items: center; gap: 11px; }
.public-link-brand__mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--klein-bright), var(--klein-deep));
  box-shadow: 0 10px 22px rgba(0, 47, 167, 0.22);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.02em;
}
.public-link-brand b { display: block; color: var(--ink-900); font-size: 14px; letter-spacing: 0.12em; }
.public-link-brand small { display: block; margin-top: 1px; color: var(--ink-400); font-size: 10px; }
.public-link-nav__meta { display: flex; align-items: center; gap: 8px; }
.public-link-nav__meta > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  color: var(--ink-500);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
}
.public-link-nav__meta .status-dot { width: 7px; height: 7px; }
.public-link-main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 58px 0 42px; }
.public-link-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: end;
  gap: 50px;
  margin-bottom: 28px;
}
.public-link-kicker {
  display: block;
  color: var(--klein);
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.public-link-hero h1 {
  margin-top: 9px;
  font-size: clamp(31px, 4vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.035em;
}
.public-link-hero__copy > p { max-width: 720px; margin-top: 15px; color: var(--ink-500); font-size: 14px; line-height: 1.8; }
.public-link-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.public-link-badges span {
  padding: 6px 9px;
  color: var(--ink-500);
  background: rgba(255,255,255,0.72);
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10.5px;
  font-weight: 600;
}
.public-link-quota {
  padding: 20px 21px;
  color: #fff;
  background: linear-gradient(145deg, #073ea8, #001b59);
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(0, 31, 101, 0.2);
}
.public-link-quota > span { display: block; color: rgba(255,255,255,0.68); font-size: 10.5px; }
.public-link-quota > strong { display: block; margin: 4px 0 1px; font-size: 35px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.public-link-quota > small { color: rgba(255,255,255,0.62); font-size: 10px; }
.public-link-quota > div { height: 4px; margin-top: 15px; overflow: hidden; background: rgba(255,255,255,0.18); border-radius: 99px; }
.public-link-quota > div i { display: block; width: 0; height: 100%; background: #fff; border-radius: inherit; transition: width .25s; }
.public-link-quota > p { margin-top: 8px; color: rgba(255,255,255,0.55); font-size: 9.5px; }

.public-link-workspace { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(285px, .65fr); gap: 20px; align-items: start; }
.public-link-form { padding: 27px; }
.public-link-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.public-link-section-head > div { display: flex; align-items: center; gap: 10px; }
.public-link-section-head > div > span,
.public-link-region legend > span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--klein);
  background: var(--klein-50);
  font-size: 9px;
  font-weight: 900;
}
.public-link-section-head h2 { font-size: 15px; }
.public-link-section-head > b {
  color: var(--ink-400);
  font-size: 10.5px;
  font-weight: 600;
}
.public-link-section-head > b.is-ready { color: var(--good); }
.public-link-section-head > b.is-error { color: var(--bad); }
.public-link-drop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  color: var(--ink-500);
  background: #fafbfe;
  border: 1px dashed #c7cede;
  border-radius: 11px;
  cursor: pointer;
  transition: .16s border-color, .16s background, .16s color;
}
.public-link-drop:hover, .public-link-drop.is-dragging { color: var(--klein); background: var(--klein-50); border-color: var(--klein-bright); }
.public-link-drop svg { width: 23px; height: 23px; }
.public-link-drop span { display: flex; flex-direction: column; }
.public-link-drop b { color: inherit; font-size: 11.5px; }
.public-link-drop small { margin-top: 1px; color: var(--ink-400); font-size: 9.5px; }
.public-link-input { display: block; margin-top: 18px; }
.public-link-input > span { display: block; margin-bottom: 7px; color: var(--ink-600, var(--ink-500)); font-size: 11px; font-weight: 600; }
.public-link-input textarea {
  width: 100%;
  min-height: 190px;
  padding: 14px 15px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  line-height: 1.65;
  word-break: break-all;
}
.public-link-input-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 7px; color: var(--ink-400); font-size: 10px; }
.public-link-input-meta button { padding: 0; color: var(--klein); background: none; border: 0; font-size: 10px; }
.public-link-region { margin: 22px 0 0; padding: 0; border: 0; }
.public-link-region legend { display: flex; align-items: center; gap: 10px; padding: 0; color: var(--ink-900); font-size: 13px; font-weight: 600; }
.public-link-execution-grid { display: grid; grid-template-columns: minmax(0, 1fr) 165px 190px; gap: 12px; margin-top: 13px; }
.public-link-country-control > label,
.public-link-promo-control > label,
.public-link-concurrency-control > label { display: block; margin-bottom: 7px; color: var(--ink-600, var(--ink-500)); font-size: 10px; font-weight: 700; }
.public-link-country-search { position: relative; }
.public-link-country-search > svg { position: absolute; top: 13px; left: 13px; z-index: 1; width: 16px; height: 16px; color: var(--ink-400); pointer-events: none; }
.public-link-country-search > input {
  width: 100%;
  height: 42px;
  padding: 0 91px 0 38px;
  appearance: textfield;
  color: var(--ink-700);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  font-size: 11px;
  transition: .16s border-color, .16s box-shadow;
}
.public-link-country-search > input::-webkit-search-cancel-button { display: none; }
.public-link-country-search > input:focus { border-color: rgba(0,47,167,.55); box-shadow: 0 0 0 3px rgba(0,47,167,.08); }
.public-link-country-search > small { position: absolute; top: 14px; right: 12px; color: var(--ink-400); font-size: 9px; pointer-events: none; }
.public-link-region-picker { position: relative; margin-top: 8px; }
.public-link-region-picker select {
  width: 100%;
  height: 42px;
  padding: 0 44px 0 14px;
  appearance: none;
  color: var(--ink-800);
  background: #fafbfe;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: .16s border-color, .16s box-shadow, .16s background;
}
.public-link-region-picker select:hover { background: #fff; border-color: var(--ink-300); }
.public-link-region-picker select:focus { background: #fff; border-color: rgba(0,47,167,.55); box-shadow: 0 0 0 3px rgba(0,47,167,.08); }
.public-link-region-picker svg { position: absolute; top: 12px; right: 15px; width: 18px; height: 18px; color: var(--klein); pointer-events: none; }
.public-link-promo-control { padding: 12px; background: #fafbfe; border: 1px solid var(--line); border-radius: 11px; }
.public-link-promo-control .public-link-region-picker { margin-top: 0; }
.public-link-promo-control > small { display: block; margin-top: 7px; color: var(--ink-400); font-size: 8.5px; line-height: 1.45; }
.public-link-concurrency-control { padding: 12px; background: #fafbfe; border: 1px solid var(--line); border-radius: 11px; }
.public-link-concurrency-control > div { display: grid; grid-template-columns: minmax(0, 1fr) 38px; align-items: center; gap: 9px; min-height: 42px; }
.public-link-concurrency-control input { width: 100%; accent-color: var(--klein); cursor: pointer; }
.public-link-concurrency-control output { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: var(--klein); border-radius: 10px; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.public-link-concurrency-control > small { display: block; margin-top: 3px; color: var(--ink-400); font-size: 8.5px; line-height: 1.45; }
.public-link-max-control { position: relative; grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 11px 12px; background: #f7f9ff; border: 1px solid #dce5fb; border-radius: 11px; cursor: pointer; }
.public-link-max-control > input { position: absolute; opacity: 0; pointer-events: none; }
.public-link-max-control > span { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.public-link-max-control b { color: var(--ink-800); font-size: 10.5px; }
.public-link-max-control small { margin-top: 2px; color: var(--ink-400); font-size: 8.8px; line-height: 1.5; }
.public-link-max-control > i { position: relative; width: 38px; height: 22px; flex: 0 0 auto; background: #c8cfdd; border-radius: 99px; transition: .18s background; }
.public-link-max-control > i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; background: #fff; border-radius: 50%; box-shadow: 0 1px 4px rgba(8,22,55,.22); transition: .18s transform; }
.public-link-max-control > input:checked ~ i { background: var(--klein); }
.public-link-max-control > input:checked ~ i::after { transform: translateX(16px); }
.public-link-max-control:focus-within { border-color: rgba(0,47,167,.55); box-shadow: 0 0 0 3px rgba(0,47,167,.08); }
.public-link-region-note { margin: 10px 1px 0; color: var(--ink-400); font-size: 10px; line-height: 1.6; }
.public-link-notice { display: flex; align-items: flex-start; gap: 9px; margin: 20px 0 15px; padding: 10px 12px; color: var(--ink-500); background: #f7f8fb; border-radius: 9px; font-size: 10.5px; line-height: 1.55; }
.public-link-notice svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: var(--klein); }
.public-link-submit { min-height: 46px; }
.public-link-submit svg { width: 17px; height: 17px; }
.public-link-submit.is-loading svg { animation: link-pulse .8s ease-in-out infinite alternate; }
.public-link-info { display: flex; flex-direction: column; gap: 14px; }
.public-link-rules { padding: 23px; }
.public-link-rules ol { margin: 23px 0 0; padding: 0; list-style: none; }
.public-link-rules li { position: relative; display: flex; gap: 12px; padding-bottom: 22px; }
.public-link-rules li:last-child { padding-bottom: 0; }
.public-link-rules li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 4px; border-left: 1px dashed var(--klein-200); }
.public-link-rules li > b { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: var(--klein); background: var(--klein-50); border-radius: 9px; font-size: 9px; }
.public-link-rules li > span { display: flex; flex-direction: column; }
.public-link-rules strong { color: var(--ink-800); font-size: 11.5px; }
.public-link-rules small { margin-top: 2px; color: var(--ink-400); font-size: 9.5px; line-height: 1.55; }
.public-link-boundary { padding: 22px; color: #fff; background: linear-gradient(145deg, #172342, #09122a); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.public-link-boundary > span { color: #86a7ff; font-size: 9px; font-weight: 800; letter-spacing: .14em; }
.public-link-boundary h3 { margin-top: 7px; color: #fff; font-size: 14px; }
.public-link-boundary p { margin-top: 7px; color: #aebbd6; font-size: 10px; line-height: 1.7; }

.public-batch { margin-top: 20px; overflow: hidden; }
.public-batch__head { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 22px 25px; }
.public-batch__head h2 { margin-top: 3px; font-size: 16px; }
.public-batch__head p { margin-top: 3px; color: var(--ink-400); font-size: 10.5px; }
.public-batch__stats { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.public-batch__stats > span { min-width: 64px; display: flex; flex-direction: column; align-items: center; padding: 8px 12px; border-right: 1px solid var(--line); }
.public-batch__stats > span:last-child { border-right: 0; }
.public-batch__stats b { color: var(--ink-800); font-size: 14px; font-variant-numeric: tabular-nums; }
.public-batch__stats small { color: var(--ink-400); font-size: 8.5px; }
.public-batch__stats .is-success b { color: var(--good); }
.public-batch__stats .is-error b { color: var(--bad); }
.public-batch__track { height: 3px; background: var(--line-soft); }
.public-batch__track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--klein), #5f88ec); transition: width .25s; }
.public-batch__table-wrap { overflow-x: auto; }
.public-batch__table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.public-batch__table th { padding: 10px 14px; color: var(--ink-400); background: #fafbfe; border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 700; text-align: left; }
.public-batch__table td { height: 55px; padding: 10px 14px; color: var(--ink-500); border-bottom: 1px solid var(--line-soft); font-size: 10.5px; }
.public-batch__table tr:last-child td { border-bottom: 0; }
.public-batch__table th:nth-child(1) { width: 62px; }
.public-batch__table th:nth-child(2) { width: 92px; }
.public-batch__table th:nth-child(3) { width: 155px; }
.public-batch__table th:nth-child(5) { width: 78px; }
.public-batch__table td > b { color: var(--ink-700); font-size: 10px; }
.public-batch__status { display: inline-flex; padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.public-batch__status.is-queued { color: var(--ink-500); background: #eef0f5; }
.public-batch__status.is-running { color: var(--klein); background: var(--klein-50); }
.public-batch__status.is-succeeded { color: var(--good); background: var(--good-bg); }
.public-batch__status.is-failed { color: var(--bad); background: var(--bad-bg); }
.public-batch__item-progress { position: relative; width: 105px; height: 5px; background: var(--line-soft); border-radius: 99px; }
.public-batch__item-progress i { display: block; height: 100%; background: var(--klein-bright); border-radius: inherit; }
.public-batch__item-progress span { position: absolute; left: 113px; top: -6px; color: var(--ink-400); font-size: 8.5px; font-variant-numeric: tabular-nums; }
.public-batch__actions { display: flex; align-items: center; gap: 7px; }
.public-batch__provider { padding: 4px 7px; color: #075985; background: #e0f2fe; border-radius: 999px; font-size: 8px; font-weight: 800; letter-spacing: .04em; }
.public-batch__copy, .public-batch__actions a, .public-batch__logs { padding: 5px 8px; color: var(--klein); background: var(--klein-50); border: 0; border-radius: 6px; font-size: 9px; font-weight: 700; }
.public-batch__actions a { color: var(--ink-500); background: #f0f2f6; }
.public-batch__error { display: block; max-width: 430px; overflow: hidden; color: var(--bad); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.public-batch__logs { color: var(--ink-500); background: #f0f2f6; }

.public-log-dialog { width: min(760px, calc(100% - 30px)); max-height: min(650px, calc(100vh - 40px)); padding: 0; color: #d6e1f5; background: #0a1328; border: 0; border-radius: 14px; box-shadow: 0 28px 80px rgba(3,8,24,.42); }
.public-log-dialog::backdrop { background: rgba(10,19,48,.45); backdrop-filter: blur(3px); }
.public-log-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.public-log-dialog header > div { display: flex; align-items: center; gap: 10px; }
.public-log-dialog header span { color: #fff; font-size: 12px; font-weight: 700; }
.public-log-dialog header b { padding: 3px 7px; color: #83a5fb; background: rgba(55,100,210,.18); border-radius: 999px; font-size: 8.5px; }
.public-log-dialog header button { color: #9aabc9; background: none; border: 0; font-size: 22px; }
.public-log-dialog ol { max-height: 520px; margin: 0; padding: 11px 16px 18px; overflow-y: auto; list-style: none; }
.public-log-dialog li { display: grid; grid-template-columns: 67px 38px minmax(0,1fr); gap: 7px; padding: 5px 0; font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.public-log-dialog time { color: #657694; }
.public-log-dialog li > b { color: #7198fa; font-size: 8.5px; }
.public-log-dialog li > p { margin: 0; overflow-wrap: anywhere; }
.public-log-dialog li.is-success > b, .public-log-dialog li.is-success > p { color: #5ee59a; }
.public-log-dialog li.is-warning > b, .public-log-dialog li.is-warning > p { color: #f7c66b; }
.public-log-dialog li.is-error > b, .public-log-dialog li.is-error > p { color: #ff8794; }
.public-link-footer { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 0 0 30px; color: var(--ink-400); font-size: 9.5px; text-align: center; }

@media (max-width: 900px) {
  .public-link-main { padding-top: 38px; }
  .public-link-hero { grid-template-columns: 1fr; gap: 20px; }
  .public-link-quota { width: 220px; }
  .public-link-workspace { grid-template-columns: 1fr; }
  .public-link-info { display: grid; grid-template-columns: 1fr 1fr; }
  .public-batch__head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 620px) {
  .public-link-nav, .public-link-main, .public-link-footer { width: min(100% - 26px, 1180px); }
  .public-link-nav { min-height: 67px; }
  .public-link-nav__meta > span:not(:first-child) { display: none; }
  .public-link-main { padding-top: 30px; }
  .public-link-hero h1 { font-size: 31px; }
  .public-link-hero__copy > p { font-size: 12.5px; }
  .public-link-quota { width: 100%; }
  .public-link-form { padding: 20px; }
  .public-link-execution-grid { grid-template-columns: 1fr; }
  .public-link-info { grid-template-columns: 1fr; }
  .public-batch__head { padding: 19px; }
  .public-batch__stats { width: 100%; }
  .public-batch__stats > span { min-width: 0; flex: 1; padding-left: 5px; padding-right: 5px; }
  .public-batch__table { min-width: 720px; }
}

/* ===================== Upgrade machine ===================== */
.machine-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.machine-stat {
  min-width: 0;
  padding: 17px 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.machine-stat span, .machine-stat small { display: block; color: var(--ink-400); font-size: 9.5px; }
.machine-stat strong { display: block; margin: 7px 0 4px; color: var(--ink-800); font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.machine-stat--good strong { color: var(--good); }
.machine-stat--warn strong { color: #b56a08; }
.machine-stat--bad strong { color: var(--bad); }
.machine-stat--node strong { font-size: 18px; }
.machine-stat--node strong.is-ready { color: var(--good); }

.machine-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
  padding: 15px 18px;
  overflow-x: auto;
}
.machine-flow > i { color: var(--ink-300); font-style: normal; font-size: 17px; }
.machine-flow__item { min-width: 145px; display: flex; align-items: center; gap: 10px; }
.machine-flow__item > b { width: 31px; height: 31px; flex: 0 0 auto; display: grid; place-items: center; color: var(--klein); background: var(--klein-50); border-radius: 9px; font-size: 9px; }
.machine-flow__item span, .machine-flow__item strong, .machine-flow__item small { display: block; }
.machine-flow__item strong { color: var(--ink-700); font-size: 10.5px; }
.machine-flow__item small { margin-top: 2px; color: var(--ink-400); font-size: 8.5px; white-space: nowrap; }

.machine-top-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(380px, .88fr); gap: 16px; margin-bottom: 16px; }
.machine-dashboard-stack { display: grid; gap: 12px; margin-bottom: 22px; }
.machine-worker-board { overflow: hidden; }
.machine-config-panel { overflow: hidden; }
.machine-config-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.machine-config-summary::-webkit-details-marker { display: none; }
.machine-config-summary h2, .machine-config-summary p { margin: 0; }
.machine-config-summary h2 { color: var(--ink-800); font-size: 12px; }
.machine-config-summary p { margin-top: 3px; color: var(--ink-400); font-size: 9px; }
.machine-config-summary__state { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.machine-config-summary__state b { color: var(--ink-400); font-size: 8.5px; font-weight: 600; }
.machine-config-summary__state i { min-width: 46px; padding: 6px 9px; color: var(--klein); background: var(--klein-50); border-radius: 999px; font-size: 8.5px; font-style: normal; font-weight: 750; text-align: center; }
.machine-config-summary__state::after { content: "⌄"; color: var(--ink-400); font-size: 16px; line-height: 1; transition: transform .2s; }
.machine-config-panel[open] .machine-config-summary__state::after { transform: rotate(180deg); }
.machine-config-panel[open] .machine-config-summary { border-bottom: 1px solid var(--line); }
.machine-run-state { padding: 5px 9px; color: var(--ink-500); background: #eef1f6; border-radius: 999px; font-size: 9px; font-weight: 700; }
.machine-run-state.is-running { color: var(--klein); background: var(--klein-50); }
.machine-run-controls { display: grid; grid-template-columns: 110px 110px minmax(105px, auto) minmax(80px, auto); align-items: end; gap: 10px; }
.machine-progress { margin-top: 18px; }
.machine-progress > div { height: 5px; overflow: hidden; background: var(--line-soft); border-radius: 99px; }
.machine-progress > div i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--klein), #6289ec); transition: width .25s; }
.machine-progress p { display: flex; gap: 14px; margin: 8px 0 0; color: var(--ink-400); font-size: 9.5px; }
.machine-progress b { color: var(--ink-700); font-variant-numeric: tabular-nums; }
.machine-live-log { height: 176px; margin-top: 15px; padding: 11px 13px; overflow: auto; color: #bac7e1; background: #0b1428; border-radius: 10px; font: 9.5px/1.65 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.machine-live-log:empty::before { content: "运行日志将显示在这里…"; color: #657593; }
.machine-live-log > div { display: grid; grid-template-columns: 68px minmax(0,1fr); gap: 8px; }
.machine-live-log time { color: #637492; }
.machine-live-log .is-success span { color: #63dfa0; }
.machine-live-log .is-warn span, .machine-live-log .is-warning span { color: #efc16c; }
.machine-live-log .is-error span { color: #ff8996; }

.machine-stage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.machine-stage { min-width: 0; padding: 13px; background: #f8faff; border: 1px solid var(--line-soft); border-radius: 10px; }
.machine-stage > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.machine-stage > header b, .machine-stage > header small { display: block; }
.machine-stage > header b { color: var(--ink-700); font-size: 10.5px; }
.machine-stage > header small, .machine-stage > small { color: var(--ink-400); font-size: 8.5px; }
.machine-stage__controls { display: grid; grid-template-columns: minmax(70px, 1fr) auto auto; align-items: end; gap: 6px; margin-top: 12px; }
.machine-stage__controls .btn { min-width: 48px; padding-right: 8px; padding-left: 8px; }
.machine-stage > p { margin: 11px 0 5px; color: var(--ink-400); font-size: 8.5px; line-height: 1.6; }
.machine-stage > p b { color: var(--ink-700); font-variant-numeric: tabular-nums; }

.machine-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.machine-settings__wide, .machine-settings__fixed, .machine-settings__save { grid-column: 1 / -1; }
.machine-settings .field em { color: var(--good); font-size: 8.5px; font-style: normal; font-weight: 500; }
.machine-check { display: flex; align-items: center; gap: 7px; color: var(--ink-500); font-size: 9.5px; cursor: pointer; }
.machine-check input { accent-color: var(--klein); }
.machine-settings__fixed { padding: 9px 11px; color: var(--ink-400); background: #f7f8fb; border-radius: 8px; font-size: 9px; }
.machine-settings__fixed b { color: var(--ink-700); }

.machine-live-pools { margin-bottom: 18px; }
.machine-board-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 11px;
  padding: 0 2px;
}
.machine-board-heading h2, .machine-board-heading p { margin: 0; }
.machine-board-heading h2 { color: var(--ink-800); font-size: 14px; }
.machine-board-heading p { margin-top: 4px; color: var(--ink-400); font-size: 9px; }
.machine-live-state { display: flex; align-items: center; gap: 10px; color: var(--ink-400); font-size: 8.5px; }
.machine-live-state span, .machine-log-connection { display: inline-flex; align-items: center; gap: 6px; color: var(--good); font-weight: 750; }
.machine-live-state span::before, .machine-log-connection::before { content: ""; width: 6px; height: 6px; background: currentColor; border-radius: 50%; box-shadow: 0 0 0 3px rgba(28,159,99,.12); }
.machine-live-state span.is-error, .machine-log-connection.is-error { color: var(--bad); }
.machine-pool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.machine-pool-card { min-width: 0; overflow: hidden; border-top: 3px solid #6289ec; }
.machine-pool-card--ba { border-top-color: #8a68d8; }
.machine-pool-card--products { border-top-color: var(--good); }
.machine-pool-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 15px 12px; }
.machine-pool-card__header h3, .machine-pool-card__header p { margin: 0; }
.machine-pool-card__header h3 { color: var(--ink-800); font-size: 11.5px; }
.machine-pool-card__header p { margin-top: 3px; color: var(--ink-400); font-size: 8.5px; }
.machine-pool-card__header > strong { min-width: 40px; color: var(--ink-800); font-size: 24px; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.machine-pool-card--filter .machine-pool-card__header > strong { color: #416fdf; }
.machine-pool-card--ba .machine-pool-card__header > strong { color: #7554c4; }
.machine-pool-card--products .machine-pool-card__header > strong { color: var(--good); }
.machine-pool-tools { min-height: 51px; display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: #fafbfe; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.machine-pool-tools .field-input { min-width: 0; flex: 1; height: 33px; }
.machine-pool-tools .field-select { width: 104px; height: 33px; }
.machine-pool-tools .btn { min-width: 44px; padding-right: 8px; padding-left: 8px; }
.machine-pool-tools .spacer { flex: 1; }
.machine-pool-scroll { height: 360px; overflow: auto; }
.machine-pool-table { min-width: 520px; }
.machine-pool-card--products .machine-pool-table { min-width: 470px; }
.machine-pool-table thead { position: sticky; top: 0; z-index: 2; }
.machine-pool-table th { background: #fff; }
.machine-pool-table td { max-width: 170px; padding: 9px; }
.machine-pool-table td:first-child { max-width: 190px; }
.machine-pool-table .machine-actions { max-width: none; }
.machine-ttl { color: var(--ink-700) !important; font-variant-numeric: tabular-nums; }
.machine-product-tools { flex-wrap: wrap; }
.machine-product-tools #productSearch { min-width: 150px; }
.machine-product-tools .machine-check { margin-left: 2px; white-space: nowrap; }
.machine-product-selected { color: var(--ink-400); font-size: 8.5px; white-space: nowrap; }
.machine-product-table { min-width: 590px !important; }
.machine-select-cell { width: 28px; max-width: 28px !important; text-align: center; }
.machine-select-cell input, .machine-product-group input { accent-color: var(--klein); }
.machine-product-group td { padding: 8px 10px; background: #f4f7fd; border-top: 1px solid #dfe6f4; border-bottom-color: #dfe6f4; }
.machine-product-group label { display: flex; align-items: center; gap: 7px; min-width: 0; cursor: pointer; }
.machine-product-group label > span { color: var(--klein); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.machine-product-group label > b { max-width: 210px; overflow: hidden; color: var(--ink-700); font: 8.5px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.machine-product-group label > small { margin: 0 0 0 auto; color: var(--ink-400); font-size: 8px; white-space: nowrap; }
.machine-export-mark { display: inline-flex !important; width: fit-content; margin-top: 3px !important; padding: 2px 5px; color: var(--good) !important; background: var(--good-bg); border-radius: 999px; font-size: 7.5px !important; font-weight: 750; }
.machine-export-mark--new { color: var(--ink-400) !important; background: #eef1f5; }

.machine-log-board { margin-bottom: 18px; overflow: hidden; }
.machine-log-board__header { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; background: #0e1930; }
.machine-log-board__header h2, .machine-log-board__header p { margin: 0; }
.machine-log-board__header h2 { color: #f4f7ff; font-size: 12px; }
.machine-log-board__header p { margin-top: 3px; color: #7182a1; font-size: 8.5px; }
.machine-log-controls { display: flex; align-items: center; gap: 8px; }
.machine-log-controls .field-select { width: 108px; height: 32px; color: #cbd6e9; background: #172541; border-color: #2b3b5a; }
.machine-log-controls .machine-check { color: #9aabc7; }
.machine-log-controls .btn { min-width: 46px; color: #b9c8df; background: #192846; border-color: #2b3b5a; }
.machine-log-connection { min-width: 52px; color: #63dfa0; font-size: 8.5px; }
.machine-log-connection.is-paused { color: #efc16c; }
.machine-live-log--board { height: 340px; margin: 0; padding: 12px 16px; border-radius: 0; font-size: 10px; line-height: 1.75; }
.machine-live-log--board > div { grid-template-columns: 72px 54px minmax(0,1fr); gap: 9px; padding: 1px 0; border-bottom: 1px solid rgba(255,255,255,.025); }
.machine-live-log--board > div b { color: #7299f8; font-size: 8px; font-weight: 750; }
.machine-live-log--board .is-success b { color: #63dfa0; }
.machine-live-log--board .is-warn b, .machine-live-log--board .is-warning b { color: #efc16c; }
.machine-live-log--board .is-error b { color: #ff8996; }
.machine-log-board > footer { display: flex; gap: 20px; padding: 8px 16px; color: #7182a1; background: #0e1930; border-top: 1px solid rgba(255,255,255,.06); font-size: 8px; }
.machine-log-board > footer b { color: #b9c8df; font-variant-numeric: tabular-nums; }

.machine-detail-board { overflow: hidden; }
.machine-detail-board__title { padding: 15px 17px 7px; }
.machine-detail-board__title h2, .machine-detail-board__title p { margin: 0; }
.machine-detail-board__title h2 { color: var(--ink-800); font-size: 12px; }
.machine-detail-board__title p { margin-top: 3px; color: var(--ink-400); font-size: 8.5px; }

.machine-pools { overflow: hidden; }
.machine-tabs { display: flex; gap: 3px; padding: 9px 12px 0; background: #fafbfe; border-bottom: 1px solid var(--line); }
.machine-tabs button { position: relative; padding: 11px 14px 12px; color: var(--ink-400); background: none; border: 0; font-size: 10.5px; font-weight: 650; }
.machine-tabs button.is-active { color: var(--klein); }
.machine-tabs button.is-active::after { content: ""; position: absolute; right: 12px; bottom: -1px; left: 12px; height: 2px; background: var(--klein); border-radius: 2px 2px 0 0; }
.machine-tab { display: none; }
.machine-tab.is-active { display: block; }
.machine-import { display: grid; grid-template-columns: 220px minmax(260px,1fr) 125px; align-items: center; gap: 13px; padding: 16px 18px; background: #f8faff; border-bottom: 1px solid var(--line); }
.machine-import strong, .machine-import small { display: block; }
.machine-import strong { color: var(--ink-700); font-size: 11px; }
.machine-import small { margin-top: 4px; color: var(--ink-400); font-size: 8.7px; line-height: 1.55; }
.machine-import textarea { min-height: 74px; resize: vertical; font: 9px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.machine-import > div:last-child { display: flex; align-items: flex-start; flex-direction: column; gap: 7px; }
.machine-import > div:last-child span { color: var(--ink-400); font-size: 8.5px; }
.machine-import .machine-file-picker { cursor: pointer; }
.machine-import #poolImportFileName { max-width: 125px; overflow-wrap: anywhere; }
.machine-table-tools { min-height: 56px; display: flex; align-items: center; gap: 9px; padding: 10px 15px; border-bottom: 1px solid var(--line-soft); }
.machine-table-tools .field-input, .machine-table-tools .field-select { width: 210px; height: 35px; }
.machine-table-tools .spacer { flex: 1; }
.machine-table-wrap { width: 100%; overflow-x: auto; }
.machine-table { width: 100%; min-width: 930px; border-collapse: collapse; }
.machine-table th { padding: 9px 11px; color: var(--ink-400); background: #fafbfe; border-bottom: 1px solid var(--line); font-size: 8.5px; text-align: left; white-space: nowrap; }
.machine-table td { max-width: 240px; padding: 10px 11px; color: var(--ink-500); border-bottom: 1px solid var(--line-soft); font-size: 9.5px; vertical-align: middle; }
.machine-table tbody tr:last-child td { border-bottom: 0; }
.machine-table td b, .machine-table td small { display: block; }
.machine-table td b { overflow: hidden; color: var(--ink-700); font-size: 9.8px; text-overflow: ellipsis; }
.machine-table td small { margin-top: 2px; color: var(--ink-400); font-size: 8px; }
.machine-mono { overflow: hidden; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.machine-error { overflow: hidden; color: var(--bad) !important; text-overflow: ellipsis; white-space: nowrap; }
.machine-empty { height: 80px; color: var(--ink-400) !important; text-align: center; }
.machine-status { display: inline-flex; padding: 4px 7px; color: var(--ink-500); background: #eef1f5; border-radius: 999px; font-size: 8px; font-weight: 750; white-space: nowrap; }
.machine-status--ready, .machine-status--running, .machine-status--processing,
.machine-status--screening, .machine-status--extracting_ba, .machine-status--paying,
.machine-status--ba_ready,
.machine-status--queued, .machine-status--cancelling { color: var(--klein); background: var(--klein-50); }
.machine-status--completed, .machine-status--succeeded, .machine-status--consumed { color: var(--good); background: var(--good-bg); }
.machine-status--pending_confirmation, .machine-status--review_required, .machine-status--awaiting_otp, .machine-status--awaiting_captcha { color: #a86208; background: #fff4dc; }
.machine-status--failed, .machine-status--expired, .machine-status--cancelled { color: var(--bad); background: var(--bad-bg); }
.machine-actions { white-space: nowrap; }
.machine-actions button { margin-right: 5px; padding: 5px 7px; color: var(--klein); background: var(--klein-50); border: 0; border-radius: 6px; font-size: 8.5px; font-weight: 650; }
.machine-actions button:last-child { color: var(--ink-500); background: #f0f2f6; }
.machine-actions button:disabled { opacity: .5; }

.machine-log-dialog { width: min(790px, calc(100% - 28px)); max-height: min(650px, calc(100vh - 38px)); padding: 0; color: #d3def2; background: #0a1328; border: 0; border-radius: 14px; box-shadow: 0 28px 80px rgba(3,8,24,.42); }
.machine-log-dialog::backdrop { background: rgba(10,19,48,.48); backdrop-filter: blur(3px); }
.machine-log-dialog header { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.machine-log-dialog header strong, .machine-log-dialog header small { display: block; }
.machine-log-dialog header strong { color: #fff; font-size: 12px; }
.machine-log-dialog header small { margin-top: 2px; color: #7182a1; font-size: 8.5px; }
.machine-log-dialog header button { color: #9bacc8; background: none; border: 0; font-size: 22px; }
.machine-log-dialog ol { max-height: 540px; margin: 0; padding: 12px 17px 18px; overflow-y: auto; list-style: none; }
.machine-log-dialog li { display: grid; grid-template-columns: 135px 44px minmax(0,1fr); gap: 7px; padding: 5px 0; font: 9.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; }
.machine-log-dialog li time { color: #647594; }
.machine-log-dialog li b { color: #7299f8; }
.machine-log-dialog li p { margin: 0; overflow-wrap: anywhere; }
.machine-log-dialog li.is-success b, .machine-log-dialog li.is-success p { color: #5de29b; }
.machine-log-dialog li.is-warn b, .machine-log-dialog li.is-warn p, .machine-log-dialog li.is-warning b, .machine-log-dialog li.is-warning p { color: #f2c36c; }
.machine-log-dialog li.is-error b, .machine-log-dialog li.is-error p { color: #ff8794; }

@media (max-width: 1200px) {
  .machine-stats { grid-template-columns: repeat(3, 1fr); }
  .machine-top-grid { grid-template-columns: 1fr; }
  .machine-stage-grid { grid-template-columns: 1fr; }
  .machine-pool-grid { grid-template-columns: repeat(3, minmax(430px, 1fr)); padding-bottom: 5px; overflow-x: auto; }
  .machine-log-board__header { align-items: flex-start; flex-direction: column; }
  .machine-log-controls { width: 100%; flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .machine-stats { grid-template-columns: repeat(2, 1fr); }
  .machine-run-controls { grid-template-columns: 1fr 1fr; }
  .machine-settings { grid-template-columns: 1fr; }
  .machine-settings__wide, .machine-settings__fixed, .machine-settings__save { grid-column: auto; }
  .machine-config-summary { align-items: flex-start; }
  .machine-config-summary p, .machine-config-summary__state b { display: none; }
  .machine-board-heading { align-items: flex-start; flex-direction: column; }
  .machine-pool-grid { grid-template-columns: 1fr; overflow: visible; }
  .machine-pool-tools { align-items: stretch; flex-wrap: wrap; }
  .machine-pool-tools .field-input, .machine-pool-tools .field-select { width: 100%; flex-basis: 100%; }
  .machine-product-tools .machine-check { margin-left: 0; }
  .machine-product-group label > small { display: none; }
  .machine-pool-scroll { height: 320px; }
  .machine-live-log--board { height: 300px; padding-right: 11px; padding-left: 11px; }
  .machine-live-log--board > div { grid-template-columns: 65px 45px minmax(0,1fr); gap: 5px; }
  .machine-import { grid-template-columns: 1fr; }
  .machine-table-tools { align-items: stretch; flex-wrap: wrap; }
  .machine-table-tools .field-input, .machine-table-tools .field-select { width: 100%; }
  .machine-progress p { flex-wrap: wrap; }
}

/* ========================================================================
   Partner workbench
   ======================================================================== */
.sidebar__nav { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent; }
.wb-eyebrow {
  display: inline-flex; align-items: center; gap: 7px; margin-bottom: 5px;
  color: var(--klein); font-size: 10px; font-weight: 800; letter-spacing: .12em;
}
.wb-eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(0,47,167,.1); }
.wb-eyebrow--good { color: var(--good); }
.wb-eyebrow--bad { color: var(--bad); }
.wb-muted { color: var(--ink-400); }
.wb-nowrap { white-space: nowrap; }
.wb-cell-sub { display: block; margin-top: 3px; color: var(--ink-400); font-size: 11px; font-weight: 400; }
.wb-reason { display: block; max-width: 440px; overflow: hidden; color: var(--ink-700); text-overflow: ellipsis; white-space: nowrap; }
.wb-empty { padding: 32px 8px; color: var(--ink-400); text-align: center; }

.wb-hero {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 28px;
  min-height: 156px; padding: 30px 34px; overflow: hidden; color: #fff;
  background: linear-gradient(120deg, #001e6c 0%, #002fa7 56%, #245de3 100%);
  border-radius: 18px; box-shadow: 0 18px 40px rgba(0,47,167,.22);
}
.wb-hero::before { content: ""; position: absolute; width: 280px; height: 280px; right: 10%; top: -190px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 45px rgba(255,255,255,.035), 0 0 0 90px rgba(255,255,255,.02); }
.wb-hero > * { position: relative; z-index: 1; }
.wb-hero .wb-eyebrow { color: #bfcffc; }
.wb-hero .wb-eyebrow i { background: #6ee7a4; box-shadow: 0 0 0 4px rgba(110,231,164,.15); }
.wb-hero h2 { color: #fff; font-size: 25px; letter-spacing: -.02em; }
.wb-hero p { margin-top: 7px; color: rgba(255,255,255,.74); font-size: 13px; }
.wb-hero__meta { display: flex; align-items: flex-end; flex-direction: column; gap: 8px; }
.wb-hero__meta small { color: rgba(255,255,255,.62); }
.wb-live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; font-size: 12px; font-weight: 650; backdrop-filter: blur(8px); }
.wb-live-pill i { width: 8px; height: 8px; background: #f5bb4b; border-radius: 50%; }
.wb-live-pill.is-online i { background: #5de29b; box-shadow: 0 0 0 4px rgba(93,226,155,.14); }
.wb-live-pill.is-offline i { background: #ff8794; }

.wb-stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 13px; }
.wb-stat {
  position: relative; display: flex; min-width: 0; min-height: 124px; padding: 19px 19px 17px;
  overflow: hidden; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s, border-color .16s;
}
a.wb-stat:hover { z-index: 1; border-color: var(--klein-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.wb-stat::after { content: ""; position: absolute; width: 64px; height: 64px; right: -26px; top: -26px; background: var(--klein-50); border-radius: 50%; }
.wb-stat > span { color: var(--ink-500); font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.wb-stat > strong { margin-top: 10px; overflow: hidden; color: var(--ink-900); font-size: clamp(22px, 2vw, 29px); line-height: 1; letter-spacing: -.04em; text-overflow: ellipsis; white-space: nowrap; }
.wb-stat > small { margin-top: auto; padding-top: 10px; color: var(--ink-400); font-size: 10.5px; white-space: nowrap; }
.wb-stat--income { border-top: 3px solid #22a766; }
.wb-stat--income > strong { color: #14804d; }
.wb-stat--income::after { background: #e7f7ef; }
.wb-stat--expense { border-top: 3px solid #e65c68; }
.wb-stat--expense > strong { color: #c93846; }
.wb-stat--expense::after { background: #fff0f2; }
.wb-stat--profit { border-top: 3px solid var(--klein); }
.wb-stat--profit > strong { color: var(--klein); }
.wb-stat--share { border-top: 3px solid #8a5ee8; }
.wb-stat--share > strong { color: #7043ce; }
.wb-stat--share::after { background: #f2edff; }
.wb-stat--review { border-top: 3px solid #e3a024; }
.wb-stat--review > strong { color: #b27308; }
.wb-stat--review::after { background: #fff6e5; }

.wb-two-col { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; align-items: stretch; }
.wb-two-col > .card { margin: 0; }
.wb-panel .card__body { min-height: 230px; }
.wb-progress-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.wb-progress-head > div { display: flex; align-items: baseline; gap: 11px; }
.wb-progress-head strong { color: var(--ink-900); font-size: 27px; letter-spacing: -.03em; }
.wb-progress-head span { color: var(--ink-400); font-size: 11px; }
.wb-progress-head > b { color: var(--klein); font-size: 15px; }
.wb-progress { height: 9px; margin-top: 14px; overflow: hidden; background: #edf1f9; border-radius: 999px; }
.wb-progress > span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--klein), #3d72ea); border-radius: inherit; transition: width .4s ease; }
.wb-progress--large { height: 11px; background: rgba(255,255,255,.14); }
.wb-progress--large > span { background: linear-gradient(90deg, #6ee7a4, #fff); }
.wb-mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 20px; }
.wb-mini-stats > div { padding: 11px 12px; background: #f7f8fc; border-radius: 9px; }
.wb-mini-stats span, .wb-mini-stats strong { display: block; }
.wb-mini-stats span { color: var(--ink-400); font-size: 9px; }
.wb-mini-stats strong { margin-top: 4px; color: var(--ink-800); font-size: 16px; }
.is-good { color: var(--good) !important; }
.is-bad { color: var(--bad) !important; }
.is-warn { color: #b27308 !important; }
.wb-source-state { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding-top: 13px; color: var(--ink-500); border-top: 1px solid var(--line-soft); font-size: 11px; }
.wb-source-state i { width: 8px; height: 8px; background: var(--warn); border-radius: 50%; }
.wb-source-state i.is-online { background: var(--good); box-shadow: 0 0 0 3px rgba(22,163,74,.13); }
.wb-source-state i.is-offline { background: var(--bad); }
.wb-source-state b { margin-left: auto; color: var(--ink-700); }
.wb-stage-list { display: flex; flex-direction: column; gap: 9px; }
.wb-stage-row { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 12px; background: #f7f8fc; border: 1px solid transparent; border-radius: 10px; }
.wb-stage-row.is-running { background: var(--klein-50); border-color: var(--klein-100); }
.wb-stage-no { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; color: var(--klein); background: #fff; border: 1px solid var(--line); border-radius: 9px; font-size: 10px; font-weight: 800; }
.wb-stage-row b, .wb-stage-row small { display: block; }
.wb-stage-row b { color: var(--ink-800); font-size: 12px; }
.wb-stage-row small { margin-top: 2px; color: var(--ink-400); font-size: 9px; }
.wb-stage-row > strong { color: var(--klein); font-size: 17px; }
.wb-quick-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.wb-quick-grid > a { display: flex; align-items: center; gap: 12px; padding: 14px; background: #f8f9fc; border: 1px solid transparent; border-radius: 11px; transition: .15s; }
.wb-quick-grid > a:hover { color: var(--klein); background: var(--klein-50); border-color: var(--klein-100); transform: translateY(-1px); }
.wb-quick-grid > a > span { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; flex: 0 0 auto; color: #fff; background: var(--klein); border-radius: 10px; font-size: 14px; font-weight: 800; }
.wb-quick-grid b, .wb-quick-grid small { display: block; }
.wb-quick-grid b { color: var(--ink-800); font-size: 12px; }
.wb-quick-grid small { margin-top: 3px; color: var(--ink-400); font-size: 9px; }

/* Finance */
.wb-stat-grid--finance { grid-template-columns: repeat(4, 1fr); }
.wb-finance-forms, .wb-finance-ledgers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.wb-form-mark { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; font-size: 23px; font-weight: 400; }
.wb-form-mark.is-income { color: var(--good); background: var(--good-bg); }
.wb-form-mark.is-expense { color: var(--bad); background: var(--bad-bg); }
.wb-form { display: flex; flex-direction: column; gap: 16px; }
.wb-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wb-form-grid--3 { grid-template-columns: repeat(3, 1fr); }
.wb-field-help { color: var(--klein); font-size: 10px; }
.wb-upload { position: relative; display: flex; min-height: 66px; padding: 12px 14px 12px 48px; flex-direction: column; justify-content: center; background: #fafbfe; border: 1px dashed var(--ink-300); border-radius: 10px; cursor: pointer; }
.wb-upload::before { content: "↑"; position: absolute; left: 16px; top: 17px; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; color: var(--klein); background: var(--klein-50); border-radius: 7px; font-weight: 800; }
.wb-upload:hover { background: var(--klein-50); border-color: var(--klein); }
.wb-upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.wb-upload span { color: var(--ink-700); font-size: 11px; font-weight: 650; }
.wb-upload small { margin-top: 2px; color: var(--ink-400); font-size: 9px; }
.wb-money { font-size: 14px; }
.wb-money.is-income { color: var(--good); }
.wb-money.is-expense { color: var(--bad); }
.wb-proof-link { display: inline-flex; padding: 5px 8px; color: var(--klein); background: var(--klein-50); border-radius: 6px; font-size: 10px; font-weight: 650; }
.wb-table th { font-size: 9px; }
.wb-table td { font-size: 11px; }

/* Registration source page */
.wb-registration-hero { padding: 27px 30px; color: #fff; background: radial-gradient(circle at 86% -20%, rgba(84,130,255,.7), transparent 38%), linear-gradient(125deg, #00164f, #002fa7); border: 0; box-shadow: 0 18px 40px rgba(0,30,108,.18); }
.wb-registration-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.wb-registration-hero .wb-eyebrow { color: #bfcffc; }
.wb-registration-hero h2 { color: #fff; font-size: 22px; }
.wb-registration-hero p { margin-top: 5px; color: rgba(255,255,255,.66); font-size: 11px; }
.wb-source-badge { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.13); border-radius: 999px; font-size: 11px; }
.wb-source-badge i { width: 8px; height: 8px; background: var(--warn); border-radius: 50%; }
.wb-source-badge.is-online i { background: #5de29b; box-shadow: 0 0 0 4px rgba(93,226,155,.13); }
.wb-source-badge.is-offline i { background: #ff8794; }
.wb-registration-count { display: flex; align-items: baseline; gap: 10px; margin-top: 25px; line-height: 1; }
.wb-registration-count strong { color: #fff; font-size: 42px; letter-spacing: -.05em; }
.wb-registration-count span { color: rgba(255,255,255,.35); font-size: 28px; }
.wb-registration-count b { color: rgba(255,255,255,.72); font-size: 24px; }
.wb-registration-meta { display: flex; gap: 20px; margin-top: 10px; color: rgba(255,255,255,.66); font-size: 9px; }
.wb-registration-meta span:first-child { color: #fff; font-weight: 700; }
.wb-stat-grid--registration { grid-template-columns: repeat(4, 1fr); }
.wb-registration-grid { grid-template-columns: 1.15fr .85fr; }
.wb-distribution { display: flex; flex-direction: column; gap: 6px; }
.wb-distribution-row { display: grid; grid-template-columns: minmax(0,1fr) 80px 60px; align-items: center; gap: 10px; padding: 10px 12px; background: #f8f9fc; border-radius: 9px; }
.wb-distribution-row > div { display: flex; align-items: center; gap: 8px; }
.wb-distribution-row i { width: 7px; height: 7px; background: var(--warn); border-radius: 50%; }
.wb-distribution-row i.is-good { background: var(--good); }
.wb-distribution-row i.is-bad { background: var(--bad); }
.wb-distribution-row span { color: var(--ink-700); font-size: 11px; }
.wb-distribution-row strong { color: var(--ink-800); font-size: 13px; text-align: right; }
.wb-distribution-row small { color: var(--ink-400); font-size: 9px; text-align: right; }
.wb-runtime-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.wb-runtime-grid > div { padding: 17px; background: #f7f8fc; border-radius: 10px; }
.wb-runtime-grid span, .wb-runtime-grid strong { display: block; }
.wb-runtime-grid span { color: var(--ink-400); font-size: 10px; }
.wb-runtime-grid strong { margin-top: 6px; color: var(--klein); font-size: 24px; }
.wb-status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; color: var(--ink-500); background: #f0f2f6; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.wb-status::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.wb-status.is-good { color: var(--good); background: var(--good-bg); }
.wb-status.is-bad { color: var(--bad); background: var(--bad-bg); }
.wb-status.is-warn { color: #a86208 !important; background: #fff4dc; }
.wb-status.is-info { color: var(--klein); background: var(--klein-50); }
.wb-status.is-muted::before { display: none; }

/* Payment client */
.wb-pipeline-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 4px 2px 2px; }
.wb-pipeline-header h2 { font-size: 23px; }
.wb-pipeline-header p { margin-top: 4px; color: var(--ink-500); font-size: 11px; }
.wb-pipeline-header__actions { display: flex; align-items: center; gap: 9px; }
.wb-counter-action { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.wb-counter-action small { color: var(--ink-400); font-size: 8px; white-space: nowrap; }
.wb-pipeline-state { display: grid; grid-template-columns: 9px auto; align-items: center; gap: 4px 8px; padding: 10px 13px; background: #fff; border: 1px solid var(--line); border-radius: 11px; }
.wb-pipeline-state > i { width: 8px; height: 8px; background: var(--ink-300); border-radius: 50%; }
.wb-pipeline-state.is-online > i { background: var(--good); box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.wb-pipeline-state.is-offline > i { background: var(--bad); }
.wb-pipeline-state span { color: var(--ink-700); font-size: 11px; font-weight: 700; }
.wb-pipeline-state small { grid-column: 2; color: var(--ink-400); font-size: 8px; }
.wb-payment-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-sm); }
.wb-payment-stats > div, .wb-payment-stats > a { min-height: 82px; padding: 15px 20px; background: #fff; }
.wb-payment-stats span, .wb-payment-stats strong { display: block; }
.wb-payment-stats span { color: var(--ink-400); font-size: 9px; }
.wb-payment-stats strong { margin-top: 5px; color: var(--ink-900); font-size: 23px; }
.wb-payment-stats small { display: block; margin-top: 5px; color: var(--ink-400); font-size: 8.5px; }
.wb-payment-stats small b { color: var(--ink-600); font-weight: 750; font-variant-numeric: tabular-nums; }
.wb-payment-stats > a { display: flex; align-items: center; gap: 17px; color: var(--klein); font-size: 11px; font-weight: 700; }
.wb-payment-stats > a:hover { background: var(--klein-50); }
.wb-payment-stats > a b { font-size: 18px; }
.wb-pool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.wb-pool-card { position: relative; padding: 22px; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); }
.wb-pool-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: #6289ec; }
.wb-pool-card:nth-child(2)::before { background: #8265cf; }
.wb-pool-card--products::before { background: var(--good); }
.wb-pool-card.is-running::before { background: linear-gradient(90deg, var(--klein), #6691f5); }
.wb-pool-card__top { display: flex; align-items: center; justify-content: space-between; }
.wb-pool-card__top > span { color: #b9c1d2; font: 800 19px/1 ui-monospace, monospace; }
.wb-pool-live { display: flex; align-items: center; gap: 6px; color: var(--ink-400); font-size: 9px; }
.wb-pool-live i { width: 7px; height: 7px; background: #b9c1d2; border-radius: 50%; }
.wb-pool-card.is-running .wb-pool-live { color: var(--good); }
.wb-pool-card.is-running .wb-pool-live i { background: var(--good); box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.wb-pool-card h2 { margin-top: 17px; font-size: 17px; }
.wb-pool-card > p { min-height: 34px; margin-top: 5px; color: var(--ink-400); font-size: 10px; line-height: 1.7; }
.wb-pool-flow { display: flex; align-items: center; justify-content: space-between; gap: 7px; margin-top: 15px; padding: 8px 10px; color: var(--ink-500); background: #f8f9fc; border: 1px solid var(--line-soft); border-radius: 8px; font-size: 8.5px; }
.wb-pool-flow b { color: var(--klein); font-size: 13px; }
.wb-rate { display: flex; align-items: baseline; justify-content: space-between; margin-top: 17px; }
.wb-rate strong { color: var(--klein); font-size: 27px; letter-spacing: -.04em; }
.wb-rate span { color: var(--ink-400); font-size: 9px; }
.wb-pool-bar { height: 6px; margin-top: 8px; overflow: hidden; background: #edf0f6; border-radius: 999px; }
.wb-pool-bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--klein), #5b87ee); border-radius: inherit; transition: width .4s; }
.wb-pool-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; margin-top: 18px; overflow: hidden; background: var(--line-soft); border-radius: 9px; }
.wb-pool-metrics > div { padding: 9px; background: #f8f9fc; text-align: center; }
.wb-pool-metrics span, .wb-pool-metrics b { display: block; }
.wb-pool-metrics span { color: var(--ink-400); font-size: 8px; }
.wb-pool-metrics b { margin-top: 3px; color: var(--ink-700); font-size: 13px; }
.wb-pool-metrics--simple { margin-top: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wb-pool-metrics--simple > div { min-height: 67px; display: flex; flex-direction: column; justify-content: center; padding: 8px 7px; }
.wb-pool-metrics--simple span { min-height: 20px; line-height: 1.35; }
.wb-pool-metrics--simple b { font-size: 16px; font-variant-numeric: tabular-nums; }
.wb-pool-metrics--simple b.is-good { color: var(--good); }
.wb-payment-footnote { margin: 13px 2px 0; color: var(--ink-400); font-size: 9px; line-height: 1.6; }

/* Manual BA payment */
.wb-ba-pay-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 3px 2px; }
.wb-ba-pay-head h2 { font-size: 23px; }
.wb-ba-pay-head__state { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; color: var(--ink-500); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 11px; font-weight: 700; }
.wb-ba-pay-head__state i { width: 8px; height: 8px; background: var(--warn); border-radius: 50%; }
.wb-ba-pay-head__state.is-online i { background: var(--good); box-shadow: 0 0 0 4px rgba(22,163,74,.11); }
.wb-ba-pay-grid { display: grid; grid-template-columns: minmax(330px, .82fr) minmax(440px, 1.18fr); gap: 16px; align-items: stretch; }
.wb-ba-pay-grid > .card { margin: 0; }
.wb-ba-pay-form-card .card__body, .wb-ba-pay-status-card .card__body { min-height: 386px; }
.wb-ba-pay-form[hidden] { display: none; }
.wb-ba-mode { display: inline-flex; padding: 3px; background: #eef1f6; border-radius: 8px; }
.wb-ba-mode button { min-width: 54px; height: 28px; padding: 0 10px; color: var(--ink-500); background: transparent; border: 0; border-radius: 6px; font-size: 10px; font-weight: 700; cursor: pointer; }
.wb-ba-mode button.is-active { color: var(--klein); background: #fff; box-shadow: 0 1px 3px rgba(20,31,54,.12); }
.wb-ba-pay-form { display: flex; flex-direction: column; gap: 17px; }
.wb-ba-pay-form__row { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(190px, 1.3fr); gap: 12px; }
.wb-ba-pay-form .field-textarea { min-height: 92px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.wb-ba-pay-form .wb-ba-batch-input { min-height: 176px; resize: vertical; }
.wb-ba-file-row { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.wb-ba-file-row > span { min-width: 0; overflow: hidden; color: var(--ink-400); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wb-ba-proxy-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; padding: 10px 12px; background: #f4faf6; border: 1px solid #d9eee0; border-radius: 8px; }
.wb-ba-proxy-summary span { color: var(--ink-500); font-size: 10px; }
.wb-ba-proxy-summary strong { color: var(--good); font-size: 11px; }
.wb-ba-status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; color: var(--ink-500); background: #f0f2f6; border-radius: 999px; font-size: 9px; }
.wb-ba-status-pill i, .wb-ba-table-status i { width: 6px; height: 6px; background: currentColor; border-radius: 50%; }
.wb-ba-status-pill.is-running, .wb-ba-table-status.is-running { color: var(--klein); background: var(--klein-50); }
.wb-ba-status-pill.is-good, .wb-ba-table-status.is-good { color: var(--good); background: var(--good-bg); }
.wb-ba-status-pill.is-warn, .wb-ba-table-status.is-warn { color: #a86208; background: var(--warn-bg); }
.wb-ba-status-pill.is-bad, .wb-ba-table-status.is-bad { color: var(--bad); background: var(--bad-bg); }
.wb-ba-empty { display: flex; min-height: 320px; align-items: center; justify-content: center; color: var(--ink-400); font-size: 11px; }
.wb-ba-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 8px; }
.wb-ba-facts > div { min-height: 64px; padding: 11px 13px; background: #fafbfe; }
.wb-ba-facts span, .wb-ba-facts strong { display: block; }
.wb-ba-facts span { color: var(--ink-400); font-size: 9px; }
.wb-ba-facts strong { margin-top: 5px; overflow: hidden; color: var(--ink-800); font: 700 11px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.wb-ba-stage { margin-top: 20px; }
.wb-ba-stage > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wb-ba-stage span { min-width: 0; overflow: hidden; color: var(--ink-700); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.wb-ba-stage b { color: var(--klein); font-size: 11px; font-variant-numeric: tabular-nums; }
.wb-ba-stage .wb-progress { margin-top: 9px; }
.wb-ba-otp { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; margin-top: 20px; padding: 14px; background: #fff8e9; border: 1px solid #f1dba9; border-radius: 8px; }
.wb-ba-otp .field-input { height: 42px; color: var(--ink-900); font: 700 19px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .16em; }
.wb-ba-otp .btn { height: 42px; }
.wb-ba-message { margin-top: 16px; padding: 10px 12px; color: var(--ink-600); background: #f6f7fa; border-left: 3px solid var(--ink-300); border-radius: 0 7px 7px 0; font-size: 10px; overflow-wrap: anywhere; }
.wb-ba-message.is-success { color: #126a37; background: var(--good-bg); border-color: var(--good); }
.wb-ba-message.is-warning { color: #875309; background: var(--warn-bg); border-color: var(--warn); }
.wb-ba-message.is-error { color: #a91f28; background: var(--bad-bg); border-color: var(--bad); }
.wb-ba-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.wb-ba-log-card .card__body { padding: 0; }
.wb-ba-log { height: 280px; overflow: auto; padding: 12px 0; color: #d8dfec; background: #151c2b; font: 11px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; scrollbar-color: #3a455d transparent; }
.wb-ba-log__empty { display: flex; height: 100%; align-items: center; justify-content: center; color: #7f8aa1; }
.wb-ba-log__row { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 4px 18px; border-left: 3px solid transparent; }
.wb-ba-log__row time { color: #758198; font-variant-numeric: tabular-nums; }
.wb-ba-log__row span { min-width: 0; overflow-wrap: anywhere; }
.wb-ba-log__row.is-success { color: #8be2ae; border-left-color: #36b96c; }
.wb-ba-log__row.is-warning { color: #f2c873; border-left-color: #dda33e; }
.wb-ba-log__row.is-error { color: #ff9ea6; border-left-color: #e4505d; }
.wb-ba-history { min-width: 800px; }
.wb-ba-history tr.is-selected td { background: var(--klein-50); }
.wb-ba-table-status { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; color: var(--ink-500); background: #f0f2f6; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.wb-ba-mode-tag { display: inline-flex; min-width: 36px; justify-content: center; padding: 4px 6px; color: var(--ink-500); background: #f0f2f6; border-radius: 6px; font-size: 9px; font-weight: 700; }
.wb-ba-mode-tag.is-auto { color: #126a37; background: var(--good-bg); }
.wb-ba-batch-card .card__body { padding-bottom: 18px; }
.wb-ba-batch-actions { display: flex; align-items: center; gap: 8px; }
.wb-ba-batch-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: 8px; }
.wb-ba-batch-metrics > div { min-height: 70px; padding: 12px 14px; background: #fafbfe; }
.wb-ba-batch-metrics span, .wb-ba-batch-metrics b { display: block; }
.wb-ba-batch-metrics span { color: var(--ink-400); font-size: 9px; }
.wb-ba-batch-metrics b { margin-top: 5px; color: var(--ink-800); font-size: 20px; font-variant-numeric: tabular-nums; }
.wb-ba-batch-metrics b.is-good { color: var(--good); }
.wb-ba-batch-metrics b.is-bad { color: var(--bad); }
.wb-ba-batch-metrics b.is-warn { color: #a86208; }
.wb-ba-batch-progress { margin-top: 16px; }
.wb-ba-batch-rejected { margin-top: 14px; padding: 9px 11px; color: #875309; background: var(--warn-bg); border-left: 3px solid var(--warn); border-radius: 0 7px 7px 0; font-size: 10px; overflow-wrap: anywhere; }
.wb-inventory-groups { display: flex; flex-direction: column; gap: 14px; }
.wb-inventory-group { padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.wb-inventory-group:last-child { padding-bottom: 0; border-bottom: 0; }
.wb-inventory-group__head { display: flex; align-items: center; justify-content: space-between; }
.wb-inventory-group__head b { color: var(--ink-700); font-size: 11px; }
.wb-inventory-group__head span { color: var(--klein); font-size: 13px; font-weight: 800; }
.wb-inventory-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.wb-inventory-chips > span { display: inline-flex; align-items: center; gap: 7px; padding: 5px 8px; background: #f5f7fb; border-radius: 6px; }
.wb-inventory-chips i { color: var(--ink-500); font-size: 8px; font-style: normal; }
.wb-inventory-chips b { color: var(--ink-800); font-size: 9px; }
.wb-inventory-chips small { color: var(--ink-400); font-size: 9px; }
.wb-flow-list { display: flex; margin: 0 0 19px; padding: 0; flex-direction: column; gap: 15px; list-style: none; }
.wb-flow-list li { display: flex; gap: 11px; }
.wb-flow-list li > i { display: flex; align-items: center; justify-content: center; width: 27px; height: 27px; flex: 0 0 auto; color: var(--klein); background: var(--klein-50); border-radius: 8px; font-size: 9px; font-style: normal; font-weight: 800; }
.wb-flow-list b, .wb-flow-list span { display: block; }
.wb-flow-list b { color: var(--ink-700); font-size: 11px; }
.wb-flow-list span { margin-top: 2px; color: var(--ink-400); font-size: 9px; }

/* Account pools */
.wb-account-summary { display: grid; grid-template-columns: repeat(3, minmax(120px, .7fr)) minmax(260px, 1.9fr); gap: 1px; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 13px; }
.wb-account-summary > div { min-height: 75px; padding: 14px 18px; background: #fff; }
.wb-account-summary span, .wb-account-summary strong { display: block; }
.wb-account-summary span { color: var(--ink-400); font-size: 9px; }
.wb-account-summary strong { margin-top: 4px; color: var(--ink-900); font-size: 22px; }
.wb-account-summary__hint { display: flex; align-items: center; gap: 10px; }
.wb-account-summary__hint i { width: 8px; height: 8px; flex: 0 0 auto; background: var(--good); border-radius: 50%; box-shadow: 0 0 0 4px rgba(22,163,74,.1); }
.wb-account-summary__hint span { color: var(--ink-500); font-size: 10px; }
.wb-account-tools { display: flex; align-items: center; gap: 8px; padding: 12px 17px; background: #fafbfe; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wb-account-tools .spacer { flex: 1; }
.wb-check-all { display: flex; align-items: center; gap: 7px; color: var(--ink-600); font-size: 10px; }
.wb-selected-count { padding-right: 5px; color: var(--ink-400); font-size: 9px; }
.wb-selected-count b { color: var(--klein); }
.wb-rt-button b { display: inline-flex; padding: 2px 4px; color: #fff; background: var(--klein); border-radius: 4px; font-size: 8px; }
.wb-quantity-export { display: flex; align-items: center; gap: 7px; }
.wb-quantity-export > span { color: var(--ink-400); font-size: 9px; }
.wb-quantity-export .field-input { width: 80px; height: 33px; padding: 6px 9px; font-size: 11px; }
.wb-account-tools .search-input { width: 190px; height: 33px; padding: 6px 10px; font-size: 11px; }
.wb-account-table { min-width: 880px; }
.wb-credential-dot { display: inline-flex; margin-right: 4px; padding: 4px 7px; color: var(--ink-400); background: #f0f2f6; border-radius: 6px; font-size: 8px; }
.wb-credential-dot.is-ready { color: var(--good); background: var(--good-bg); }
.wb-review-pool { border-top: 3px solid #e4a12a; }
.wb-review-reason { display: flex; align-items: flex-start; gap: 8px; max-width: 620px; padding: 7px 9px; color: #835108; background: #fff8e9; border-radius: 7px; }
.wb-review-reason i { display: flex; align-items: center; justify-content: center; width: 15px; height: 15px; flex: 0 0 auto; color: #fff; background: #d9951e; border-radius: 50%; font-size: 8px; font-style: normal; font-weight: 800; }
.wb-review-reason span { overflow-wrap: anywhere; font-size: 9px; line-height: 1.5; }
.wb-rt-task { border-color: var(--klein-200); box-shadow: 0 8px 28px rgba(0,47,167,.09); }
.wb-rt-config .modal { max-width: 590px; }
.wb-rt-config .modal__header > div small { display: block; margin-top: 3px; color: var(--ink-400); font-size: 9px; }
.wb-rt-config__intro { display: flex; align-items: baseline; gap: 9px; margin-bottom: 17px; }
.wb-rt-config__intro b { color: var(--ink-800); font-size: 12px; }
.wb-rt-config__intro span { color: var(--ink-400); font-size: 9px; }
.wb-rt-config__grid { gap: 14px; }
.wb-rt-config__grid .field > small { display: block; margin-top: 5px; color: var(--ink-400); font-size: 8.5px; line-height: 1.45; }
.wb-price-input { position: relative; }
.wb-price-input > i { position: absolute; z-index: 1; left: 11px; top: 50%; color: var(--ink-400); font-size: 11px; font-style: normal; transform: translateY(-50%); }
.wb-price-input .field-input { width: 100%; padding-left: 25px; }
.wb-rt-config__summary { margin-top: 17px; padding: 10px 12px; color: var(--klein); background: var(--klein-50); border: 1px solid var(--klein-100); border-radius: 8px; font-size: 9.5px; font-weight: 700; text-align: center; }
.wb-mini-stats--rt { grid-template-columns: repeat(3,1fr); }
.wb-rt-results { display: flex; gap: 6px; max-height: 140px; margin: 15px 0; overflow-y: auto; flex-wrap: wrap; }
.wb-rt-results > span { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 5px 8px; background: #f5f7fb; border-radius: 6px; }
.wb-rt-results b { max-width: 260px; overflow: hidden; color: var(--ink-700); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.wb-rt-results i { color: inherit; font-size: 8px; font-style: normal; }

@media (max-width: 1280px) {
  .wb-stat-grid { grid-template-columns: repeat(3, 1fr); }
  .wb-stat-grid--finance, .wb-stat-grid--registration { grid-template-columns: repeat(4, 1fr); }
  .wb-quick-grid { grid-template-columns: repeat(2, 1fr); }
  .wb-form-grid--3 { grid-template-columns: 1fr 1fr; }
  .wb-form-grid--3 .field:last-child { grid-column: span 2; }
  .wb-account-summary { grid-template-columns: repeat(3, 1fr); }
  .wb-account-summary__hint { grid-column: span 3; min-height: 50px !important; }
}
@media (max-width: 1040px) {
  .wb-two-col, .wb-registration-grid, .wb-ba-pay-grid { grid-template-columns: 1fr; }
  .wb-finance-forms, .wb-finance-ledgers { grid-template-columns: 1fr; }
  .wb-pool-grid { grid-template-columns: 1fr; }
  .wb-payment-stats { grid-template-columns: repeat(3,1fr); }
  .wb-payment-stats > a { grid-column: span 3; min-height: 50px; justify-content: center; }
  .wb-account-tools .spacer { flex-basis: 100%; height: 0; }
  .wb-ba-batch-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .wb-hero { align-items: flex-start; padding: 24px; flex-direction: column; }
  .wb-hero__meta { align-items: flex-start; }
  .wb-stat-grid, .wb-stat-grid--finance, .wb-stat-grid--registration { grid-template-columns: repeat(2, 1fr); }
  .wb-stat { min-height: 112px; }
  .wb-quick-grid { grid-template-columns: 1fr; }
  .wb-registration-hero__top, .wb-pipeline-header { align-items: flex-start; flex-direction: column; }
  .wb-registration-meta { flex-direction: column; gap: 4px; }
  .wb-form-grid, .wb-form-grid--3 { grid-template-columns: 1fr; }
  .wb-form-grid--3 .field:last-child { grid-column: auto; }
  .wb-payment-stats { grid-template-columns: 1fr; }
  .wb-payment-stats > a { grid-column: auto; }
  .wb-account-summary { grid-template-columns: repeat(3, 1fr); }
  .wb-account-summary__hint { grid-column: span 3; }
  .wb-account-tools { align-items: stretch; }
  .wb-account-tools .btn, .wb-account-tools .search-input { width: 100%; }
  .wb-quantity-export { width: 100%; }
  .wb-quantity-export .field-input { flex: 1; }
  .wb-progress-head > div { align-items: flex-start; flex-direction: column; gap: 2px; }
  .wb-ba-pay-head { align-items: flex-start; flex-direction: column; }
  .wb-ba-pay-form-card .card__header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .wb-ba-mode { width: 100%; }
  .wb-ba-mode button { flex: 1; }
  .wb-ba-pay-form__row, .wb-ba-facts { grid-template-columns: 1fr; }
  .wb-ba-pay-form-card .card__body, .wb-ba-pay-status-card .card__body { min-height: auto; }
  .wb-ba-empty { min-height: 180px; }
  .wb-ba-otp { grid-template-columns: 1fr; }
  .wb-ba-otp .btn { width: 100%; }
  .wb-ba-log { height: 240px; }
  .wb-ba-log__row { grid-template-columns: 58px minmax(0, 1fr); padding-right: 11px; padding-left: 11px; }
  .wb-ba-batch-card .card__header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .wb-ba-batch-actions { width: 100%; flex-wrap: wrap; }
  .wb-ba-batch-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
