:root { color-scheme: dark; background: #0e141d; color: #edf2f9; font: 15px/1.5 system-ui, sans-serif; --line: #303a49; --muted: #a9b7c8; --accent: #f5aa78; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 1280px; margin: 0 auto; padding: 24px 20px 48px; }
.app-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.app-header > button { flex: 0 0 auto; }
.app-brand { display: flex; align-items: center; min-width: 0; gap: 11px; }
.app-brand img { flex: 0 0 auto; border-radius: 9px; }
.app-brand > div { min-width: 0; }
.app-brand h1 { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 9px; }
.bot-version { padding: 2px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font: 500 .78rem/1.2 var(--mono); white-space: nowrap; }
.bot-version-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.bot-version-actions button { padding: 3px 8px; min-height: 28px; font-size: .78rem; white-space: nowrap; }
#bot-upgrade { color: var(--accent); }
#bot-upgrade-panel {
  --upgrade-color: #ffb27c;
  padding: 12px 15px; margin-bottom: 16px; border: 1px solid #765339;
  border-inline-start: 4px solid var(--upgrade-color); border-radius: 8px; background: #231f1e;
}
.upgrade-progress-heading { display: flex; align-items: center; justify-content: space-between; gap: 3px 12px; }
#bot-upgrade-panel[data-state="working"] .upgrade-progress-heading { flex-wrap: wrap; }
#bot-upgrade-dismiss { flex: none; width: 44px; height: 44px; margin: -10px -10px -10px 0; padding: 0; border: 0; background: transparent; color: var(--upgrade-color); font: 24px/1 system-ui, sans-serif; }
#bot-upgrade-dismiss:hover { background: #ffffff12; }
#bot-upgrade-dismiss:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
#bot-upgrade-status { margin: 0; color: #f5eee8; font-weight: 650; overflow-wrap: anywhere; }
#bot-upgrade-step { color: var(--upgrade-color); font-size: .85rem; font-variant-numeric: tabular-nums; }
#bot-upgrade-progress { position: relative; display: flex; gap: 3px; height: 10px; margin-top: 9px; border-radius: 4px; overflow: hidden; }
#bot-upgrade-progress > span { flex: 1; background: #4e4440; }
#bot-upgrade-progress > [data-step="done"] { background: var(--upgrade-color); }
#bot-upgrade-progress > [data-step="current"] {
  background: repeating-linear-gradient(120deg, #ffb27c 0 6px, #a9693e 6px 12px);
}
#bot-upgrade-progress:not([aria-valuenow]) { background: #4e4440; }
#bot-upgrade-progress:not([aria-valuenow]) > span { display: none; }
#bot-upgrade-progress:not([aria-valuenow])::after {
  content: ""; width: 33.333%; height: 100%; border-radius: inherit; background: var(--upgrade-color);
  animation: upgrade-waiting 1.6s ease-in-out infinite alternate;
}
@keyframes upgrade-waiting { to { transform: translateX(200%); } }
@media (prefers-reduced-motion: reduce) {
  #bot-upgrade-progress:not([aria-valuenow])::after {
    width: 100%; animation: none; background: repeating-linear-gradient(120deg, #ffb27c 0 6px, #a9693e 6px 12px);
  }
}
#bot-upgrade-panel:is([data-state="complete"], [data-state="current"]) { --upgrade-color: #8dddc1; border-color: #416958; background: #172923; }
#bot-upgrade-panel[data-state="failed"] { --upgrade-color: #ff9aa8; border-color: #82525a; background: #2c2025; }
#bot-id { margin: 1px 0 0; font-size: .76rem; overflow-wrap: anywhere; }
h1, h2, h3, p { margin: 0 0 .6rem; }
h1 { margin: 0; font-size: clamp(1.3rem, 4vw, 1.7rem); line-height: 1.2; }
h2 { font-size: 1.24rem; }
h3 { font-size: 1.05rem; }
p, small, dt, label { color: var(--muted); }
a { color: var(--accent); text-underline-offset: 3px; }
.workspace-nav { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 5px; margin-bottom: 16px; padding: 5px; border: 1px solid var(--line); border-radius: 10px; background: #101721; }
.workspace-nav a { display: block; border: 1px solid transparent; border-radius: 7px; padding: 8px 10px; color: var(--muted); text-align: center; text-decoration: none; font-weight: 620; white-space: nowrap; }
.workspace-nav a:hover { color: #edf2f9; background: #202a39; }
.workspace-nav a[aria-current] { border-color: #795539; background: #382a23; color: #ffd4b4; }
section, dialog { margin-bottom: 16px; padding: 18px; background: #151d28; border: 1px solid var(--line); border-radius: 12px; }
dialog { width: min(420px, 94vw); margin: auto; color: inherit; }
dialog::backdrop { background: #0009; }
section[id] { scroll-margin-top: 12px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(195px,100%),1fr)); gap: 10px; }
dd { margin: 3px 0 0; font-size: 1.1rem; font-weight: 650; }
#enabled[data-active="true"] { color: #8dddc1; }
.overview-strategy { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 14px; }
.overview-execution { align-items: center; margin-top: 12px; }
.overview-section-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 9px; }
.overview-section-heading h3 { margin: 0; }
.overview-strategy-list { margin: 0; padding-inline-start: 20px; overflow-wrap: anywhere; }
.overview-strategy-list > .running-batch { position: relative; list-style: none; }
.overview-strategy-list > .running-batch::before {
  content: ""; position: absolute; inset-inline-start: -18px; top: .75em;
  width: 10px; height: 10px; border-radius: 50%; background: var(--green); transform: translateY(-50%);
}
#device-binding-inputs form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 10px; }
#device-binding-inputs label { flex: 0 1 24rem; }
#device-billing { margin: 12px 0; }
#device-account-feedback { align-self: center; }
#stop-live-help, .pnl-note { font-size: .87rem; margin-top: 8px; }
#pnl-summary { display: flex; flex-wrap: wrap; gap: 10px 34px; margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: #101721; }
#pnl-summary dt { font-size: .85rem; }
#pnl-total .pnl-value { display: block; }
.pnl-table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
.pnl-table th, .pnl-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); }
.pnl-table thead { color: var(--muted); }
.pnl-table td, .pnl-table thead th:not(:first-child) { text-align: right; }
.pnl-table [data-label="净盈亏"] { font-weight: 650; }
.pnl-table td:last-child { max-width: 24em; white-space: normal; overflow-wrap: anywhere; }
.pnl-table td > * { display: block; }
.pnl-value { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pnl-value[data-sign="1"] { color: #8dddc1; }
.pnl-value[data-sign="-1"] { color: #ff9aa8; }
@media (max-width: 800px) {
  .pnl-table, .pnl-table tbody, .pnl-table tr { display: block; }
  .pnl-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pnl-table tbody tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  .pnl-table tbody th { display: block; padding: 2px 0 6px; border: 0; color: inherit; font-weight: 650; }
  .pnl-table tbody td { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 0 8px; max-width: none; border: 0; padding: 3px 0; }
  .pnl-table tbody td::before { content: attr(data-label); grid-column: 1; grid-row: 1; text-align: left; color: var(--muted); font-weight: 400; }
  .pnl-table tbody td > * { grid-column: 2; }
}
.order-rounds { margin: 14px 0; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.round-results { display: grid; gap: 9px; padding: 0; margin: 0; list-style: none; }
.round-results > li { overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 9px; background: #101721; }
#order-rounds-list > li, #order-review-list > li { padding: 13px; display: grid; gap: 10px; }
.round-results header, .round-results summary { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 14px; }
.round-results header span, .round-results time { color: var(--muted); font-size: .86rem; }
.round-actions { align-items: center; }
.round-actions .round-position-status[data-attention="true"] { color: var(--accent); font-weight: 650; }
.round-actions [data-round-close-status] { color: var(--accent); font-weight: 650; }
.round-results .round-positions > p { margin: 0 0 7px; }
.round-positions [data-position-leg] { display: grid; gap: 4px; }
.round-positions [data-position-quantity] { font-size: 1.17rem; font-variant-numeric: tabular-nums; }
.round-positions span { color: var(--muted); font-size: .83rem; }
.round-positions [data-position-event] { color: var(--accent); margin: 0; }
.round-results .round-ledger > summary { display: list-item; width: fit-content; cursor: pointer; color: var(--muted); font-size: .85rem; }
.round-ledger[open] > :not(summary) { margin-top: 8px; }
#confirm-round { color: inherit; font-weight: 650; overflow-wrap: anywhere; }
.round-legs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.round-legs > div, .close-estimate { padding: 10px 12px; background: #171f2b; border: 1px solid var(--line); border-radius: 7px; }
.round-legs [data-leg="long"] { color: #8dddc1; }
.round-legs [data-leg="short"] { color: #ff9aa8; }
.round-results dl { display: flex; flex-wrap: wrap; gap: 7px 18px; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.round-results dt { font-size: .8rem; }
.round-results dd { font-size: .91rem; }
.round-results p { margin: 6px 0 0; color: var(--muted); font-size: .83rem; }
.round-opening { grid-column: 1 / -1; min-width: 0; }
.round-opening dl { margin-top: 0; }
.round-opening dl > div { min-width: 0; flex: 1 1 max-content; }
.round-money > .pnl-value + .pnl-value { margin-inline-start: .6em; }
.close-estimate-value { display: inline-block; margin-inline-start: 12px; font-weight: 700; }
#closed-round-list summary { cursor: pointer; padding: 11px 13px; }
#closed-round-list summary::after { content: ""; width: 7px; height: 7px; margin: auto 0 auto auto; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
#closed-round-list details[open] summary::after { transform: rotate(225deg); }
#closed-round-list .round-legs { padding: 0 12px 12px; }
.closed-round-total { color: var(--muted); margin-inline-start: auto; }
@media (max-width: 620px) {
  .round-legs { grid-template-columns: 1fr; }
  .close-estimate-value { display: block; margin: 4px 0 0; }
  #closed-round-list summary strong { flex-basis: 100%; }
  .closed-round-total { margin-inline-start: 0; }
}
.run-log-note { font-size: .9rem; }
#run-log-filters { grid-template-columns: minmax(110px, 1fr) minmax(135px, 1.4fr) repeat(2,minmax(100px,1fr)) auto; align-items: end; margin: 14px 0; }
#run-log-status:empty { display: none; }
#run-log-status[data-error="true"] { color: #ff9aa8; }
#run-log-list { margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
#run-log-list li { border-top: 1px solid var(--line); }
#run-log-list summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 5px; cursor: pointer; }
#run-log-list summary::-webkit-details-marker { display: none; }
#run-log-list summary::after { content: ""; flex-shrink: 0; width: 7px; height: 7px; margin-right: 4px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
#run-log-list details[open] summary::after { transform: rotate(225deg); }
#run-log-list summary:hover { background: #1a2330; }
.run-log-line { flex: 1; min-width: 0; display: grid; grid-template-columns: 11em minmax(120px,.85fr) 3em 4em minmax(130px,1.2fr); align-items: center; gap: 5px 12px; overflow-wrap: anywhere; }
.run-log-line small { display: block; font-weight: 400; }
.run-log-line time, .run-log-reason, .run-log-detail p { color: var(--muted); font-size: .9rem; }
.run-log-result { width: fit-content; font-weight: 650; color: #8dddc1; }
.run-log-result[data-blocked="true"] { color: #ffad90; }
.run-log-detail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 24px; margin-bottom: 12px; border-radius: 8px; padding: 12px; background: #101721; overflow-wrap: anywhere; }
.run-log-detail p { margin: 3px 0 0; }
.run-log-refs, .run-log-market { grid-column: 1/-1; }
.run-log-detail .run-log-market { color: inherit; font-variant-numeric: tabular-nums; }
#run-log-pages { align-items: center; justify-content: flex-end; margin-top: 10px; }
#run-log-page { color: var(--muted); font-size: .9rem; }
@media (max-width: 760px) {
  #run-log-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .run-log-line { grid-template-columns: minmax(0,1fr) auto auto; }
  .run-log-line time, .run-log-reason { grid-column: 1/-1; }
  .run-log-detail { grid-template-columns: 1fr; }
}
.action-link { border: 1px solid var(--line); background: #202a39; padding: 7px 10px; border-radius: 7px; text-decoration: none; }
form, label { display: grid; gap: 7px; }
form { gap: 11px; }
fieldset { min-inline-size: 0; margin: 0; padding: 10px 12px 12px; border: 1px solid var(--line); border-radius: 8px; }
legend { padding: 0 5px; font-weight: 650; }
.form-footer { align-items: center; }
input, select, button { font: inherit; color: inherit; border: 1px solid #495364; border-radius: 7px; background: #101721; padding: 7px 10px; min-width: 0; }
button { cursor: pointer; background: #202a39; justify-self: start; }
.primary { color: #251b14; background: var(--accent); border-color: var(--accent); font-weight: 700; }
.danger { color: var(--red); border-color: #79464f; }
.danger:hover:not(:disabled) { background: #392630; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.strategy-delete-hint { margin-top: 7px; font-size: .86rem; }
#strategy-delete-summary { overflow-wrap: anywhere; }
#strategy-delete-error, #confirm-error { color: var(--red); }
#notice { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: .6rem; padding: 0 5px 0 13px; background: #202a39; border-radius: 8px; color: #e6edf7; }
#notice-text { margin: 10px 0; color: inherit; overflow-wrap: anywhere; }
#notice-dismiss { flex: none; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: inherit; font: 24px/1 system-ui, sans-serif; }
#notice-dismiss:hover { background: #ffffff12; }
#notice-dismiss:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
#enroll-qr { background: #fff; border-radius: 6px; }
#enroll-secret { overflow-wrap: anywhere; user-select: all; }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; }
th,td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; }
#arbitrage .board, .history-dialog .history-chart, .history-dialog .history-events { padding: 0; }
#arbitrage .board { margin-bottom: 0; }
#arbitrage .board td { padding-block: 11px; }
#arbitrage .history-trigger { padding: 0; }
#arbitrage .route { white-space: normal; }
#arbitrage .board-note { margin-bottom: 12px; }
#arbitrage .quote-only, #arbitrage .route-history { display: inline-block; font-size: .75rem; }
#arbitrage .asset-cell .quote-only { display: block; }
#arbitrage .route-history { padding: 3px 7px; margin-top: 4px; }
.history-strategy { margin-top: 13px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); }
.history-strategy p, .history-strategy h3 { margin: 0; overflow-wrap: anywhere; }
.history-strategy form { margin-top: 13px; }
.history-strategy fieldset { background: var(--surface); }
#strategy-baseline { margin-top: 9px; }
.history-strategy fieldset > .fields { align-items: start; }
.history-strategy .field-help, .strategy-help-list { margin: 8px 0 0; font-size: .86rem; line-height: 1.65; color: var(--muted); }
.strategy-help-list { display: grid; gap: 4px; padding-inline-start: 18px; }
.strategy-calculation { margin-top: 9px !important; color: var(--text); font-variant-numeric: tabular-nums; }
#coverage-status, #strategy-leverage-result[data-error="true"], .strategy-calculation[data-error="true"] { color: var(--accent); }
.exposure-field { display: grid; gap: 7px; color: var(--muted); }
.exposure-options { display: flex; border: 1px solid #495364; border-radius: 7px; background: #101721; padding: 2px; }
.exposure-options label { position: relative; flex: 1; display: block; text-align: center; cursor: pointer; }
.exposure-options input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.exposure-options span { display: block; padding: 5px 4px; border-radius: 4px; }
.exposure-options input:checked + span { color: #ffd4b4; background: #493426; font-weight: 700; }
.exposure-options input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.history-strategy .execution-details, #strategy-leverage .actions, #strategy-leverage-result { margin-top: 9px; }
#strategy-leverage-result { white-space: pre-line; }
#leverage-change { margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
#leverage-change h4 { margin: 0 0 6px; }
#leverage-change-message { margin: 0; }
.execution-details summary { cursor: pointer; color: var(--text); font-size: .9rem; }
.strategy-api { display: grid; gap: 8px; padding: 9px 10px; border: 1px solid #78563d; border-radius: 7px; }
.strategy-api button { padding: 4px 8px; }
#strategy-status[data-error="true"] { color: var(--red); }
#exchange-settings .key-fields { border: 0; padding: 0; }
#binance-key-help, #okx-key-help { margin: 0; font-size: .87rem; }
#keys-feedback { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #101721; }
#keys-feedback p, #keys-issues { margin: 0; }
#keys-issues { padding-inline-start: 21px; }
#keys-feedback[data-state="success"] { border-color: #356657; }
#keys-feedback[data-state="success"] strong { color: var(--green); }
#keys-feedback[data-state="error"] { border-color: #8c4c55; }
#keys-feedback[data-state="error"] strong { color: var(--red); }
#keys-feedback[data-state="unknown"] strong { color: var(--accent); }
.saved-exchanges { margin-top: 19px; padding-top: 14px; border-top: 1px solid var(--line); }
.opening-blockers { margin: 9px 0; padding: 9px 12px; border-inline-start: 3px solid var(--accent); }
.opening-blockers strong, .minimum-notional { color: var(--accent); }
.opening-blockers ul { margin: 4px 0; padding-inline-start: 20px; }
.opening-blockers li, .minimum-notional { overflow-wrap: anywhere; }
.minimum-notional { white-space: pre-line; font-size: .9rem; }
.saved-exchanges p, #saved-exchange-list { margin: 0; }
.exchange-mode-form p { margin: 8px 0; }
.exchange-mode-guidance strong, [data-mode-current][data-blocked="true"] { color: var(--accent); }
[data-mode-feedback][data-error="true"] { color: var(--red); }
.exchange-mode-change { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 12px; margin: 9px 0; }
#saved-exchange-list { padding: 0; list-style: none; display: grid; gap: 6px; }
#saved-exchange-list li { display: flex; align-items: baseline; flex-wrap: wrap; column-gap: 12px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; }
#saved-exchange-list li > span { color: var(--green); }
#saved-exchange-list time { margin-inline-start: auto; color: var(--muted); font-size: .83rem; }
#venue-risk-help { font-size: .9rem; }
#venue-risk-result[data-error="true"] { color: var(--red); }
.venue-bulk-job { display: grid; gap: 10px; margin-top: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 8px; background: #101721; }
.venue-bulk-job h4 { margin: 0; }
.venue-bulk-job p { overflow-wrap: anywhere; }
.venue-bulk-job p:empty, #venue-bulk-processed:empty { display: none; }
.venue-bulk-summary { color: inherit; font-variant-numeric: tabular-nums; }
.venue-bulk-job p + p:not(:empty) { margin-top: 4px; }
.venue-bulk-progress-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; font-size: .87rem; color: var(--muted); }
.venue-bulk-progress-wrap progress { flex: 1 1 160px; width: 100%; min-width: 0; height: 10px; accent-color: var(--accent); }
#venue-bulk-processed { white-space: nowrap; font-variant-numeric: tabular-nums; }
#venue-bulk-details summary { cursor: pointer; color: var(--muted); }
#venue-bulk-details .table-wrap { max-height: 310px; margin-top: 7px; }
#venue-bulk-details th { position: sticky; top: 0; background: #101721; }
#venue-bulk-details td:last-child { min-width: 110px; white-space: normal; overflow-wrap: anywhere; }
#venue-bulk-rows [data-status="raise"] { color: var(--accent); }
#venue-bulk-rows [data-status="applied"] { color: var(--green); }
#venue-bulk-rows [data-status="failed"], #venue-bulk-rows [data-status="unconfirmed"] { color: var(--red); }
.arbitrage-tabs { display: flex; gap: 18px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.arbitrage-tabs a { padding: 4px 1px 8px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-weight: 630; }
.arbitrage-tabs a[aria-current] { border-bottom-color: var(--accent); color: var(--accent); }
.saved-strategies-list { display: grid; gap: 8px; padding: 0; margin: 12px 0 0; list-style: none; }
.saved-strategies-list:empty { display: none; }
.saved-strategies-list li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 9px 16px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #101721; }
.saved-strategy-detail { flex: 1 1 240px; min-width: 0; overflow-wrap: anywhere; }
.saved-strategy-detail strong { font-weight: 700; }
.saved-strategy-detail p { margin: 4px 0 0; }
.saved-strategy-status { font-size: .85rem; margin-inline-start: 10px; color: var(--muted); }
.saved-strategy-status[data-running="true"] { color: var(--green); }
.saved-strategies-list button { font-size: .9rem; }
#saved-strategies-feedback { color: var(--green); }
.live-feedback { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0; color: var(--muted); }
.live-feedback progress { width: 8rem; height: 8px; accent-color: var(--accent); }
.live-feedback[data-state="success"] { color: var(--green); }
.live-feedback[data-state="error"] { color: var(--red); }
.live-feedback[data-state="unknown"] { color: var(--accent); }
#confirm :is(select, input:not([type="checkbox"])) { width: 100%; }
#confirm-single-strategy { max-height: min(42vh, 22rem); overflow-y: auto; }
#confirm-single-strategy label { display: flex; align-items: center; gap: 9px; padding: 8px 4px; overflow-wrap: anywhere; cursor: pointer; }
#confirm-single-strategy label + label { border-top: 1px solid var(--line); }
#confirm-single-strategy input { flex: none; margin: 0; padding: 0; width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
#confirm-single-count, #confirm-single-conflict { margin: 6px 0 0; font-size: .9rem; }
#confirm-single-count { color: var(--muted); }
#confirm-single-conflict { color: var(--red); }
.batch-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px 15px; flex-wrap: wrap; }
.batch-heading > div { min-width: 0; }
.batch-heading p { margin-bottom: 4px; overflow-wrap: anywhere; }
.batch-parameter-groups { display: grid; gap: 12px; min-width: 0; }
.batch-parameter-groups :is(input,select), #batch-screen-filters select { width: 100%; }
.batch-field-help { margin: 8px 0 0; font-size: .86rem; }
.batch-preview { margin-top: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #101721; }
.batch-preview p:last-child { margin-bottom: 0; }
#batch-preview-table th { white-space: normal; }
#batch-preview-table td:first-child { white-space: normal; overflow-wrap: anywhere; }
.batch-preview-filters { align-items: flex-end; margin-bottom: 9px; }
.batch-preview-filters label:first-child { flex: 1 1 180px; }
.batch-preview-filters input { width: 100%; }
.batch-preview-pages { align-items: center; justify-content: flex-end; margin-top: 9px; }
#batch-preview-rows [data-coverage-insufficient] { color: var(--red); font-weight: 650; }
#batch-strategy-feedback[data-error="true"] { color: var(--red); }
#overview-batch-scan { margin: 9px 0 0; }
@media (max-width: 540px) {
  main { padding: 15px 12px 36px; }
  .app-brand img { width: 36px; height: 36px; }
  section { padding: 13px; }
  .workspace-nav { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .workspace-nav a { padding: 7px 5px; }
}
