.worker-card { position: relative; padding: 16px; }
.delete-corner { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 1px solid var(--red); border-radius: 6px; background: transparent; color: var(--red); font-size: 22px; line-height: 1; }
.delete-corner:hover { background: var(--red); color: white; }
.start-button { background: var(--green); color: #202020; }

.strategy-row { position: relative; display: block; padding: 16px; border: 1px solid var(--line); background: var(--panel); }
.strategy-actions { display: flex; gap: 8px; align-items: center; }
.worker-count { font-size: 0.9em; color: var(--yellow); font-weight: bold; }
.delete-btn { background: transparent; border: none; color: var(--red); cursor: pointer; font-size: 1.2em; padding: 0; line-height: 1; }
.delete-btn:hover { opacity: 0.8; }
.strategy-row h3 { margin-right: 42px; }
.strategy-row p { margin-top: 5px; color: var(--muted); font-size: 12px; }
.strategy-patches { margin-top: 14px; }
.strategy-report { display: flex; align-items: baseline; gap: 7px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.strategy-report strong { color: var(--yellow); font-size: 20px; }
.strategy-report span { color: var(--muted); font-size: 11px; }
.card-topline { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; justify-content: space-between; flex-wrap: wrap; }
.card-topline > :first-child { display: flex; gap: 8px; align-items: center; flex: 0; }
.worker-meta-patches { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.meta-patch { display: inline-flex; align-items: baseline; border: 1px solid var(--line); border-radius: 3px; padding: 5px 7px; color: var(--text); font-size: 11px; }
.meta-patch.exchange { border-color: var(--yellow); color: var(--yellow); }
.meta-patch.symbol { border-color: var(--green); color: var(--green); }
.meta-patch.strategy { border-color: var(--muted); color: var(--text); }
.worker-symbol { display: none; }
.collector-state { margin-top: 10px; font-size: 10px; text-transform: uppercase; letter-spacing: .4px; }
.collector-state.is-running { color: var(--green); }
.collector-state.is-missing { color: var(--red); }
.worker-signal { margin-top: 5px; color: var(--muted); font-size: 10px; }
.worker-report { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.worker-report-values { display: grid; grid-template-columns: 1.4fr .7fr 1fr; gap: 8px; }
.worker-report-values span { min-width: 0; }
.worker-report-values b { display: block; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.worker-report-values strong { display: block; margin-top: 4px; overflow: hidden; color: var(--text); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.worker-report-values .balance-value { grid-column: 1 / -1; }
.last-trade { margin-top: 10px; color: var(--muted); font-size: 11px; }
.worker-report-values .positive strong { color: var(--green); }
.worker-report-values .negative strong { color: var(--red); }
.worker-report-values .neutral strong { color: var(--muted); }
.trade-bar { display: flex; height: 7px; margin-top: 13px; overflow: hidden; border-radius: 4px; background: var(--panel-soft); }
.trade-bar-buy { min-width: 0; background: var(--green); }
.trade-bar-sell { min-width: 0; background: var(--red); }
.trade-counts { display: flex; justify-content: space-between; margin-top: 5px; font-size: 10px; }
.buy-text { color: var(--green); }
.sell-text { color: var(--red); }
* { box-sizing: border-box; }
:root { color-scheme: dark; --bg: #393939; --panel: #454545; --panel-soft: #4c4c4c; --line: #777; --text: #f4f4f4; --muted: #b8b8b8; --green: #64bd79; --red: #e46c6c; --yellow: #dfb45c; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: sans-serif; }
body { padding: 16px 12px 36px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.app-shell { width: min(100%, 430px); margin: auto; }
.topbar, .section-heading, .card-topline, .worker-meta, .card-actions { display: flex; align-items: center; }
.topbar, .section-heading { justify-content: space-between; gap: 20px; }
.topbar { padding: 8px 0 22px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
h1, h2, h3, p { margin: 0; } h1 { font-size: 28px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
.connection { color: var(--muted); font-size: 12px; white-space: nowrap; } .connection i, .status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); }
.tabs { display: flex; gap: 4px; padding: 18px 0 28px; overflow-x: auto; }
.tab { border: 0; border-bottom: 2px solid transparent; padding: 8px 12px; background: transparent; color: var(--muted); } .tab.is-active { border-color: var(--text); color: var(--text); } .tab span { margin-left: 5px; color: var(--muted); }
.view { animation: appear .2s ease-out; } .section-heading { margin-bottom: 18px; }
.icon-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: var(--panel); font-size: 26px; line-height: 1; } .quiet-button, .small-button, .inline-form button, .dialog-form > button { border: 1px solid var(--line); border-radius: 5px; padding: 10px 14px; background: var(--panel); }
.worker-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.collector-list { display: grid; gap: 12px; }
.collector-card { position: relative; padding: 16px; border: 1px solid var(--line); background: var(--panel); }
.collector-card h3 { margin-top: 20px; }
.collector-patches { margin-top: 14px; }
.meta-patch.timeframe { border-color: var(--muted); color: var(--text); }
.collector-report { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.collector-price { display: flex; justify-content: space-between; align-items: baseline; }
.collector-price strong { color: var(--yellow); font-size: 22px; }
.collector-price span { font-size: 12px; font-weight: 700; }
.collector-chart { display: flex; align-items: end; gap: 3px; height: 64px; margin-top: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.collector-chart i { flex: 1; min-width: 3px; border-radius: 2px 2px 0 0; background: var(--green); opacity: .8; }
.chart-empty { color: var(--muted); font-size: 11px; }
.collector-stats { display: flex; justify-content: space-between; gap: 6px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.collector-report small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.worker-card, .metric, .strategy-row, .inline-form, .table-wrap { border: 1px solid var(--line); background: var(--panel); }
.worker-card { padding: 16px; } .card-topline { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; } .status-dot.paused { background: var(--yellow); } .status-dot.stopped { background: var(--red); } .mode { margin-left: auto; border: 1px solid var(--line); border-radius: 3px; padding: 3px 6px; } .mode.live { color: var(--red); border-color: var(--red); } .mode.paper { color: var(--yellow); border-color: var(--yellow); }
.worker-card h3 { margin-top: 20px; } .worker-symbol { margin-top: 5px; color: var(--muted); } .worker-meta { justify-content: space-between; margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; } .worker-meta strong { color: var(--text); font-size: 13px; }
.card-actions { gap: 7px; margin-top: 18px; } .small-button { flex: 1; padding: 8px; font-size: 12px; } .small-button.muted { color: var(--muted); background: transparent; }
.empty-state, .table-empty { padding: 32px 0; color: var(--muted); text-align: center; }
.inline-form { display: grid; grid-template-columns: 1fr 1.5fr auto; gap: 8px; padding: 10px; margin-bottom: 14px; }
.strategy-form { display: grid; grid-template-columns: 1fr; gap: 8px; padding: 10px; margin-bottom: 14px; border: 1px solid var(--line); background: var(--panel); } .strategy-form label { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; } .strategy-form input, .strategy-form select { width: 100%; min-height: 36px; border: 1px solid var(--line); border-radius: 4px; padding: 8px; background: var(--panel-soft); } .strategy-form button { background: var(--text); color: #292929; font-weight: 700; } input, select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; background: var(--panel-soft); } .inline-form button, .dialog-form > button { background: var(--text); color: #292929; font-weight: 700; }
.strategy-list { display: grid; gap: 8px; } .strategy-row { justify-content: space-between; gap: 20px; padding: 15px; } .strategy-row p { margin-top: 5px; color: var(--muted); } .strategy-row > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; } .metric { padding: 14px; } .metric span { display: block; color: var(--muted); font-size: 12px; } .metric strong { display: block; margin-top: 8px; font-size: 18px; }
.report-balances { display: grid; gap: 8px; margin-bottom: 16px; }
.report-balance { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; padding: 12px; border: 1px solid var(--line); background: var(--panel); }
.report-balance span { color: var(--muted); font-size: 12px; }
.report-balance strong { color: var(--text); font-size: 16px; }
.report-balance small { grid-column: 1 / -1; color: var(--muted); font-size: 10px; }
.table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: 13px; text-align: left; } th, td { padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; } th { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; } tr:last-child td { border-bottom: 0; } .positive { color: var(--green); } .negative { color: var(--red); }
dialog { width: min(100% - 28px, 520px); padding: 0; border: 1px solid var(--line); background: var(--bg); color: var(--text); } dialog::backdrop { background: rgba(0,0,0,.62); } .dialog-form { padding: 20px; } .dialog-form label { display: block; margin-top: 14px; color: var(--muted); font-size: 12px; } .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } fieldset { display: flex; gap: 16px; margin: 18px 0; padding: 12px; border: 1px solid var(--line); } legend { padding: 0 5px; color: var(--muted); font-size: 12px; } .choice { margin: 0 !important; } .choice input { width: auto; min-height: 0; margin-right: 6px; } .close-button { border: 0; background: transparent; color: var(--muted); font-size: 26px; } .form-error { min-height: 18px; color: var(--red); font-size: 12px; }
.toast { position: fixed; right: 18px; bottom: 18px; max-width: 320px; padding: 12px 15px; border: 1px solid var(--line); background: var(--panel); opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; } .toast.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 980px) {
	.table-wrap { width: 100%; max-width: 100%; overflow: hidden; border: 0; background: transparent; }
	table { display: block; width: 100%; min-width: 0; }
	thead { display: none; }
	tbody { display: grid; gap: 8px; }
	tr { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); width: 100%; min-width: 0; border: 1px solid var(--line); background: var(--panel); }
	td { display: flex; min-width: 0; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: normal; overflow-wrap: anywhere; text-align: right; }
	td::before { color: var(--muted); content: attr(data-label); font-size: 10px; text-align: left; text-transform: uppercase; }
	tr:last-child td { border-bottom: 1px solid var(--line); }
	tr td:last-child { border-bottom: 0; }
	.table-empty { display: block; grid-column: 1 / -1; padding: 24px; text-align: center; }
}
@keyframes appear { from { opacity: .2; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.connection { display: none; }
.topbar { align-items: flex-start; }
.inline-form { grid-template-columns: 1fr; }
.inline-form button { grid-column: 1 / -1; }
.form-row { grid-template-columns: 1fr; }
fieldset { flex-direction: column; gap: 8px; }
