/* ==========================================================================
   AcceleraLeads — Client Sales Dashboard
   Dark glass UI. All colors are tokens below so the client brand can be
   swapped in one place.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0d0b;
  --ink: #f4f3ee;
  --ink2: rgba(244, 243, 238, 0.64);
  --ink3: rgba(244, 243, 238, 0.42);
  --line: rgba(255, 255, 255, 0.08);
  --line2: rgba(255, 255, 255, 0.14);
  --glass: rgba(255, 255, 255, 0.04);
  --glass2: rgba(255, 255, 255, 0.07);
  --glass3: rgba(255, 255, 255, 0.11);
  --panel: rgba(24, 23, 20, 0.86);

  --lime: #d4f36b;           /* brand accent (UI only) */
  --lime-ink: #1b2006;
  --salmon: #ee9a7f;
  --good: #7fd88f;
  --bad: #f08a7a;

  /* Chart categorical palette — validated for the dark surface
     (lightness band, chroma, CVD adjacency, contrast). Keep this ORDER. */
  --c1: #86a21c; /* lime    */
  --c2: #3987e5; /* blue    */
  --c3: #d95926; /* orange  */
  --c4: #9085e9; /* violet  */
  --c5: #c98500; /* yellow  */
  --c6: #d55181; /* magenta */

  --r-xl: 28px;
  --r-lg: 22px;
  --r-md: 16px;
  --r-sm: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --font: 'Urbanist', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  font-size: 14px;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
svg { display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Ambient background ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 78% -12%, rgba(150, 140, 115, 0.30), transparent 60%),
    radial-gradient(900px 700px at 8% 112%, rgba(120, 80, 45, 0.34), transparent 60%),
    radial-gradient(700px 500px at 40% 40%, rgba(60, 58, 50, 0.35), transparent 70%),
    #0e0e0c; }
.ambient .blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; animation: drift 28s var(--ease-io) infinite alternate; }
.ambient .b1 { width: 520px; height: 520px; background: rgba(212, 243, 107, 0.07); top: -120px; left: 30%; }
.ambient .b2 { width: 600px; height: 600px; background: rgba(238, 154, 127, 0.08); bottom: -260px; right: 10%; animation-duration: 34s; }
@keyframes drift { to { transform: translate3d(80px, 60px, 0) scale(1.15); } }
.ambient::after { content: ''; position: absolute; inset: 0; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"); }

/* ---------- Layout ---------- */
.app { --sb: 272px; --sb-c: 84px; position: relative; z-index: 1; height: 100vh; display: grid;
  grid-template-columns: auto minmax(0, 1fr); grid-template-rows: 76px 1fr; }

.topbar { grid-column: 2; display: flex; align-items: center; gap: 20px; padding: 0 28px 0 22px; }
.top-spacer { min-width: 146px; }
.top-brand { display: none; }
.top-brand img { height: 22px; width: auto; display: block; }

.nav { position: relative; margin: 0 auto; display: flex; gap: 2px; padding: 5px; border-radius: 999px;
  background: rgba(20, 20, 18, 0.55); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.nav a { position: relative; z-index: 1; padding: 9px 18px; border-radius: 999px; color: var(--ink2); font-weight: 500;
  transition: color .3s var(--ease); white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--ink); }
.nav .indicator { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px;
  background: var(--glass3); border: 1px solid var(--line2);
  transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s; }
.nav .hover-ghost { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px;
  background: rgba(255,255,255,.04); opacity: 0; transition: transform .45s var(--ease), width .45s var(--ease), opacity .25s; }

.top-actions { display: flex; align-items: center; gap: 10px; min-width: 210px; justify-content: flex-end; }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: var(--glass2); border: 1px solid var(--line); color: var(--ink2);
  transition: background .25s, color .25s, transform .25s var(--ease), border-color .25s; }
.icon-btn:hover { background: var(--glass3); color: var(--ink); border-color: var(--line2); }
.icon-btn:active { transform: scale(.94); }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.ghost { background: transparent; }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--salmon); box-shadow: 0 0 0 2px #1d1c19; transform: scale(0); transition: transform .35s var(--ease); }
.icon-btn .dot.on { transform: scale(1); }
.icon-btn.ring { animation: ring .8s var(--ease); }
@keyframes ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-14deg); } 40% { transform: rotate(11deg); } 60% { transform: rotate(-6deg); } 80% { transform: rotate(3deg); } }
.avatar-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--lime); color: var(--lime-ink); font-weight: 700;
  box-shadow: 0 0 0 4px rgba(212, 243, 107, .14); transition: box-shadow .3s, transform .25s var(--ease); }
.avatar-btn:hover { box-shadow: 0 0 0 6px rgba(212, 243, 107, .2); }

/* Sidebar — expands to logo + wordmark, collapses to the mark alone */
.sidebar { grid-column: 1; grid-row: 1 / -1; width: var(--sb); padding: 14px 0 14px 14px; display: flex;
  transition: width .55s var(--ease); }
.app.collapsed .sidebar { width: var(--sb-c); }
.sb-inner { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 12px 10px; border-radius: 26px;
  background: rgba(20, 20, 18, 0.5); border: 1px solid var(--line); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }

.sb-brand { display: flex; align-items: center; height: 50px; padding-left: 6px; margin-bottom: 10px; overflow: hidden; flex: none; }
.sb-mark { height: 26px; width: auto; flex: none; transition: transform .55s var(--ease); }
.sb-brand:hover .sb-mark { transform: translateY(-1px) scale(1.04); }
.sb-word { height: 26px; width: auto; flex: none; margin-left: 8px; transform-origin: left center;
  transition: opacity .4s var(--ease) .12s, transform .55s var(--ease), filter .4s; }
