/* =========================================================
   Brim — Sales pipeline CRM
   © Ofir Baranes 2026
   ========================================================= */

:root {
  --bg-0: #060f1c;
  --bg-1: #0a1626;
  --bg-2: #112033;
  --bg-3: #182a40;
  --ink-0: #ecfdf5;
  --ink-1: #c9d6cc;
  --ink-2: #889d92;
  --ink-3: #586a60;
  --line-0: rgba(255,255,255,.07);
  --line-1: rgba(255,255,255,.14);
  --line-2: rgba(255,255,255,.24);
  --glass-0: rgba(16, 28, 42, 0.55);
  --glass-1: rgba(20, 34, 50, 0.66);
  --glass-2: rgba(28, 42, 60, 0.78);

  --emerald: #10b981;
  --emerald-2: #059669;
  --cyan: #22d3ee;
  --cyan-2: #06b6d4;
  --gold: #fbbf24;
  --gold-2: #f59e0b;
  --rose: #fb7185;
  --violet: #a78bfa;
  --red: #ef4444;

  --grad-primary: linear-gradient(135deg, var(--emerald) 0%, var(--cyan) 100%);
  --grad-warm: linear-gradient(135deg, var(--gold) 0%, var(--rose) 100%);

  --serif: "Fraunces", "Frank Ruhl Libre", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --accent: "Instrument Serif", "Fraunces", Georgia, serif;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-2xl: 32px;

  --shadow-card: 0 18px 50px rgba(0,0,0,.4), 0 0 0 1px var(--line-0);
  --shadow-glow: 0 24px 60px rgba(16,185,129,.20), 0 0 0 1px rgba(16,185,129,.16);

  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-glide: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
*::selection { background: rgba(16,185,129,.4); color: #fff; }

html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); letter-spacing: -.01em; }
.serif-italic { font-family: var(--accent); font-style: italic; font-weight: 400; }

/* ───────── bg stage ───────── */
.bg-stage {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 8% -10%, rgba(16,185,129,.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 30%, rgba(34,211,238,.14), transparent 60%),
    radial-gradient(ellipse 50% 50% at 50% 110%, rgba(251,191,36,.08), transparent 60%),
    linear-gradient(180deg, var(--bg-0) 0%, #050b14 60%, #03070d 100%);
}
.bg-hero {
  position: absolute; top: 0; left: 0; right: 0; height: 70vh;
  background-size: cover; background-position: center top;
  opacity: .42;
  mask-image: linear-gradient(180deg, #000 30%, transparent 100%);
  filter: blur(2px) saturate(120%);
}
.bg-grain {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .20 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.5'/></svg>");
  mix-blend-mode: overlay; opacity: .30;
}
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; mix-blend-mode: screen; }
.orb-em { top: -120px; left: 8%; width: 380px; height: 380px; background: var(--emerald); animation: floatA 20s ease-in-out infinite; }
.orb-cy { top: 18%; right: -80px; width: 320px; height: 320px; background: var(--cyan); animation: floatB 24s ease-in-out infinite; }
.orb-am { bottom: -80px; left: 38%; width: 280px; height: 280px; background: var(--gold); opacity: .3; animation: floatA 28s ease-in-out infinite reverse; }
@keyframes floatA { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(40px) translateX(-30px); } }
@keyframes floatB { 0%, 100% { transform: translateY(0) translateX(0); } 50% { transform: translateY(-30px) translateX(40px); } }

