* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #020617;
  color: #e2e8f0;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 20px;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 18px;
  font-weight: 700;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.chip {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  white-space: nowrap;
}

.chip.ok {
  border-color: #16a34a;
  color: #4ade80;
}

.chip.warn {
  border-color: #d97706;
  color: #fbbf24;
}

.chip.neg {
  border-color: #dc2626;
  color: #f87171;
}

.price-chip {
  font-variant-numeric: tabular-nums;
}

.kill-btn {
  background: #dc2626;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.kill-btn:hover:not(:disabled) {
  background: #b91c1c;
}

.kill-btn:disabled {
  background: #334155;
  cursor: not-allowed;
}

.prices {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 20px 0;
}

main {
  padding: 16px 20px 40px;
  display: grid;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.card {
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 12px;
  padding: 16px;
}

.card h2 {
  font-size: 15px;
  margin-bottom: 12px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.chart {
  height: 320px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #1e293b;
  white-space: nowrap;
}

th {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:hover td {
  background: #16213a;
}

.empty {
  color: #475569;
  text-align: center;
  padding: 20px;
}

.pos {
  color: #4ade80;
}

.neg {
  color: #f87171;
}

.badges {
  max-width: 380px;
  white-space: normal;
}

.badge {
  display: inline-block;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 11px;
  margin: 1px 2px;
}

.badge.ok {
  border-color: #16a34a;
  color: #4ade80;
}

.badge.warn {
  border-color: #d97706;
  color: #fbbf24;
}

.strategy-info {
  font-size: 13px;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 8px 24px;
}

.strategy-grid .lbl {
  display: block;
  color: #64748b;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}

.strategy-grid .val.mono {
  font-family: Consolas, monospace;
  font-size: 12px;
  color: #94a3b8;
}

.badge.neg {
  border-color: #dc2626;
  color: #f87171;
}

.settings-btn {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
}

.settings-btn:hover {
  background: #334155;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #1e293b;
}

.modal-head h2 {
  font-size: 15px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.modal-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
}

.modal-body {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.modal-sub {
  font-size: 13px;
  color: #94a3b8;
}

.hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.hint a {
  color: #38bdf8;
}

.fld {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: #94a3b8;
}

.fld input {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 9px 12px;
  color: #e2e8f0;
  font-size: 14px;
  outline: none;
}

.fld input:focus {
  border-color: #38bdf8;
}

.notif-events {
  display: grid;
  gap: 8px;
}

.notif-events label {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
}

.notif-events input[type="checkbox"] {
  accent-color: #22c55e;
  width: 16px;
  height: 16px;
}

.modal-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid #1e293b;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: #16a34a;
  color: #fff;
}

.btn.primary:hover {
  background: #15803d;
}

.btn.ghost {
  background: #1e293b;
  color: #e2e8f0;
  border: 1px solid #334155;
}

.btn.ghost:hover {
  background: #334155;
}