.app.collapsed .sb-word { opacity: 0; transform: translateX(-14px); filter: blur(4px); transition: opacity .2s, transform .45s var(--ease), filter .25s; }

.lbl { white-space: nowrap; transition: opacity .35s var(--ease) .12s, transform .5s var(--ease); }
.app.collapsed .lbl { opacity: 0; transform: translateX(-8px); pointer-events: none; transition: opacity .15s, transform .3s var(--ease); }

.sb-workspace { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border-radius: 16px; text-align: left;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); margin-bottom: 8px; transition: background .25s; }
.sb-workspace:hover { background: var(--glass2); }
.ws-dot { width: 34px; height: 34px; border-radius: 11px; flex: none; display: grid; place-items: center; font-weight: 700;
  background: linear-gradient(135deg, #5b63f0, #3d46d6); color: #fff; }
.sb-workspace b { display: block; font-weight: 600; font-size: 13.5px; }
.sb-workspace small { display: block; color: var(--ink3); font-size: 11.5px; }

.sb-label { color: var(--ink3); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  padding: 12px 15px 6px; transition: opacity .3s; }
.app.collapsed .sb-label { opacity: 0; }
.sb-item { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; height: 42px; padding: 0 15px; border-radius: 14px;
  color: var(--ink2); font-weight: 500; text-align: left; transition: background .25s, color .25s; }
.sb-item svg { flex: none; }
.sb-item:hover, .sb-item.on { background: var(--glass3); color: var(--ink); }
.sb-item.on { color: var(--lime); }
.sb-item kbd { font-family: inherit; font-size: 11px; color: var(--ink3); padding: 1px 6px; border-radius: 6px; border: 1px solid var(--line2); margin-left: 6px; }
.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 3px; padding-top: 10px; border-top: 1px solid var(--line); }
.sb-toggle svg { transition: transform .55s var(--ease); }
.app.collapsed .sb-toggle svg { transform: rotate(180deg); }

/* Tooltips only when the sidebar is collapsed */
.sidebar [data-tip]::after { content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; white-space: nowrap;
  transform: translate(-4px, -50%); opacity: 0; pointer-events: none; padding: 6px 10px; border-radius: 8px; font-size: 12px; font-weight: 500;
  background: #24231f; border: 1px solid var(--line2); color: var(--ink); transition: opacity .2s, transform .25s var(--ease); z-index: 40; }
.app.collapsed .sidebar [data-tip]:hover::after { opacity: 1; transform: translate(0, -50%); }

/* Main */
.main { grid-column: 2; grid-row: 2; overflow-y: auto; overflow-x: hidden; padding: 6px 28px 40px 22px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.main::-webkit-scrollbar, .col-body::-webkit-scrollbar, .scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.main::-webkit-scrollbar-thumb, .col-body::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }
.view { transition: opacity .22s var(--ease), transform .22s var(--ease), filter .22s; }
.view.leaving { opacity: 0; transform: translateY(-8px); filter: blur(4px); }

/* Reveal stagger */
.reveal { opacity: 0; transform: translateY(16px); filter: blur(6px);
  animation: reveal .75s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes reveal { to { opacity: 1; transform: none; filter: none; } }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: center; gap: 34px; margin: 6px 0 22px; flex-wrap: wrap; }
.title { font-size: 40px; line-height: 1.02; font-weight: 500; letter-spacing: -.02em; min-width: 190px; }
.stats { display: flex; gap: 34px; flex-wrap: wrap; flex: 1; }
.stat { display: flex; align-items: center; gap: 12px; }
.stat .ic { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--glass2); border: 1px solid var(--line); color: var(--ink2); }
.stat b { display: flex; align-items: center; gap: 8px; font-size: 23px; font-weight: 600; letter-spacing: -.01em; }
.stat > div > span { display: block; color: var(--ink3); font-size: 13px; }
.badge { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; letter-spacing: 0; }
.badge.up { background: rgba(127, 216, 143, .16); color: var(--good); }
.badge.down { background: rgba(238, 154, 127, .22); color: var(--salmon); }
.badge.blue { background: rgba(57, 135, 229, .22); color: #9cc4f5; }
.head-right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: var(--glass2);
  border: 1px solid var(--line); color: var(--ink2); font-weight: 600; font-size: 13px; cursor: pointer; transition: background .25s; }
.live-pill:hover { background: var(--glass3); }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--good); animation: pulse 1.8s ease-out infinite; }
.live-pill.paused .pulse { background: var(--ink3); }
.live-pill.paused .pulse::after { display: none; }
@keyframes pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3.2); opacity: 0; } }