/* ───────── topbar ───────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 32px;
  background: rgba(6, 15, 28, 0.7);
  backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--line-0);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.brand-mark { width: 38px; height: 38px; filter: drop-shadow(0 6px 18px rgba(16,185,129,.55)); }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 19px; letter-spacing: -.02em; display: block; }
.brand-tag { font-size: 10.5px; color: var(--ink-2); letter-spacing: .04em; display: block; }
.topnav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.topnav-link {
  position: relative;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 10px;
  font-weight: 500; font-size: 13px; color: var(--ink-2);
  transition: color .25s, background .25s;
}
.topnav-link:hover { color: var(--ink-0); background: rgba(255,255,255,.04); }
.topnav-link.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(16,185,129,.16), rgba(34,211,238,.10));
  box-shadow: inset 0 0 0 1px rgba(16,185,129,.32);
}
.topnav-link.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -12px;
  height: 2px; background: var(--grad-primary); border-radius: 2px;
  filter: drop-shadow(0 0 6px rgba(16,185,129,.6));
}
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(16,185,129,.12); color: var(--emerald);
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid rgba(16,185,129,.25);
}
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald);
  box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.6); } 70% { box-shadow: 0 0 0 12px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }

/* ───────── buttons ───────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 600; letter-spacing: -.005em;
  border: 1px solid transparent; background: none;
  transition: transform .15s var(--ease-spring), box-shadow .2s, background .2s;
  white-space: nowrap;
}
.btn.lg { padding: 13px 22px; font-size: 14.5px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad-primary); color: #0c1820; font-weight: 700; box-shadow: 0 8px 20px rgba(16,185,129,.35), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-primary:hover { box-shadow: 0 12px 28px rgba(16,185,129,.5); }
.btn-glass { background: rgba(255,255,255,.06); color: var(--ink-0); border: 1px solid var(--line-1); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255,255,255,.10); border-color: var(--line-2); }
.btn-danger { background: rgba(251,113,133,.14); color: var(--rose); border: 1px solid rgba(251,113,133,.32); }

.select-pill {
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.04); color: var(--ink-0);
  border: 1px solid var(--line-1); font-size: 13px;
  font-family: var(--sans); cursor: pointer;
}
.select-pill:focus { outline: none; border-color: var(--emerald); }

/* ───────── hero ───────── */
.hero { padding: 60px 32px 36px; }
.hero-inner {
  max-width: 1320px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr);
  gap: 56px; align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(16,185,129,.10); border: 1px solid rgba(16,185,129,.22);
  color: var(--ink-1); font-size: 11.5px; letter-spacing: .04em; font-family: var(--mono);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); }
.sep { color: var(--ink-3); }
.hero-title {
  margin: 18px 0 12px;
  font-family: var(--serif); font-weight: 700;
  font-size: clamp(40px, 5.4vw, 76px);
  line-height: 1.02; letter-spacing: -.035em;
}
.hero-title span { display: block; }
.hero-grad {
  background: linear-gradient(120deg, var(--emerald) 0%, var(--cyan) 50%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 12px 32px rgba(16,185,129,.40);
}
.hero-title em { font-family: var(--accent); font-style: italic; font-weight: 400; color: var(--gold); }
.hero-sub { font-size: 17px; color: var(--ink-1); max-width: 580px; margin: 12px 0 26px; line-height: 1.6; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero-marks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-marks li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-0);
  color: var(--ink-1); font-size: 12.5px;
}
.hero-marks i { color: var(--emerald); }

.hero-card {
  padding: 26px;
  background: var(--glass-1); backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid var(--line-1); border-radius: var(--r-2xl);
  box-shadow: var(--shadow-glow);
  display: flex; flex-direction: column; gap: 16px;
}
.hero-card-head { display: flex; justify-content: space-between; align-items: center; }
.hc-eyebrow { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.hc-tick { font-family: var(--mono); font-size: 11px; color: var(--emerald); display: inline-flex; gap: 5px; align-items: center; }
.hero-card-body { padding: 18px; border-radius: var(--r-lg); background: rgba(255,255,255,.04); border: 1px solid var(--line-0); min-height: 140px; }
.placeholder { color: var(--ink-3); font-size: 12px; }
.hp-title { font-family: var(--serif); font-weight: 600; font-size: 18px; line-height: 1.25; letter-spacing: -.015em; margin: 0; }
.hp-meta { display: flex; gap: 12px; margin-top: 8px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); flex-wrap: wrap; }
.hp-value { color: var(--gold); font-weight: 700; }
.hp-comp { color: var(--emerald); }
.hp-snip { font-size: 12.5px; color: var(--ink-1); margin: 10px 0 0; line-height: 1.5; }
.hero-card-foot { display: flex; gap: 8px; }
.hc-stat { flex: 1; padding: 10px 12px; border-radius: var(--r-md); background: rgba(255,255,255,.04); border: 1px solid var(--line-0); text-align: center; font-size: 10.5px; color: var(--ink-2); letter-spacing: .06em; text-transform: uppercase; }
.hc-stat strong { display: block; font-family: var(--serif); font-weight: 700; font-size: 22px; color: #fff; }

/* ───────── shell + tabs ───────── */
.shell { max-width: 1320px; margin: 0 auto; padding: 32px 32px 80px; }
.tab { display: none; animation: fadeUp .5s var(--ease-glide); }
.tab.tab-active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }

