@charset "UTF-8";
:root { color-scheme: dark; --bg:#0b0f15; --surface:#121820; --surface2:#17202b; --border:#28313e; --muted:#8290a3; --text:#e3eaf4; --gold:#e8c87c; --green:#83c5a7; --red:#e88b7c; --blue:#7cb3e8; --orange:#f5a14a; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
a { color: var(--blue); }
button, input, select { font: inherit; }
button { cursor: pointer; color: var(--text); background: #1b2430; border: 1px solid #344151; border-radius: 8px; padding: 6px 11px; white-space: nowrap; }
button:hover:not(:disabled) { background: #293646; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.primary { background: #3a3220; border-color: var(--gold); color: var(--gold); font-weight: 600; }
button:focus-visible, input:focus, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
input { color: var(--text); background: #0e141c; border: 1px solid #344151; border-radius: 8px; padding: 6px 9px; }
input[type=checkbox] { accent-color: var(--gold); width: 15px; height: 15px; vertical-align: -2px; }
.muted { color: var(--muted); }
.help { color: var(--muted); font-size: 12px; margin: 10px 2px 0; }
.tag, .badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--border); color: var(--muted); }
.badge.warn { color: var(--gold); border-color: #6b5a33; }
.badge.bad { color: var(--red); border-color: #6b3a33; }

.topbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 20px; border-bottom: 1px solid var(--border); background: var(--surface); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand h1 { font-size: 18px; margin: 0; }
.brand .back { color: var(--muted); text-decoration: none; font-size: 13px; }
.assistant { font-size: 13px; padding: 4px 10px; border-radius: 8px; background: #0e141c; border: 1px solid var(--border); }
.assistant.ready { color: var(--green); border-color: #2f5546; }
.assistant.offline, .assistant.expired, .assistant.unpaired { color: var(--gold); border-color: #6b5a33; }
.assistant.ready.outdated { color: var(--gold); border-color: #6b5a33; }
.settings { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-left: auto; font-size: 13px; color: var(--muted); align-items: center; }
.settings input:not([type=checkbox]) { width: 4.5em; padding: 3px 6px; }
.turbo-on .turbo-toggle { color: var(--red); font-weight: 600; }
.watch-warm:has(input:checked) { color: var(--gold); font-weight: 600; }
.turbo-banner { background: #3a1f1c; color: #ffb4a6; border-bottom: 1px solid #6b3a33; padding: 8px 20px; font-weight: 600; }
/* A fixed toast: a notice must never move the buttons under the pointer. */
.notice { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 20; max-width: min(720px, calc(100vw - 32px)); padding: 9px 14px; border-radius: 10px; background: #1d2733; border: 1px solid #3b4a5c; box-shadow: 0 6px 24px rgba(0,0,0,.45); pointer-events: none; }
.notice.error { color: var(--red); border-color: #6b3a33; }

.layout { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; padding: 16px 20px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-head h2 { font-size: 15px; margin: 0; }
.records { margin: 0 20px 16px; }

.wallet-actions { display: flex; gap: 6px; margin-bottom: 8px; }
.wallet-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wallet { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--surface2); }
.wallet.disabled { opacity: .55; }
.wallet-main { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.wallet-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.addr { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.wallet .bnb { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
.wallet .addr { flex: none; }
.gates { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 4px 0 0 23px; font-size: 12px; color: var(--muted); }
.flag.bad { color: var(--red); }
.blockers { margin: 3px 0 0 23px; font-size: 12px; color: var(--gold); }
.watch-box form { display: flex; gap: 6px; margin-bottom: 8px; }
.watch-box input { flex: 1; min-width: 0; }
.empty { color: var(--muted); padding: 10px 4px; list-style: none; }

.whitelist-status { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
#index-status { font-variant-numeric: tabular-nums; }
#index-status.live::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--green); vertical-align: 1px; }
.whitelist-status.hot { color: var(--gold); }
.search { display: flex; gap: 6px; margin-bottom: 10px; }
.search input { flex: 1; min-width: 0; }
.token-list { display: grid; gap: 8px; max-height: 62vh; overflow-y: auto; padding-right: 4px; align-content: start; }
@media (max-width: 900px) { .token-list { max-height: none; } }
.token { border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); }
.token.open { border-color: #6b5a33; }
/* 纯分红: red frame (a ring, so the card does not shift), kept when the card is open */
.token.pure-dividend, .token.pure-dividend.open { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.first-dividend-clear { color: var(--orange); border-color: var(--orange); }
.first-tag { color: #ff4d4f; font-weight: 700; font-size: 12px; padding: 0 7px; border: 1px solid #ff4d4f; border-radius: 99px; background: rgba(255, 77, 79, .14); white-space: nowrap; }
.first-tag:empty { display: none; }
/* The first 纯分红 token after the 10-24 cut: orange, a heavier frame */
.token.pure-dividend.first-dividend, .token.pure-dividend.first-dividend.open { border: 2px solid var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.token-head { width: 100%; display: grid; grid-template-columns: 40px minmax(180px, 1.5fr) minmax(120px, 1fr) auto auto; grid-template-areas: "icon name bar ptext phase" "icon created created last mine"; gap: 2px 12px; align-items: center; text-align: left; background: transparent; border: 0; border-radius: 10px; padding: 9px 12px; }
.token-head:hover:not(:disabled) { background: #1d2733; }
.icon { grid-area: icon; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #253040; }
.icon.placeholder { display: grid; place-items: center; background: #253040; color: var(--gold); font-size: 12px; }
.tname { grid-area: name; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-width: 0; }
.tname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
.tname .tn { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14em; }
.qpill { font-size: 11px; padding: 0 7px; border-radius: 99px; border: 1px solid #2e4a66; color: var(--blue); white-space: nowrap; }
.qpill.zap { border-color: #4a3f2a; color: var(--gold); }
.qpill:empty, .tpill:empty { display: none; }
.tpill { font-size: 11px; padding: 0 7px; border-radius: 99px; border: 1px solid #3d4a3a; color: var(--green); white-space: nowrap; }
.tpill.risk { border-color: #6b3a33; color: var(--red); }
.progress { grid-area: bar; height: 8px; border-radius: 99px; background: #0e141c; border: 1px solid var(--border); overflow: hidden; }
.progress .bar { height: 100%; background: linear-gradient(90deg, #b99c55, var(--gold)); }
.ptext { grid-area: ptext; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.phase { grid-area: phase; font-size: 12px; color: var(--muted); white-space: nowrap; }
.phase.live { color: var(--green); }
.created { grid-area: created; font-size: 12px; }
button.copy-ca { margin-left: 6px; border-color: var(--blue); color: var(--blue); font-weight: 600; min-width: 6.5em; }
button.copy-ca.done { color: var(--green); border-color: var(--green); }
/* 控制台同款: its own framed block under the board's rows, same buttons */
.console-box { display: grid; gap: 6px; margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--blue); border-radius: 10px; background: rgba(124, 179, 232, .06); }
.console-label { min-width: 3.6em; color: var(--blue); font-weight: 600; font-size: 12px; }
button.amount.console { border-color: #2f4a66; }
button.amount.console.sell { border-color: #4a3a5a; }
.last { grid-area: last; font-size: 12px; color: var(--muted); }
.mine { grid-area: mine; font-size: 12px; color: var(--gold); text-align: right; }
@media (max-width: 1180px) {
  .token-head { grid-template-columns: 40px 1fr auto; grid-template-areas: "icon name phase" "icon bar ptext" "icon created mine" "icon last last"; }
  .trade { padding-left: 12px; }
}
.trade { padding: 4px 12px 12px 58px; display: grid; gap: 8px; }
.trade-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.trade-row .label { width: 1.6em; color: var(--muted); }
.trade-row .unit { color: var(--muted); font-size: 12px; }
button.amount { min-width: 3.6em; }
button.amount.max { border-color: var(--gold); color: var(--gold); }
button.amount.sell { border-color: #4a3a5a; }
.trade-row input.custom { width: 6.5em; }
.fill, .meta { margin: 0; font-size: 12px; overflow-wrap: anywhere; }
.panel-info { margin-top: 6px; font-size: 12px; }
.panel-info summary { cursor: pointer; width: fit-content; }
.panel-info[open] summary { margin-bottom: 4px; }

/* Preview modal: opens on the click, so nothing has to be scrolled to. */
.modal { position: fixed; inset: 0; z-index: 15; background: rgba(4, 7, 11, .72); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal[hidden] { display: none; }
.preview { border-color: #6b5a33; width: min(980px, 100%); margin: 0; box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.preview .close { padding: 2px 10px; font-size: 18px; line-height: 1; background: transparent; border-color: transparent; color: var(--muted); }
/* Send / 放弃 at the top right, kept in view while a long wallet list scrolls */
.preview .panel-head { align-items: center; flex-wrap: wrap; position: sticky; top: 0; z-index: 2; background: var(--surface); margin: -14px -14px 10px; padding: 12px 14px 10px; border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--border); }
.preview-summary { font-size: 13px; margin-bottom: 8px; }
.preview-common p { margin: 4px 0; font-size: 13px; }
.warning, .warn { color: var(--gold); }
.info { color: var(--blue); }
.preview-rows { display: grid; gap: 6px; margin: 8px 0; }
.prow { display: grid; grid-template-columns: minmax(120px, 200px) 1fr auto; gap: 8px 12px; align-items: start; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface2); }
.pname { display: flex; flex-direction: column; }
.pbody { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: 13px; }
.kind { font-weight: 600; }
.kind.buy { color: var(--green); } .kind.sell { color: var(--red); } .kind.approve { color: var(--blue); }
.skip { color: var(--muted); }
.good { color: var(--green); }
.error { color: var(--red); }
.pdetails summary { cursor: pointer; color: var(--muted); font-size: 12px; }
.pdetails pre { max-width: 60vw; max-height: 260px; overflow: auto; font-size: 11px; background: #0e141c; padding: 8px; border-radius: 8px; }
.preview-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; margin-left: auto; }

.record-list { display: grid; gap: 4px; font-size: 13px; }
.record { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.record .status { color: var(--muted); }
.record.confirmed .status { color: var(--green); }
.record.reverted .status, .record.not_submitted .status { color: var(--red); }
.record.broadcasted .status, .record.pending_confirmation .status, .record.unknown .status { color: var(--gold); }
.foot { padding: 4px 20px 24px; font-size: 12px; }
.readonly #preview-send { display: none; }

.panel-head button.small { padding: 3px 10px; font-size: 12px; }
.template { width: min(760px, 100%); margin: 0; border-color: #3b4a5c; box-shadow: 0 18px 60px rgba(0,0,0,.6); }
.template textarea { width: 100%; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--text); background: #0e141c; border: 1px solid #344151; border-radius: 8px; padding: 8px; resize: vertical; }
.template .close { margin-left: auto; padding: 2px 10px; font-size: 18px; line-height: 1; background: transparent; border-color: transparent; color: var(--muted); }
#template-info.error { color: var(--red); }
.search .filter { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); white-space: nowrap; }

.rounds-status { margin: 0 0 8px; font-size: 12.5px; display: grid; gap: 4px; }
.rounds-status .round-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; background: #0e141c; }
.rounds-status .warn { color: var(--gold); }

/* The hidden attribute always wins over a display rule (.pair-form, .add-wallet are flex). */
[hidden] { display: none !important; }
/* 本机助手 setup and wallet connections (the page works on its own, without the Agent page) */
.helper-box { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; background: var(--surface2); font-size: 13px; }
.helper-head { display: flex; align-items: center; gap: 8px; }
.helper-head .muted { flex: 1; }
.helper-steps { margin: 8px 0; padding-left: 1.3em; display: grid; gap: 4px; }
.helper-steps code { background: #0e141c; padding: 0 4px; border-radius: 4px; }
.pair-form, .add-wallet { display: flex; gap: 6px; margin: 6px 0; }
.pair-form input, .add-wallet input { flex: 1; min-width: 0; }
.wallet-ops { display: grid; gap: 4px; margin-top: 4px; font-size: 12px; }
.ops-line { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.ops-line button.small, .record button.small { padding: 2px 8px; font-size: 12px; }
.login-box { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 8px; border: 1px dashed var(--gold); border-radius: 8px; color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