/* ---------- Cards ---------- */
.card { position: relative; border-radius: var(--r-xl); padding: 22px; background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  border: 1px solid var(--line); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 15px; font-weight: 600; }
.card-head .muted { color: var(--ink3); font-size: 12.5px; }
.card-head .spacer { flex: 1; }
.hero { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.hero b { font-size: 36px; font-weight: 600; letter-spacing: -.02em; }
.hero span { color: var(--ink3); font-size: 13px; }
.hero span strong { color: var(--ink); font-weight: 600; }
.muted { color: var(--ink3); }

.seg { position: relative; display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--line); }
.seg button { position: relative; z-index: 1; padding: 6px 13px; border-radius: 999px; color: var(--ink3); font-size: 12.5px; font-weight: 600; transition: color .25s; }
.seg button.on { color: var(--ink); }
.seg .thumb { position: absolute; z-index: 0; top: 4px; bottom: 4px; left: 0; border-radius: 999px; background: var(--glass3);
  transition: transform .45s var(--ease), width .45s var(--ease); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 999px; font-weight: 600; font-size: 13.5px;
  transition: transform .25s var(--ease), background .25s, box-shadow .3s, border-color .25s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn-lime { background: var(--lime); color: var(--lime-ink); box-shadow: 0 8px 26px rgba(212, 243, 107, .18); }
.btn-lime:hover { box-shadow: 0 10px 34px rgba(212, 243, 107, .32); transform: translateY(-1px); }
.btn-glass { background: var(--glass2); border: 1px solid var(--line); color: var(--ink); }
.btn-glass:hover { background: var(--glass3); border-color: var(--line2); }
.btn-danger { background: rgba(240, 138, 122, .16); color: var(--bad); border: 1px solid rgba(240,138,122,.25); }
.btn-danger:hover { background: rgba(240, 138, 122, .26); }
.btn.sm { padding: 7px 13px; font-size: 12.5px; }

.chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 999px; background: var(--glass2);
  border: 1px solid var(--line); color: var(--ink2); font-weight: 600; font-size: 12.5px; transition: background .25s, border-color .25s, color .25s; }
.chip.plain { padding: 6px 12px; }
.chip:hover { background: var(--glass3); color: var(--ink); }
.chip.on { background: rgba(212, 243, 107, .14); border-color: rgba(212, 243, 107, .35); color: var(--lime); }
.chip .sw { width: 9px; height: 9px; border-radius: 50%; margin-left: 4px; }
.chip em { font-style: normal; color: var(--ink3); font-weight: 500; }

.av { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 10px; font-weight: 700;
  background: var(--c, #ddd); color: #1c1a16; flex: none; }
.av.lg { width: 52px; height: 52px; font-size: 17px; }
.av.md { width: 36px; height: 36px; font-size: 12.5px; }
.stack { display: flex; }
.stack .av { box-shadow: 0 0 0 2px rgba(40, 38, 34, .9); }
.stack .av + .av { margin-left: -8px; }

.src { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink2); font-weight: 500; }
.src i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }

/* ---------- Overview ---------- */
.grid-ov { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; }
.grid-ov .live { grid-row: span 2; display: flex; flex-direction: column; }
.ov-bottom { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; }
.ov-recent { grid-column: 1 / -1; }
.chart { position: relative; width: 100%; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--ink2); font-size: 12.5px; margin: 8px 0 4px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.legend i.dash { width: 18px; height: 0; border-radius: 0; border-top: 2px dashed var(--ink3); background: none; }

.live-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; align-content: start; }
.lead-card { position: relative; display: flex; flex-direction: column; gap: 4px; min-height: 166px; padding: 15px 15px 13px; border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04)); border: 1px solid var(--line2); cursor: pointer;
  transition: translate .35s var(--ease), background .3s, box-shadow .35s; }
.lead-card:hover { translate: 0 -3px; background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)); box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.lead-card .when { display: flex; justify-content: space-between; align-items: center; color: var(--ink3); font-size: 12px; }
.lead-card h4 { font-size: 17px; font-weight: 500; line-height: 1.2; margin-top: 8px; }
.lead-card .co { color: var(--ink3); font-size: 12.5px; }
.lead-card .foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; padding-top: 12px; }
.lead-card .val { font-size: 19px; font-weight: 600; }
.lead-card .sub { color: var(--ink3); font-size: 11.5px; margin-top: 1px; }
.lead-card.fresh { animation: freshIn .9s var(--ease) both; }
.lead-card.fresh::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  border: 1px solid rgba(212, 243, 107, .6); box-shadow: 0 0 0 4px rgba(212, 243, 107, .08), 0 0 34px rgba(212, 243, 107, .18);
  animation: freshGlow 4s ease forwards; }
.new-tag { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--lime-ink); background: var(--lime); padding: 3px 7px; border-radius: 999px; }
@keyframes freshIn { from { opacity: 0; transform: translateY(-14px) scale(.96); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes freshGlow { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }

.quota { background: linear-gradient(180deg, rgba(160, 190, 70, .30), rgba(110, 130, 40, .14)); border-color: rgba(212, 243, 107, .22); }
.gauge-wrap { position: relative; display: grid; place-items: center; margin-top: 4px; }
.gauge-label { position: absolute; bottom: 4px; text-align: center; }
.gauge-label b { font-size: 30px; font-weight: 600; display: block; letter-spacing: -.02em; }
.gauge-label span { color: var(--ink2); font-size: 12.5px; }
.mini-row { display: flex; justify-content: space-between; color: var(--ink2); font-size: 12.5px; margin-top: 12px; }
.mini-row b { color: var(--ink); font-weight: 600; }

.segbar { display: flex; gap: 2px; height: 14px; border-radius: 5px; overflow: hidden; margin: 18px 0 14px; }
.segbar div { height: 100%; background: var(--sc); transform-origin: left; animation: growX .9s var(--ease) both; animation-delay: calc(var(--i) * 70ms + 200ms); cursor: pointer; transition: filter .2s; }
.segbar div:hover { filter: brightness(1.2); }
@keyframes growX { from { transform: scaleX(0); } }
.stage-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.stage-legend div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.stage-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); flex: none; }
.stage-legend b { margin-left: auto; color: var(--ink); font-weight: 600; }
.stage-legend em { font-style: normal; color: var(--ink3); width: 26px; text-align: right; }

