
:root {
  --bg: #070b14; --bg2: #0c1220; --surface: rgba(15,22,38,0.9);
  --border: rgba(148,163,184,0.12); --text: #f1f5f9; --muted: #94a3b8;
  --total: #38bdf8; --total2: #818cf8; --ok: #34d399; --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: Manrope, system-ui, sans-serif; color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(ellipse 70% 45% at 10% -10%, rgba(56,189,248,0.12), transparent),
    linear-gradient(180deg, var(--bg), var(--bg2));
  min-height: 100vh;
}
.wrap { max-width: 1200px; margin: 0 auto; padding: 20px 16px 32px; }
header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px;
  padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.header-left { display: flex; align-items: center; gap: 16px; }
.client-logo { height: 40px; max-width: 200px; object-fit: contain; }
.brand h1 { margin: 0; font-size: 1.35rem; font-weight: 800; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.88rem; }
.date-chip { margin-left: 8px; padding: 2px 10px; border-radius: 8px;
  background: rgba(56,189,248,0.12); color: #7dd3fc; font-size: 0.8rem; }
.total-pill { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(56,189,248,0.35); color: #7dd3fc; }
.badge { padding: 8px 14px; border-radius: 999px; font-size: 0.78rem;
  background: rgba(52,211,153,0.1); border: 1px solid rgba(52,211,153,0.3); color: #6ee7b7; }
.section-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.12em; color: var(--muted); margin: 24px 0 12px; }
.panel { padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); margin-bottom: 16px; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; align-items: end; }
label { font-size: 0.78rem; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
input, select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(0,0,0,0.25); color: var(--text); font: inherit; }
.preset-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.preset-btns button { padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: rgba(56,189,248,0.1); color: #7dd3fc; cursor: pointer; font: inherit; font-weight: 600; }
.user-avatars { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.avatar-chip { width: 36px; height: 36px; border-radius: 50%; overflow: hidden;
  border: 2px solid rgba(56,189,248,0.35); display: flex; align-items: center; justify-content: center; }
.avatar-chip img { width: 100%; height: 100%; object-fit: cover; }
.avatar-init { font-size: 0.7rem; font-weight: 700; color: #7dd3fc; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.metrics-grid--deals { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.metric-card { padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.metric-card--wide { grid-column: 1 / -1; }
.metric-card .label { font-size: 0.82rem; color: var(--muted); }
.metric-card .value { font-size: 1.75rem; font-weight: 800; margin: 8px 0 4px; }
.metric-card .unit { font-size: 1rem; color: var(--muted); }
.norm-line { font-size: 0.75rem; color: #64748b; }
.norm-line.muted { color: var(--muted); }
.spark { height: 80px; margin-top: 8px; }
.funnels-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 800px) { .funnels-row { grid-template-columns: 1fr; } }
.funnel-panel h3 { margin: 0 0 12px; font-size: 1rem; }
.funnel-row { display: grid; grid-template-columns: 1fr 2fr auto; gap: 8px; align-items: center; margin-bottom: 8px; font-size: 0.82rem; }
.funnel-label { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.funnel-bar-wrap { height: 8px; background: rgba(255,255,255,0.06); border-radius: 4px; overflow: hidden; }
.funnel-bar { height: 100%; background: linear-gradient(90deg, var(--total), var(--total2)); border-radius: 4px; }
.funnel-count { font-weight: 700; min-width: 2rem; text-align: right; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th { color: var(--muted); text-align: left; padding: 10px; border-bottom: 1px solid var(--border); }
td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,0.04); }
td a { color: var(--total); font-weight: 600; text-decoration: none; }
td a:hover { text-decoration: underline; }
.muted { color: var(--muted); }
.error-banner { background: rgba(248,113,113,0.15); border: 1px solid rgba(248,113,113,0.4);
  padding: 12px; border-radius: 12px; margin-bottom: 16px; color: #fca5a5; }
.footer-min { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--muted); }