.panel-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 22px; gap: 18px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.025em; line-height: 1.05; }
.crumb { display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.crumb i { font-size: 8px; color: var(--ink-3); }
.panel-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ───────── KPI ───────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.kpi {
  position: relative; padding: 20px;
  background: var(--glass-0); backdrop-filter: blur(16px);
  border: 1px solid var(--line-0); border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease-spring), border-color .2s;
  overflow: hidden;
}
.kpi:hover { transform: translateY(-4px); border-color: var(--line-2); }
.kpi::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--grad-primary); opacity: .8; }
.kpi-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.kpi-l { font-size: 12px; color: var(--ink-2); letter-spacing: .08em; text-transform: uppercase; font-weight: 500; }
.kpi-i { width: 28px; height: 28px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: rgba(16,185,129,.14); color: var(--emerald); font-size: 12px; }
.kpi-v { font-family: var(--serif); font-weight: 700; font-size: 34px; line-height: 1.1; letter-spacing: -.03em; }
.kpi-u { font-size: 18px; color: var(--ink-2); margin-left: 2px; font-family: var(--mono); }
.kpi-f { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
.kpi-ring { width: 36px; height: 36px; transform: rotate(-90deg); }
.kpi-ring-track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 4; }
.kpi-ring-bar { fill: none; stroke: var(--emerald); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 88; stroke-dashoffset: 88; transition: stroke-dashoffset 1.2s var(--ease-glide); }

.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.badge-ok { background: rgba(16,185,129,.14); color: var(--emerald); }
.badge-info { background: rgba(34,211,238,.14); color: var(--cyan); }
.badge-warn { background: rgba(251,191,36,.16); color: var(--gold); }
.badge-err { background: rgba(239,68,68,.16); color: var(--red); }
.badge-violet { background: rgba(167,139,250,.16); color: var(--violet); }

/* ───────── cards / funnel / timeline ───────── */
.card-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-bottom: 22px; }
.card-grid-2col { grid-template-columns: 1fr 1fr; }
.card {
  position: relative; padding: 20px;
  background: var(--glass-0); backdrop-filter: blur(14px);
  border: 1px solid var(--line-0); border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}
.card-wide { min-height: 280px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-head h3 { margin: 0; font-size: 17px; font-weight: 700; font-family: var(--serif); letter-spacing: -.015em; }
.card-eyebrow { font-size: 11px; color: var(--ink-2); letter-spacing: .08em; text-transform: uppercase; }
.card-link { font-size: 12px; color: var(--cyan); display: inline-flex; align-items: center; gap: 6px; transition: gap .2s; cursor: pointer; }
.card-link:hover { gap: 10px; }

.funnel-wrap { display: flex; flex-direction: column; gap: 8px; }
.funnel-row {
  display: grid; grid-template-columns: 130px 1fr 100px;
  gap: 12px; align-items: center;
  padding: 8px 0;
}
.funnel-row-name { font-size: 13px; font-weight: 500; }
.funnel-row-name span { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }
.funnel-bar {
  position: relative; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,.05);
  overflow: hidden;
}
.funnel-fill {
  height: 100%; border-radius: 8px;
  display: flex; align-items: center; padding: 0 12px;
  font-family: var(--mono); font-size: 11px; color: #0c1820; font-weight: 600;
  transition: width 1s var(--ease-glide);
}
.funnel-row-val { font-family: var(--mono); font-size: 12.5px; color: var(--ink-1); text-align: right; }
.funnel-row-val .prob { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; }

.chart-bars { width: 100%; height: 220px; display: block; }

