/* ── EV Page Styles ─────────────────────────────────────── */
#page-ev { font-family: 'IBM Plex Mono', monospace; background: #0a0d14; min-height: 100vh; color: #e2e8f0; }

/* topbar */
.ev-topbar { background: #10141f; border-bottom: 1px solid #1e2535; padding: 8px 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; position: sticky; top: 0; z-index: 50; }
.ev-logo { color: #a78bfa; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.ev-pill { background: #1a1f2e; border: 1px solid #2a3148; border-radius: 20px; padding: 4px 12px; font-size: 11px; color: #64748b; cursor: pointer; white-space: nowrap; }
.ev-pill.on { background: #1e1b4b; border-color: #7c3aed; color: #c4b5fd; }
.ev-pill.live-pill.on { background: #14532d; border-color: #16a34a; color: #86efac; }
.ev-count { background: #312e81; color: #a5b4fc; border-radius: 10px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.ev-spacer { flex: 1; }
.ev-icon-btn { background: #1a1f2e; border: 1px solid #2a3148; border-radius: 6px; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: #64748b; cursor: pointer; font-size: 14px; }
.ev-icon-btn:hover { border-color: #7c3aed; color: #a78bfa; }
.ev-filter-btn { background: #1a1f2e; border: 1px solid #2a3148; border-radius: 6px; padding: 5px 12px; font-size: 12px; color: #94a3b8; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.ev-filter-btn:hover { border-color: #7c3aed; color: #c4b5fd; }
.ev-filter-active { border-color: #7c3aed !important; color: #c4b5fd !important; }

/* nav tabs */
.ev-nav { display: flex; background: #0d1018; border-bottom: 1px solid #1e2535; padding: 0 14px; }
.ev-nav-tab { padding: 10px 16px; font-size: 12px; color: #475569; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.ev-nav-tab:hover { color: #94a3b8; }
.ev-nav-tab.on { color: #a78bfa; border-bottom-color: #7c3aed; }

/* col headers */
.ev-thead { display: grid; grid-template-columns: 90px 200px 160px 1fr 90px 110px 85px 30px; background: #0d1018; border-bottom: 1px solid #1a2030; padding: 7px 14px; font-size: 10px; color: #475569; text-transform: uppercase; letter-spacing: .05em; align-items: center; }

/* rows */
.ev-row { border-bottom: 1px solid #131825; position: relative; }
.ev-row-main { display: grid; grid-template-columns: 90px 200px 160px 1fr 90px 110px 85px 30px; padding: 11px 14px; align-items: center; cursor: pointer; }
.ev-row-main:hover { background: #0f1420; }
.ev-row-main:hover .ev-hover-btns { opacity: 1; }
.ev-row.expanded .ev-row-main { background: #0c1019; }

/* hover buttons */
.ev-left-col { position: relative; display: flex; flex-direction: column; gap: 5px; min-height: 52px; }
.ev-hover-btns { position: absolute; top: 0; left: 0; display: flex; flex-direction: column; gap: 3px; opacity: 0; transition: opacity .12s; z-index: 2; }
.ev-calc-btn { background: #1a1f2e; border: 1px solid #2a3148; border-radius: 5px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 12px; cursor: pointer; }
.ev-log-btn { background: #1d4ed8; border: none; border-radius: 5px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; color: #bfdbfe; font-size: 17px; cursor: pointer; font-weight: 700; line-height: 1; }
.ev-badge { display: inline-block; border-radius: 5px; padding: 4px 8px; font-weight: 700; font-size: 13px; margin-top: 2px; }
.ev-badge.pos { background: #14532d; color: #4ade80; }
.ev-badge.neg { background: #450a0a; color: #f87171; }
.ev-badge.mid { background: #1e1b4b; color: #a5b4fc; }

/* event col */
.ev-event { display: flex; flex-direction: column; gap: 2px; }
.ev-event-time { font-size: 10px; color: #475569; }
.ev-event-teams { font-size: 12px; color: #e2e8f0; font-weight: 600; }
.ev-event-sub { font-size: 10px; color: #475569; }
.ev-live-dot { width: 6px; height: 6px; background: #22c55e; border-radius: 50%; display: inline-block; margin-right: 4px; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }
.ev-market-col { color: #818cf8; font-size: 12px; }

/* books summary */
.ev-books-col { display: flex; flex-direction: column; gap: 4px; }
.ev-book-row { display: flex; align-items: center; gap: 8px; }
.ev-book-label { font-size: 11px; color: #cbd5e1; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 180px; }
.ev-best-odds { background: #14532d; color: #4ade80; border-radius: 4px; padding: 2px 8px; font-weight: 700; font-size: 12px; }
.ev-best-odds.neg-odds { background: #1e1b4b; color: #a5b4fc; }
.ev-bet-btn { background: #166534; color: #86efac; border: none; border-radius: 4px; padding: 2px 8px; font-size: 10px; cursor: pointer; }
.ev-opp-odds { color: #475569; font-size: 11px; }

/* prob / novig / betsize */
.ev-prob-col { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: #94a3b8; }
.ev-novig-col { display: flex; flex-direction: column; gap: 4px; }
.ev-novig-pos { font-size: 11px; color: #4ade80; }
.ev-novig-neg { font-size: 11px; color: #64748b; }
.ev-size-btn { background: #7c3aed; color: #ede9fe; border-radius: 5px; padding: 5px 10px; font-weight: 700; font-size: 12px; border: none; cursor: pointer; white-space: nowrap; }
.ev-more-btn { background: none; border: none; color: #475569; cursor: pointer; font-size: 16px; }

/* expanded body */
.ev-exp-body { background: #0c1019; border-bottom: 1px solid #131825; padding: 0 14px 14px; overflow-x: auto; }
.ev-tabs { display: flex; border-bottom: 1px solid #1e2535; margin-bottom: 12px; }
.ev-tab { padding: 8px 16px; font-size: 11px; color: #64748b; cursor: pointer; border-bottom: 2px solid transparent; }
.ev-tab.on { color: #a78bfa; border-bottom-color: #7c3aed; }
.ev-action-row { display: flex; gap: 14px; margin-top: 10px; }
.ev-act-link { font-size: 11px; color: #818cf8; cursor: pointer; }

/* odds table */
.ev-odds-tbl { min-width: 700px; border-collapse: collapse; width: 100%; }
.ev-odds-tbl th { font-size: 10px; color: #475569; text-align: center; padding: 4px; border-bottom: 1px solid #1e2535; white-space: nowrap; }
.ev-odds-tbl th.lbl { text-align: left; min-width: 150px; }
.ev-odds-tbl td { text-align: center; padding: 5px 3px; border-bottom: 1px solid #131825; vertical-align: middle; }
.ev-odds-tbl td.lbl { text-align: left; font-size: 11px; color: #94a3b8; white-space: nowrap; }
.ev-bk-logo { width: 24px; height: 24px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 700; color: #fff; margin: 0 auto 1px; }
.ev-oc { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.ev-oc-odds { font-size: 11px; font-weight: 600; color: #64748b; padding: 2px 5px; border-radius: 3px; }
.ev-oc-odds.best { background: #14532d; color: #4ade80; }
.ev-oc-odds.model { background: #1e1b4b; color: #a5b4fc; }
.ev-oc-bet { background: #1a2535; border: none; border-radius: 3px; padding: 2px 5px; font-size: 9px; color: #475569; cursor: pointer; }
.ev-oc-bet:hover { background: #1e3a5f; color: #93c5fd; }

/* line history chart */
.ev-chart-wrap { position: relative; height: 200px; margin-top: 4px; }
.ev-lh-pills { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ev-lh-pill { display: flex; align-items: center; gap: 4px; background: #1a1f2e; border: 1px solid #2a3148; border-radius: 20px; padding: 3px 10px; font-size: 10px; color: #94a3b8; cursor: pointer; }
.ev-lh-pill.off { opacity: .35; }
.ev-lh-dot { width: 7px; height: 7px; border-radius: 50%; }

/* model pill */
.ev-model-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; font-size: 10px; }
.ev-model-pill { background: #1a1f2e; border: 1px solid #2a3148; border-radius: 4px; padding: 3px 8px; color: #64748b; }
.ev-model-pill.highlight { background: #1e1b4b; border-color: #4338ca; color: #a5b4fc; }

/* log modal */
.ev-modal-bg { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.65); z-index: 999; align-items: center; justify-content: center; }
.ev-modal-bg.show { display: flex; }
.ev-modal { background: #10141f; border: 1px solid #2a3148; border-radius: 10px; padding: 20px; width: 460px; max-width: 95vw; position: relative; }
.ev-modal-title { font-size: 14px; font-weight: 700; color: #e2e8f0; margin-bottom: 16px; }
.ev-modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; color: #64748b; font-size: 18px; cursor: pointer; }
.ev-modal-fields { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ev-mf { display: flex; flex-direction: column; gap: 4px; }
.ev-mf label { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.ev-mf input, .ev-mf select { background: #0a0d14; border: 1px solid #2a3148; border-radius: 5px; padding: 7px 10px; color: #e2e8f0; font-size: 12px; outline: none; font-family: 'IBM Plex Mono', monospace; }
.ev-mf input:focus, .ev-mf select:focus { border-color: #7c3aed; }
.ev-mf.wide { flex: 1; min-width: 160px; }
.ev-modal-checks { display: flex; gap: 16px; margin-bottom: 16px; }
.ev-modal-checks label { display: flex; align-items: center; gap: 6px; font-size: 11px; color: #94a3b8; cursor: pointer; }
.ev-modal-footer { display: flex; align-items: center; justify-content: space-between; }
.ev-track-btn { background: #2563eb; color: #fff; border: none; border-radius: 6px; padding: 9px 18px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: 'IBM Plex Mono', monospace; }
.ev-track-btn:hover { background: #1d4ed8; }
.ev-add-tags-btn { background: none; border: none; color: #818cf8; font-size: 11px; cursor: pointer; }

/* filter drawer */
.ev-drawer-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 200; }
.ev-drawer-overlay.show { display: flex; }
.ev-drawer { display: flex; width: 680px; max-width: 96vw; background: #0d1018; border-right: 1px solid #1e2535; height: 100vh; overflow: hidden; flex-direction: column; }
.ev-drawer-body { display: flex; flex: 1; overflow: hidden; }
.ev-drawer-backdrop { flex: 1; background: rgba(0,0,0,.45); }

/* drawer sidebar */
.ev-dsb { width: 195px; border-right: 1px solid #1e2535; display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0; }
.ev-dsb-header { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 8px; border-bottom: 1px solid #1e2535; }
.ev-dsb-title { font-size: 12px; font-weight: 700; color: #e2e8f0; }
.ev-dsb-rec { display: flex; align-items: center; gap: 7px; padding: 8px 14px; font-size: 11px; color: #64748b; }
.ev-tog { width: 32px; height: 17px; background: #1a1f2e; border-radius: 9px; position: relative; cursor: pointer; border: 1px solid #2a3148; flex-shrink: 0; }
.ev-tog.on { background: #312e81; border-color: #7c3aed; }
.ev-tog::after { content: ''; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #475569; transition: left .12s; }
.ev-tog.on::after { background: #a78bfa; left: 17px; }
.ev-saved-section { margin: 8px 10px 4px; }
.ev-saved-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.ev-saved-label { font-size: 10px; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.ev-save-new { background: #1d4ed8; border: none; border-radius: 4px; padding: 2px 9px; font-size: 10px; color: #bfdbfe; cursor: pointer; }
.ev-saved-list { display: flex; flex-direction: column; gap: 3px; margin-bottom: 4px; }
.ev-saved-item { background: #131825; border: 1px solid #1e2535; border-radius: 5px; padding: 6px 9px; display: flex; align-items: center; gap: 5px; cursor: pointer; }
.ev-saved-item:hover { border-color: #3b82f6; }
.ev-saved-item.active { background: #172040; border-color: #3b82f6; }
.ev-saved-name { font-size: 11px; color: #cbd5e1; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-saved-del { background: none; border: none; color: #2e3650; cursor: pointer; font-size: 12px; }
.ev-saved-del:hover { color: #f87171; }
.ev-dsb-divider { border: none; border-top: 1px solid #1e2535; margin: 4px 0; }
.ev-dsb-fc { display: flex; justify-content: space-between; padding: 3px 14px; font-size: 10px; color: #475569; }
.ev-dsb-reset { background: none; border: none; color: #818cf8; font-size: 10px; cursor: pointer; }
.ev-dsb-item { padding: 8px 14px; font-size: 11px; color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: space-between; border-left: 2px solid transparent; }
.ev-dsb-item:hover { background: #0f1420; color: #e2e8f0; }
.ev-dsb-item.on { background: #101830; color: #93c5fd; border-left-color: #3b82f6; }
.ev-dsb-badge { background: #1e1b4b; color: #a5b4fc; border-radius: 8px; padding: 1px 6px; font-size: 9px; }
.ev-dsb-settings { margin-top: auto; border-top: 1px solid #1e2535; padding: 8px 14px; }

/* drawer right panel */
.ev-dpanel { flex: 1; padding: 14px 16px; overflow-y: auto; }
.ev-dcard { background: #131825; border: 1px solid #1e2535; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.ev-dcard-title { font-size: 13px; font-weight: 700; color: #e2e8f0; margin-bottom: 4px; }
.ev-dcard-sub { font-size: 11px; color: #475569; margin-bottom: 12px; }
.ev-dradio-group { display: flex; flex-direction: column; gap: 9px; }
.ev-dradio { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #64748b; cursor: pointer; }
.ev-dradio input { accent-color: #7c3aed; width: 14px; height: 14px; }
.ev-dradio.on { color: #e2e8f0; }
.ev-dsel { background: #0a0d14; border: 1px solid #2a3148; border-radius: 5px; padding: 6px 10px; color: #e2e8f0; font-size: 11px; width: 200px; outline: none; margin-top: 5px; }
.ev-dfield { background: #131825; border: 1px solid #1e2535; border-radius: 7px; padding: 11px 13px; margin-bottom: 8px; }
.ev-dfield label { font-size: 10px; color: #475569; display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .04em; }
.ev-dfield input { background: transparent; border: none; outline: none; font-size: 14px; color: #e2e8f0; width: 100%; font-family: 'IBM Plex Mono', monospace; }
.ev-drawer-footer { border-top: 1px solid #1e2535; padding: 10px 14px; display: flex; gap: 8px; justify-content: flex-end; background: #0d1018; }
.ev-dfooter-save { background: #1a1f2e; border: 1px solid #2a3148; border-radius: 6px; padding: 7px 14px; font-size: 11px; color: #94a3b8; cursor: pointer; }
.ev-dfooter-show { background: #2563eb; border: none; border-radius: 6px; padding: 7px 18px; font-size: 11px; color: #fff; font-weight: 700; cursor: pointer; }

/* save preset modal */
.ev-preset-modal { background: #10141f; border: 1px solid #2a3148; border-radius: 10px; padding: 20px; width: 360px; max-width: 95vw; }
.ev-preset-modal-title { font-size: 13px; font-weight: 700; color: #e2e8f0; margin-bottom: 14px; }

/* bet tracker & sweat station */
.ev-tracker-wrap { padding: 14px; max-width: 960px; margin: 0 auto; }
.ev-stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 16px; }
.ev-stat-card { background: #10141f; border: 1px solid #1e2535; border-radius: 8px; padding: 12px; }
.ev-stat-label { font-size: 10px; color: #475569; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 5px; }
.ev-stat-val { font-size: 20px; font-weight: 700; color: #e2e8f0; }
.ev-stat-val.green { color: #4ade80; }
.ev-stat-val.red { color: #f87171; }
.ev-stat-val.purple { color: #a78bfa; }

.ev-bet-card { background: #10141f; border: 1px solid #1e2535; border-radius: 8px; padding: 12px 14px; margin-bottom: 8px; }
.ev-bet-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.ev-bet-name { font-size: 13px; color: #e2e8f0; font-weight: 600; flex: 1; }
.ev-status-badge { border-radius: 4px; padding: 2px 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.ev-status-badge.open   { background: #1e2436; color: #94a3b8; }
.ev-status-badge.live   { background: #14532d; color: #4ade80; }
.ev-status-badge.won    { background: #14532d; color: #4ade80; }
.ev-status-badge.lost   { background: #450a0a; color: #f87171; }
.ev-status-badge.void   { background: #1e2436; color: #64748b; }
.ev-profit-val { font-size: 13px; font-weight: 700; }
.ev-profit-val.pos { color: #4ade80; }
.ev-profit-val.neg { color: #f87171; }
.ev-bet-meta { font-size: 10px; color: #475569; display: flex; gap: 10px; flex-wrap: wrap; }
.ev-bet-actions { display: flex; gap: 5px; margin-top: 8px; }
.ev-bet-action-btn { background: #1a1f2e; border: 1px solid #2a3148; border-radius: 4px; padding: 3px 10px; font-size: 10px; color: #64748b; cursor: pointer; }
.ev-bet-action-btn:hover { border-color: #7c3aed; color: #a78bfa; }
.ev-bet-action-btn.won { background: #14532d; border-color: #16a34a; color: #86efac; }
.ev-bet-action-btn.lost { background: #450a0a; border-color: #dc2626; color: #fca5a5; }

/* progress bar for sweat station */
.ev-progress-wrap { margin-top: 8px; }
.ev-progress-label { display: flex; justify-content: space-between; font-size: 10px; color: #475569; margin-bottom: 3px; }
.ev-progress-bar { height: 6px; background: #1a1f2e; border-radius: 3px; overflow: hidden; }
.ev-progress-fill { height: 100%; border-radius: 3px; transition: width .3s; }
.ev-progress-fill.green { background: #22c55e; }
.ev-progress-fill.red { background: #ef4444; }

/* empty state */
.ev-empty { text-align: center; padding: 50px 20px; color: #2e3650; }
.ev-empty-icon { font-size: 40px; margin-bottom: 12px; }
.ev-empty-text { font-size: 13px; }

/* loading */
.ev-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: #475569; font-size: 12px; }
.ev-spinner { width: 18px; height: 18px; border: 2px solid #2a3148; border-top-color: #7c3aed; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* toast */
.ev-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #101830; border: 1px solid #3b82f6; border-radius: 8px; padding: 9px 20px; font-size: 12px; color: #93c5fd; z-index: 1000; display: none; white-space: nowrap; }
.ev-toast.show { display: block; }

/* footer bar */
.ev-footer { background: #0d1018; border-top: 1px solid #1e2535; padding: 6px 14px; display: flex; align-items: center; gap: 14px; font-size: 10px; color: #2e3650; }
.ev-footer span { color: #a78bfa; font-weight: 700; }

/* settings panel */
.ev-settings-wrap { padding: 14px; max-width: 500px; }
.ev-settings-card { background: #10141f; border: 1px solid #1e2535; border-radius: 8px; padding: 16px; margin-bottom: 12px; }
.ev-settings-title { font-size: 13px; font-weight: 700; color: #e2e8f0; margin-bottom: 12px; }
.ev-settings-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ev-settings-label { font-size: 12px; color: #94a3b8; }
.ev-settings-input { background: #0a0d14; border: 1px solid #2a3148; border-radius: 5px; padding: 6px 10px; color: #e2e8f0; font-size: 12px; width: 120px; outline: none; text-align: right; font-family: 'IBM Plex Mono', monospace; }
.ev-settings-save { background: #7c3aed; border: none; border-radius: 6px; padding: 8px 20px; font-size: 12px; color: #ede9fe; font-weight: 700; cursor: pointer; margin-top: 4px; }

/* export buttons */
.ev-export-row { display: flex; gap: 8px; margin-bottom: 14px; }
.ev-export-btn { background: #1a1f2e; border: 1px solid #2a3148; border-radius: 6px; padding: 7px 14px; font-size: 11px; color: #94a3b8; cursor: pointer; display: flex; align-items: center; gap: 5px; }
.ev-export-btn:hover { border-color: #7c3aed; color: #a78bfa; }

@media (max-width: 768px) {
  .ev-thead { display: none; }
  .ev-row-main { grid-template-columns: 70px 1fr 70px; gap: 4px; }
  .ev-event-col-wrap, .ev-market-col, .ev-prob-col, .ev-novig-col { display: none; }
  .ev-books-col { grid-column: 2; }
  .ev-size-btn { grid-column: 3; }
  .ev-drawer { width: 100vw; }
}
