:root {
  --page: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #17201d;
  --ink-soft: #3d4a45;
  --muted: #74827d;
  --muted-light: #99a49f;
  --line: #dfe7e3;
  --line-strong: #d0dbd6;
  --green: #159a67;
  --green-dark: #087c50;
  --green-soft: #e8f7f0;
  --green-pale: #f2fbf7;
  --blue: #3979ed;
  --blue-dark: #245fca;
  --blue-soft: #edf3ff;
  --orange: #ec8a37;
  --orange-soft: #fff3e7;
  --red: #d65050;
  --red-soft: #fff0f0;
  --shadow-sm: 0 5px 20px rgba(27, 49, 41, .045);
  --shadow-md: 0 16px 42px rgba(27, 49, 41, .075);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 6% 12%, rgba(21, 154, 103, .065), transparent 26%),
    radial-gradient(circle at 94% 28%, rgba(57, 121, 237, .05), transparent 24%),
    var(--page);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, output { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(207, 219, 213, .9);
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 4px 22px rgba(28, 47, 40, .035);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(1320px, 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: 11px; flex: 0 0 auto; }
.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  place-content: center;
  gap: 4px;
  border-radius: 12px;
  background: var(--ink);
  box-shadow: 4px 4px 0 #c4ead9;
}
.brand-mark i { width: 8px; height: 8px; display: block; border-radius: 3px; background: #fff; }
.brand-mark i:first-child { grid-row: span 2; height: 20px; background: #50d49b; }
.brand-mark i:last-child { background: #73a2ff; }
.brand-copy { display: grid; line-height: 1.08; }
.brand-copy strong { font-size: 17px; letter-spacing: -.3px; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: 1.25px; text-transform: uppercase; }

.cdk-console { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.cdk-state { min-width: 110px; display: flex; align-items: center; gap: 9px; }
.cdk-state span { display: grid; }
.cdk-state small { color: var(--muted-light); font-size: 8px; font-weight: 800; letter-spacing: .6px; }
.cdk-state strong { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.state-dot, .run-state-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #aeb9b4;
  box-shadow: 0 0 0 5px rgba(149, 165, 158, .12);
}
.state-dot.online { background: var(--green); box-shadow: 0 0 0 5px rgba(21, 154, 103, .12); }
.cdk-input-group { position: relative; width: min(310px, 29vw); }
.cdk-input-group input {
  width: 100%;
  height: 40px;
  padding: 0 61px 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: none;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 12px;
  transition: .18s ease;
}
.cdk-input-group input:focus { border-color: #6bc29e; background: #fff; box-shadow: 0 0 0 4px rgba(21, 154, 103, .08); }
.input-button {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: #edf2f0;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}
.session-meta { display: flex; align-items: center; gap: 8px; padding: 0 6px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.session-meta b { width: 1px; height: 14px; background: var(--line-strong); }
.session-meta strong { color: var(--green-dark); font-size: 11px; }
.header-message {
  position: absolute;
  left: 50%;
  bottom: -29px;
  transform: translateX(-50%);
  max-width: min(620px, calc(100% - 32px));
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.header-message:not(:empty) { opacity: 1; }
.header-message.error { color: var(--red); border-color: #efcaca; background: #fff8f8; }
.header-message.success { color: var(--green-dark); border-color: #c5e7d7; background: #f7fcf9; }

.button {
  min-height: 39px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  cursor: pointer;
  font-size: 10px;
  font-weight: 790;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, opacity .16s ease;
}
.button:hover:not(:disabled):not(.disabled) { transform: translateY(-1px); }
.button:disabled, .button.disabled { cursor: not-allowed; opacity: .4; transform: none; box-shadow: none; pointer-events: none; }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--green), #25ae78); box-shadow: 0 7px 17px rgba(21, 154, 103, .18); }
.button.primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--green-dark), var(--green)); box-shadow: 0 9px 21px rgba(21, 154, 103, .23); }
.button.secondary { color: var(--green-dark); border-color: #c7e6d7; background: var(--green-pale); }
.button.quiet { color: #53615c; border-color: var(--line); background: #fff; }
.button.quiet:hover:not(:disabled) { color: var(--green-dark); border-color: #a8d8c2; background: #f8fcfa; }
.button.danger { color: var(--red); border-color: #efcaca; background: var(--red-soft); }
.button.success { color: var(--green-dark); border-color: #bfe2d1; background: var(--green-soft); }
.button.checkout-button { color: #fff; border-color: var(--blue); background: linear-gradient(135deg, var(--blue), #548cf2); box-shadow: 0 7px 17px rgba(57,121,237,.17); }

.page-shell { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 28px; }
.hero { min-height: 280px; display: grid; grid-template-columns: minmax(0, 1.32fr) minmax(350px, .68fr); align-items: center; gap: 70px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--green-dark); font-size: 9px; font-weight: 850; letter-spacing: 1.7px; }
.eyebrow > span { width: 25px; height: 2px; border-radius: 999px; background: var(--green); }
.hero h1 { margin: 15px 0 16px; font-size: clamp(41px, 5vw, 63px); line-height: 1.05; letter-spacing: -3px; }
.hero h1 em { color: var(--green); font-style: normal; }
.hero-copy > p { max-width: 750px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 23px; }
.hero-tags span { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; color: #697872; background: rgba(255,255,255,.76); font-size: 9px; font-weight: 730; }
.hero-card { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.84); box-shadow: var(--shadow-md); }
.hero-card-head { display: flex; align-items: center; gap: 11px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.hero-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 38px; border-radius: 11px; color: #fff; background: var(--ink); font-size: 19px; font-weight: 800; }
.hero-card-head > div { min-width: 0; display: grid; }
.hero-card-head small { color: var(--muted-light); font-size: 8px; font-weight: 800; letter-spacing: 1.25px; }
.hero-card-head strong { margin-top: 3px; font-size: 12px; }
.status-badge { margin-left: auto; padding: 6px 8px; border-radius: 7px; font-size: 8px; font-weight: 850; }
.status-badge.locked { color: #8b6a3d; background: var(--orange-soft); }
.status-badge.online { color: var(--green-dark); background: var(--green-soft); }
.hero-card dl { margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; }
.hero-card dl > div { padding: 12px 10px; }
.hero-card dl > div:nth-child(odd) { border-right: 1px solid var(--line); }
.hero-card dl > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.hero-card dt { color: var(--muted-light); font-size: 8px; }
.hero-card dd { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; font-weight: 780; }

.flow-strip { display: grid; grid-template-columns: repeat(5, 1fr); margin: 20px 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.flow-step { min-width: 0; display: flex; align-items: center; gap: 11px; padding: 16px 15px; }
.flow-step:not(:last-child) { border-right: 1px solid var(--line); }
.flow-step > span { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 33px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted-light); background: var(--surface-soft); font-size: 8px; font-weight: 850; }
.flow-step.active > span { color: #fff; border-color: var(--green); background: var(--green); box-shadow: 0 6px 15px rgba(21,154,103,.17); }
.flow-step div { min-width: 0; display: grid; }
.flow-step small { color: var(--muted-light); font-size: 7px; font-weight: 820; letter-spacing: 1px; }
.flow-step strong { margin-top: 3px; font-size: 10px; }
.flow-step p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.locked-notice { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 15px; border: 1px solid #efd9b9; border-radius: 12px; background: #fffaf3; }
.lock-icon { position: relative; width: 31px; height: 28px; flex: 0 0 31px; border: 2px solid #b99053; border-radius: 8px; }
.lock-icon::before { content: ""; position: absolute; left: 7px; top: -11px; width: 13px; height: 13px; border: 2px solid #b99053; border-bottom: 0; border-radius: 9px 9px 0 0; }
.locked-notice div { min-width: 0; }
.locked-notice strong { display: block; color: #755a34; font-size: 11px; }
.locked-notice p { margin: 3px 0 0; color: #967951; font-size: 9px; }
.locked-notice a { margin-left: auto; color: #8b6733; font-size: 9px; font-weight: 800; white-space: nowrap; }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm); }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(365px, .75fr); gap: 18px; }
.token-panel, .settings-panel { padding: 23px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.panel-head > div { display: flex; align-items: center; gap: 11px; }
.panel-head > div > div { display: grid; }
.panel-index { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; border-radius: 10px; color: var(--green-dark); background: var(--green-soft); font-size: 9px; font-weight: 850; }
.panel-index.blue { color: var(--blue-dark); background: var(--blue-soft); }
.panel-head small, .tasks-title small { color: var(--muted-light); font-size: 8px; font-weight: 820; letter-spacing: 1.35px; }
.panel-head h2, .tasks-title h2 { margin: 3px 0 0; font-size: 17px; letter-spacing: -.3px; }
.local-chip, .region-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 8px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.local-chip { color: var(--green-dark); border: 1px solid #cae8d9; background: var(--green-pale); }
.local-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.region-chip { color: var(--blue-dark); border: 1px solid #d4e0fa; background: #f5f8ff; }
.region-chip b { color: #a6b9df; }
.field-head, .setting-row > label, .compact-field > label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: #52605b; font-size: 10px; font-weight: 800; }
.text-button { padding: 5px 7px; border: 0; border-radius: 6px; color: var(--green-dark); background: transparent; cursor: pointer; font-size: 9px; font-weight: 780; }
.text-button:hover:not(:disabled) { background: var(--green-soft); }
.text-button:disabled { cursor: not-allowed; opacity: .45; }

.token-input-shell { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 12px; background: #fbfcfc; transition: .18s ease; }
.token-input-shell:focus-within { border-color: #77c6a5; box-shadow: 0 0 0 4px rgba(21,154,103,.07); background: #fff; }
.token-input-shell textarea { width: 100%; min-height: 190px; resize: vertical; display: block; padding: 15px; border: 0; outline: 0; color: var(--ink-soft); background: transparent; font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 10px; line-height: 1.7; }
.token-input-shell textarea::placeholder { color: #b0bab6; }
.token-input-shell textarea:disabled { cursor: not-allowed; opacity: .6; }
.token-input-shell.tokens-masked textarea { -webkit-text-security: disc; letter-spacing: 2px; }
.textarea-foot { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 10px 0 14px; border-top: 1px solid var(--line); color: var(--muted-light); background: #f8faf9; font-size: 8px; line-height: 1.5; }
.drop-zone { min-height: 76px; display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 13px; border: 1px dashed #c7d8d0; border-radius: 12px; background: #fafcfb; transition: .18s ease; }
.drop-zone.dragging { border-color: var(--green); background: var(--green-pale); box-shadow: inset 0 0 0 1px var(--green); }
.drop-zone[aria-disabled="true"] { opacity: .58; }
.upload-icon { width: 35px; height: 35px; display: grid; place-items: center; flex: 0 0 35px; border-radius: 10px; color: var(--green); background: var(--green-soft); font-size: 20px; }
.drop-zone > div { min-width: 0; }
.drop-zone strong { display: block; font-size: 10px; }
.drop-zone p { margin: 4px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.file-button { min-height: 34px; margin-left: auto; cursor: pointer; }
#fileInput { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.parse-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.parse-stats > span { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); }
.parse-stats small { color: var(--muted); font-size: 8px; }
.parse-stats strong { color: var(--ink-soft); font-size: 12px; }
.identity-preview { margin-top: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfc; }
.identity-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.identity-title span { color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.identity-title small { color: var(--muted-light); font-size: 7px; }
.identity-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.identity-chip { max-width: 100%; display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #d8e5df; border-radius: 7px; color: #5d6c66; background: #fff; font-size: 8px; }
.identity-chip i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--green); }
.identity-chip code { overflow: hidden; color: var(--blue-dark); font-family: "SFMono-Regular", Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.identity-empty { color: var(--muted-light); font-size: 8px; }
.inline-message { min-height: 15px; margin: 9px 1px 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.inline-message.error { color: var(--red); }
.inline-message.success { color: var(--green-dark); }

.fixed-profile { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 18px; }
.fixed-profile > div { padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); }
.fixed-profile small, .fixed-profile strong { display: block; }
.fixed-profile small { color: var(--muted-light); font-size: 8px; }
.fixed-profile strong { margin-top: 6px; color: var(--ink-soft); font-size: 10px; }
.flag-dot { display: inline-grid; place-items: center; width: 23px; height: 17px; margin-right: 4px; border-radius: 4px; color: #fff; background: linear-gradient(135deg, #1d64b6 0 48%, #d23f49 49% 100%); font-size: 7px; }
.setting-row { margin-top: 17px; }
.setting-row output { color: var(--green-dark); font-size: 11px; }
.compact-field input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; outline: none; color: var(--ink-soft); background: var(--surface-soft); font-size: 10px; }
.compact-field input:focus { border-color: #77c6a5; background: #fff; box-shadow: 0 0 0 3px rgba(21,154,103,.07); }
.compact-field > small { display: block; margin-top: 6px; color: var(--muted-light); font-size: 8px; }
input[type="range"] { width: 100%; height: 4px; display: block; border-radius: 999px; outline: none; appearance: none; background: linear-gradient(90deg, var(--green) 28.5%, #dbe4e0 28.5%); }
input[type="range"]::-webkit-slider-thumb { width: 16px; height: 16px; appearance: none; border: 3px solid #fff; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px #80c9aa, 0 3px 8px rgba(21,154,103,.18); cursor: pointer; }
input[type="range"]::-moz-range-thumb { width: 11px; height: 11px; border: 3px solid #fff; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 1px #80c9aa; cursor: pointer; }
.range-scale { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted-light); font-size: 7px; }
.proxy-status { display: flex; gap: 10px; margin-top: 18px; padding: 11px; border: 1px solid #d2e1da; border-radius: 10px; background: #f8fbf9; }
.proxy-status.managed { border-color: #cae6d8; background: var(--green-pale); }
.proxy-status.required { border-color: #d6e0f6; background: #f5f8ff; }
.proxy-status.blocked { border-color: #efd3ad; background: #fff9f1; }
.proxy-icon { width: 23px; height: 23px; display: grid; place-items: center; flex: 0 0 23px; border-radius: 7px; color: #fff; background: var(--green); font-size: 12px; }
.proxy-status.required .proxy-icon { background: var(--blue); }
.proxy-status.blocked .proxy-icon { background: var(--orange); }
.proxy-status strong { display: block; font-size: 9px; }
.proxy-status p { margin: 3px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.proxy-inputs { display: grid; gap: 10px; margin-top: 12px; padding: 12px; border: 1px solid #d9e3f7; border-radius: 10px; background: #f8faff; }
.proxy-inputs > p { margin: 0; color: #7d8ca9; font-size: 7px; line-height: 1.5; }
.script-boundary { display: flex; gap: 9px; margin-top: 17px; padding: 11px; border: 1px solid #efd5b1; border-radius: 10px; background: #fff9f1; }
.script-boundary > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 22px; border-radius: 7px; color: #fff; background: var(--orange); font-size: 10px; font-weight: 900; }
.script-boundary p { margin: 0; color: #816746; font-size: 8px; line-height: 1.55; }
.script-boundary strong { display: block; margin-bottom: 2px; color: #6c512f; font-size: 9px; }

.run-panel { min-height: 82px; display: grid; grid-template-columns: minmax(180px, .35fr) minmax(280px, 1fr) auto; align-items: center; gap: 24px; margin-top: 18px; padding: 16px 18px; }
.run-state { display: flex; align-items: center; gap: 11px; }
.run-state > div { display: grid; }
.run-state small { color: var(--muted-light); font-size: 8px; font-weight: 850; letter-spacing: 1.2px; }
.run-state strong { margin-top: 3px; font-size: 10px; }
.run-state-dot.running { background: var(--blue); box-shadow: 0 0 0 5px rgba(57,121,237,.12); animation: pulse 1.3s ease-in-out infinite; }
.run-state-dot.done { background: var(--green); box-shadow: 0 0 0 5px rgba(21,154,103,.12); }
.run-state-dot.stopped { background: var(--orange); box-shadow: 0 0 0 5px rgba(236,138,55,.12); }
.progress-block { min-width: 0; }
.progress-copy { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 9px; }
.progress-copy strong { color: var(--ink-soft); }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #e9efec; }
.progress-track > span { width: 0; height: 100%; display: block; border-radius: inherit; background: linear-gradient(90deg, var(--green), #45c491); transition: width .25s ease; }
.run-actions { display: flex; gap: 8px; }
.start-button { min-width: 150px; }
.start-button b { font-size: 17px; }

.tasks-panel { margin-top: 18px; overflow: hidden; }
.tasks-head { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.tasks-title { display: flex; align-items: center; gap: 11px; min-width: 260px; }
.tasks-title > div { display: grid; }
.tasks-title p { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.task-toolbar { display: flex; align-items: center; gap: 7px; }
.select-all { min-height: 36px; display: inline-flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: #596762; background: #fff; cursor: pointer; font-size: 9px; font-weight: 750; }
.select-all input { position: absolute; opacity: 0; pointer-events: none; }
.select-all > span, .check-control > span { position: relative; width: 16px; height: 16px; display: block; border: 1px solid #c4d1cb; border-radius: 5px; background: #fff; }
.select-all input:checked + span, .check-control input:checked + span { border-color: var(--green); background: var(--green); }
.select-all input:checked + span::after, .check-control input:checked + span::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.select-all input:indeterminate + span { border-color: var(--green); background: var(--green); }
.select-all input:indeterminate + span::after { content: ""; position: absolute; left: 3px; top: 7px; width: 8px; height: 2px; border-radius: 2px; background: #fff; }
.select-all:has(input:disabled) { opacity: .42; cursor: not-allowed; }
.task-list { display: grid; gap: 12px; padding: 16px; background: #f8faf9; }
.task-card { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: 0 4px 16px rgba(28,51,42,.035); }
.task-card.selected { border-color: #a9d9c4; box-shadow: 0 0 0 2px rgba(21,154,103,.06); }
.task-topline { min-height: 52px; display: grid; grid-template-columns: 18px 105px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fcfdfd; }
.check-control { position: relative; width: 16px; height: 16px; display: block; cursor: pointer; }
.check-control input { position: absolute; opacity: 0; pointer-events: none; }
.check-control input:disabled + span { opacity: .45; cursor: not-allowed; }
.task-status { display: inline-flex; align-items: center; gap: 6px; }
.task-status i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #aab5b0; }
.task-status b { color: #68756f; font-size: 9px; }
.task-status.processing i { background: var(--blue); animation: pulse 1.2s ease-in-out infinite; }
.task-status.processing b { color: var(--blue-dark); }
.task-status.checkout_ready i, .task-status.bound i, .task-status.paid i { background: var(--green); }
.task-status.checkout_ready b, .task-status.bound b, .task-status.paid b { color: var(--green-dark); }
.task-status.failed i { background: var(--red); }
.task-status.failed b { color: var(--red); }
.task-status.cancelled i { background: var(--orange); }
.task-status.cancelled b { color: #a5632a; }
.task-name { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.task-name strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-name small { color: var(--muted-light); font-family: "SFMono-Regular", Consolas, monospace; font-size: 7px; }
.task-topline time { color: var(--muted); font-size: 8px; }
.task-body { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(250px,.55fr); gap: 18px; padding: 15px; }
.section-caption { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.section-caption span { color: var(--muted-light); font-size: 7px; font-weight: 850; letter-spacing: 1.2px; }
.section-caption small { color: var(--muted-light); font-size: 7px; }
.checkout-box { min-height: 58px; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid #d9e3df; border-radius: 10px; background: #fafcfb; }
.checkout-box.invalid { border-color: #edcccc; background: #fff9f9; }
.checkout-indicator { width: 7px; height: 7px; border-radius: 50%; background: #aeb9b4; }
.checkout-box.ready .checkout-indicator { background: var(--green); box-shadow: 0 0 0 4px rgba(21,154,103,.1); }
.checkout-box.invalid .checkout-indicator { background: var(--red); }
.checkout-box > div { min-width: 0; display: grid; }
.checkout-box small { color: var(--muted-light); font-size: 7px; }
.checkout-url { margin-top: 4px; overflow: hidden; color: var(--blue-dark); font-family: "SFMono-Regular", Consolas, monospace; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.checkout-url:hover { text-decoration: underline; }
.checkout-placeholder { margin: 4px 0 0; color: var(--muted); font-size: 8px; }
.copy-checkout { min-height: 29px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; color: #63716b; background: #fff; cursor: pointer; font-size: 8px; font-weight: 760; }
.copy-checkout:disabled { opacity: .4; cursor: not-allowed; }
.account-line { display: flex; align-items: center; gap: 7px; margin-top: 8px; color: var(--muted-light); font-size: 8px; }
.account-line strong { color: var(--ink-soft); font-size: 8px; }
.account-line b { color: #c0cac5; }
.account-line code { color: var(--blue-dark); font-family: "SFMono-Regular", Consolas, monospace; font-size: 8px; }
.task-message { min-height: 12px; margin: 7px 1px 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.task-message.error { color: var(--red); }
.stage-column { display: grid; align-items: center; }
.stage-track { display: grid; grid-template-columns: repeat(3,1fr); }
.stage { position: relative; min-width: 0; display: grid; justify-items: center; text-align: center; }
.stage:not(:last-child)::after { content: ""; position: absolute; left: calc(50% + 16px); right: calc(-50% + 16px); top: 15px; height: 1px; background: #dce5e1; }
.stage.complete:not(:last-child)::after { background: #8ed0b3; }
.stage > span { position: relative; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid #d4dfda; border-radius: 9px; color: var(--muted-light); background: #fff; font-size: 8px; font-weight: 850; }
.stage.complete > span { color: #fff; border-color: var(--green); background: var(--green); }
.stage.current > span { color: var(--blue-dark); border-color: #b7caf2; background: var(--blue-soft); }
.stage div { min-width: 0; margin-top: 7px; display: grid; }
.stage strong { overflow: hidden; color: var(--ink-soft); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.stage small { margin-top: 3px; overflow: hidden; color: var(--muted-light); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.task-actions { display: grid; grid-template-columns: 1.25fr 1px .75fr; gap: 14px; padding: 13px 15px; border-top: 1px solid var(--line); background: #fcfdfd; }
.action-group > span { display: block; margin-bottom: 7px; color: var(--muted-light); font-size: 7px; font-weight: 850; letter-spacing: 1px; }
.action-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.action-group .button { min-height: 34px; padding-inline: 10px; font-size: 8px; }
.action-divider { width: 1px; align-self: stretch; background: var(--line); }
.empty-tasks { min-height: 270px; display: grid; place-items: center; align-content: center; padding: 35px 20px; color: var(--muted); text-align: center; }
.empty-graphic { position: relative; width: 62px; height: 47px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; margin-bottom: 13px; border: 1px solid #d8e4de; border-radius: 13px; background: #f7faf8; }
.empty-graphic::before { content: ""; position: absolute; left: 9px; right: 9px; top: 10px; height: 1px; background: #dde7e2; box-shadow: 0 7px 0 #dde7e2; }
.empty-graphic i { position: relative; z-index: 1; width: 7px; border-radius: 4px 4px 0 0; background: #bfe5d4; }
.empty-graphic i:nth-child(1) { height: 9px; }
.empty-graphic i:nth-child(2) { height: 15px; background: #84d0ae; }
.empty-graphic i:nth-child(3) { height: 21px; background: var(--green); }
.empty-tasks strong { font-size: 11px; }
.empty-tasks p { max-width: 490px; margin: 6px 0 0; color: var(--muted-light); font-size: 9px; line-height: 1.6; }

.site-footer { display: flex; align-items: center; justify-content: space-between; padding: 28px 2px 4px; color: var(--muted-light); }
.site-footer span { display: flex; align-items: center; gap: 7px; color: #63726c; font-size: 9px; font-weight: 800; }
.site-footer span i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.site-footer p { margin: 0; font-size: 8px; letter-spacing: .2px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; max-width: min(400px, calc(100% - 32px)); padding: 11px 14px; border: 1px solid #c7e4d5; border-radius: 10px; color: var(--green-dark); background: #f6fcf9; box-shadow: var(--shadow-md); font-size: 10px; font-weight: 720; }
.toast.error { color: var(--red); border-color: #efc8c8; background: #fff7f7; }

@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

@media (max-width: 1120px) {
  .header-inner, .page-shell { width: min(100% - 32px, 1320px); }
  .header-inner { padding: 10px 0; flex-wrap: wrap; }
  .cdk-console { flex: 1 1 650px; }
  .hero { grid-template-columns: minmax(0,1.1fr) minmax(320px,.9fr); gap: 36px; }
  .hero h1 { font-size: 49px; }
  .flow-strip { grid-template-columns: repeat(3,1fr); }
  .flow-step:nth-child(3) { border-right: 0; }
  .flow-step:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .flow-step:nth-child(4) { grid-column: 1 / 2; }
  .flow-step:nth-child(5) { grid-column: 2 / 4; }
  .workspace-grid { grid-template-columns: minmax(0,1.1fr) minmax(350px,.9fr); }
  .task-body { grid-template-columns: 1fr; }
  .task-actions { grid-template-columns: 1fr; }
  .action-divider { display: none; }
  .pay-actions { padding-top: 10px; border-top: 1px solid var(--line); }
}

@media (max-width: 840px) {
  .page-shell { padding-top: 38px; }
  .brand-copy small { display: none; }
  .cdk-console { justify-content: flex-start; }
  .cdk-state { min-width: 100px; }
  .cdk-input-group { flex: 1 1 240px; width: auto; }
  .session-meta { flex: 1 1 auto; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero h1 { font-size: clamp(40px,8vw,56px); }
  .workspace-grid { grid-template-columns: 1fr; }
  .run-panel { grid-template-columns: 170px 1fr; }
  .run-actions { grid-column: 1 / -1; justify-content: flex-end; margin-top: -6px; }
  .tasks-head { align-items: flex-start; }
  .task-toolbar { flex-wrap: wrap; justify-content: flex-end; }
}

@media (max-width: 620px) {
  .header-inner, .page-shell { width: min(100% - 24px, 1320px); }
  .site-header { position: relative; }
  .header-inner { min-height: 0; display: block; padding: 13px 0; }
  .brand { margin-bottom: 12px; }
  .cdk-console { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
  .cdk-state { grid-column: 1 / -1; }
  .cdk-input-group { width: 100%; }
  .session-meta { grid-column: 1; display: grid; gap: 2px; padding: 7px 0; white-space: normal; }
  .session-meta b { display: none; }
  .header-message { position: static; max-width: none; margin-top: 8px; transform: none; border-width: 1px 0 0; border-radius: 0; box-shadow: none; text-align: center; }
  .page-shell { padding-top: 30px; }
  .hero { min-height: 0; }
  .hero h1 { margin-top: 12px; font-size: 38px; letter-spacing: -2px; }
  .hero-copy > p { font-size: 12px; }
  .hero-card { padding: 16px; }
  .flow-strip { grid-template-columns: 1fr 1fr; }
  .flow-step { padding: 13px 11px; gap: 9px; }
  .flow-step:nth-child(n) { grid-column: auto; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .flow-step:nth-child(even) { border-right: 0; }
  .flow-step:last-child { grid-column: 1 / -1; border-right: 0; border-bottom: 0; }
  .flow-step > span { width: 30px; height: 30px; flex-basis: 30px; }
  .flow-step p { display: none; }
  .locked-notice { align-items: flex-start; }
  .locked-notice a { display: none; }
  .token-panel, .settings-panel { padding: 17px; }
  .panel-head { display: block; }
  .panel-head > div { margin-bottom: 10px; }
  .local-chip, .region-chip { margin-left: 47px; }
  .token-input-shell textarea { min-height: 220px; }
  .textarea-foot { align-items: flex-start; padding-block: 8px; }
  .drop-zone { align-items: flex-start; flex-wrap: wrap; }
  .drop-zone > div { flex: 1 1 calc(100% - 50px); }
  .file-button { width: 100%; margin: 0; }
  .parse-stats { grid-template-columns: 1fr 1fr; }
  .identity-title { display: grid; }
  .run-panel { display: block; padding: 16px; }
  .progress-block { margin: 16px 0; }
  .run-actions { margin: 0; }
  .run-actions .button { flex: 1; }
  .tasks-head { display: block; padding: 16px; }
  .task-toolbar { justify-content: flex-start; margin-top: 14px; }
  .task-toolbar .button { flex: 1; }
  .task-topline { grid-template-columns: 18px 90px 1fr; gap: 8px; }
  .task-topline time { grid-column: 3; }
  .task-name { display: grid; }
  .task-body { padding: 12px; }
  .section-caption { display: grid; }
  .checkout-box { grid-template-columns: 8px minmax(0,1fr); }
  .copy-checkout { grid-column: 2; justify-self: start; }
  .checkout-url { white-space: normal; overflow-wrap: anywhere; }
  .account-line { flex-wrap: wrap; }
  .stage strong { white-space: normal; }
  .stage small { display: none; }
  .task-actions { padding: 12px; }
  .action-group > div { display: grid; grid-template-columns: 1fr 1fr; }
  .action-group .button { width: 100%; white-space: normal; text-align: center; }
  .open-checkout { grid-column: 1 / -1; }
  .site-footer { display: block; text-align: center; }
  .site-footer span { justify-content: center; }
  .site-footer p { margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