.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.mini-list li {
  display: grid; grid-template-columns: 40px 1fr auto;
  gap: 10px; align-items: center;
  padding: 12px; border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line-0);
  cursor: pointer;
  transition: border-color .2s, transform .2s var(--ease-spring);
}
.mini-list li:hover { border-color: var(--line-2); transform: translateX(2px); }
.mini-list .av {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--m-accent, var(--emerald)); color: #0c1820;
  font-family: var(--serif); font-weight: 700;
}
.mini-list .name { font-weight: 600; font-size: 13.5px; }
.mini-list .sub { font-size: 11.5px; color: var(--ink-2); margin-top: 2px; }
.mini-list .val { font-family: var(--mono); font-weight: 700; font-size: 13px; color: var(--gold); }

.activity-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.activity-list li {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center;
  padding: 10px; border-radius: var(--r-md);
  border: 1px solid var(--line-0); background: rgba(255,255,255,.025);
}
.activity-list .ico {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,.18); color: var(--emerald); font-size: 14px;
}
.activity-list .ico.k-note { background: rgba(34,211,238,.18); color: var(--cyan); }
.activity-list .ico.k-call { background: rgba(251,191,36,.18); color: var(--gold); }
.activity-list .ico.k-meeting { background: rgba(167,139,250,.18); color: var(--violet); }
.activity-list .ico.k-email { background: rgba(34,211,238,.18); color: var(--cyan); }
.activity-list .ico.k-won { background: rgba(16,185,129,.22); color: var(--emerald); }
.activity-list .ico.k-lost { background: rgba(239,68,68,.18); color: var(--red); }
.activity-list .ico.k-stage-change { background: rgba(255,255,255,.06); color: var(--ink-1); }
.activity-list .desc { font-size: 12.5px; color: var(--ink-1); }
.activity-list .desc strong { color: #fff; }
.activity-list .when { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }

/* ───────── Kanban board ───────── */
.board-kanban { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; align-items: flex-start; }
.km-col {
  padding: 14px; border-radius: var(--r-xl);
  background: var(--glass-0); border: 1px solid var(--line-0);
  min-height: 360px;
  display: flex; flex-direction: column; gap: 10px;
}
.km-col-head { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; border-bottom: 1px solid var(--line-0); }
.km-col-title-row { display: flex; justify-content: space-between; align-items: center; }
.km-col-title { font-family: var(--serif); font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.km-col-count { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.05); }
.km-col-value { font-family: var(--mono); font-size: 11.5px; color: var(--gold); font-weight: 600; }
.km-col-prob { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.km-card {
  padding: 12px; border-radius: var(--r-md);
  background: rgba(255,255,255,.04); border: 1px solid var(--line-0);
  cursor: pointer;
  transition: transform .2s var(--ease-spring), border-color .2s;
  display: flex; flex-direction: column; gap: 8px;
}
.km-card:hover { transform: translateY(-3px); border-color: var(--line-2); }
.km-card-title { margin: 0; font-weight: 600; font-size: 13px; line-height: 1.25; letter-spacing: -.01em; }
.km-card-comp { font-size: 11px; color: var(--ink-2); }
.km-card-meta { display: flex; justify-content: space-between; align-items: center; font-family: var(--mono); font-size: 11px; }
.km-card-val { color: var(--gold); font-weight: 700; }
.km-card-health { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); }
.km-card-health i { font-size: 9px; }
.km-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.km-card-tag { padding: 2px 6px; border-radius: 4px; background: rgba(34,211,238,.10); color: var(--cyan); font-family: var(--mono); font-size: 9.5px; }

/* ───────── Deals table ───────── */
.filter-row { display: flex; gap: 4px; padding: 4px; background: rgba(255,255,255,.04); border: 1px solid var(--line-0); border-radius: 999px; }
.chip { padding: 6px 14px; border-radius: 999px; background: transparent; border: none; font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: all .2s; }
.chip:hover { color: var(--ink-0); }
.chip-active { background: var(--grad-primary); color: #0c1820; font-weight: 700; }
.search-input {
  padding: 9px 14px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-1);
  color: var(--ink-0); font-size: 13px; min-width: 220px;
}
.search-input:focus { outline: none; border-color: var(--emerald); }

.deals-table-wrap, .contacts-table-wrap {
  padding: 8px; border-radius: var(--r-xl);
  background: var(--glass-0); border: 1px solid var(--line-0); box-shadow: var(--shadow-card);
  overflow-x: auto;
}
.deals-table, .contacts-table { width: 100%; border-collapse: collapse; }
.deals-table th, .deals-table td,
.contacts-table th, .contacts-table td {
  padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-0); font-size: 13px;
  vertical-align: middle;
}
.deals-table th, .contacts-table th { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.deals-table tr:hover td, .contacts-table tr:hover td { background: rgba(255,255,255,.03); }
.deals-table tr { cursor: pointer; }
.dt-title { font-weight: 600; font-size: 13.5px; }
.dt-title small { display: block; font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); margin-top: 2px; font-weight: 400; }
.dt-stage { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.dt-value { font-family: var(--mono); font-weight: 700; color: var(--gold); }
.dt-health-pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; }
.dt-health-pill.h-hi { background: rgba(16,185,129,.16); color: var(--emerald); }
.dt-health-pill.h-md { background: rgba(251,191,36,.18); color: var(--gold); }
.dt-health-pill.h-lo { background: rgba(239,68,68,.18); color: var(--red); }
.dt-status-won { color: var(--emerald); font-weight: 600; }
.dt-status-lost { color: var(--red); font-weight: 600; }

