/* Trang trade thật (/live) — cùng tông màu dashboard.css */
.live-wrap { flex: 1; min-height: 0; overflow: auto; padding: 12px 16px 40px; display: flex; flex-direction: column; gap: 12px; }
.lv-muted { color: #787b86; font-size: 12px; }
.lv-label { font-weight: 700; color: #d1d4dc; }
.lv-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; background: #1e222d; border: 1px solid #2a2e39; border-radius: 6px; padding: 10px 12px; }
.lv-switch-box, .lv-top-right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lv-switch { min-width: 120px; padding: 8px 14px; border-radius: 20px; border: 1px solid #363a45; font-weight: 700; cursor: pointer; background: #2a2e39; color: #d1d4dc; }
.lv-switch.on { background: #1b5e20; border-color: #26a69a; color: #fff; }
.lv-switch.off { background: #2a2e39; color: #b2b5be; }
.lv-pill { padding: 4px 10px; background: #2a2e39; border-radius: 12px; font-size: 12px; }
.lv-btn { display: inline-block; padding: 6px 12px; border: 1px solid #363a45; border-radius: 4px; background: #2a2e39; color: #d1d4dc; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.lv-btn:hover { border-color: #787b86; }
.lv-btn.lv-primary { background: #2962ff; border-color: #2962ff; color: #fff; }
.lv-btn.lv-danger { background: #b71c1c; border-color: #ef5350; color: #fff; }
.lv-btn.lv-small { padding: 3px 8px; font-size: 12px; }
.lv-btn:disabled { opacity: .5; cursor: default; }
.lv-error-bar { background: #4a1c1c; border: 1px solid #ef5350; color: #ffcdd2; padding: 8px 12px; border-radius: 4px; font-size: 13px; }
.lv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }

.lv-card { overflow-wrap: anywhere; background: #1e222d; border: 1px solid #2a2e39; border-radius: 6px; padding: 10px 12px; font-size: 13px; }
.lv-card h4 { margin: 0 0 6px; font-size: 14px; }
.lv-card .big { font-size: 20px; font-weight: 700; }
.lv-panel { background: #1e222d; border: 1px solid #2a2e39; border-radius: 6px; padding: 10px 12px; }
.lv-panel h3 { margin: 4px 0 10px; font-size: 15px; }
.lv-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lv-table-wrap { overflow-x: auto; }
.lv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lv-table th, .lv-table td { padding: 6px 8px; border-bottom: 1px solid #2a2e39; text-align: left; vertical-align: top; }
.lv-table th { color: #787b86; font-weight: 600; white-space: nowrap; }
.lv-table td .lv-btn { margin: 0 4px 4px 0; }
.pos { color: #26a69a; } .neg { color: #ef5350; }
.st-running { color: #26a69a; font-weight: 700; } .st-paused { color: #ffb74d; font-weight: 700; } .st-stopped { color: #787b86; font-weight: 700; }
.lv-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.lv-tab { padding: 8px 12px; border: 1px solid #2a2e39; border-radius: 4px 4px 0 0; background: #1e222d; color: #787b86; font-weight: 600; cursor: pointer; }
.lv-tab.active { color: #2962ff; border-bottom-color: #2962ff; }
.lv-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 14px; align-items: end; }
.lv-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #787b86; font-weight: 600; }
.lv-form input, .lv-form select, .live-login input { padding: 7px 8px; background: #2a2e39; border: 1px solid #363a45; color: #d1d4dc; border-radius: 4px; font-size: 13px; }
.lv-form .lv-inline, .lv-inline { flex-direction: row; align-items: center; gap: 6px; font-weight: 500; color: #d1d4dc; }
.lv-checks { grid-column: 1 / -1; border: 1px solid #2a2e39; border-radius: 4px; display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 10px; }
.lv-checks legend { color: #787b86; font-size: 12px; }
.lv-checks > div { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.lv-form-actions { display: flex; gap: 8px; }
.lv-form > p { grid-column: 1 / -1; margin: 0; }
.lv-events { list-style: none; margin: 0; padding: 0; font-size: 12px; max-height: 480px; overflow: auto; }
.lv-events li { padding: 5px 0; border-bottom: 1px solid #2a2e39; white-space: pre-wrap; }
.lv-events .k-error { color: #ef9a9a; } .lv-events .k-open { color: #80cbc4; } .lv-events .k-close { color: #90caf9; } .lv-events .k-signal { color: #ffe082; }
.live-login { align-items: center; justify-content: flex-start; padding-top: 60px; }
.live-login .lv-card { width: min(420px, 100%); padding: 18px; }
.live-login form { display: flex; flex-direction: column; gap: 10px; }
.live-login pre { background: #2a2e39; padding: 8px; border-radius: 4px; overflow-x: auto; }
.lv-warn { color: #ffb74d; } .lv-error { color: #ef5350; }
.lv-toast { position: fixed; right: 16px; bottom: 16px; max-width: min(420px, calc(100vw - 32px)); background: #2a2e39; border: 1px solid #363a45; border-radius: 6px; padding: 10px 14px; font-size: 13px; z-index: 50; }
.lv-toast.err { border-color: #ef5350; color: #ffcdd2; }
@media (max-width: 640px) {
  .live-wrap { padding: 8px 8px 40px; }
  .top-nav { overflow-x: auto; }
  .lv-table { font-size: 12px; }
  #botsTable thead { display: none; }
  #botsTable tr { display: block; border-bottom: 1px solid #363a45; padding: 6px 0; }
  #botsTable td { display: flex; justify-content: space-between; gap: 12px; border: none; padding: 3px 4px; text-align: right; }
  #botsTable td::before { content: attr(data-label); color: #787b86; font-weight: 600; text-align: left; flex-shrink: 0; }
  #botsTable td:last-child > div { text-align: left; }
}
