:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080c17;
  color: #eef2ff;
  --ink: #eef2ff;
  --muted: #8d97ae;
  --panel: #111827;
  --panel-2: #161f31;
  --line: #263147;
  --cyan: #63e6d1;
  --cyan-dark: #0c5d56;
  --danger: #ff6b73;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 85% 10%, rgba(34, 197, 170, .12), transparent 32rem), #080c17; }
button, input, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 64px; }
.topbar { display: flex; align-items: center; gap: 14px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; background: var(--cyan); color: #06110f; font-weight: 900; border-radius: 11px 4px 11px 4px; letter-spacing: -.06em; }
.eyebrow, .step-label { margin: 0 0 5px; color: var(--cyan); font-size: 11px; font-weight: 800; letter-spacing: .18em; }
h1 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.status-pill { margin-left: auto; display: flex; align-items: center; gap: 8px; color: #bdc5d7; font-size: 13px; border: 1px solid var(--line); padding: 8px 12px; border-radius: 999px; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.stepper { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 20px; border: 1px solid var(--line); background: rgba(12, 18, 31, .74); }
.step { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 14px 18px; text-align: left; color: #8994aa; background: transparent; border: 0; border-right: 1px solid var(--line); }
.step:last-child { border-right: 0; }
.step b { font-size: 12px; color: #59647b; }
.step span { display: grid; gap: 3px; font-size: 13px; font-weight: 800; }
.step small { color: #59647b; font-size: 10px; font-weight: 600; }
.step.active { color: var(--ink); background: rgba(99, 230, 209, .07); box-shadow: inset 0 -2px var(--cyan); }
.step.active b, .step.done b { color: var(--cyan); }
.workspace { display: grid; grid-template-columns: minmax(0, .85fr) minmax(440px, 1.15fr); gap: 72px; align-items: start; padding: 86px 0; }
.intro h2 { max-width: 520px; margin: 18px 0; font-size: clamp(36px, 5vw, 64px); line-height: .98; letter-spacing: -.055em; }
.intro > p:last-child { color: var(--muted); line-height: 1.7; max-width: 500px; }
.connect-card { display: grid; gap: 20px; padding: 28px; background: linear-gradient(145deg, rgba(23, 33, 52, .98), rgba(13, 20, 34, .98)); border: 1px solid #2b3850; border-radius: 18px 6px 18px 6px; box-shadow: 0 24px 80px rgba(0, 0, 0, .35); }
.form-stage { display: grid; gap: 20px; }
.stage-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.stage-heading h3 { margin: 7px 0 0; font-size: 20px; }
.stage-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.stage-actions .primary { width: 100%; }
.field-row { display: grid; grid-template-columns: .75fr 1.25fr; gap: 14px; }
label { display: grid; gap: 9px; color: #cbd3e2; font-size: 12px; font-weight: 700; letter-spacing: .03em; }
input { width: 100%; border: 1px solid #34415a; border-radius: 8px 3px 8px 3px; background: #0a1020; color: var(--ink); padding: 14px; outline: none; }
select { width: 100%; border: 1px solid #34415a; border-radius: 8px 3px 8px 3px; background: #0a1020; color: var(--ink); padding: 14px; outline: none; }
select:disabled { color: #68748c; cursor: not-allowed; }
input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(99, 230, 209, .1); }
.token-field { display: flex; }
.token-field input { border-radius: 8px 0 0 3px; }
.token-field button { min-width: 64px; border: 1px solid #34415a; border-left: 0; border-radius: 0 3px 8px 0; background: #1b263a; color: var(--cyan); cursor: pointer; }
.security-note { display: grid; gap: 4px; padding: 13px 15px; border-left: 2px solid var(--cyan); background: rgba(99, 230, 209, .06); }
.security-note strong { color: var(--cyan); font-size: 12px; }
.security-note span { color: var(--muted); font-size: 12px; }
.primary { display: flex; justify-content: space-between; border: 0; border-radius: 9px 3px 9px 3px; padding: 15px 18px; background: var(--cyan); color: #071411; font-weight: 900; cursor: pointer; }
.primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary:disabled { background: #273346; color: #6f7b91; cursor: not-allowed; filter: none; transform: none; }
.secondary-action { background: transparent; color: var(--cyan); border: 1px solid var(--cyan); }
.access-note { margin: -5px 0 0; color: #97a2b7; font-size: 11px; line-height: 1.55; }
.access-note strong { color: var(--cyan); }
.form-error { margin: 0; padding: 12px 14px; border: 1px solid rgba(255, 107, 115, .35); color: #ffb1b5; background: rgba(255, 107, 115, .08); font-size: 13px; }
.form-error.success-message { border-color: rgba(99, 230, 209, .35); color: #9beadd; background: rgba(99, 230, 209, .07); }
.operation, .run-section { padding: 62px 0; }
.section-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 24px; }
.section-head h2 { margin: 8px 0 0; font-size: 34px; letter-spacing: -.04em; }
.ghost { border: 1px solid #34415a; background: #11192a; color: #c7d0e0; padding: 11px 14px; border-radius: 8px 3px 8px 3px; cursor: pointer; }
.page-summary { display: flex; align-items: center; gap: 17px; padding: 23px; margin-bottom: 18px; border: 1px solid #2b3850; background: linear-gradient(110deg, #151e30, #0f1727); }
.page-avatar { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 14px 4px 14px 4px; background: #223149; color: var(--cyan); font-size: 22px; font-weight: 900; }
.connected { color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.connected i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--cyan); }
.page-summary h3 { margin: 6px 0 3px; font-size: 20px; }
.page-summary p { margin: 0; color: var(--muted); font-size: 12px; }
.summary-metrics { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); gap: 1px; margin-left: auto; background: var(--line); border: 1px solid var(--line); }
.summary-metrics div, .result-grid div { display: grid; gap: 5px; padding: 14px 18px; background: #101827; }
.summary-metrics strong, .result-grid strong { font-size: 20px; }
.summary-metrics span, .result-grid span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .1em; }
.grid-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(360px, .8fr); gap: 18px; }
.panel { padding: 22px; border: 1px solid #2b3850; background: #0f1727; }
.panel-title { display: flex; align-items: start; justify-content: space-between; margin-bottom: 15px; }
.panel h3 { margin: 5px 0 0; font-size: 19px; }
.count-badge { padding: 6px 9px; color: var(--cyan); background: rgba(99, 230, 209, .08); border: 1px solid rgba(99, 230, 209, .2); font-size: 10px; font-weight: 800; }
.inventory-tools { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; margin-bottom: 12px; }
.inventory-tools input { padding: 10px 12px; }
.inventory-tools > div { display: flex; gap: 7px; }
.ghost.small { padding: 9px 10px; font-size: 10px; white-space: nowrap; }
.post-list { display: grid; max-height: 328px; overflow: auto; border-top: 1px solid var(--line); }
.post-item { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: start; padding: 13px 6px; border-bottom: 1px solid var(--line); cursor: pointer; }
.post-item:hover { background: rgba(99, 230, 209, .04); }
.post-item.kept { opacity: .62; }
.post-item > input { width: 17px; height: 17px; margin: 0; padding: 0; accent-color: var(--cyan); }
.post-item strong { display: block; overflow: hidden; max-width: 480px; color: #dce3ef; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.post-item span { display: block; margin-top: 5px; color: #68748c; font-size: 10px; }
.post-item time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.empty-list { padding: 38px 8px; color: var(--muted); text-align: center; }
.scope-note { color: #68748c; font-size: 11px; line-height: 1.6; }
code { color: #9beadd; }
.danger-panel { border-color: rgba(255, 107, 115, .3); background: linear-gradient(145deg, rgba(44, 20, 29, .46), #101625 58%); }
.danger-label { color: var(--danger); }
.danger-panel > p:not(.step-label):not(.confirmation-hint) { color: var(--muted); font-size: 13px; line-height: 1.6; }
.rename-label { margin: 20px 0; }
.rename-label span { color: #68748c; font-size: 10px; font-weight: 500; }
.check-row { grid-template-columns: auto 1fr; align-items: start; margin: 20px 0; color: #b9c2d2; line-height: 1.5; }
.check-row input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--danger); }
.confirmation-hint { color: var(--muted); font-size: 11px; }
.danger-button { width: 100%; margin-top: 7px; padding: 14px; border: 1px solid var(--danger); background: var(--danger); color: #22070a; font-weight: 900; cursor: pointer; }
.danger-button:disabled { border-color: #3b3543; background: #272737; color: #656779; cursor: not-allowed; }
.run-state { padding: 7px 10px; color: var(--cyan); border: 1px solid rgba(99, 230, 209, .25); font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.run-state.failed { color: var(--danger); border-color: rgba(255, 107, 115, .3); }
.progress-card { padding: 24px; border: 1px solid #2b3850; background: #0f1727; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 10px; }
.progress-meta span { color: var(--cyan); font-weight: 800; }
.progress-track { height: 8px; overflow: hidden; background: #222c40; }
.progress-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #33b9a7, var(--cyan)); transition: width .25s ease; }
.result-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 24px; background: var(--line); }
.run-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.primary-link { display: inline-flex; align-items: center; padding: 11px 14px; margin-left: auto; color: #071411; background: var(--cyan); border-radius: 8px 3px 8px 3px; font-size: 13px; font-weight: 900; text-decoration: none; }
.rename-disclaimer { padding: 13px 15px; color: #aeb8ca; border-left: 2px solid #f6c85f; background: rgba(246, 200, 95, .06); font-size: 12px; }
.fallback-panel { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; margin: 16px 0; padding: 20px; border: 1px solid rgba(255, 107, 115, .3); background: rgba(44, 20, 29, .36); }
.fallback-panel h3 { margin: 5px 0 8px; }
.fallback-panel p:not(.step-label) { max-width: 760px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.failed-post-list { display: grid; grid-column: 1 / -1; gap: 1px; background: var(--line); }
.failed-post { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 14px; background: #0d1422; }
.failed-post strong, .failed-post span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.failed-post strong { color: #dce3ef; font-size: 12px; }
.failed-post span, .failed-post em { margin-top: 4px; color: #68748c; font-size: 10px; font-style: normal; }
.failed-post a { color: var(--cyan); font-size: 11px; text-decoration: none; white-space: nowrap; }
.failed-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.activity-log { display: grid; gap: 1px; max-height: 260px; overflow: auto; background: var(--line); border: 1px solid var(--line); }
.log-row { display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; padding: 10px 13px; background: #0d1422; color: #9ca7bb; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; }
.log-row b { color: var(--cyan); }
.log-row.error b { color: var(--danger); }
[hidden] { display: none !important; }
@media (max-width: 900px) { .grid-two { grid-template-columns: 1fr; } .page-summary { align-items: flex-start; flex-wrap: wrap; } .summary-metrics { width: 100%; margin-left: 0; } }
@media (max-width: 820px) { .workspace { grid-template-columns: 1fr; gap: 34px; padding: 54px 0; } .intro h2 { font-size: 44px; } .step small { display: none; } }
@media (max-width: 620px) { .inventory-tools, .fallback-panel, .failed-post { grid-template-columns: 1fr; } .inventory-tools > div, .failed-actions { flex-wrap: wrap; justify-content: flex-start; } .failed-post-list { grid-column: 1; } }
@media (max-width: 520px) { .shell { width: min(100% - 24px, 1180px); } .status-pill { display: none; } .stepper { grid-template-columns: repeat(4, auto); } .step { justify-content: center; padding: 12px 8px; } .step span { display: none; } .field-row, .summary-metrics, .result-grid { grid-template-columns: 1fr; } .connect-card { padding: 20px; } .section-head { align-items: start; } }
