:root {
  --bg: #f1f5f6;
  --bar: #202a58;
  --surface: #ffffff;
  --surface-soft: #f6f9fa;
  --border: #d7e2e4;
  --border-strong: #9bb6ba;
  --text: #202950;
  --muted: #5c7078;
  --faint: #7a8e95;
  --primary: #007f7c;
  --primary-hover: #006c69;
  --success: #78c83b;
  --success-text: #477d1d;
  --danger: #d94f5f;
  --warning: #d99a2b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
}

* { box-sizing: border-box; }
::selection { color: #202a58; background: #b8fa77; }
html { min-width: 320px; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; }
button, textarea, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

.topbar { min-height: 72px; border-bottom: 1px solid #168a89; background: linear-gradient(115deg, #202a58 0%, #174964 62%, #0a8d89 135%); }
.topbar-inner { width: min(1080px, calc(100% - 40px)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 8px; background: #b8fa77; color: #202a58; font-size: 18px; box-shadow: 0 8px 24px rgb(4 64 76 / 24%); }
.service-state { min-height: 32px; display: inline-flex; align-items: center; gap: 8px; color: #d8eeee; font-size: 13px; }
.service-state span { width: 8px; height: 8px; border-radius: 50%; background: var(--warning); }
.service-state[data-state="online"] span { background: var(--success); }
.service-state[data-state="offline"] span { background: var(--danger); }
.service-state strong { font-weight: 500; }

.shell { width: min(1080px, calc(100% - 40px)); margin: 40px auto 0; }
.text-input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; outline: none; background: #f8fbfb; color: var(--text); font-size: 14px; letter-spacing: 0; }
.text-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(0 167 162 / 14%); }
#cdk-note[data-state="valid"] { color: var(--success-text); }
#cdk-note[data-state="invalid"] { color: var(--danger); }
.server-mode .method-switch { grid-template-columns: repeat(3, 1fr); }
.admin-shell { width: min(760px, calc(100% - 40px)); }
.admin-home { color: var(--primary); font-size: 12px; font-weight: 700; text-decoration: none; }
.admin-form { display: flex; align-items: end; gap: 10px; }
.admin-form label { display: grid; gap: 6px; color: var(--text); font-size: 12px; font-weight: 700; }
.admin-form input { width: 140px; height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 6px; outline: none; background: #f8fbfb; color: var(--text); }
.admin-list-panel { padding: 8px 18px; }
.admin-cdk-row { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--border); }
.admin-cdk-row:last-child { border-bottom: 0; }
.admin-cdk-row[data-disabled="true"] { opacity: .5; }
.admin-cdk-row > div:first-child { display: grid; gap: 4px; }
.admin-cdk-row strong { font-size: 13px; letter-spacing: 0; }
.admin-cdk-row span { color: var(--muted); font-size: 11px; }
.admin-cdk-row > div:last-child { display: flex; gap: 8px; }
.admin-cdk-row button { min-height: 34px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); background: transparent; font-size: 11px; font-weight: 700; }
.admin-cdk-row .danger-button { border-color: #f3b4b0; color: #b42318; }
.admin-cdk-row .danger-button:hover { border-color: #f04438; background: #fff1f0; }
.input-panel, .run-panel { border: 1px solid var(--border); border-radius: 8px; background: var(--surface); box-shadow: 0 12px 32px rgb(25 56 67 / 7%); }
.input-panel { padding: 22px; }
.section-heading, .run-heading, .form-actions, .label-row, .phase-line { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow, .run-state p, .success-result p { margin: 0 0 3px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 17px; line-height: 1.25; }
h2 { margin: 0; font-size: 14px; }
.ready-badge { padding: 6px 9px; border: 1px solid #9cdc62; border-radius: 6px; color: #477e1d; background: #effbe5; font-size: 11px; font-weight: 700; }

form { margin-top: 22px; }
.method-switch { width: min(540px, 100%); height: 34px; margin: 0 0 18px; padding: 3px; display: grid; grid-template-columns: repeat(6, 1fr); border: 1px solid var(--border); border-radius: 7px; background: #edf3f4; }
.method-switch label { min-width: 0; cursor: pointer; }
.method-switch input { position: absolute; opacity: 0; pointer-events: none; }
.method-switch span { height: 26px; display: grid; place-items: center; border-radius: 4px; color: var(--muted); font-size: 11px; }
.method-switch input:checked + span { color: #fff; background: var(--primary); }
.method-switch input:focus-visible + span { outline: 2px solid rgb(0 167 162 / 48%); outline-offset: 1px; }
.field + .field { margin-top: 18px; }
.label-row { margin-bottom: 8px; }
label { font-size: 12px; font-weight: 700; color: var(--text); }
.label-row > span { color: var(--faint); font-size: 12px; }
textarea { width: 100%; min-height: 96px; display: block; resize: vertical; padding: 11px 12px; border: 1px solid var(--border); border-radius: 7px; outline: none; background: #f8fbfb; color: var(--text); font-size: 13px; line-height: 1.45; transition: border-color 160ms ease, box-shadow 160ms ease; }
textarea::placeholder { color: #8b9ba0; }
textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(0 167 162 / 14%); }
.proxy-source { margin-bottom: 9px; }
textarea:disabled { background: #eef3f4; color: #8b9ba0; cursor: not-allowed; }
.admin-proxy-panel { margin-top: 18px; }
.admin-proxy-form { display: grid; gap: 10px; }
.admin-proxy-form small { color: var(--faint); font-size: 12px; }
.admin-proxy-form .start-button { justify-self: end; }
.field small { display: block; min-height: 20px; margin-top: 7px; color: var(--faint); font-size: 12px; }

.concurrency-row { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.concurrency-row div { display: flex; flex-direction: column; gap: 2px; }
.concurrency-row small { color: var(--faint); font-size: 11px; }
.concurrency-row input { width: 72px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 6px; outline: none; background: #f8fbfb; color: var(--text); text-align: center; }
.concurrency-row input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(0 167 162 / 14%); }

.form-message { margin-top: 20px; padding: 11px 13px; border: 1px solid rgb(217 79 95 / 35%); border-radius: 6px; color: #a82f3e; background: rgb(217 79 95 / 7%); font-size: 13px; }
.form-actions { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.form-actions p { margin: 0; color: var(--faint); font-size: 12px; }
.start-button, .open-button, .copy-button, .stop-button { min-height: 44px; border-radius: 7px; font-weight: 700; transition: background 160ms ease, border-color 160ms ease, opacity 160ms ease; }
.start-button { min-width: 128px; padding: 0 20px; border: 1px solid var(--primary); display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #fff; background: var(--primary); box-shadow: 0 7px 18px rgb(0 129 126 / 16%); }
.start-button:hover:not(:disabled) { background: var(--primary-hover); border-color: var(--primary-hover); }
.start-button:disabled { cursor: not-allowed; opacity: .55; }
.button-icon { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid currentColor; }

.run-panel { margin-top: 20px; overflow: hidden; }
.success-dashboard { position: relative; margin-top: 0; margin-bottom: 20px; padding: 20px; overflow: hidden; border: 1px solid #1b6d91; border-radius: 10px; color: #eaf6ff; background: linear-gradient(145deg, #11243a, #0b192a); box-shadow: 0 14px 34px rgb(14 42 68 / 16%); }
.success-dashboard[hidden] { display: none; }
.success-dashboard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.dashboard-side { display: grid; justify-items: end; gap: 8px; }
.success-dashboard-kicker { margin: 0 0 8px; color: #65d8ff; font-size: 11px; font-weight: 800; }
.success-dashboard h2 { color: #f4fbff; font-size: 20px; }
.success-dashboard-subtitle { margin: 4px 0 0; color: #8ba7ba; font-size: 11px; }
.dashboard-live { min-height: 28px; padding: 0 10px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgb(57 211 137 / 30%); border-radius: 16px; color: #8af0ba; background: rgb(28 154 98 / 14%); font-size: 11px; font-weight: 700; white-space: nowrap; }
.dashboard-live > span { width: 7px; height: 7px; border-radius: 50%; background: #35dc85; box-shadow: 0 0 9px rgb(53 220 133 / 70%); }
.dashboard-legend { color: #8ba7ba; font-size: 10px; white-space: nowrap; }
.dashboard-legend i { width: 9px; height: 9px; margin: 0 4px 0 8px; display: inline-block; border: 1px solid #36546a; border-radius: 3px; vertical-align: -1px; background: #243e53; }
.dashboard-legend i:first-child { margin-left: 0; }
.dashboard-legend .legend-success { border-color: #277d62; background: #31b879; }
.success-channel-tabs { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.success-channel-tabs button { min-height: 28px; padding: 0 10px; border: 1px solid #2b4a61; border-radius: 5px; color: #9db4c4; background: #132c42; font-size: 11px; font-weight: 700; }
.success-channel-tabs button:hover, .success-channel-tabs button.is-active { border-color: #46d9dc; color: #efffff; background: #14606a; }
.success-dashboard-metrics { margin-top: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #244158; border-radius: 8px; background: rgb(4 17 31 / 30%); }
.success-dashboard-metrics > div { min-width: 0; padding: 10px 12px; display: grid; gap: 2px; border-right: 1px solid #244158; }
.success-dashboard-metrics > div:last-child { border-right: 0; }
.success-dashboard-metrics strong { color: #8ed7ff; font-size: 17px; font-variant-numeric: tabular-nums; }
.success-dashboard-metrics span { color: #809caf; font-size: 10px; }
.success-grid { margin-top: 12px; padding: 10px; display: grid; grid-template-columns: repeat(48, minmax(8px, 1fr)); gap: 4px; border: 1px solid #244158; border-radius: 8px; background: rgb(4 17 31 / 25%); }
.success-cell { min-width: 0; aspect-ratio: 1; border: 1px solid #36546a; border-radius: 4px; background: #243e53; }
.success-cell.has-activity { border-color: #596271; background: #3b4654; }
.success-cell.has-success { border-color: #277d62; background: #174d40; }
.success-cell.has-success.level-2 { background: #1c654e; }
.success-cell.has-success.level-3 { background: #258760; }
.success-cell.has-success.level-4 { border-color: #55e9a2; background: #31b879; box-shadow: 0 0 8px rgb(49 184 121 / 38%); }
.success-dashboard-note { margin: 10px 0 0; color: #7693a7; font-size: 10px; }
.success-tooltip { position: absolute; z-index: 12; max-width: 210px; padding: 6px 9px; border: 1px solid #3e7188; border-radius: 5px; color: #eaf6ff; background: #0a1a2b; box-shadow: 0 8px 18px rgb(0 0 0 / 24%); font-size: 10px; pointer-events: none; white-space: nowrap; }
.stop-button { min-width: 72px; padding: 0 14px; border: 1px solid var(--border-strong); color: var(--text); background: transparent; }
.stop-button:hover { border-color: var(--danger); color: #a82f3e; }
.task-list { display: grid; }
.task-item { padding: 13px 18px 15px; border-bottom: 1px solid var(--border); }
.task-item:last-child { border-bottom: 0; }
.task-item.is-success { padding-top: 12px; padding-bottom: 12px; }
.task-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; }
.task-head-main { min-width: 0; display: flex; align-items: center; gap: 7px; }
.task-head strong { font-size: 12px; }
.copy-email { min-height: 22px; padding: 0 7px; flex: 0 0 auto; border: 1px solid var(--border-strong); border-radius: 4px; color: var(--muted); background: transparent; font-size: 10px; }
.copy-email:hover { border-color: var(--primary); color: var(--primary); background: #eef9f8; }
.task-success-badge { padding: 3px 7px; border: 1px solid #9cdc62; border-radius: 5px; color: var(--success-text); background: #effbe5; font-size: 10px; font-weight: 700; }
.progress-track { height: 5px; margin: 0; overflow: hidden; border-radius: 3px; background: #dbe7e8; }
.progress-track span { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--primary); transition: width 240ms ease, background 180ms ease; }
.progress-track[data-state="done"] span { background: var(--success); }
.progress-track[data-state="error"] span { background: var(--danger); }
.task-detail { margin: 8px 0 0; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.task-detail.is-error { color: #a82f3e; }
.task-result { width: 100%; min-width: 0; display: flex; align-items: center; gap: 10px; }
.task-item.is-success .task-result { margin-top: 7px; }
.task-result a, .task-result > span { min-width: 0; flex: 1 1 0; overflow: hidden; color: var(--success-text); font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.task-result a:visited { color: var(--success-text); }
.task-check .is-available { color: var(--success-text); }
.task-check .is-unavailable { color: #a82f3e; }
.task-result button { min-height: 28px; padding: 0 9px; flex: 0 0 auto; border: 1px solid var(--border-strong); border-radius: 5px; color: var(--text); background: transparent; font-size: 11px; }
.result-card { display: grid; grid-template-columns: minmax(0, 1fr) 176px; align-items: stretch; gap: 22px; }
.result-info { min-width: 0; }
.result-card-actions { display: flex; gap: 8px; margin-bottom: 15px; }
.result-card-actions .result-open, .result-card-actions button { min-height: 34px; padding: 0 13px; display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 6px; font-size: 11px; font-weight: 700; text-decoration: none; }
.result-card-actions .result-open { border: 1px solid var(--primary); color: #fff; background: var(--primary); }
.result-card-actions .result-open:hover { border-color: var(--primary-hover); background: var(--primary-hover); }
.result-card-actions button:hover { border-color: var(--primary); background: #eef9f8; }
.result-link-block { min-width: 0; }
.result-link-block > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 700; }
.result-link-block > a, .result-link-block > span:last-child { min-height: 38px; padding: 9px 11px; display: block; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; color: var(--primary); background: var(--surface-soft); font-size: 12px; font-weight: 600; line-height: 18px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.result-link-block > a:visited { color: var(--primary); }
.result-meta { margin: 14px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 20px; }
.result-meta div { min-width: 0; }
.result-meta dt { color: var(--faint); font-size: 10px; }
.result-meta dd { margin: 2px 0 0; overflow: hidden; color: var(--text); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.result-qr-wrap { width: 176px; min-height: 176px; margin: 0; padding: 8px; display: grid; place-items: center; align-self: center; border: 1px solid var(--border); border-radius: 7px; background: #fff; }
.result-qr { width: 158px; height: 158px; display: block; object-fit: contain; image-rendering: pixelated; }
.result-qr-state { color: var(--faint); font-size: 10px; text-align: center; }
.result-qr-state.is-error { color: #a82f3e; }
.run-footer { padding: 10px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.run-toolbar { position: sticky; top: 0; z-index: 8; background: var(--surface); }
.run-footer .stop-button { min-height: 32px; font-size: 11px; }
.batch-actions { padding: 10px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; position: sticky; top: 53px; z-index: 7; background: var(--surface); box-shadow: 0 4px 12px rgb(25 56 67 / 6%); flex-wrap: wrap; }
.process-steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 10px 0 5px; }
.process-step { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--faint); font-size: 10px; }
.process-step > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.process-dot { width: 19px; height: 19px; flex: 0 0 19px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); color: var(--faint); font-size: 10px; font-weight: 800; }
.process-step.is-current { color: var(--primary); font-weight: 800; }
.process-step.is-current .process-dot { border-color: var(--primary); color: var(--primary); background: #eef9f8; }
.process-step.is-done { color: var(--success-text); }
.process-step.is-done .process-dot { border-color: var(--success); color: #fff; background: var(--success); }
.batch-actions[hidden] { display: none; }
.result-filters { display: flex; align-items: center; gap: 5px; width: 100%; padding-bottom: 2px; }
.result-filter { min-height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); background: #f7fbfb; font-size: 11px; font-weight: 700; cursor: pointer; }
.result-filter strong { margin-left: 3px; color: var(--text); font-variant-numeric: tabular-nums; }
.result-filter:hover, .result-filter.is-active { border-color: var(--primary); color: var(--primary); background: #eef9f8; }
.result-filter.is-active strong { color: var(--primary); }
.task-item[hidden] { display: none; }
.filter-empty { margin: 0; padding: 24px 18px; color: var(--muted); text-align: center; font-size: 12px; }
.batch-action-button { min-height: 34px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); background: transparent; font-size: 12px; font-weight: 700; transition: border-color 160ms ease, color 160ms ease, opacity 160ms ease; }
.batch-action-button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.batch-action-button:disabled { cursor: not-allowed; opacity: .55; }
.batch-actions-hint { margin-left: auto; color: var(--faint); font-size: 11px; }

.error-result, .success-result { margin: 0 24px 24px; border-radius: 7px; }
.error-result { padding: 16px; border: 1px solid rgb(217 79 95 / 35%); background: rgb(217 79 95 / 7%); }
.error-result strong { color: #a82f3e; }
.error-result p { margin: 5px 0 0; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.success-result { padding: 20px; border: 1px solid rgb(120 200 59 / 38%); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; background: #f3fbe9; }
.success-result[hidden] { display: none; }
.success-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: #20320f; background: #aef16f; font-weight: 900; }
.result-copy { min-width: 0; }
.result-copy > a { display: block; overflow: hidden; color: #007f7c; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.result-copy dl { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; }
.result-copy dl div { display: flex; gap: 6px; font-size: 12px; }
.result-copy dt { color: var(--faint); }
.result-copy dd { margin: 0; color: var(--muted); }
.result-actions { display: flex; gap: 8px; }
.open-button, .copy-button { padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.open-button { border: 1px solid var(--primary); color: #fff; background: var(--primary); }
.open-button:hover { background: var(--primary-hover); }
.copy-button { border: 1px solid var(--border-strong); color: var(--text); background: transparent; }
.copy-button:hover { border-color: var(--primary); background: #eef9f8; }

.site-footer { width: min(1080px, calc(100% - 40px)); margin: 24px auto; color: #789097; font-size: 12px; text-align: center; }
button:focus-visible, a:focus-visible { outline: 3px solid rgb(0 167 162 / 42%); outline-offset: 2px; }
[hidden] { display: none !important; }
@media (max-width: 680px) {
  .success-dashboard { padding: 15px; }
  .success-dashboard h2 { font-size: 17px; }
  .success-dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .success-dashboard-metrics > div:nth-child(2) { border-right: 0; }
  .success-dashboard-metrics > div:nth-child(-n + 2) { border-bottom: 1px solid #244158; }
  .success-grid { grid-template-columns: repeat(24, minmax(8px, 1fr)); }
}

@media (max-width: 640px) {
  .topbar-inner, .shell, .site-footer { width: min(100% - 24px, 1080px); }
  .shell { margin-top: 20px; }
  .input-panel { padding: 20px 16px; }
  .ready-badge { display: none; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .start-button { width: 100%; }
  .admin-form { align-items: stretch; flex-direction: column; }
  .admin-form input { width: 100%; }
  .admin-cdk-row { align-items: flex-start; flex-direction: column; padding: 14px 0; }
  .run-heading, .phase-line { padding-left: 16px; padding-right: 16px; }
  .phase-line { align-items: flex-start; flex-direction: column; gap: 3px; }
  .phase-line code { max-width: 100%; }
  .task-item { padding-left: 16px; padding-right: 16px; }
  .result-card { grid-template-columns: 1fr; }
  .result-qr-wrap { width: min(176px, 100%); justify-self: start; }
  .error-result, .success-result { margin-left: 16px; margin-right: 16px; }
  .success-result { grid-template-columns: auto 1fr; }
  .result-actions { grid-column: 1 / -1; }
  .open-button, .copy-button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
.admin-audit-table-wrap { overflow-x: auto; }
.admin-audit-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-audit-table th, .admin-audit-table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.1); text-align: left; vertical-align: top; white-space: nowrap; }
.admin-audit-table th { color: #9fb0c8; font-weight: 600; }
.admin-audit-table td:nth-child(4), .admin-audit-table td:nth-child(6) { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }

/* 2026 visual refresh */
:root { --bg:#f4f7fb; --surface:#fff; --surface-soft:#f7f9fc; --border:#e3e8f0; --border-strong:#c8d1df; --text:#172033; --muted:#667085; --faint:#98a2b3; --primary:#635bff; --primary-hover:#5149e8; --success:#12b76a; --success-text:#067647; --danger:#f04438; }
body { background:radial-gradient(circle at 8% 0%,rgba(99,91,255,.10),transparent 28rem),radial-gradient(circle at 92% 8%,rgba(6,182,212,.10),transparent 26rem),var(--bg); }
.topbar { min-height:68px; border:0; background:rgba(18,24,38,.94); box-shadow:0 1px 0 rgba(255,255,255,.08); backdrop-filter:blur(18px); position:sticky; top:0; z-index:30; }
.topbar-inner { min-height:68px; width:min(1180px,calc(100% - 40px)); }
.brand-mark { border-radius:12px; background:linear-gradient(135deg,#8b85ff,#5eead4); box-shadow:0 10px 28px rgba(99,91,255,.34); }
.shell { width:min(1180px,calc(100% - 40px)); margin-top:30px; }
.input-panel,.run-panel { border:1px solid rgba(214,221,232,.9); border-radius:18px; box-shadow:0 18px 50px rgba(31,42,68,.08); }
.input-panel { padding:28px; }
.method-switch { width:100%; height:auto; padding:5px; gap:4px; grid-template-columns:repeat(7,minmax(0,1fr)); border-radius:12px; background:#eef2f7; }
.method-switch span { height:38px; border-radius:8px; font-weight:700; transition:.18s ease; }
.method-switch input:checked + span { background:linear-gradient(135deg,#635bff,#7c73ff); box-shadow:0 7px 18px rgba(99,91,255,.25); }
textarea,.text-input,.concurrency-row input,.admin-form input { border-radius:12px; border-color:#dce3ed; background:#fbfcfe; }
textarea { padding:14px 15px; min-height:112px; }
textarea:focus,.text-input:focus,.concurrency-row input:focus { border-color:#817aff; box-shadow:0 0 0 4px rgba(99,91,255,.12); }
.start-button { border:0; border-radius:11px; background:linear-gradient(135deg,#635bff,#756cff); box-shadow:0 10px 24px rgba(99,91,255,.25); }
.start-button:hover:not(:disabled) { background:linear-gradient(135deg,#554de9,#665deb); transform:translateY(-1px); }
.success-dashboard { border:0; border-radius:20px; background:radial-gradient(circle at 95% 0%,rgba(94,234,212,.18),transparent 28rem),linear-gradient(145deg,#111827,#1f2a44); box-shadow:0 22px 56px rgba(16,24,40,.19); }
.success-channel-tabs button { border-radius:999px; }
.success-dashboard-metrics { border-radius:14px; }
.task-item { padding:18px 22px; }
.result-card,.batch-actions { border-radius:14px; }

.admin-body { background:#f3f5f9; }
.admin-shell { width:min(1480px,calc(100% - 40px)); }
.admin-topbar-inner .brand > span:last-child { display:grid; line-height:1.05; }
.admin-topbar-inner .brand small { margin-top:4px; color:#98a2b3; font-size:10px; font-weight:600; }
.admin-home,.ghost-button { min-height:38px; padding:0 14px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #d8dee9; border-radius:10px; color:#344054; background:#fff; font-size:12px; font-weight:700; text-decoration:none; cursor:pointer; }
.admin-hero { padding:28px 30px; display:flex; align-items:center; justify-content:space-between; gap:20px; border-radius:20px; color:#fff; background:radial-gradient(circle at 90% 0%,rgba(94,234,212,.2),transparent 24rem),linear-gradient(135deg,#182238,#2f3563); box-shadow:0 18px 50px rgba(24,34,56,.18); }
.admin-hero h1 { margin:2px 0 7px; font-size:28px; }
.admin-hero p:last-child { margin:0; color:#b9c2d3; }
.admin-metrics { margin:18px 0; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.admin-metrics article { min-height:94px; padding:18px; display:grid; align-content:center; gap:6px; border:1px solid #e1e6ef; border-radius:16px; background:#fff; box-shadow:0 10px 30px rgba(31,42,68,.055); }
.admin-metrics span { color:#667085; font-size:11px; font-weight:700; }
.admin-metrics strong { color:#172033; font-size:25px; font-variant-numeric:tabular-nums; }
.admin-grid { display:grid; grid-template-columns:minmax(320px,.72fr) minmax(420px,1.28fr); gap:18px; }
.admin-card { min-width:0; border-radius:18px; }
.admin-card h2 { font-size:18px; }
.admin-form { margin-top:18px; }
.admin-database-card { margin-top:18px; }
.admin-subtitle { margin:5px 0 0; color:#667085; font-size:12px; }
.admin-filters { margin:20px 0 14px; display:grid; grid-template-columns:minmax(240px,1fr) 180px 180px; gap:10px; }
.admin-audit-table-wrap { max-height:620px; overflow:auto; border:1px solid #e3e8f0; border-radius:14px; }
.admin-audit-table { min-width:1280px; color:#344054; background:#fff; }
.admin-audit-table thead { position:sticky; top:0; z-index:2; background:#f7f9fc; }
.admin-audit-table th,.admin-audit-table td { padding:13px 14px; border-bottom:1px solid #edf0f5; white-space:pre-line; }
.admin-audit-table th { color:#667085; font-size:11px; letter-spacing:.02em; }
.admin-audit-table td { font-size:12px; }
.admin-select-cdk-hint { padding:40px 20px !important; text-align:center !important; color:#98a2b3; font-weight:700; }
.admin-audit-table tr[data-status="done"] td:nth-child(7) { color:#067647; font-weight:800; }
.admin-audit-table tr[data-status="error"] td:nth-child(7) { color:#b42318; font-weight:800; }
.admin-pagination { padding-top:14px; display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.admin-page-summary,.admin-page-controls { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.admin-page-summary { gap:12px; color:#667085; font-size:12px; font-weight:700; }
.admin-page-controls { justify-content:flex-end; }
.admin-page-size,.admin-page-jump { display:flex; align-items:center; gap:6px; color:#667085; font-size:12px; font-weight:700; }
.admin-page-size .text-input { min-width:74px; width:auto; height:34px; padding:0 8px; }
.admin-page-jump .text-input { width:64px; height:34px; padding:0 8px; }
.admin-page-jump { margin-left:4px; padding-left:10px; border-left:1px solid #e3e8f0; }
.admin-page-numbers { display:flex; align-items:center; gap:4px; }
.page-number { min-width:32px; height:34px; border:1px solid #e3e8f0; border-radius:8px; background:#fff; color:#475467; font-weight:700; cursor:pointer; }
.page-number.active { background:#635bff; border-color:#635bff; color:#fff; cursor:default; }
.page-ellipsis { width:22px; text-align:center; color:#98a2b3; }
.admin-pagination button:disabled { opacity:.45; cursor:not-allowed; }
.admin-list { max-height:280px; overflow:auto; }
.admin-empty { color:#98a2b3; text-align:center; }
@media(max-width:1000px){.admin-metrics{grid-template-columns:repeat(3,1fr)}.admin-grid{grid-template-columns:1fr}.admin-filters{grid-template-columns:1fr 1fr}.admin-filters input{grid-column:1/-1}}
@media(max-width:680px){.method-switch,.server-mode .method-switch{grid-template-columns:repeat(2,1fr)}.admin-metrics{grid-template-columns:repeat(2,1fr)}.admin-hero{align-items:flex-start;flex-direction:column}.admin-filters{grid-template-columns:1fr}.admin-filters input{grid-column:auto}.admin-pagination{align-items:stretch;flex-direction:column}.admin-page-controls{justify-content:flex-start}.admin-page-edge{display:none}.admin-page-jump{margin-left:0;padding-left:0;border-left:0}}

/* Success data board: compact glass cards, live probability and clearer grid. */
.success-dashboard { padding:24px; background:radial-gradient(circle at 94% 5%,rgba(20,184,166,.25),transparent 25rem),radial-gradient(circle at 8% 100%,rgba(99,102,241,.22),transparent 22rem),linear-gradient(145deg,#0b1324,#17233b 64%,#17394a); }
.success-dashboard::before { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(110deg,rgba(255,255,255,.045),transparent 36%); }
.success-dashboard-head,.success-channel-tabs,.success-dashboard-metrics,.success-grid,.success-dashboard-note { position:relative; z-index:1; }
.success-channel-tabs { margin-top:18px; gap:8px; }
.success-channel-tabs button { min-height:34px; padding:0 14px; border-color:rgba(125,211,252,.22); color:#a9c5d8; background:rgba(8,22,39,.36); transition:transform .16s ease,border-color .16s ease,background .16s ease; }
.success-channel-tabs button:hover { transform:translateY(-1px); border-color:#5eead4; color:#e6fffb; }
.success-channel-tabs button.is-active { border-color:#5eead4; color:#052e2b; background:linear-gradient(135deg,#5eead4,#67e8f9); box-shadow:0 8px 22px rgba(45,212,191,.22); }
.success-dashboard-metrics { margin-top:16px; gap:12px; border:0; background:transparent; }
.success-dashboard-metrics > div { min-height:104px; padding:16px 17px; align-content:center; gap:4px; overflow:hidden; border:1px solid rgba(125,211,252,.16); border-radius:14px; background:linear-gradient(145deg,rgba(17,31,52,.88),rgba(24,53,70,.72)); box-shadow:inset 0 1px 0 rgba(255,255,255,.045),0 10px 28px rgba(0,0,0,.10); position:relative; }
.success-dashboard-metrics > div::after { content:""; position:absolute; top:-34px; right:-30px; width:90px; height:90px; border-radius:50%; background:rgba(56,189,248,.09); }
.success-dashboard-metrics > div:nth-child(1)::after { background:rgba(52,211,153,.13); }
.success-dashboard-metrics > div:nth-child(3)::after { background:rgba(94,234,212,.16); }
.success-dashboard-metrics > div:nth-child(4)::after { background:rgba(167,139,250,.14); }
.success-dashboard-metrics strong { position:relative; z-index:1; color:#eaf9ff; font-size:26px; line-height:1; letter-spacing:-.03em; }
.success-dashboard-metrics > div:nth-child(1) strong { color:#6ee7b7; }
.success-dashboard-metrics > div:nth-child(3) strong { color:#5eead4; }
.success-dashboard-metrics span { position:relative; z-index:1; color:#91adc0; font-size:11px; font-weight:700; }
.metric-value-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.success-dashboard-metrics .metric-target { padding:4px 7px; border:1px solid rgba(94,234,212,.28); border-radius:999px; color:#99f6e4; background:rgba(20,184,166,.12); font-size:9px; white-space:nowrap; }
.metric-progress { height:5px; margin-top:7px; overflow:hidden; border-radius:999px; background:rgba(148,163,184,.18); }
.metric-progress i { width:0; height:100%; display:block; border-radius:inherit; background:linear-gradient(90deg,#22d3ee,#5eead4); box-shadow:0 0 12px rgba(94,234,212,.55); transition:width .7s cubic-bezier(.2,.8,.2,1); }
.success-dashboard-metrics .metric-rate-card small { margin-top:2px; color:#66869c; font-size:9px; }
.success-grid { margin-top:16px; padding:13px; gap:5px; border-color:rgba(125,211,252,.15); border-radius:14px; background:rgba(4,13,27,.32); box-shadow:inset 0 1px 10px rgba(0,0,0,.16); }
.success-cell { border-color:#315069; border-radius:5px; background:#1d374d; transition:transform .12s ease,filter .12s ease,box-shadow .12s ease; }
.success-cell:hover { z-index:2; transform:scale(1.22); filter:brightness(1.2); box-shadow:0 4px 12px rgba(0,0,0,.34); }
.success-cell.has-activity { border-color:#626d7b; background:#46515f; }
.success-cell.has-activity { animation:activity-pulse 2.8s ease-in-out infinite; }
.success-cell.has-success { border-color:#2dd4bf; background:#0f766e; }
.success-cell.has-success.level-2 { background:#0d9488; }
.success-cell.has-success.level-3 { background:#14b8a6; }
.success-cell.has-success.level-4 { border-color:#99f6e4; background:#2dd4bf; box-shadow:0 0 10px rgba(45,212,191,.42); }
.success-cell.has-success.level-4 { animation:success-pulse 2.2s ease-in-out infinite; }
.success-tooltip { padding:9px 11px; border-color:rgba(94,234,212,.5); border-radius:9px; background:rgba(5,15,29,.96); box-shadow:0 12px 30px rgba(0,0,0,.34); font-size:11px; }

/* Complete proxy-pool audit, visible only on the authenticated admin page. */
.admin-audit-table .admin-proxy-cell { min-width:330px; max-width:520px; overflow:visible; white-space:normal; }
.admin-proxy-label { display:block; margin-bottom:5px; color:#667085; font-size:10px; font-weight:800; text-transform:uppercase; }
.admin-proxy-used { display:block; padding:7px 9px; overflow-wrap:anywhere; border:1px solid #dce4ef; border-radius:8px; color:#344054; background:#f8fafc; font-size:11px; white-space:pre-wrap; }
.admin-proxy-cell details { margin-top:8px; }
.admin-proxy-cell summary { color:#635bff; font-size:11px; font-weight:800; cursor:pointer; user-select:none; }
.admin-proxy-pool { max-height:220px; margin-top:8px; padding:8px; display:grid; gap:5px; overflow:auto; border:1px solid #e4e7ec; border-radius:9px; background:#f8fafc; }
.admin-proxy-pool code { padding-bottom:5px; overflow-wrap:anywhere; border-bottom:1px dashed #e4e7ec; color:#344054; font-size:10px; white-space:pre-wrap; }
.admin-proxy-pool code:last-child { padding-bottom:0; border-bottom:0; }
.admin-proxy-copy { min-height:30px; margin-top:8px; padding:0 10px; border:1px solid #cfd6e3; border-radius:8px; color:#344054; background:#fff; font-size:10px; font-weight:800; cursor:pointer; }
.admin-proxy-copy:hover { border-color:#635bff; color:#635bff; }
@media(max-width:680px){.success-dashboard{padding:18px}.success-dashboard-metrics{grid-template-columns:1fr 1fr}.success-dashboard-metrics>div{min-height:96px}.success-grid{gap:4px}}
@keyframes activity-pulse { 0%,100%{opacity:.72;box-shadow:0 0 0 rgba(96,165,250,0)} 50%{opacity:1;box-shadow:0 0 10px rgba(96,165,250,.28)} }
@keyframes success-pulse { 0%,100%{filter:saturate(.95);box-shadow:0 0 7px rgba(45,212,191,.26)} 50%{filter:saturate(1.25);box-shadow:0 0 16px rgba(94,234,212,.64)} }
@media (prefers-reduced-motion: reduce) { .success-cell.has-activity,.success-cell.has-success.level-4 { animation:none; } }