.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--line); }
.feed-item:first-child { border-top: 0; }
.feed-item .t-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--tc-bg); color: var(--tc); }
.feed-item p { flex: 1; color: var(--ink2); line-height: 1.4; min-width: 0; }
.feed-item p b { color: var(--ink); font-weight: 600; }
.feed-item p a { color: var(--ink); font-weight: 600; border-bottom: 1px dashed var(--line2); cursor: pointer; }
.feed-item time { color: var(--ink3); font-size: 12px; white-space: nowrap; }
.feed-item.fresh { animation: freshIn .8s var(--ease) both; }

/* ---------- Pipeline ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.search { position: relative; display: flex; align-items: center; width: 250px; }
.search svg { position: absolute; left: 14px; color: var(--ink3); pointer-events: none; }
.search input { width: 100%; padding: 11px 14px 11px 40px; border-radius: 999px; background: var(--glass2); border: 1px solid var(--line); outline: none;
  transition: border-color .25s, background .25s; }
.search input::placeholder { color: var(--ink3); }
.search input:focus { border-color: rgba(212, 243, 107, .4); background: var(--glass3); }
.toolbar .grow { flex: 1; }

.board { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(232px, 1fr)) 56px 112px; overflow-x: auto; padding-bottom: 4px; gap: 14px; height: calc(100vh - 290px); min-height: 460px; }
.col { display: flex; flex-direction: column; border-radius: var(--r-xl); background: rgba(255,255,255,.03); border: 1px solid var(--line); min-height: 0;
  transition: background .25s, border-color .25s; }
.col.drag-over { background: rgba(212, 243, 107, .06); border-color: rgba(212, 243, 107, .35); }
.col-head { padding: 16px 16px 10px; }
.col-head .row { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; }
.col-head .row i { width: 10px; height: 10px; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 3px rgba(255,255,255,.07); }
.col-head .count { font-size: 11px; padding: 2px 7px; border-radius: 999px; background: var(--glass2); color: var(--ink2); }
.col-head .row .icon-btn { margin-left: auto; }
.col-head .total { color: var(--ink3); font-size: 12.5px; margin: 2px 0 0 18px; }
.col-body { flex: 1; overflow-y: auto; padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.1) transparent; }

.kcard { position: relative; padding: 14px 14px 12px; border-radius: 18px; background: var(--kbg); border: 1px solid rgba(255,255,255,.12); cursor: grab;
  transition: translate .3s var(--ease), transform .3s var(--ease), box-shadow .3s, opacity .25s; user-select: none; }
.kcard:hover { translate: 0 -2px; box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.kcard { --kbg: linear-gradient(180deg, color-mix(in oklab, var(--kc, var(--c1)) 58%, rgb(66 64 58 / .55)), color-mix(in oklab, var(--kc, var(--c1)) 40%, rgb(40 39 36 / .45))); }
.kcard.dragging { opacity: .35; transform: scale(.97); }
.kcard .top { display: flex; justify-content: space-between; align-items: center; color: rgba(255,255,255,.6); font-size: 12px; }
.kcard h4 { font-size: 15.5px; font-weight: 600; margin-top: 6px; }
.kcard .co { color: rgba(255,255,255,.58); font-size: 12.5px; }
.kcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.kcard .val { font-weight: 600; font-size: 17px; }
.kcard .star { color: var(--lime); }
.kcard.fresh { animation: freshIn .8s var(--ease) both; }
.kcard.fresh::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; border: 1px solid rgba(212,243,107,.7); animation: freshGlow 3.5s ease forwards; pointer-events: none; }
.st-new       { --kbg: linear-gradient(180deg, rgba(128, 150, 64, .58), rgba(92, 108, 44, .42)); }
.st-contacted { --kbg: linear-gradient(180deg, rgba(110, 138, 186, .55), rgba(80, 100, 140, .38)); }
.st-qualified { --kbg: linear-gradient(180deg, rgba(160, 96, 72, .58), rgba(120, 70, 52, .42)); }
.st-proposal  { --kbg: linear-gradient(180deg, rgba(128, 120, 180, .45), rgba(96, 90, 140, .32)); }
.st-won       { --kbg: linear-gradient(180deg, rgba(180, 210, 90, .45), rgba(120, 140, 50, .3)); }
.st-lost      { --kbg: linear-gradient(180deg, rgba(120, 120, 120, .3), rgba(90, 90, 90, .2)); }

.drop-col { border-style: dashed; display: grid; grid-template-rows: 1fr 1fr; gap: 0; padding: 0; overflow: hidden; background: transparent; border: 0; gap: 14px; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; border-radius: var(--r-xl);
  border: 1px dashed var(--line2); background: rgba(255,255,255,.025); padding: 10px; transition: background .25s, border-color .25s, transform .3s var(--ease); }
.drop .circ { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--glass2); color: var(--ink2); }
.drop.won .circ { background: var(--lime); color: var(--lime-ink); }
.drop b { font-weight: 600; }
.drop span { color: var(--ink3); font-size: 11.5px; line-height: 1.35; }
.drop.drag-over { background: rgba(212,243,107,.08); border-color: rgba(212,243,107,.5); transform: scale(1.03); }
.drop.lost.drag-over { background: rgba(240,138,122,.08); border-color: rgba(240,138,122,.5); }

.table-wrap { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,.03); }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; color: var(--ink3); font-weight: 500; font-size: 12.5px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); color: var(--ink2); }
.tbl tbody tr { cursor: pointer; transition: background .2s; }
.tbl tbody tr:hover { background: rgba(255,255,255,.04); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl td b { color: var(--ink); font-weight: 600; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--glass2); color: var(--ink); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); }

/* ---------- Activities ---------- */
.grid-act { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.day-label { color: var(--ink3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin: 18px 4px 4px; }
.day-label:first-child { margin-top: 0; }
.timeline .feed-item { position: relative; }
.task { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.check { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line2); display: grid; place-items: center; flex: none; margin-top: 1px;
  transition: background .25s, border-color .25s; color: var(--lime-ink); }
.check svg { opacity: 0; transform: scale(.4); transition: opacity .2s, transform .3s var(--ease); }
.task.done .check { background: var(--lime); border-color: var(--lime); }
.task.done .check svg { opacity: 1; transform: none; }
.task .txt { flex: 1; min-width: 0; }
.task .txt p { position: relative; display: inline; color: var(--ink); background: linear-gradient(var(--ink3), var(--ink3)) no-repeat 0 55% / 0 1.5px; transition: background-size .4s var(--ease), color .3s; }
.task.done .txt p { background-size: 100% 1.5px; color: var(--ink3); }
.task .txt small { display: block; color: var(--ink3); font-size: 12px; margin-top: 3px; }
.empty { text-align: center; color: var(--ink3); padding: 40px 10px; }

/* ---------- Team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.member { display: flex; flex-direction: column; gap: 14px; transition: translate .35s var(--ease), box-shadow .35s; }
.member:hover { translate: 0 -3px; box-shadow: 0 18px 40px rgba(0,0,0,.3); }
.member .who { display: flex; align-items: center; gap: 12px; }
.member .who > div { min-width: 0; flex: 1; }
.member .who b { display: block; font-size: 16px; font-weight: 600; }
.member .who span { color: var(--ink3); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.av-wrap { position: relative; }
.status { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--ink3); box-shadow: 0 0 0 3px #22211d; }
.status.online { background: var(--good); }
.status.away { background: var(--c5); }
.role { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--glass2); color: var(--ink2); }
.role.admin { background: rgba(212,243,107,.14); color: var(--lime); }
.m-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.m-stats div { padding: 10px; border-radius: 14px; background: rgba(0,0,0,.18); border: 1px solid var(--line); }
.m-stats b { display: block; font-size: 17px; font-weight: 600; }
.m-stats span { color: var(--ink3); font-size: 11.5px; }
.bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.bar div { height: 100%; border-radius: 99px; background: var(--lime); width: 0; transition: width 1.1s var(--ease); }
.bar-row { display: flex; justify-content: space-between; color: var(--ink3); font-size: 12px; margin-bottom: 7px; }
.bar-row b { color: var(--ink); font-weight: 600; }
.member.invite-card { align-items: center; justify-content: center; text-align: center; border-style: dashed; cursor: pointer; min-height: 240px; background: rgba(255,255,255,.02); }
.member.invite-card .circ { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); transition: transform .4s var(--ease); }
.member.invite-card:hover .circ { transform: rotate(90deg) scale(1.06); }
.member.removing { animation: removeOut .45s var(--ease) forwards; }
@keyframes removeOut { to { opacity: 0; transform: scale(.92); filter: blur(4px); } }
.invite-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); }
.invite-row:first-child { border-top: 0; }
.invite-row > div { flex: 1; min-width: 0; }
.invite-row b { font-weight: 600; }
.invite-row small { display: block; color: var(--ink3); font-size: 12px; }

/* ---------- Reports ---------- */
.grid-rep { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; }
.grid-rep .full { grid-column: 1 / -1; }
.donut-wrap { position: relative; display: grid; place-items: center; margin: 6px 0 16px; }
.donut-center { position: absolute; text-align: center; pointer-events: none; }
.donut-center b { display: block; font-size: 28px; font-weight: 600; }
.donut-center span { color: var(--ink3); font-size: 12px; }
.src-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.src-list div { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.src-list i { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); flex: none; }
.src-list b { margin-left: auto; color: var(--ink); font-weight: 600; }
.src-list em { font-style: normal; color: var(--ink3); width: 30px; text-align: right; font-size: 12px; }
.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel-row { display: grid; grid-template-columns: 90px 1fr 90px; align-items: center; gap: 12px; font-size: 13px; color: var(--ink2); }
.funnel-row .track { height: 26px; border-radius: 8px; background: rgba(255,255,255,.04); overflow: hidden; }
.funnel-row .fill { height: 100%; border-radius: 0 6px 6px 0; background: var(--lime); opacity: var(--o, 1); transform-origin: left; animation: growX 1s var(--ease) both; animation-delay: calc(var(--i) * 80ms + 150ms); }
.funnel-row b { color: var(--ink); font-weight: 600; text-align: right; }
.funnel-row b em { color: var(--ink3); font-style: normal; font-weight: 500; font-size: 12px; margin-left: 4px; }
.leader td:first-child { width: 34px; color: var(--ink3); }

/* ---------- Charts ---------- */
.chart svg text { fill: var(--ink3); font-size: 11.5px; font-family: var(--font); }
.chart .grid line { stroke: rgba(255,255,255,.06); }
.chart .draw { transition: stroke-dashoffset 1.6s var(--ease); }
.chart .area { opacity: 0; transition: opacity 1.2s ease .4s; }
.chart .area.in { opacity: 1; }
.chart .bars g.col-g { transform-box: fill-box; transform-origin: bottom; animation: growY .9s var(--ease) both; animation-delay: calc(var(--i) * 60ms + 100ms); }
@keyframes growY { from { transform: scaleY(0); } }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .col-g { transition: opacity .2s; }
.chart.hovering .col-g { opacity: .45; }
.chart.hovering .col-g.hl { opacity: 1; }
.chart .donut-seg { transition: stroke-dashoffset 1.3s var(--ease), stroke-width .25s var(--ease), opacity .2s; cursor: pointer; }
.chart .donut-seg:hover { stroke-width: 26; }
.chart .gauge-val { transition: stroke-dashoffset 1.5s var(--ease); }
.xhair { stroke: rgba(255,255,255,.25); stroke-dasharray: 3 3; opacity: 0; transition: opacity .15s; }
.hdot { opacity: 0; transition: opacity .15s; }
.chart.hovering .xhair, .chart.hovering .hdot { opacity: 1; }
.tooltip { position: fixed; z-index: 100; pointer-events: none; padding: 10px 12px; border-radius: 12px; background: rgba(30, 29, 26, .96); border: 1px solid var(--line2);
  box-shadow: 0 12px 30px rgba(0,0,0,.4); font-size: 12.5px; min-width: 120px; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .2s var(--ease); }
.tooltip.on { opacity: 1; transform: none; }
.tooltip .tt-h { color: var(--ink3); margin-bottom: 6px; font-size: 11.5px; }
.tooltip .tt-r { display: flex; align-items: center; gap: 8px; color: var(--ink2); margin-top: 3px; }
.tooltip .tt-r i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.tooltip .tt-r b { margin-left: auto; color: var(--ink); font-weight: 600; padding-left: 14px; }

/* ---------- Popovers (notifications / account) ---------- */
.popover { position: fixed; z-index: 60; width: 380px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line2);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); box-shadow: 0 30px 70px rgba(0,0,0,.5);
  opacity: 0; transform: translateY(-8px) scale(.97); transform-origin: top right; pointer-events: none; transition: opacity .22s, transform .35s var(--ease); }
