html, body { margin: 0; min-height: 100%; background: #0f1115; color: #e8ecf1; font-family: system-ui, sans-serif; }
#app { max-width: 1200px; margin: 0 auto; padding: 24px; }
h1 { margin: 0; font-size: 1.5rem; }
h2 { margin: 0 0 6px; }
h3 { margin: 18px 0 8px; font-size: 1rem; color: #9aa4b2; }
.muted { color: #8b95a5; font-size: 0.85rem; }
.top { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin-bottom: 14px; }
.top .fx-input { margin-left: auto; min-width: 200px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { background: none; border: 0; color: #9aa4b2; padding: 8px 14px; border-radius: 8px; cursor: pointer; font-size: 0.95rem; display: inline-flex; gap: 6px; align-items: center; }
.tab.active { background: #1e2430; color: #fff; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }
.row.end { justify-content: flex-end; }
.toolbar { margin-bottom: 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat .big { font-size: 1.6rem; font-weight: 700; margin-top: 4px; }
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.col { background: #151922; border: 2px solid transparent; border-top: 3px solid #4b5563; border-radius: 10px; padding: 10px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; }
.col.over { border-color: #6366f1; background: #181d2b; }
.stage-lead { border-top-color: #60a5fa; } .stage-qualified { border-top-color: #a78bfa; }
.stage-proposal { border-top-color: #fbbf24; } .stage-won { border-top-color: #34d399; } .stage-lost { border-top-color: #f87171; }
.col-head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.col-totals { display: flex; flex-wrap: wrap; gap: 4px; }
.deal { padding: 10px; cursor: grab; }
.deal.dragging { opacity: 0.4; }
.deal-title { font-weight: 600; }
.deal-value { font-size: 1.1rem; margin: 4px 0; }
.small { padding: 2px 8px; font-size: 0.8rem; }
.empty { color: #6b7587; text-align: center; padding: 20px 8px; font-size: 0.9rem; }
.split { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; align-items: start; }
.fx-table tbody tr { cursor: pointer; }
.fx-table tbody tr.sel { background: #1e2430; }
.detail { padding: 16px; }
.reports { display: grid; gap: 16px; }
.line { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #222a37; align-items: center; flex-wrap: wrap; }
.link { background: none; border: 0; color: #f87171; cursor: pointer; }
.linkbtn { background: none; border: 0; color: #93c5fd; cursor: pointer; padding: 0; font: inherit; }
.err { color: #f87171; font-size: 0.8rem; min-height: 0; }
.fx-badge.tag { background: #1e293b; color: #93c5fd; margin: 0 4px 2px 0; }
.fx-badge.warn { background: #78350f; color: #fde68a; margin-left: 6px; }
.fx-badge.danger { background: #7f1d1d; color: #fecaca; }
.task-main { display: flex; gap: 8px; align-items: center; flex: 1; min-width: 160px; }
.task.overdue { border-left: 3px solid #f87171; padding-left: 8px; }
.task.today { border-left: 3px solid #fbbf24; padding-left: 8px; }
.strike { text-decoration: line-through; color: #6b7587; }
.timeline { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.tl-item { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #222a37; }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; background: #1e2430; display: grid; place-items: center; flex: none; }
.tl-body { flex: 1; }
.funnel-row { display: grid; grid-template-columns: 90px 1fr 130px; gap: 10px; align-items: center; margin: 8px 0; }
.funnel-track { background: #151922; border-radius: 6px; height: 30px; overflow: hidden; }
.funnel-bar { height: 100%; display: flex; align-items: center; padding-left: 10px; box-sizing: border-box; font-weight: 700; color: #0f1115; min-width: 28px; }
.funnel-bar.f0 { background: #60a5fa; } .funnel-bar.f1 { background: #a78bfa; }
.funnel-bar.f2 { background: #fbbf24; } .funnel-bar.f3 { background: #34d399; }
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: min(420px, 100%); padding: 20px; display: flex; flex-direction: column; gap: 6px; max-height: 90vh; overflow: auto; }
.modal label { margin-top: 8px; font-size: 0.85rem; color: #9aa4b2; }
footer { margin-top: 24px; text-align: center; }
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, 230px); }
  .top .fx-input { margin-left: 0; width: 100%; }
  .funnel-row { grid-template-columns: 70px 1fr; }
  .funnel-conv { display: none; }
}
