:root {
  --bg: #090b0f;
  --panel: rgba(19, 22, 29, .88);
  --panel-strong: #151922;
  --line: rgba(255, 255, 255, .09);
  --line-bright: rgba(243, 186, 47, .28);
  --text: #f6f3e9;
  --muted: #969ba8;
  --gold: #f3ba2f;
  --gold-soft: #ffd86b;
  --green: #56d6a5;
  --red: #ff7d7d;
  --radius: 20px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(circle at 50% -10%, #22200f 0, #0b0d12 38%, #07090c 100%); }
button, input, textarea { font: inherit; }
button { color: inherit; }
.ambient { position: fixed; pointer-events: none; filter: blur(80px); opacity: .15; border-radius: 999px; }
.ambient-one { width: 420px; height: 420px; background: var(--gold); top: -260px; right: -80px; }
.ambient-two { width: 280px; height: 280px; background: #735d16; left: -180px; top: 38%; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 58px 0 40px; position: relative; }
.hero { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 34px; }
.brand-mark { width: 58px; height: 58px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line-bright); border-radius: 17px; background: linear-gradient(145deg, rgba(243, 186, 47, .18), rgba(243, 186, 47, .04)); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.brand-mark svg { width: 34px; fill: var(--gold); }
.eyebrow { margin: 2px 0 8px; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .2em; }
h1 { margin: 0; font-size: clamp(34px, 5vw, 56px); line-height: 1.05; letter-spacing: -.045em; }
.hero-copy { margin: 13px 0 0; color: var(--muted); font-size: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.025); backdrop-filter: blur(18px); }
.input-panel { padding: 28px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.panel-heading > div:first-child { display: flex; align-items: center; gap: 12px; }
.panel-heading h2 { font-size: 18px; margin: 0; }
.step { color: var(--gold); font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid var(--line-bright); border-radius: 7px; padding: 6px 7px; }
.small-note, .parse-hint { color: var(--muted); font-size: 13px; }
.dropzone { border: 1px dashed rgba(255,255,255,.16); border-radius: 15px; background: rgba(7,9,12,.6); transition: .2s ease; overflow: hidden; }
.dropzone.dragging { border-color: var(--gold); background: rgba(243,186,47,.055); }
textarea { display: block; width: 100%; height: 210px; resize: vertical; border: 0; outline: none; padding: 20px; color: var(--text); background: transparent; line-height: 1.75; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
textarea::placeholder { color: #5d626d; }
.drop-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 10px 14px; border-top: 1px solid var(--line); }
.file-button { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: #d8d9dc; font-size: 13px; padding: 8px 10px; border-radius: 9px; }
.file-button:hover { background: rgba(255,255,255,.05); }
.file-button svg { width: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.parse-hint.good { color: var(--green); }
.parse-hint.bad { color: var(--red); }
.settings-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 18px; margin-top: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span:first-child, .switch-row strong { font-size: 13px; font-weight: 650; }
.field small, .switch-row small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.5; }
.field em { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 400; }
.field select { height: 44px; border: 1px solid var(--line); border-radius: 11px; outline: 0; color: var(--text); padding: 0 36px 0 13px; background: #0c0f14; }
.field select:focus { border-color: var(--line-bright); box-shadow: 0 0 0 3px rgba(243,186,47,.07); }
.input-wrap { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(7,9,12,.6); overflow: hidden; }
.input-wrap:focus-within { border-color: var(--line-bright); box-shadow: 0 0 0 3px rgba(243,186,47,.07); }
.input-wrap input { min-width: 0; flex: 1; height: 44px; border: 0; outline: 0; color: var(--text); padding: 0 13px; background: transparent; }
.icon-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 10px 13px; font-size: 12px; }
.switch-row { min-height: 76px; border: 1px solid var(--line); border-radius: 13px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; cursor: pointer; }
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch { width: 42px; height: 24px; border-radius: 99px; background: #383c44; padding: 3px; transition: .2s; flex: 0 0 auto; }
.switch::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: .2s; }
.switch-row input:checked + .switch { background: var(--gold); }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: #17130a; }
.option-grid { grid-template-columns: .8fr 1.2fr; }
.scope-note { min-height: 76px; border: 1px solid var(--line); border-radius: 13px; display: flex; flex-direction: column; justify-content: center; padding: 14px 16px; }
.scope-note strong { font-size: 13px; }
.scope-note small { color: var(--muted); margin-top: 6px; line-height: 1.5; }
.standalone-scope { margin-top: 20px; }
.primary-row { display: flex; align-items: center; gap: 20px; margin-top: 24px; }
.primary-button { min-width: 190px; height: 50px; border: 0; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; color: #17130a; background: linear-gradient(135deg, var(--gold-soft), var(--gold)); font-weight: 750; box-shadow: 0 10px 28px rgba(243,186,47,.14); transition: transform .15s, box-shadow .15s; }
.primary-button:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(243,186,47,.2); }
.primary-button:disabled { cursor: wait; opacity: .55; transform: none; }
.primary-button svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.privacy-note { margin: 0; color: var(--muted); font-size: 12px; }
.progress-panel { margin-top: 20px; padding: 24px 28px; }
.progress-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.progress-top h2 { margin: 10px 0 0; font-size: 17px; }
.progress-top > strong { color: var(--gold); font-size: 24px; font-variant-numeric: tabular-nums; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; color: var(--gold-soft); font-size: 12px; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(243,186,47,.09); }
.status-pill.running i { animation: pulse 1.4s infinite; }
.status-pill.done { color: var(--green); }
.status-pill.error { color: var(--red); }
@keyframes pulse { 50% { opacity: .35; } }
.progress-track { margin-top: 20px; height: 6px; overflow: hidden; background: #282b31; border-radius: 99px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #af7f07, var(--gold-soft)); border-radius: inherit; transition: width .3s ease; }
.progress-detail { color: var(--muted); font-size: 12px; margin: 11px 0 0; }
.results { margin-top: 22px; }
.result-banner { border: 1px solid var(--line); border-radius: 15px; padding: 17px 20px; margin-bottom: 16px; font-size: 14px; line-height: 1.55; }
.result-banner.success { color: #b8f6dd; border-color: rgba(86,214,165,.25); background: rgba(86,214,165,.07); }
.result-banner.warning { color: #ffe2a0; border-color: rgba(243,186,47,.28); background: rgba(243,186,47,.07); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.metric { min-height: 138px; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--panel-strong); }
.metric > span { color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin: 14px 0 5px; font-size: 31px; line-height: 1; font-variant-numeric: tabular-nums; }
.metric small { color: #686e7a; font-size: 11px; }
.metric.accent { border-color: var(--line-bright); background: linear-gradient(145deg, rgba(243,186,47,.11), var(--panel-strong) 70%); }
.metric.accent strong { color: var(--gold-soft); }
.table-panel { margin-top: 16px; overflow: hidden; }
.table-heading { padding: 22px 24px 0; }
.table-actions { display: flex; align-items: center; gap: 16px; }
.check-label { color: var(--muted); font-size: 12px; cursor: pointer; }
.check-label input { accent-color: var(--gold); vertical-align: -2px; }
.secondary-button { border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.03); cursor: pointer; padding: 8px 11px; color: #d5d6da; font-size: 12px; }
.secondary-button:hover { border-color: var(--line-bright); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 880px; }
.address-result-table { min-width: 680px; }
th { color: #727884; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; text-align: left; font-weight: 700; padding: 13px 16px; border-bottom: 1px solid var(--line); background: rgba(7,9,12,.26); }
th:first-child, td:first-child { padding-left: 24px; }
td { padding: 16px; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 12px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(255,255,255,.018); }
.address-cell strong { display: block; margin-bottom: 4px; color: #e7e4da; font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--muted); }
.amount-cell strong { display: block; font-variant-numeric: tabular-nums; }
.amount-cell small { display: block; color: var(--muted); margin-top: 4px; }
.badge { display: inline-block; white-space: nowrap; border-radius: 99px; padding: 5px 8px; font-size: 10px; }
.badge.yes { color: #9af0cf; background: rgba(86,214,165,.1); }
.badge.no { color: #8d929d; background: rgba(255,255,255,.05); }
.badge.warning { color: #ffe2a0; background: rgba(243,186,47,.1); }
.badge.type { color: #dbc77e; background: rgba(243,186,47,.08); margin: 2px; }
.full-address { font-size: 12px; }
.hash-link { color: var(--gold-soft); text-decoration: none; }
.hash-link:hover { text-decoration: underline; }
.empty-state { padding: 44px 24px; color: var(--muted); text-align: center; font-size: 13px; }
.failure-panel { margin-top: 16px; padding: 22px 24px; border-color: rgba(255,125,125,.22); }
.failure-panel h2 { margin: 0 0 8px; font-size: 16px; color: #ffabab; }
.failure-panel p, .failure-panel li { color: var(--muted); font-size: 12px; line-height: 1.6; }
.failure-panel ul { margin: 12px 0 0; padding-left: 20px; }
footer { display: flex; justify-content: space-between; gap: 30px; color: #555b65; font-size: 11px; margin-top: 26px; padding: 0 4px; }
footer p { margin: 0; }

@media (max-width: 820px) {
  .shell { padding-top: 34px; }
  .settings-grid, .metric-grid { grid-template-columns: 1fr 1fr; }
  .panel-heading, .primary-row, footer { align-items: flex-start; }
  .primary-row { flex-direction: column; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 1180px); }
  .hero { gap: 14px; }
  .brand-mark { width: 46px; height: 46px; border-radius: 13px; }
  .brand-mark svg { width: 28px; }
  .eyebrow { font-size: 10px; }
  .hero-copy { font-size: 14px; }
  .input-panel, .progress-panel { padding: 20px; }
  .panel-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .drop-actions, .table-actions { align-items: flex-start; flex-direction: column; }
  .settings-grid, .metric-grid { grid-template-columns: 1fr; }
  .primary-button { width: 100%; }
  .metric { min-height: 112px; }
  footer { flex-direction: column; }
}