.popover.open { opacity: 1; transform: none; pointer-events: auto; }
.pop-head { display: flex; align-items: center; gap: 10px; padding: 18px 18px 10px; }
.pop-head h3 { font-size: 16px; font-weight: 600; flex: 1; }
.link-btn { color: var(--lime); font-weight: 600; font-size: 12.5px; }
.link-btn:hover { text-decoration: underline; }
.pop-tabs { padding: 0 18px 10px; }
.notif-list { max-height: 420px; overflow-y: auto; padding: 0 8px 8px; }
.notif { position: relative; display: flex; gap: 12px; padding: 12px 12px; border-radius: 16px; cursor: pointer; transition: background .2s; }
.notif:hover { background: rgba(255,255,255,.05); }
.notif .t-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--tc-bg); color: var(--tc); }
.notif b { display: block; font-weight: 600; font-size: 13.5px; }
.notif p { color: var(--ink2); font-size: 12.5px; line-height: 1.4; margin-top: 2px; }
.notif time { color: var(--ink3); font-size: 11.5px; display: block; margin-top: 4px; }
.notif.unread::after { content: ''; position: absolute; right: 14px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); }
.notif.fresh { animation: freshIn .7s var(--ease) both; }

.acct { width: 300px; padding: 8px; }
.acct-card { display: flex; align-items: center; gap: 12px; padding: 14px 12px; border-radius: 18px; background: rgba(255,255,255,.04); margin-bottom: 6px; }
.acct-card b { display: block; font-weight: 600; }
.acct-card span { color: var(--ink3); font-size: 12.5px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 12px; border-radius: 14px; color: var(--ink2); font-weight: 500; text-align: left; transition: background .2s, color .2s; }
.menu-item:hover { background: rgba(255,255,255,.06); color: var(--ink); }
.menu-item.danger:hover { color: var(--bad); }
.menu-item kbd { margin-left: auto; font-family: inherit; font-size: 11px; color: var(--ink3); padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line2); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 8px; }