/* ───────── Companies ───────── */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.company-card {
  padding: 22px; border-radius: var(--r-xl);
  background: var(--glass-0); backdrop-filter: blur(14px);
  border: 1px solid var(--line-0); box-shadow: var(--shadow-card);
  transition: transform .25s var(--ease-spring);
  position: relative;
  overflow: hidden;
}
.company-card:hover { transform: translateY(-4px); }
.company-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--c-accent, var(--emerald)); }
.cc-name { font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: -.015em; margin: 0 0 4px; }
.cc-domain { font-family: var(--mono); font-size: 11px; color: var(--ink-3); margin-bottom: 16px; }
.cc-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 12.5px; }
.cc-row-l { color: var(--ink-2); letter-spacing: .04em; }
.cc-row-v { color: var(--ink-0); font-weight: 500; }
.cc-arr { padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--line-0); display: flex; justify-content: space-between; align-items: center; }
.cc-arr-l { font-size: 10.5px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; }
.cc-arr-v { font-family: var(--serif); font-weight: 700; font-size: 20px; color: var(--gold); }

/* ───────── Settings ───────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form { display: flex; flex-direction: column; gap: 12px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-2); letter-spacing: .04em; font-weight: 500; }
.form input, .form select, .form textarea {
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line-1);
  color: var(--ink-0); font-size: 13.5px;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--emerald); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

.tech-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tech-card { display: flex; gap: 12px; padding: 12px; border-radius: var(--r-md); background: rgba(255,255,255,.03); border: 1px solid var(--line-0); }
.ti { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; color: #0c1820; }
.ti-a { background: linear-gradient(135deg, var(--emerald), var(--cyan)); }
.ti-b { background: linear-gradient(135deg, var(--cyan), var(--violet)); }
.ti-c { background: linear-gradient(135deg, var(--gold), var(--rose)); }
.ti-d { background: linear-gradient(135deg, var(--violet), var(--rose)); }
.ti-e { background: linear-gradient(135deg, var(--emerald), var(--gold)); }
.ti-f { background: linear-gradient(135deg, var(--rose), var(--gold)); }
.tech-card strong { display: block; font-size: 13px; }
.tech-card small { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.tech-card .mono { color: var(--cyan); }

/* ───────── Drawer ───────── */
.drawer-shade {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.65); backdrop-filter: blur(8px);
  display: flex; justify-content: flex-end;
  animation: fadeIn .25s ease-out;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.drawer {
  width: min(680px, 100%); height: 100%;
  background: var(--bg-1); border-left: 1px solid var(--line-1);
  overflow-y: auto;
  animation: slideIn .35s var(--ease-glide);
}
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.drawer-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  background: rgba(10,22,38,.85); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line-0);
}
.drawer-head h3 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.drawer-close { width: 36px; height: 36px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line-0); display: inline-flex; align-items: center; justify-content: center; transition: background .2s; }
.drawer-close:hover { background: rgba(255,255,255,.08); }
.drawer-body { padding: 24px; }
.drawer-deal-hero {
  padding: 20px; border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(16,185,129,.18), rgba(34,211,238,.10));
  border: 1px solid rgba(16,185,129,.28);
  margin-bottom: 24px;
}
.drawer-deal-title { font-family: var(--serif); font-weight: 700; font-size: 24px; letter-spacing: -.02em; margin: 4px 0; line-height: 1.2; }
.drawer-deal-meta { display: flex; gap: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); flex-wrap: wrap; }
.drawer-deal-meta strong { color: var(--gold); }
.drawer-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 20px 0; }
.drawer-section-h { font-family: var(--serif); font-weight: 600; font-size: 16px; margin: 24px 0 12px; }
.drawer-stage-select { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.stage-pill {
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line-1); background: rgba(255,255,255,.03);
  font-size: 11.5px; color: var(--ink-1); cursor: pointer;
  transition: background .2s, border-color .2s;
}
.stage-pill:hover { background: rgba(255,255,255,.06); }
.stage-pill.active { background: var(--s-color, var(--emerald)); color: #0c1820; border-color: var(--s-color, var(--emerald)); font-weight: 600; }

.timeline { display: flex; flex-direction: column; gap: 12px; }
.tl-item {
  position: relative; padding: 12px 14px 12px 44px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line-0);
}
.tl-ico {
  position: absolute; left: 12px; top: 14px;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(16,185,129,.18); color: var(--emerald); font-size: 10px;
}
.tl-head { display: flex; justify-content: space-between; font-size: 13px; }
.tl-title { font-weight: 600; }
.tl-time { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); }
.tl-body { font-size: 12.5px; color: var(--ink-2); margin: 4px 0 0; line-height: 1.5; }
.tl-author { font-size: 10.5px; color: var(--ink-3); margin-top: 4px; font-family: var(--mono); }

