:root { color-scheme: dark; font-family: Inter, system-ui, "Segoe UI", sans-serif; }
* { box-sizing: border-box; letter-spacing: 0; }
[hidden] { display: none !important; }
html, body { min-width: 320px; min-height: 100%; margin: 0; color: #eef2ef; background: #101311; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #101311; }
.login-form { width: min(390px, 100%); padding: 32px; border: 1px solid #384039; border-top: 3px solid #ccff00; border-radius: 6px; background: #171b18; box-shadow: 0 24px 70px #0008; }
.brand-mark { color: #ccff00; font: 700 12px/1 ui-monospace, Consolas, monospace; }
.login-form h1 { margin: 14px 0 8px; font-size: 24px; }
.login-form p { margin: 0 0 24px; color: #8e9991; font-size: 13px; }
.login-form button { width: 100%; height: 42px; border-radius: 5px; }
.login-status { min-height: 20px; margin-top: 12px; color: #ef9696; font-size: 12px; }
.operator { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; min-height: 62px; padding: 10px max(18px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid #303631; background: #161a17ee; backdrop-filter: blur(12px); }
.topbar > div:first-child { display: grid; gap: 3px; }
.topbar strong { color: #ccff00; font: 700 14px/1.2 ui-monospace, Consolas, monospace; }
#backendState { color: #89958c; font-size: 10px; }
#backendState[data-state="ok"] { color: #76dca4; }
#backendState[data-state="warning"] { color: #e4bd63; }
#backendState[data-state="error"] { color: #ef8585; }
.top-actions { display: flex; align-items: center; gap: 10px; color: #98a29b; font-size: 11px; }
.top-actions button { height: 32px; padding: 0 12px; border: 1px solid #414943; border-radius: 4px; color: #d2d9d4; background: #202521; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; max-width: 1180px; height: 48px; margin: 0 auto; padding: 6px 0; border-bottom: 1px solid #2b312c; }
.tabs button { border: 0; border-radius: 4px; color: #89948e; background: transparent; font-weight: 600; }
.tabs button[data-active="true"] { color: #edf1ee; background: #232824; }
.running-count { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 4px; border-radius: 10px; color: #10140b; background: #ccff00; font-size: 10px; }
.view { max-width: 1180px; margin: 0 auto; }
.launch-view { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 28px; padding: 26px 0 48px; }
.form-band { min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 14px; padding-bottom: 10px; border-bottom: 1px solid #303631; }
.section-head.minor { margin-top: 18px; }
.section-head strong { font-size: 14px; }
.section-head span { color: #7f8b83; font-size: 10px; }
label { display: grid; gap: 6px; min-width: 0; margin-bottom: 12px; color: #adb7b0; font-size: 12px; }
.grid { display: grid; gap: 10px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid label { margin-bottom: 0; }
input:not([type="radio"]):not([type="checkbox"]), textarea, select { width: 100%; min-width: 0; border: 1px solid #3a423c; border-radius: 5px; outline: 0; color: #f3f6f4; background: #1a1f1b; }
input:not([type="radio"]):not([type="checkbox"]), select { height: 39px; padding: 0 10px; }
textarea { min-height: 74px; padding: 9px 10px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #a8ce14; }
input[type="radio"], input[type="checkbox"] { accent-color: #ccff00; }
.image-picker { display: flex; align-items: center; gap: 12px; min-height: 90px; margin: 12px 0; padding: 12px; border: 1px dashed #4b574e; border-radius: 6px; cursor: pointer; }
.image-picker:hover, .image-picker.dragging { border-color: #ccff00; background: #192019; }
.image-picker img { display: none; width: 64px; height: 64px; flex: 0 0 auto; border-radius: 5px; object-fit: cover; }
.image-picker.has-image img { display: block; }
.image-picker div { display: grid; min-width: 0; gap: 4px; }
.image-picker strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-picker span, .quote-address, .wallet-address, .custom-quote > span { overflow-wrap: anywhere; color: #78847c; font-size: 10px; }
.quote-address, .wallet-address { min-height: 14px; font-family: ui-monospace, Consolas, monospace; }
.swap-hint { display: block; margin: 0 0 12px; color: #8f9a92; font-size: 10px; }
.allocation-total[data-valid="false"] { color: #ef8585; }
.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0 12px; }
.mode label { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; padding: 0 10px; border: 1px solid #353d37; border-radius: 5px; color: #c8cfca; }
.watch-options { display: grid; grid-template-columns: 1fr 125px; align-items: end; gap: 10px; margin: 12px 0; padding: 10px; border: 1px solid #44502f; border-radius: 5px; background: #171d15; }
.watch-options label { margin: 0; }
.simulation-options { display: grid; grid-template-columns: 1fr 125px; align-items: end; gap: 10px; margin: 12px 0; padding: 10px; border: 1px solid #665c2c; border-radius: 5px; background: #211f14; }
.simulation-options label { margin: 0; }
.confirm { display: flex; align-items: flex-start; gap: 8px; color: #cbd2cd; line-height: 1.4; }
.confirm input { margin-top: 2px; }
.salt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; padding: 10px; border: 1px solid #353d37; border-radius: 5px; background: #171b18; }
.salt-row > div { display: grid; gap: 2px; }
.salt-row span { color: #7f8b83; font-size: 10px; }
.salt-row button { height: 33px; padding: 0 12px; border: 1px solid #667a1d; border-radius: 5px; color: #ccff00; background: #202714; }
.mainnet-confirm { margin: 14px 0; }
.actions { display: grid; grid-template-columns: 1fr 150px; gap: 9px; }
.actions button { height: 42px; border-radius: 5px; font-weight: 700; }
.primary { border: 1px solid #ccff00; color: #10140b; background: #ccff00; }
.stop { border: 1px solid #704343; color: #f2b0b0; background: #281b1b; }
button:disabled { cursor: not-allowed; opacity: .45; }
.status { min-height: 34px; margin-top: 10px; padding: 9px; border-left: 2px solid #58625d; color: #aab4ad; background: #191e1a; font-size: 11px; }
.status[data-tone="ok"] { border-color: #62d798; color: #7be0a8; }
.status[data-tone="error"] { border-color: #e06e6e; color: #ef9999; }
.log { display: none; max-height: 210px; overflow: auto; margin: 9px 0 0; padding: 9px; border: 1px solid #2d342f; border-radius: 5px; color: #aeb8b1; background: #0a0d0b; white-space: pre-wrap; overflow-wrap: anywhere; font: 10px/1.5 ui-monospace, Consolas, monospace; }
.log:not(:empty) { display: block; }
.task-console { padding: 24px 0 48px; }
.console-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #303631; }
.console-head > div { display: grid; gap: 3px; }
.console-head span { color: #78847c; font-size: 10px; }
.console-head button, .job-controls button { height: 32px; padding: 0 10px; border: 1px solid #465049; border-radius: 4px; color: #cdd5cf; background: #202621; font-size: 10px; }
.console-layout { display: grid; grid-template-columns: 390px 1fr; gap: 20px; margin-top: 14px; }
.job-list { display: grid; align-content: start; gap: 7px; }
.empty-jobs { padding: 40px 12px; color: #78847c; text-align: center; font-size: 11px; }
.job-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; width: 100%; min-height: 58px; padding: 9px 10px; border: 1px solid #343c36; border-radius: 5px; color: #dbe1dc; background: #171b18; text-align: left; }
.job-row[data-selected="true"] { border-color: #788c25; background: #1b2218; }
.job-row > span:first-child { display: grid; min-width: 0; gap: 3px; }
.job-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.job-row small { color: #737f77; font: 9px/1.3 ui-monospace, Consolas, monospace; }
.job-state { min-width: 60px; padding: 5px 7px; border-radius: 3px; color: #9ea8a1; background: #252c27; text-align: center; font-size: 9px; }
.job-state[data-state="waiting"] { color: #e8cf79; background: #302b18; }
.job-state[data-state="sending"] { color: #8cd7f0; background: #172932; }
.job-state[data-state="paused"] { color: #d5b5f1; background: #2a1d35; }
.job-state[data-state="succeeded"] { color: #80dda9; background: #173023; }
.job-state[data-state="failed"], .job-state[data-state="cancelled"] { color: #efa0a0; background: #301c1c; }
.job-detail { min-width: 0; }
.detail-head { display: grid; gap: 10px; }
.detail-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timing-summary { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.timing-summary span { padding: 6px 8px; border: 1px solid #47614f; border-radius: 4px; color: #8ee0b1; background: #17291f; font: 10px/1 ui-monospace, Consolas, monospace; }
.job-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.job-controls .pause-selected { border-color: #746528; color: #ead582; background: #2b2718; }
.job-controls .resume-selected { border-color: #416f55; color: #8ee0b1; background: #17291f; }
.job-controls .abandon-selected { border-color: #704343; color: #f2b0b0; background: #281b1b; }
.detail-log { min-height: 360px; max-height: calc(100vh - 260px); overflow: auto; margin: 10px 0 0; padding: 12px; border: 1px solid #2d342f; border-radius: 5px; color: #aeb8b1; background: #0a0d0b; white-space: pre-wrap; overflow-wrap: anywhere; font: 11px/1.55 ui-monospace, Consolas, monospace; }
@media (max-width: 900px) {
  .topbar, .tabs, .view { padding-left: 14px; padding-right: 14px; }
  .launch-view, .console-layout { grid-template-columns: 1fr; }
  .detail-log { min-height: 260px; }
}
@media (max-width: 560px) {
  .topbar { align-items: flex-start; }
  .top-actions { flex-direction: column; align-items: flex-end; gap: 5px; }
  .grid.two, .grid.four, .mode, .watch-options, .simulation-options { grid-template-columns: 1fr; }
  .actions { grid-template-columns: 1fr; }
  .launch-view { gap: 34px; }
  .login-form { padding: 24px 20px; }
}