/* ---------- Drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(5,5,4,.5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .35s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; z-index: 80; top: 14px; right: 14px; bottom: 14px; width: min(460px, calc(100vw - 28px)); border-radius: 28px; background: var(--panel);
  border: 1px solid var(--line2); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); box-shadow: -30px 0 80px rgba(0,0,0,.45);
  transform: translateX(calc(100% + 30px)); transition: transform .55s var(--ease); display: flex; flex-direction: column; }
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 10px; }
.drawer-head h2 { font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
.drawer-head .co { color: var(--ink2); }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 22px 22px; }
.drawer-body > * { animation: reveal .6s var(--ease) both; }
.drawer-body > *:nth-child(2) { animation-delay: .05s; } .drawer-body > *:nth-child(3) { animation-delay: .1s; }
.drawer-body > *:nth-child(4) { animation-delay: .15s; } .drawer-body > *:nth-child(5) { animation-delay: .2s; } .drawer-body > *:nth-child(n+6) { animation-delay: .25s; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.kv > div { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); min-width: 0; }
.kv > div > span { display: block; color: var(--ink3); font-size: 11.5px; margin-bottom: 3px; }
.kv b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.quick { display: flex; gap: 8px; margin: 4px 0 6px; flex-wrap: wrap; }
.section-t { font-size: 13px; font-weight: 600; color: var(--ink2); margin: 20px 0 8px; }
.stage-picker { display: flex; gap: 6px; flex-wrap: wrap; }
.stage-picker button { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--glass); color: var(--ink2); font-size: 12.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px; transition: all .25s var(--ease); }
.stage-picker button i { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); }
.stage-picker button:hover { color: var(--ink); background: var(--glass2); }
.stage-picker button.on { background: rgba(212,243,107,.14); border-color: rgba(212,243,107,.4); color: var(--lime); }
.score { display: flex; align-items: center; gap: 10px; }
.score .bar { flex: 1; }

/* ---------- Modal ---------- */
.modal { position: fixed; z-index: 90; left: 50%; top: 50%; width: min(480px, calc(100vw - 32px)); border-radius: 28px; padding: 24px; background: var(--panel);
  border: 1px solid var(--line2); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); box-shadow: 0 40px 100px rgba(0,0,0,.55);
  transform: translate(-50%, -46%) scale(.96); opacity: 0; pointer-events: none; transition: opacity .25s, transform .45s var(--ease); }