.activity-form {
  margin-top: 16px; padding: 16px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid var(--line-0);
  display: flex; flex-direction: column; gap: 10px;
}
.activity-form-row { display: grid; grid-template-columns: 140px 1fr; gap: 10px; }

/* ───────── Toasts ───────── */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 18px; border-radius: var(--r-md);
  background: var(--glass-2); backdrop-filter: blur(20px);
  border: 1px solid var(--line-1);
  color: var(--ink-0); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-card);
  animation: toastIn .3s var(--ease-spring);
}
.toast.ok { border-left: 3px solid var(--emerald); }
.toast.err { border-left: 3px solid var(--rose); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ───────── footer ───────── */
.footer { border-top: 1px solid var(--line-0); padding: 30px 32px; margin-top: 40px; background: rgba(0,0,0,.4); backdrop-filter: blur(20px); }
.footer-inner { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 36px; height: 36px; }
.footer-brand strong { display: block; font-family: var(--serif); font-weight: 700; }
.footer-brand span { font-size: 11.5px; color: var(--ink-3); }
.footer-nav { display: flex; gap: 16px; justify-content: center; font-size: 12.5px; color: var(--ink-2); }
.footer-nav a:hover { color: var(--ink-0); }
.footer-meta { justify-self: end; font-size: 11.5px; color: var(--ink-3); }

/* ───────── responsive ───────── */
@media (max-width: 1400px) {
  .board-kanban { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid, .card-grid-2col { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .tech-grid { grid-template-columns: 1fr; }
  .board-kanban { grid-template-columns: repeat(2, 1fr); }
  .topnav { display: none; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; }
  .footer-nav, .footer-meta { justify-content: center; justify-self: center; }
}
@media (max-width: 720px) {
  .topbar { padding: 12px 18px; }
  .shell, .hero { padding-left: 18px; padding-right: 18px; }
  .hero-title { font-size: clamp(34px, 7vw, 48px); }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .board-kanban { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .funnel-row { grid-template-columns: 100px 1fr 80px; }
}
