:root { --accent: #7c3aed; --bg: #f6f7f9; --card: #fff; --text: #1f2937; --muted: #6b7280; --line: #e5e7eb; --ok: #059669; --warn: #d97706; --bad: #dc2626; }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 15px; margin: 0 0 10px; }
h3 { font-size: 13px; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.center { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 10px 20px; background: #111827; color: #fff; position: sticky; top: 0; z-index: 5; }
.topbar .brand { font-weight: 700; letter-spacing: .02em; }
.topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.topbar nav a { color: #d1d5db; padding: 6px 10px; border-radius: 6px; }
.topbar nav a.active, .topbar nav a:hover { background: #374151; color: #fff; text-decoration: none; }
.topbar .spacer { flex: 1; }
.ws-switch { display: flex; gap: 0; border-radius: 8px; overflow: hidden; border: 1px solid #374151; }
.ws-switch button { background: transparent; color: #d1d5db; border: 0; padding: 6px 12px; cursor: pointer; font: inherit; }
.ws-switch button.active { background: var(--accent); color: #fff; }
.ws-banner { height: 4px; background: var(--accent); }
main { padding: 20px; max-width: 1400px; margin: 0 auto; }
.grid { display: grid; gap: 16px; align-items: start; align-content: start; }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g2 { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .g4, .g3, .g2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stat .n { font-size: 26px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
tr.click { cursor: pointer; }
tr.click:hover { background: #f9fafb; }
.btn { background: var(--accent); color: #fff; border: 0; border-radius: 7px; padding: 7px 12px; cursor: pointer; font: inherit; font-weight: 600; }
.btn.secondary { background: #fff; color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: var(--bad); }
.btn:disabled { opacity: .6; cursor: default; }
input, select, textarea { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; width: 100%; background: #fff; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 3px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 0 0 auto; }
.row .grow { flex: 1 1 200px; }
.row > select, .row > input:not(.grow), .row > button { width: auto; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: #eef2ff; color: #3730a3; white-space: nowrap; }
.pill.new { background: #f3f4f6; color: #374151; } .pill.contacted { background: #e0f2fe; color: #075985; }
.pill.qualified { background: #fef3c7; color: #92400e; } .pill.proposal { background: #ede9fe; color: #5b21b6; }
.pill.won { background: #d1fae5; color: #065f46; } .pill.lost { background: #fee2e2; color: #991b1b; }
.score { display: inline-block; min-width: 34px; text-align: center; font-weight: 700; border-radius: 6px; padding: 1px 6px; color: #fff; }
.board { display: grid; grid-template-columns: repeat(6, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; }
.col { background: #eef0f3; border-radius: 10px; padding: 10px; min-height: 300px; }
.col.drop { outline: 2px dashed var(--accent); }
.col h2 { display: flex; justify-content: space-between; font-size: 13px; }
.deal { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 9px; margin-bottom: 8px; cursor: grab; }
.deal .t { font-weight: 600; }
.timeline .item { border-left: 3px solid var(--line); padding: 4px 0 10px 10px; margin-left: 4px; }
.timeline .item.meeting { border-color: #8b5cf6; } .timeline .item.email_sent { border-color: #0ea5e9; }
.timeline .item.email_received { border-color: #10b981; } .timeline .item.stage_change { border-color: #9ca3af; }
.pre { white-space: pre-wrap; }
.bar { height: 10px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); }
.funnel .f { display: grid; grid-template-columns: 110px 1fr 60px; gap: 8px; align-items: center; margin: 6px 0; }
.toast { position: fixed; bottom: 20px; right: 20px; background: #111827; color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 50; max-width: 420px; }
.login { width: 360px; }
.breakdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.breakdown div { background: #f9fafb; border-radius: 6px; padding: 6px; }
.notice { background: #fffbeb; border: 1px solid #fde68a; padding: 8px 10px; border-radius: 8px; font-size: 13px; }
ul.recs { margin: 0; padding-left: 18px; } ul.recs li { margin: 4px 0; }