.modal.open { opacity: 1; transform: translate(-50%, -50%); pointer-events: auto; }
.modal.wide { width: min(640px, calc(100vw - 32px)); }
.modal { max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.form-section { color: var(--ink3); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 6px 0 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.lead-notes { padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.04); border: 1px solid var(--line); line-height: 1.5; white-space: pre-wrap; color: var(--ink2); }
.kv a { color: inherit; }
.kv a:hover { color: var(--lime); }
.modal h2 { font-size: 21px; font-weight: 600; margin-bottom: 4px; }
.modal .sub { color: var(--ink3); margin-bottom: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s; }
.field textarea { resize: vertical; min-height: 84px; }
.field select option { background: #1d1c19; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: rgba(212,243,107,.45); background: rgba(255,255,255,.07); box-shadow: 0 0 0 4px rgba(212,243,107,.08); }
.field.invalid input { border-color: var(--bad); animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 2px; border-top: 1px solid var(--line); }
.toggle-row:first-of-type { border-top: 0; }
.toggle-row b { display: block; font-weight: 600; }
.toggle-row small { color: var(--ink3); font-size: 12.5px; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 99px; background: rgba(255,255,255,.12); flex: none; transition: background .3s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .35s var(--ease); }
.switch.on { background: var(--lime); }
.switch.on::after { transform: translateX(18px); background: var(--lime-ink); }

/* Command palette */
.palette { top: 18%; transform: translate(-50%, -8px) scale(.97); padding: 10px; width: min(560px, calc(100vw - 32px)); }
.palette.open { transform: translate(-50%, 0); }
.palette .search { width: 100%; }
.palette .search input { padding: 14px 16px 14px 42px; font-size: 15px; background: transparent; border-color: transparent; }
.palette .search input:focus { background: transparent; border-color: transparent; box-shadow: none; }
.pal-results { max-height: 360px; overflow-y: auto; border-top: 1px solid var(--line); padding-top: 6px; margin-top: 4px; }
.pal-group { color: var(--ink3); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; padding: 10px 12px 4px; }
.pal-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border-radius: 12px; text-align: left; color: var(--ink2); }
.pal-item small { margin-left: auto; color: var(--ink3); }
.pal-item:hover, .pal-item.sel { background: rgba(255,255,255,.07); color: var(--ink); }

/* Toasts */
.toasts { position: fixed; z-index: 120; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 12px; width: 360px; padding: 14px 14px 14px 14px; border-radius: 20px; background: var(--panel);
  border: 1px solid var(--line2); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); box-shadow: 0 20px 50px rgba(0,0,0,.45);
  animation: toastIn .55s var(--ease) both; overflow: hidden; position: relative; }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
