/* ══════════════════════════════════════════════════════════════════
   Illunex — design system.

   Modelled on folk.app's CRM surface: one typeface (Inter), a warm
   near-black rather than pure black, greys expressed as alpha so they
   layer over any ground, a pastel accent set carrying all semantic
   colour, 20px card radii, and shadows that are a hairline ring plus a
   1px lift — never a soft blur pretending to be depth.

   Every class name here is the one the existing markup already emits.
   The look is new; the DOM contract is unchanged.
   ══════════════════════════════════════════════════════════════════ */

:root{
  /* ── ground & surfaces ──────────────────────────────────────────
     The page is a warm off-white; panels are true white floating on
     it. Sunk/hover tints are alpha so they read correctly on both. */
  --bg:#f6f6f4;
  --sheet:#ffffff;
  --sheet-2:#fbfbfa;
  --sunk:rgba(15,8,0,.035);
  --hover:rgba(13,10,0,.055);
  --press:rgba(13,10,0,.09);
  --sel:rgba(148,196,255,.18);

  /* ── ink ── warm near-black, not #000 */
  --ink:#030200;
  --ink-a:rgba(3,2,0,.89);
  --ink-2:rgba(5,5,0,.63);
  --ink-3:rgba(5,5,0,.44);
  --ink-4:rgba(5,5,0,.3);

  /* ── rules ── alpha-based hairlines */
  --rule:rgba(15,10,0,.10);
  --rule-2:rgba(13,10,0,.17);

  /* ── accents ── the whole semantic palette is pastel */
  --blue:#94c4ff;
  --green:#bdee63;
  --orange:#ffc53d;
  --purple:#c1aaf9;
  --pink:#fab9fb;
  --red:#ffb4ab;

  --blue-ink:#0b4a8f;
  --green-ink:#3d5c00;
  --orange-ink:#6b4600;
  --purple-ink:#4c3287;
  --red-ink:#8c1d13;

  /* buttons are black here, the way folk's are */
  --primary:var(--ink-a);
  --primary-deep:#000;
  --on-primary:#fff;

  --ok:var(--green-ink);
  --warn:var(--orange-ink);
  --err:#b3261e;
  --err-bg:rgba(255,180,171,.4);
  --info:var(--blue-ink);

  /* ── geometry ── soft outside, tighter inside */
  --r:10px;
  --r-sm:7px;
  --r-lg:20px;
  --r-pill:999px;
  --row:44px;
  --ctl:34px;
  --u:8px;

  /* ── elevation ── ring + lift, layered for popovers */
  --sh-card:0 0 0 1px rgba(3,2,0,.055), 0 1px 2px rgba(3,2,0,.05);
  --sh-raise:0 0 0 1px rgba(3,2,0,.06), 0 2px 5px rgba(3,2,0,.07);
  --sh-pop:0 0 0 1px rgba(3,2,0,.06), 0 3px 6px rgba(3,2,0,.06), 0 12px 32px rgba(3,2,0,.12);
  --ring:0 0 0 2px #fff, 0 0 0 4px rgba(3,2,0,.75);

  --sans:Inter,-apple-system,BlinkMacSystemFont,system-ui,"Segoe UI",sans-serif;
  --cond:var(--sans);
  /* one typeface throughout — "mono" now means tabular figures, which is
     what the project codes, revisions, currency and dates actually needed */
  --mono:var(--sans);

  --z-drawer:40;
  --z-menu:60;
  --z-toast:80;
}

*{box-sizing:border-box}
[hidden]{display:none!important}
html{scroll-behavior:smooth}

body{
  margin:0;
  background:var(--bg);
  color:var(--ink-a);
  font:400 14px/1.5 var(--sans);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-feature-settings:"cv05" 1,"ss01" 1;
}

a{color:inherit;text-decoration:none}
button,input,select,textarea{font:inherit;color:inherit}

:focus-visible{outline:none;box-shadow:var(--ring);border-radius:var(--r-sm)}