.toast .t-ic { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--tc-bg, rgba(212,243,107,.16)); color: var(--tc, var(--lime)); }
.toast > div { flex: 1; min-width: 0; }
.toast b { display: block; font-weight: 600; }
.toast p { color: var(--ink2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast .timer { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--lime); opacity: .6; animation: timer linear forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }
@keyframes timer { from { width: 100%; } to { width: 0; } }

/* Utilities */
.flex { display: flex; align-items: center; gap: 10px; }
.mt { margin-top: 18px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .grid-ov, .grid-rep, .grid-act { grid-template-columns: 1fr; }
  .grid-ov .live { grid-row: auto; }
  .live-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .board { overflow-x: auto; grid-template-columns: repeat(var(--n, 4), 260px) 56px 112px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar, .main { grid-column: 1 / -1; }
  .top-spacer { display: none; }
  .top-brand { display: block; }
  .main { padding: 6px 16px 40px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .nav { overflow-x: auto; scrollbar-width: none; }
  .nav a { padding: 9px 12px; }
  .top-actions { min-width: 0; }
  .ov-bottom { grid-template-columns: 1fr; }
  .title { font-size: 32px; }
  .popover { right: 12px !important; width: calc(100vw - 24px); }
}

@media (max-height: 760px) { .sb-label { display: none; } .sb-item { height: 38px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Custom pipeline stages ---------- */
.add-col { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border-radius: var(--r-xl); border: 1px dashed var(--line2, rgba(255,255,255,.14));
  background: transparent; color: var(--ink3); font-size: 12px; font-weight: 600; transition: color .2s, border-color .2s, background .2s; }
.add-col span { writing-mode: vertical-rl; letter-spacing: .04em; }
.add-col:hover { color: var(--lime); border-color: rgba(212,243,107,.45); background: rgba(212,243,107,.05); }
.modal.stages { width: min(600px, calc(100vw - 32px)); }
.stage-head { display: flex; align-items: center; color: var(--ink3); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 0 122px 8px 4px; }
.stage-head .spacer { flex: 1; }
.stage-list { display: flex; flex-direction: column; gap: 8px; max-height: min(46vh, 420px); overflow-y: auto; padding: 2px; scrollbar-width: thin; }
.stage-row { border-radius: 18px; background: rgba(255,255,255,.035); border: 1px solid var(--line); padding: 8px 10px; animation: stageIn .35s var(--ease) both; transition: border-color .2s, background .2s; }
.stage-row.confirming { border-color: rgba(240,138,122,.35); background: rgba(240,138,122,.05); }
.sr-main { display: flex; align-items: center; gap: 10px; }
.sr-move { display: flex; flex-direction: column; gap: 2px; }
.sr-move button { width: 22px; height: 18px; display: grid; place-items: center; border-radius: 6px; color: var(--ink3); transition: background .15s, color .15s; }
.sr-move button:hover:not(:disabled) { background: var(--glass2); color: var(--ink); }
.sr-move button:disabled { opacity: .25; cursor: default; }
.sr-move button:first-child svg { transform: rotate(180deg); }
.sr-color { width: 22px; height: 22px; flex: none; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 3px rgba(255,255,255,.08); transition: box-shadow .2s, scale .2s; }
.sr-color:hover, .stage-row.picking .sr-color { box-shadow: 0 0 0 3px rgba(255,255,255,.25); scale: 1.08; }
.sr-name { flex: 1; margin: 0; min-width: 0; }
.sr-name input { padding: 9px 12px; border-radius: 12px; }
.sr-prob { display: flex; align-items: center; gap: 4px; color: var(--ink3); font-size: 13px; }
.sr-prob input { width: 58px; padding: 9px 8px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: inherit; font: inherit; text-align: right; outline: none; color: var(--ink); }
.sr-prob input:focus { border-color: rgba(212,243,107,.45); }
.sr-count { width: 62px; text-align: right; color: var(--ink3); font-size: 12px; white-space: nowrap; }
.sr-del:hover:not(:disabled) { color: var(--bad); }
.sr-del:disabled { opacity: .3; }
.sr-swatches, .sr-confirm { display: none; align-items: center; gap: 8px; padding: 10px 0 2px 32px; flex-wrap: wrap; }
.stage-row.picking .sr-swatches, .stage-row.confirming .sr-confirm { display: flex; animation: stageIn .25s var(--ease) both; }
.sr-swatches button { width: 24px; height: 24px; border-radius: 50%; background: var(--sc); transition: scale .15s, box-shadow .15s; }
.sr-swatches button:hover { scale: 1.12; }
.sr-swatches button.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px rgba(255,255,255,.7); }
.sr-confirm { font-size: 13px; color: var(--ink2); }
.sr-confirm select { padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--ink); font: inherit; }
.sr-confirm select option { background: #1d1c19; }
.add-stage { width: 100%; margin-top: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; border-radius: 16px; border: 1px dashed rgba(255,255,255,.16);
  color: var(--ink2); font-weight: 600; transition: color .2s, border-color .2s, background .2s; }
.add-stage:hover { color: var(--lime); border-color: rgba(212,243,107,.45); background: rgba(212,243,107,.05); }
.stage-closed { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: 12.5px; }
@keyframes stageIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .sr-count { display: none; } .stage-head { padding-right: 70px; } }

/* ---------- Sign-in (live mode) ---------- */
.auth { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 600px at 20% 0%, rgba(212,243,107,.08), transparent 60%), var(--bg); transition: opacity .45s var(--ease); }
.auth.leaving { opacity: 0; pointer-events: none; }
.auth-card { width: min(400px, 100%); padding: 32px 28px 26px; border-radius: 28px; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0,0,0,.45); animation: stageIn .5s var(--ease) both; }
.auth-logo { height: 34px; margin-bottom: 22px; }
.auth h1 { font-size: 26px; font-weight: 600; letter-spacing: -.01em; }
.auth-sub { color: var(--ink2); margin: 6px 0 22px; line-height: 1.5; }
.auth-oauths { display: grid; gap: 10px; }
.auth-oauth { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--ink); font-weight: 600; transition: background .2s, border-color .2s; }
.auth-oauth:hover { background: rgba(255,255,255,.09); border-color: var(--line2); }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--ink3); font-size: 12px; margin: 18px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink2); }
.auth-form input { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--ink); font: inherit; font-weight: 500; outline: none; transition: border-color .2s, box-shadow .2s; }
.auth-form input:focus { border-color: rgba(212,243,107,.45); box-shadow: 0 0 0 4px rgba(212,243,107,.08); }
.auth-main { width: 100%; justify-content: center; padding: 12px; }
.auth-main.busy { opacity: .6; pointer-events: none; }
.auth-link { color: var(--ink2); font-size: 13px; justify-self: center; padding: 4px; }
.auth-link:hover { color: var(--lime); }
.auth-msg { min-height: 18px; font-size: 13px; color: var(--ink2); text-align: center; }
.auth-msg.bad { color: var(--bad); }
.auth-foot { margin-top: 14px; text-align: center; color: var(--ink3); font-size: 12px; }
.auth-spin { width: 28px; height: 28px; margin: 30px auto; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.12); border-top-color: var(--lime); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