.skip{position:absolute;left:-9999px;top:8px;z-index:100;background:var(--ink-a);color:#fff;padding:10px 14px;border-radius:var(--r)}
.skip:focus{left:8px}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

.gap{flex:1}
.mono{font-variant-numeric:tabular-nums;letter-spacing:-.005em}
.screen-title{font:600 22px/28px var(--sans);letter-spacing:-.021em;margin:0}

/* small grey label — sentence case, not the old condensed all-caps */
.lbl-caps{
  font:500 12px/16px var(--sans);
  letter-spacing:-.005em;
  color:var(--ink-3);
}

/* ══ shell ══════════════════════════════════════════════════════════
   Sidebar sits directly on the ground; the main column is a white
   rounded sheet floating on it — the structural move that makes this
   read as a modern CRM rather than a document. */
.shell{display:flex;height:100dvh;padding:8px;gap:2px;overflow:hidden}

.side{
  width:236px;flex:none;
  display:flex;flex-direction:column;
  padding:4px 8px 8px;
  min-height:0;
}

.brand{display:flex;align-items:center;gap:9px;padding:8px 6px 14px;position:relative}
.brand-mark{
  width:28px;height:28px;flex:none;border-radius:8px;
  background:var(--ink-a);
  display:grid;place-items:center;
}
.brand-mark svg{width:17px;height:17px}
.brand-txt{min-width:0;flex:1;display:flex;flex-direction:column;line-height:1.25}
.brand-txt strong{font:600 13.5px/18px var(--sans);letter-spacing:-.012em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.brand-txt span{font:400 11.5px/15px var(--sans);color:var(--ink-3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

.nav{display:flex;flex-direction:column;gap:1px;overflow-y:auto;min-height:0;flex:1;margin:0 -2px;padding:0 2px}
.nav a{
  display:flex;align-items:center;gap:10px;
  height:32px;padding:0 9px;border-radius:var(--r-sm);
  color:var(--ink-2);font:500 13.5px/1 var(--sans);letter-spacing:-.009em;
  cursor:pointer;
  transition:background .14s ease,color .14s ease;
}
.nav a .i{width:16px;height:16px;flex:none;opacity:.72}
.nav a span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav a:hover{background:var(--hover);color:var(--ink-a)}
.nav a.on{background:rgba(3,2,0,.075);color:var(--ink-a);font-weight:600}
.nav a.on .i{opacity:1}
.nav a .n{
  flex:none;min-width:19px;height:19px;padding:0 5px;border-radius:var(--r-pill);
  background:rgba(3,2,0,.07);color:var(--ink-2);
  font:500 11px/19px var(--sans);text-align:center;font-variant-numeric:tabular-nums;
}
.nav a.on .n{background:var(--ink-a);color:#fff}
.nav-sec{font:500 11px/16px var(--sans);color:var(--ink-4);padding:14px 9px 5px;letter-spacing:.01em}

.side-foot{padding-top:8px;position:relative}
.who{
  display:flex;align-items:center;gap:9px;width:100%;
  padding:7px 8px;border-radius:var(--r-sm);border:0;background:transparent;
  cursor:pointer;text-align:left;
  transition:background .14s ease;
}
.who:hover{background:var(--hover)}
.who-txt{min-width:0;flex:1;display:flex;flex-direction:column;line-height:1.3}
.who-txt strong{font:600 12.5px/17px var(--sans);letter-spacing:-.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.who-txt span{font:400 11.5px/15px var(--sans);color:var(--ink-3);text-transform:capitalize}

/* ── the floating main sheet ── */
.main{
  flex:1;min-width:0;
  display:flex;flex-direction:column;
  background:var(--sheet);
  border-radius:var(--r-lg);
  box-shadow:var(--sh-card);
  overflow:hidden;
}

.head{
  display:flex;align-items:center;gap:10px;
  height:56px;flex:none;padding:0 18px;
  border-bottom:1px solid var(--rule);
}
.crumb{display:flex;align-items:center;gap:7px;font:500 13.5px/1 var(--sans);letter-spacing:-.01em;color:var(--ink-3);min-width:0}
.crumb b{font-weight:600;color:var(--ink-a);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crumb .sep{color:var(--ink-4)}

.find{
  display:flex;align-items:center;gap:7px;
  height:var(--ctl);padding:0 10px;
  width:min(320px,34vw);
  background:var(--sunk);border-radius:var(--r);
  color:var(--ink-3);
  transition:background .14s ease,box-shadow .14s ease;
}
.find:focus-within{background:var(--sheet);box-shadow:0 0 0 1px var(--rule-2)}
.find .i{width:15px;height:15px;flex:none}
.find input{flex:1;min-width:0;border:0;background:transparent;outline:none;font-size:13.5px;color:var(--ink-a)}
.find input::placeholder{color:var(--ink-4)}
.find kbd{
  flex:none;font:500 10.5px/16px var(--sans);color:var(--ink-3);
  background:var(--sheet);border:1px solid var(--rule);border-radius:5px;
  min-width:17px;height:18px;text-align:center;padding:0 4px;
}
.find:focus-within kbd{display:none}

.view{flex:1;overflow-y:auto;padding:20px;outline:none;scroll-behavior:smooth}

/* ══ buttons ════════════════════════════════════════════════════════
   folk's button inverts rather than merely darkening: filled black,
   then transparent-with-border on hover. */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:6px;
  height:var(--ctl);padding:0 13px;
  border:1px solid var(--rule-2);border-radius:var(--r-sm);
  background:var(--sheet);color:var(--ink-a);
  font:500 13.5px/1 var(--sans);letter-spacing:-.009em;
  cursor:pointer;white-space:nowrap;
  transition:background .14s ease,border-color .14s ease,color .14s ease,transform .08s ease;
}
.btn:hover{background:var(--hover)}
.btn:active:not(:disabled){transform:translateY(1px);background:var(--press)}
.btn.primary{background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
.btn.primary:hover{background:transparent;color:var(--ink-a);border-color:var(--ink-a)}
.btn.danger{color:var(--err);border-color:var(--rule-2);background:var(--sheet)}
.btn.danger:hover{background:var(--err-bg);border-color:rgba(179,38,30,.35)}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn.sm{height:27px;padding:0 9px;font-size:12.5px;border-radius:6px}
.btn .i{width:15px;height:15px}

.ico-btn{
  display:inline-grid;place-items:center;flex:none;
  width:var(--ctl);height:var(--ctl);
  border:0;border-radius:var(--r-sm);background:transparent;color:var(--ink-2);
  cursor:pointer;transition:background .14s ease,color .14s ease;
}
.ico-btn:hover{background:var(--hover);color:var(--ink-a)}
.ico-btn .i{width:16px;height:16px}
/* every icon() call emits class="i" — without an intrinsic size an inline
   SVG expands to fill its container, so this default is load-bearing */
.i{display:block;flex:none;width:16px;height:16px}

/* ══ pills / tags ═══════════════════════════════════════════════════
   Solid pastel fill, dark ink, no leading dot — the folk tag. */
.pill{
  display:inline-flex;align-items:center;gap:0;
  height:22px;padding:0 9px;border-radius:var(--r-pill);
  background:rgba(3,2,0,.06);color:var(--ink-2);
  font:500 12px/1 var(--sans);letter-spacing:-.006em;white-space:nowrap;
}
.pill i{display:none}
.pill.b{background:var(--blue);color:var(--blue-ink)}
.pill.g{background:var(--green);color:var(--green-ink)}
.pill.a{background:var(--orange);color:var(--orange-ink)}
.pill.r{background:var(--red);color:var(--red-ink)}
.pill.n{background:rgba(3,2,0,.06);color:var(--ink-2)}

/* filter chip — interactive sibling of the pill */
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{
  display:inline-flex;align-items:center;gap:6px;
  height:29px;padding:0 11px;border-radius:var(--r-pill);
  border:1px solid var(--rule);background:var(--sheet);color:var(--ink-2);
  font:500 12.5px/1 var(--sans);cursor:pointer;
  transition:background .14s ease,border-color .14s ease,color .14s ease;
}
.chip:hover{background:var(--hover);color:var(--ink-a)}
.chip .mono{color:var(--ink-4);font-size:11.5px}
.chip.on{background:var(--ink-a);border-color:var(--ink-a);color:#fff}
.chip.on .mono{color:rgba(255,255,255,.65)}

/* ══ avatars ══ squircles, not circles ══════════════════════════════ */
.av{
  display:inline-grid;place-items:center;flex:none;
  width:26px;height:26px;border-radius:9px;
  background:var(--ink-3);color:#fff;
  font:600 10.5px/1 var(--sans);letter-spacing:.01em;
  text-transform:uppercase;user-select:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.14);
}
.av.sq{border-radius:8px}
.av.agent{background:var(--purple);color:var(--purple-ink);font-size:13px}
.av.client{background:var(--orange);color:var(--orange-ink)}
.who-cell{display:inline-flex;align-items:center;gap:8px;min-width:0}
.who-cell span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ══ panels ═════════════════════════════════════════════════════════ */
.panel{
  background:var(--sheet);
  border:1px solid var(--rule);
  border-radius:var(--r-lg);
  overflow:hidden;
}
.panel-head{
  display:flex;align-items:center;gap:8px;
  padding:13px 16px 11px;
}
.panel-head .lbl-caps{font-weight:600;color:var(--ink-a);font-size:13px;letter-spacing:-.011em}
.panel-body{padding:16px}
.panel-body.flush{padding:0}
.panel-head + .panel-body.flush{border-top:1px solid var(--rule)}

.stack{display:flex;flex-direction:column;gap:12px;min-width:0}
.grid2{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:12px;align-items:start}
.bar{display:flex;align-items:center;gap:10px;margin-bottom:16px;flex-wrap:wrap}
.hr{height:1px;background:var(--rule);border:0;margin:0}

/* ══ KPI tiles ══════════════════════════════════════════════════════ */
.kpi{display:grid;grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:12px}
.kpi .panel{
  padding:15px 16px 14px!important;
  display:flex;flex-direction:column;gap:3px;
  transition:box-shadow .16s ease,transform .16s ease;
}
.kpi .panel:hover{box-shadow:var(--sh-raise);transform:translateY(-1px)}
.kpi b{
  font:600 27px/32px var(--sans);letter-spacing:-.028em;
  font-variant-numeric:tabular-nums;color:var(--ink-a);
}
.kpi .lbl-caps{font-size:12.5px}

/* ══ tables ═════════════════════════════════════════════════════════
   Spreadsheet-flavoured: quiet header, airy rows, hover fill. */
.tw{overflow-x:auto}
table{width:100%;border-collapse:collapse}
thead th{
  position:sticky;top:0;z-index:1;
  background:var(--sheet);
  text-align:left;font:500 12px/1 var(--sans);color:var(--ink-3);
  letter-spacing:-.004em;
  padding:11px 14px;border-bottom:1px solid var(--rule);white-space:nowrap;
}
tbody td{
  padding:0 14px;height:var(--row);
  border-bottom:1px solid var(--rule);
  font-size:13.5px;color:var(--ink-a);
  vertical-align:middle;
}
tbody tr{transition:background .12s ease;cursor:pointer}
tbody tr:hover{background:var(--sunk)}
tbody tr.sel{background:var(--sel)}
tbody tr:last-child td{border-bottom:0}
tbody tr:focus-visible{outline:none;box-shadow:inset 0 0 0 2px var(--blue)}
th.num,td.num{text-align:right}
th.chk,td.chk{width:38px;padding-right:0}
input[type=checkbox]{
  width:15px;height:15px;accent-color:var(--ink-a);cursor:pointer;margin:0;
}

/* summary line under a table, inside the same panel */
.foot-note{
  padding:11px 16px;border-top:1px solid var(--rule);
  background:var(--sheet-2);
  font:500 12.5px/1 var(--sans);color:var(--ink-3);
  font-variant-numeric:tabular-nums;
}

.t-empty{padding:44px 16px;text-align:center;color:var(--ink-3);font-size:13.5px}
.empty{padding:64px 20px;text-align:center}
.empty .i{width:26px;height:26px;margin:0 auto 12px;color:var(--ink-4)}
.empty h3{font:600 16px/22px var(--sans);letter-spacing:-.015em;margin:0 0 5px}
.empty p{color:var(--ink-3);font-size:13.5px;margin:0}

/* ══ rows list ══════════════════════════════════════════════════════ */
.rows{display:flex;flex-direction:column}
.rows > *{
  display:flex;align-items:center;gap:10px;
  padding:11px 16px;border-bottom:1px solid var(--rule);
  font-size:13.5px;
  transition:background .12s ease;
}
.rows > *:last-child{border-bottom:0}
.rows > *[data-open-task]:hover,.rows > *[style*="cursor:pointer"]:hover{background:var(--sunk)}

.dl{display:flex;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid var(--rule);font-size:13.5px}
.dl:last-child{border-bottom:0}
.dl .lbl-caps{width:104px;flex:none}
.dl .v{color:var(--ink-a);min-width:0;overflow:hidden;text-overflow:ellipsis}

/* ══ record strip (project header) ══════════════════════════════════ */
.strip{
  display:flex;gap:0;overflow-x:auto;
  background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r-lg);
}
.strip div{padding:11px 16px;border-right:1px solid var(--rule);min-width:0}
.strip div:last-child{border-right:0}
.strip .lbl-caps{display:block;margin-bottom:3px}
.strip b{font:600 13.5px/19px var(--sans);letter-spacing:-.011em;white-space:nowrap}

/* ══ tabs ═══════════════════════════════════════════════════════════ */
.tabs{display:inline-flex;gap:2px;padding:3px;background:var(--sunk);border-radius:var(--r)}
.tabs button{
  border:0;background:transparent;color:var(--ink-2);cursor:pointer;
  height:27px;padding:0 11px;border-radius:6px;
  font:500 13px/1 var(--sans);text-transform:capitalize;letter-spacing:-.008em;
  transition:background .14s ease,color .14s ease;
}
.tabs button:hover{color:var(--ink-a)}
.tabs button.on{background:var(--sheet);color:var(--ink-a);font-weight:600;box-shadow:var(--sh-card)}

/* ══ progress ═══════════════════════════════════════════════════════ */
.prog{display:flex;align-items:center;gap:8px;font-variant-numeric:tabular-nums;font-size:12.5px;color:var(--ink-2)}
.prog-track{display:block;height:6px;min-width:56px;flex:1;background:rgba(3,2,0,.08);border-radius:var(--r-pill);overflow:hidden}
.prog-fill{display:block;height:100%;background:var(--ink-a);border-radius:var(--r-pill);transition:width .3s cubic-bezier(.4,0,.2,1)}

/* ══ bar chart (reports + dashboard) ════════════════════════════════ */
.bars{display:flex;flex-direction:column;gap:11px;padding:16px}
.bar-row{display:flex;align-items:center;gap:11px;font-size:13px}
.bar-label{width:132px;flex:none;color:var(--ink-2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bar-track{flex:1;height:8px;background:rgba(3,2,0,.06);border-radius:var(--r-pill);overflow:hidden}
.bar-fill{display:block;height:100%;background:var(--blue);border-radius:var(--r-pill);transition:width .45s cubic-bezier(.4,0,.2,1)}
/* wide enough for formatted currency — the values this carries are
   ₹-prefixed lakh/crore groupings, not two-digit counts */
.bar-value{min-width:104px;flex:none;text-align:right;color:var(--ink-2);font-variant-numeric:tabular-nums;white-space:nowrap}

/* vertical column chart — the dashboard's headline graphic */
.chart{display:flex;align-items:stretch;gap:8px;height:186px;padding:18px 16px 14px}
.cbar{flex:1;display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0}
.cbar-track{width:100%;flex:1;display:flex;align-items:flex-end;border-radius:8px 8px 0 0;overflow:hidden}
.cbar-fill{
  width:100%;border-radius:8px 8px 3px 3px;min-height:3px;
  background:var(--blue);
  transition:height .5s cubic-bezier(.4,0,.2,1);
}
.cbar:nth-child(5n+2) .cbar-fill{background:var(--purple)}
.cbar:nth-child(5n+3) .cbar-fill{background:var(--green)}
.cbar:nth-child(5n+4) .cbar-fill{background:var(--orange)}
.cbar:nth-child(5n+5) .cbar-fill{background:var(--pink)}
.cbar-cap{
  font:500 11px/14px var(--sans);color:var(--ink-3);
  text-align:center;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
.cbar-val{font:600 12.5px/1 var(--sans);font-variant-numeric:tabular-nums;color:var(--ink-a)}

/* ══ kanban board ═══════════════════════════════════════════════════ */
.board{display:flex;gap:12px;overflow-x:auto;padding-bottom:8px;align-items:flex-start}
.col{
  width:274px;flex:none;
  background:var(--sunk);border-radius:var(--r-lg);
  padding:10px;
  transition:background .16s ease,box-shadow .16s ease;
}
.col.over{background:var(--sel);box-shadow:inset 0 0 0 2px var(--blue)}
.col-head{display:flex;align-items:center;gap:8px;padding:2px 6px 10px}
.col-head .n{
  margin-left:auto;font:500 11.5px/18px var(--sans);color:var(--ink-3);
  background:rgba(3,2,0,.06);min-width:19px;height:19px;text-align:center;
  border-radius:var(--r-pill);padding:0 5px;font-variant-numeric:tabular-nums;
}
.col-body{display:flex;flex-direction:column;gap:8px;min-height:44px}
.kcard{
  background:var(--sheet);border-radius:12px;padding:12px;
  box-shadow:var(--sh-card);cursor:grab;
  display:flex;flex-direction:column;gap:8px;
  transition:box-shadow .16s ease,transform .16s ease;
}
.kcard:hover{box-shadow:var(--sh-raise);transform:translateY(-1px)}
.kcard:active{cursor:grabbing}
.kcard.drag{opacity:.45;transform:rotate(1.5deg) scale(.98)}
.card-title{font:600 13.5px/19px var(--sans);letter-spacing:-.012em;color:var(--ink-a)}
/* kanban card internals */
.kcard .code{font:500 11px/1 var(--sans);color:var(--ink-4);font-variant-numeric:tabular-nums;letter-spacing:.01em}
.kcard .ttl{font:600 13.5px/19px var(--sans);letter-spacing:-.012em;color:var(--ink-a)}
.kcard .foot{display:flex;align-items:center;gap:8px;font-size:11.5px}

/* ══ forms ══════════════════════════════════════════════════════════ */
.field{display:flex;flex-direction:column;gap:6px}
.field > span{font:500 12px/16px var(--sans);color:var(--ink-3);letter-spacing:-.004em}
input[type=text],input[type=email],input[type=password],input[type=number],
input[type=date],input[type=search],select,textarea{
  height:var(--ctl);padding:0 11px;width:100%;
  background:var(--sheet);color:var(--ink-a);
  border:1px solid var(--rule-2);border-radius:var(--r-sm);
  font:400 13.5px/1 var(--sans);outline:none;
  transition:border-color .14s ease,box-shadow .14s ease;
}
textarea{height:auto;min-height:86px;padding:9px 11px;line-height:1.55;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--ink-3);box-shadow:0 0 0 3px rgba(148,196,255,.3)}
input::placeholder,textarea::placeholder{color:var(--ink-4)}
select{appearance:none;cursor:pointer;padding-right:30px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6.5L8 10l4-3.5' fill='none' stroke='%23050500' stroke-opacity='.45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 9px center;background-size:15px;
}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.form-grid .full{grid-column:1/-1}

/* ══ drawer ═════════════════════════════════════════════════════════ */
.drawer-wrap{position:fixed;inset:0;z-index:var(--z-drawer);display:flex;justify-content:flex-end}
.scrim{position:absolute;inset:0;background:rgba(3,2,0,.32);backdrop-filter:blur(2px);animation:fade .18s ease}
.drawer{
  position:relative;width:min(484px,100%);height:100%;
  background:var(--sheet);display:flex;flex-direction:column;
  box-shadow:var(--sh-pop);
  animation:slide .24s cubic-bezier(.32,.72,0,1);
}
@keyframes fade{from{opacity:0}}
@keyframes slide{from{transform:translateX(18px);opacity:.4}}
.drawer-head{display:flex;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid var(--rule);flex:none}
.drawer-head h2{font:600 16px/22px var(--sans);letter-spacing:-.016em;margin:0}
.drawer-head .lbl-caps{font-size:11.5px}
.drawer-body{flex:1;overflow-y:auto;padding:18px}
.drawer-foot{display:flex;align-items:center;gap:9px;padding:14px 18px;border-top:1px solid var(--rule);flex:none;background:var(--sheet-2)}

/* ══ menus ══════════════════════════════════════════════════════════ */
.org-menu,.who-menu,.mention-menu{
  position:absolute;z-index:var(--z-menu);
  background:var(--sheet);border-radius:12px;
  box-shadow:var(--sh-pop);padding:5px;min-width:212px;
  animation:pop .14s ease;
}
@keyframes pop{from{opacity:0;transform:translateY(-4px)}}
.org-menu{top:calc(100% - 6px);left:6px;right:6px}
.who-menu{bottom:calc(100% + 2px);left:8px;right:8px}
.menu-item{
  display:flex;align-items:center;gap:9px;width:100%;
  padding:8px 9px;border:0;background:transparent;border-radius:var(--r-sm);
  font:500 13px/1 var(--sans);color:var(--ink-2);cursor:pointer;text-align:left;
  transition:background .12s ease,color .12s ease;
}
.menu-item:hover{background:var(--hover);color:var(--ink-a)}
.menu-item.on{background:var(--sel);color:var(--ink-a)}
.menu-item .tag{margin-left:auto;font-size:11.5px;color:var(--ink-3);text-transform:capitalize}
.menu-sep{height:1px;background:var(--rule);margin:5px 0}

/* ══ toast ══════════════════════════════════════════════════════════ */
.toast{
  position:fixed;left:50%;bottom:26px;transform:translateX(-50%);
  z-index:var(--z-toast);
  background:var(--ink-a);color:#fff;
  padding:11px 17px;border-radius:var(--r-pill);
  font:500 13px/1 var(--sans);letter-spacing:-.008em;
  box-shadow:var(--sh-pop);
  animation:toast .22s cubic-bezier(.32,.72,0,1);
}
@keyframes toast{from{opacity:0;transform:translate(-50%,10px)}}

/* ══ read-only banner ═══════════════════════════════════════════════ */
.ro-note{
  display:flex;align-items:center;gap:9px;
  padding:10px 14px;margin-bottom:16px;
  background:var(--orange);color:var(--orange-ink);
  border-radius:var(--r);font:500 12.5px/1.45 var(--sans);
}

/* ══ bulk selection bar ═════════════════════════════════════════════ */
.bulk{
  display:flex;align-items:center;gap:8px;flex-wrap:wrap;
  padding:10px 14px;border-bottom:1px solid var(--rule);
  background:var(--sel);
}
.bulk b{font:600 13px/1 var(--sans)}

/* ══ inbox ══════════════════════════════════════════════════════════ */
.inbox-list{
  display:flex;flex-direction:column;
  background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r-lg);overflow:hidden;
}
.inbox-item{
  display:flex;align-items:flex-start;gap:12px;
  padding:14px 16px;border-bottom:1px solid var(--rule);
  cursor:pointer;transition:background .12s ease;
}
.inbox-item:last-child{border-bottom:0}
.inbox-item:hover{background:var(--sunk)}
.inbox-item.unread{background:rgba(148,196,255,.07)}
.inbox-item.unread:hover{background:rgba(148,196,255,.13)}
.inbox-item .av{margin-top:1px}

/* tone stripe, glyph, stacked title/subtitle, right-hand meta */
.ib-accent{width:3px;align-self:stretch;border-radius:var(--r-pill);flex:none}
.ib-icon{display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:9px;background:var(--sunk);color:var(--ink-2)}
.ib-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:3px}
.ib-title{font:600 13.5px/19px var(--sans);letter-spacing:-.011em;color:var(--ink-a)}
.inbox-item.unread .ib-title{font-weight:600}
.ib-sub{font-size:12.5px;line-height:1.5;color:var(--ink-3);overflow-wrap:anywhere}
.ib-meta{display:flex;align-items:center;gap:10px;flex:none;margin-left:auto}
.ib-time{font-size:11.5px;color:var(--ink-4);white-space:nowrap;font-variant-numeric:tabular-nums}

/* ══ chat ═══════════════════════════════════════════════════════════ */
.chat{display:flex;height:100%;min-height:0;gap:0}
.chat-side{width:238px;flex:none;border-right:1px solid var(--rule);display:flex;flex-direction:column;min-height:0}
.chat-search{padding:12px;border-bottom:1px solid var(--rule)}
.chat-groups{flex:1;overflow-y:auto;padding:8px}
.chat-group{font:500 11px/16px var(--sans);color:var(--ink-4);padding:12px 8px 5px}
.chan-link{
  display:flex;align-items:center;gap:8px;width:100%;
  padding:7px 9px;border:0;background:transparent;border-radius:var(--r-sm);
  font:500 13px/1 var(--sans);color:var(--ink-2);cursor:pointer;text-align:left;
  transition:background .12s ease,color .12s ease;
}
.chan-link:hover{background:var(--hover);color:var(--ink-a)}
.chan-link.on{background:rgba(3,2,0,.075);color:var(--ink-a);font-weight:600}
.chan-link span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chan-link .u{
  flex:none;min-width:18px;height:18px;padding:0 5px;border-radius:var(--r-pill);
  background:var(--blue);color:var(--blue-ink);
  font:600 10.5px/18px var(--sans);text-align:center;font-variant-numeric:tabular-nums;
}
.chat-main{flex:1;display:flex;flex-direction:column;min-width:0;min-height:0}
.chat-head{display:flex;align-items:center;gap:10px;padding:13px 16px;border-bottom:1px solid var(--rule);flex:none}
.chat-msgs{flex:1;overflow-y:auto;padding:18px 16px;display:flex;flex-direction:column;gap:16px}
.msg{display:flex;gap:11px;align-items:flex-start}
.msg .body{min-width:0;flex:1}
.msg p{margin:2px 0 0;font-size:13.5px;line-height:1.6;color:var(--ink-a);overflow-wrap:anywhere}
.msg .meta{display:flex;align-items:baseline;gap:7px;flex-wrap:wrap}
.msg .meta b{font:600 13px/1.4 var(--sans);letter-spacing:-.011em;color:var(--ink-a)}
.msg .meta .t{font-size:11.5px;color:var(--ink-4);font-variant-numeric:tabular-nums}
.msg .meta .tag{
  font:500 10.5px/1 var(--sans);padding:3px 6px;border-radius:var(--r-pill);
  background:var(--purple);color:var(--purple-ink);
}
.msg-file .ico{display:grid;place-items:center;flex:none;color:var(--ink-3)}
.msg-file .name{font:500 12.5px/16px var(--sans);color:var(--ink-a);overflow-wrap:anywhere}
.msg-file .fmeta{font-size:11px;color:var(--ink-4);font-variant-numeric:tabular-nums}
.msg-report{
  font-variant-numeric:tabular-nums;font-size:12.5px;line-height:1.6;
  background:var(--sunk);border-radius:var(--r);padding:11px 13px;
  border-left:2px solid var(--purple);white-space:pre-wrap;
}
.msg-file{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 11px;border:1px solid var(--rule);border-radius:var(--r-sm);
  font-size:12.5px;color:var(--ink-2);margin-top:6px;background:var(--sheet-2);
}
.mention{background:var(--blue);color:var(--blue-ink);border-radius:5px;padding:1px 4px;font-weight:500}
.mention.ref{background:var(--green);color:var(--green-ink)}
.composer{padding:12px 16px 16px;border-top:1px solid var(--rule);flex:none;position:relative}
/* the composer is one bordered block that focuses as a unit */
.composer .box{
  border:1px solid var(--rule-2);border-radius:var(--r);background:var(--sheet);
  position:relative;transition:border-color .14s ease,box-shadow .14s ease;
}
.composer .box:focus-within{border-color:var(--ink-3);box-shadow:0 0 0 3px rgba(148,196,255,.3)}
.composer .box textarea{
  border:0;background:transparent;min-height:62px;padding:11px 12px 4px;
}
.composer .box textarea:focus{box-shadow:none;border:0}
.composer .toolbar{display:flex;align-items:center;gap:6px;padding:4px 8px 8px}

.chat-details{width:252px;flex:none;border-left:1px solid var(--rule);overflow-y:auto;padding:16px}
.chat-details .sec{margin-bottom:20px}
.chat-details .sec:last-child{margin-bottom:0}
.chat-details .sec h4{margin:0 0 9px}
.chan-link .dot{width:7px;height:7px;border-radius:50%;flex:none}
.pin-row{display:flex;align-items:center;gap:8px;padding:8px 0;border-bottom:1px solid var(--rule);font-size:12.5px}
.pin-row:last-child{border-bottom:0}
.member-row{display:flex;align-items:center;gap:8px;padding:6px 0;font-size:13px}
.mention-menu{bottom:calc(100% + 6px);left:16px;right:16px;max-height:212px;overflow-y:auto}

/* ══ automations ════════════════════════════════════════════════════ */
.auto-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:12px}
.auto-card{
  display:flex;gap:13px;padding:15px;
  background:var(--sheet);border:1px solid var(--rule);border-radius:var(--r-lg);
  transition:box-shadow .16s ease,transform .16s ease;
}
.auto-card:hover{box-shadow:var(--sh-raise);transform:translateY(-1px)}

/* labelled badge: the icon sits in a pastel tile with its category beneath */
.auto-icon{width:62px;flex:none;display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center;overflow-wrap:anywhere}
.auto-icon .i{
  width:34px;height:34px;padding:8px;
  background:var(--purple);color:var(--purple-ink);border-radius:10px;
}
.auto-icon .lbl-caps{line-height:1.3;color:var(--ink-4)}

.auto-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:9px}
.auto-head{display:flex;align-items:center;gap:10px}
.auto-head .card-title{flex:1;min-width:0}

/* WHEN / IF / THEN are inline markers inside one flowing sentence */
.auto-rule{font-size:12.5px;line-height:1.65;color:var(--ink-2)}
.auto-rule b{
  font:600 9.5px/1 var(--sans);letter-spacing:.07em;text-transform:uppercase;
  color:var(--ink-4);margin-right:4px;
}
.auto-rule b ~ b{margin-left:7px}

.auto-meta{display:flex;align-items:center;gap:13px;font-size:11.5px;color:var(--ink-3);font-variant-numeric:tabular-nums}

/* ══ switch ═════════════════════════════════════════════════════════ */
.switch{display:inline-flex;align-items:center;cursor:pointer;flex:none}
.switch input{position:absolute;opacity:0;width:0;height:0}
.switch .track{
  width:34px;height:20px;border-radius:var(--r-pill);
  background:rgba(3,2,0,.16);position:relative;
  transition:background .18s ease;
}
.switch .track::after{
  content:"";position:absolute;top:2px;left:2px;
  width:16px;height:16px;border-radius:50%;background:#fff;
  box-shadow:0 1px 2px rgba(3,2,0,.25);
  transition:transform .18s cubic-bezier(.32,.72,0,1);
}
.switch input:checked + .track{background:var(--ink-a)}
.switch input:checked + .track::after{transform:translateX(14px)}
.switch input:focus-visible + .track{box-shadow:var(--ring)}
.switch.dis{opacity:.45;cursor:not-allowed}

/* ══ auth / onboarding ══════════════════════════════════════════════ */
.auth-view{display:flex;align-items:center;justify-content:center;min-height:100dvh;background:var(--bg);padding:20px}
.auth-card{
  width:100%;max-width:392px;
  background:var(--sheet);border-radius:var(--r-lg);
  box-shadow:var(--sh-card);padding:32px 30px;
}
.auth-brand{display:flex;align-items:center;gap:9px;margin-bottom:24px}
.auth-brand span{font:600 15px/18px var(--sans);letter-spacing:-.015em}
.auth-card .field{margin-bottom:13px}
.auth-card a{color:var(--ink-a);font-weight:500;text-decoration:underline;text-underline-offset:2px}
.auth-card a:hover{color:var(--ink-2)}

/* ══ boot skeleton ══════════════════════════════════════════════════ */
.boot-skel{display:flex;height:100dvh;overflow:hidden;padding:8px;gap:2px}
.boot-skel .side-sk{width:236px;flex:none;padding:12px 14px;display:flex;flex-direction:column;gap:9px}
.boot-skel .side-sk :first-child{margin-bottom:12px}
.boot-skel .main-sk{flex:1;display:flex;flex-direction:column;min-width:0;background:var(--sheet);border-radius:var(--r-lg);box-shadow:var(--sh-card);overflow:hidden}
.boot-skel .head-sk{height:56px;border-bottom:1px solid var(--rule);flex:none}
.boot-skel .body-sk{flex:1;padding:20px;display:flex;flex-direction:column;gap:12px;overflow:hidden}
.boot-skel .sk-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.sk{
  background:linear-gradient(90deg,rgba(3,2,0,.045) 25%,rgba(3,2,0,.075) 37%,rgba(3,2,0,.045) 63%);
  background-size:400% 100%;
  border-radius:var(--r);
  animation:shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer{0%{background-position:100% 0}100%{background-position:0 0}}

/* ══ responsive ═════════════════════════════════════════════════════ */
.only-sm{display:none}
@media (max-width:1100px){
  .grid2{grid-template-columns:1fr}
  .chat-details{display:none}
}
@media (max-width:860px){
  .shell{padding:0;gap:0}
  .main{border-radius:0;box-shadow:none}
  .only-sm{display:inline-grid}
  .side{
    position:fixed;inset:0 auto 0 0;z-index:var(--z-menu);
    width:262px;background:var(--bg);
    transform:translateX(-102%);transition:transform .24s cubic-bezier(.32,.72,0,1);
    box-shadow:var(--sh-pop);padding:10px;
  }
  .side.show{transform:none}
  .find{width:auto;flex:1}
  .find kbd{display:none}
  .view{padding:14px}
  .chat-side{width:186px}
}
@media (max-width:620px){
  .form-grid{grid-template-columns:1fr}
  .kpi{grid-template-columns:repeat(2,1fr)}
  .crumb{display:none}
  .chat-side{display:none}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}
  html{scroll-behavior:auto}
}
