/* Palette from ramonrabadan.com: cream #FAF7F3, ink #111111, sand #E9E4DD */
:root{
  --bg:#EDE8E1; --card:#FAF7F3; --soft:#F1EDE7; --soft2:#E6E0D8;
  --text:#111111; --muted:#6a6a6a; --faint:#a39d95; --line:rgba(17,17,17,.1);
  --ink:#111111; --inkText:#FAF7F3;
  --accent:#6E50FF; --accent2:#8F78FF; --accentSoft:#ECE7FF; --glow:rgba(110,80,255,.55);
  --hot1:#1f1b2e; --hot2:#111111; --hotText:#FAF7F3;
  --stripe:#A796FF; --loss:#d9d2c8;
  --green:#1f8a4c; --greenSoft:#e2efe4; --red:#c4423a; --redSoft:#f5e3df;
  --blue:#3c64b1; --blueSoft:#e3e9f3; --amber:#a8741a; --amberSoft:#f3e9d6;
  --violet:#6e50ff; --violetSoft:#ebe6fb;
  --shadow:0 1px 2px rgba(17,17,17,.04);
  --pop:0 24px 60px -20px rgba(17,17,17,.35);
  --grain:.06;
}
:root[data-theme="dark"]{
  --bg:#0b0b0b; --card:#161616; --soft:#1d1d1d; --soft2:#2a2a2a;
  --text:#FAF7F3; --muted:#9a958e; --faint:#5f5b56; --line:rgba(250,247,243,.08);
  --ink:#FAF7F3; --inkText:#111111;
  --accent:#8F78FF; --accent2:#B3A4FF; --accentSoft:#231D3F; --glow:rgba(143,120,255,.5);
  --hot1:#241F38; --hot2:#141218; --hotText:#FAF7F3;
  --stripe:#5B45D6; --loss:#34312d;
  --green:#4cc27f; --greenSoft:#132a1c; --red:#ef7a70; --redSoft:#2e1614;
  --blue:#7ea2e6; --blueSoft:#15203a; --amber:#e0ad55; --amberSoft:#2d2310;
  --violet:#a594ff; --violetSoft:#211b3a;
  --shadow:none; --pop:0 24px 60px -20px rgba(0,0,0,.8);
  --grain:.04;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{background:var(--bg)}
body{font-family:"Archivo",system-ui,sans-serif;color:var(--text);-webkit-font-smoothing:antialiased;min-height:100vh;transition:background .4s,color .4s;font-size:14px;letter-spacing:-.01em}
/* subtle grain, as on ramonrabadan.com */
body:before{content:"";position:fixed;inset:0;pointer-events:none;z-index:400;opacity:var(--grain);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer}
input,select,textarea{font:inherit;color:var(--text)}
a{color:inherit;text-decoration:none}
svg{display:block}
.ico{width:18px;height:18px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
::selection{background:var(--accent);color:#fff}

/* ---------- shell ---------- */
.app{max-width:1480px;margin:0 auto;padding:24px 24px 40px}
.top{display:flex;align-items:center;gap:16px;margin-bottom:28px}
.pill{background:var(--card);border-radius:999px;box-shadow:var(--shadow);transition:background .4s}
.brand{display:flex;align-items:center;gap:10px;padding:6px 20px 6px 6px;font-weight:700;font-size:15px}
.logo{width:40px;height:40px;border-radius:50%;background:var(--ink);display:grid;place-items:center;color:var(--inkText);font-weight:700;font-size:20px;flex-shrink:0}
.nav{margin:0 auto;display:flex;padding:6px;gap:2px;position:relative}
.nav a{position:relative;padding:11px 18px;border-radius:999px;font-size:15px;font-weight:500;z-index:1;transition:color .25s;white-space:nowrap}
.nav a.on{color:var(--inkText)}
.blob{position:absolute;top:6px;bottom:6px;border-radius:999px;background:var(--ink);transition:left .45s cubic-bezier(.65,0,.35,1),width .45s cubic-bezier(.65,0,.35,1),background .4s,opacity .2s}
.tools{display:flex;gap:4px;padding:8px 10px}
.tools button{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;position:relative;transition:background .2s}
.tools button:hover{background:var(--soft)}
.dot{position:absolute;top:8px;right:9px;width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 8px var(--glow)}
.user{display:flex;align-items:center;gap:10px;padding:6px 16px 6px 6px;position:relative}
.user b{font-size:14px;font-weight:600;display:block}
.user small{font-size:11px;color:var(--muted)}
.user>.ico{width:16px;margin-left:12px;color:var(--muted)}

.body{display:flex;gap:28px;align-items:flex-start}
.rail{display:flex;flex-direction:column;gap:16px;flex-shrink:0;position:sticky;top:24px;z-index:20;height:calc(100vh - 140px);min-height:560px}
.railgrp{display:flex;flex-direction:column;gap:6px;padding:6px;border-radius:999px}
.railgrp a,.railgrp button{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;color:var(--text);transition:background .25s,color .25s;position:relative}
.railgrp a:hover,.railgrp button:hover{background:var(--soft)}
.railgrp .on{background:var(--ink)!important;color:var(--inkText)}
.railgrp .cnt{position:absolute;top:2px;right:0;min-width:16px;height:16px;padding:0 4px;border-radius:99px;background:var(--accent);color:#fff;font-size:9.5px;font-weight:700;display:grid;place-items:center;border:2px solid var(--card)}
.rail .spacer{flex:1}
.tipr{position:relative}
.tipr[data-tip]:hover:after{content:attr(data-tip);position:absolute;left:calc(100% + 12px);top:50%;transform:translateY(-50%);background:var(--ink);color:var(--inkText);font-size:12px;font-weight:500;padding:6px 10px;border-radius:8px;white-space:nowrap;z-index:50;pointer-events:none}
main{flex:1;min-width:0}
#view.enter{animation:pageIn .55s cubic-bezier(.2,.7,.2,1)}
@keyframes pageIn{from{opacity:0;filter:blur(10px);transform:translateY(10px)}to{opacity:1;filter:none;transform:none}}

/* ---------- type & primitives ---------- */
h1{font-size:42px;font-weight:600;letter-spacing:-.035em;line-height:1.05}
h3{font-size:17px;font-weight:600;letter-spacing:-.01em}
.sub{color:var(--muted);font-size:15px;margin-top:10px}
.phead{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:28px;flex-wrap:wrap}
.phead .acts{display:flex;gap:10px;flex-wrap:wrap}
.crumb{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:13px;margin-bottom:12px;transition:color .2s}
.crumb:hover{color:var(--text)}
.meta{font-size:12px;color:var(--muted)}
.muted{color:var(--muted)}
.card{background:var(--card);border-radius:24px;padding:20px;box-shadow:var(--shadow);transition:background .4s}
.card>.hd{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.inner{background:var(--soft);border-radius:18px;transition:background .4s}
.reveal{opacity:0;transform:translateY(14px);animation:rise .6s cubic-bezier(.2,.7,.2,1) forwards}
.reveal:nth-child(2){animation-delay:.06s}.reveal:nth-child(3){animation-delay:.12s}.reveal:nth-child(4){animation-delay:.18s}.reveal:nth-child(5){animation-delay:.24s}.reveal:nth-child(6){animation-delay:.3s}
@keyframes rise{to{opacity:1;transform:none}}
.lift{transition:transform .25s cubic-bezier(.2,.7,.2,1),box-shadow .25s,background .3s}
.lift:hover{transform:translateY(-4px)}
.grid{display:grid;gap:20px}
.g2{grid-template-columns:1fr 1fr}.g3{grid-template-columns:repeat(3,1fr)}.g4{grid-template-columns:repeat(4,1fr)}
.row{display:flex;align-items:center;gap:10px}
.between{display:flex;align-items:center;justify-content:space-between;gap:10px}
.empty{padding:40px 20px;text-align:center;color:var(--muted);font-size:13px}
.empty .ico{width:28px;height:28px;margin:0 auto 10px;color:var(--faint)}
hr.sep{border:0;border-top:1px solid var(--line);margin:16px 0}

.badge{display:inline-flex;align-items:center;gap:3px;font-size:11px;font-weight:600;padding:3px 7px;border-radius:7px;white-space:nowrap}
.up{background:var(--greenSoft);color:var(--green)}
.down{background:var(--redSoft);color:var(--red)}
.ok{color:var(--green)}.ko{color:var(--red)}
.tag{display:inline-flex;align-items:center;gap:4px;font-size:11px;padding:4px 9px;border-radius:999px;font-weight:500;background:var(--soft);color:var(--muted);white-space:nowrap}
.tag.acc{color:var(--accent);background:var(--accentSoft)}
.st{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:500;padding:4px 10px;border-radius:999px;white-space:nowrap}
.st:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.st.blue{background:var(--blueSoft);color:var(--blue)}.st.amber{background:var(--amberSoft);color:var(--amber)}
.st.green{background:var(--greenSoft);color:var(--green)}.st.red{background:var(--redSoft);color:var(--red)}
.st.gray{background:var(--soft);color:var(--muted)}.st.violet{background:var(--violetSoft);color:var(--violet)}
.st.orange{background:var(--accentSoft);color:var(--accent)}.st.ink{background:var(--soft2);color:var(--text)}.st.dark{background:var(--accent);color:#fff}

.av{border-radius:50%;display:inline-grid;place-items:center;color:#fff;font-weight:600;flex-shrink:0;letter-spacing:.02em}
.avs{display:flex}.avs .av{border:2px solid var(--card);margin-left:-8px}.avs .av:first-child{margin-left:0}
.who{display:flex;align-items:center;gap:10px;min-width:0}
.who b{font-weight:500;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.who small{font-size:12px;color:var(--muted);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:42px;padding:0 18px;border-radius:999px;font-size:14px;font-weight:500;transition:transform .15s,opacity .2s,background .25s;white-space:nowrap}
.btn:active{transform:scale(.97)}
.btn .ico{width:16px;height:16px}
.btn.dark{background:var(--ink);color:var(--inkText)}
.btn.light{background:var(--soft)}
.btn.light:hover{background:var(--soft2)}
.btn.line{border:1px solid var(--line);background:var(--card)}
.btn.line:hover{background:var(--soft)}
.btn.acc{background:var(--ink);color:var(--inkText)}
.btn.danger{background:var(--redSoft);color:var(--red)}
.btn.sm{height:34px;padding:0 14px;font-size:13px}
.btn.xs{height:28px;padding:0 11px;font-size:12px}
.btn.wide{flex:1}
.ibtn{width:34px;height:34px;border-radius:50%;display:inline-grid;vertical-align:middle;place-items:center;transition:background .2s;color:var(--muted)}
.ibtn:hover{background:var(--soft);color:var(--text)}
.ibtn .ico{width:16px;height:16px}

/* inputs */
.field{display:flex;flex-direction:column;gap:6px}
.field label{font-size:12px;font-weight:500;color:var(--muted)}
.in{height:42px;border:1px solid var(--line);border-radius:12px;padding:0 14px;background:var(--card);outline:0;transition:border-color .2s,box-shadow .2s;width:100%}
textarea.in{height:auto;min-height:90px;padding:12px 14px;resize:vertical;line-height:1.5}
.in:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--accentSoft)}
select.in{appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2377767d' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:34px}
.search{display:flex;align-items:center;gap:8px;border:1px solid var(--line);border-radius:999px;padding:0 16px;height:42px;color:var(--muted);background:var(--card);min-width:220px;transition:border-color .2s}
.search:focus-within{border-color:var(--accent)}
.search input{border:0;outline:0;background:none;width:100%}
.selp{height:42px;border:1px solid var(--line);border-radius:999px;padding:0 34px 0 16px;background:var(--card);outline:0;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2377767d' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 13px center;cursor:pointer}
.toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:16px}
.toolbar .grow{flex:1}
.fgrid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.fgrid .full{grid-column:1/-1}
.chk{width:17px;height:17px;border:1.5px solid var(--faint);border-radius:5px;display:inline-grid;place-items:center;vertical-align:middle;transition:.2s;cursor:pointer;flex-shrink:0;background:var(--card)}
.chk.on{background:var(--accent);border-color:var(--accent)}
.chk.on:after{content:"";width:8px;height:4px;border:2px solid #fff;border-top:0;border-right:0;transform:rotate(-45deg) translate(1px,-1px)}
.chk.round{border-radius:50%}

/* segmented */
.segm{display:inline-flex;background:var(--soft);border-radius:999px;padding:4px;gap:2px;flex-wrap:wrap}
.segm button{font-size:13px;padding:7px 14px;border-radius:999px;color:var(--muted);transition:color .2s,background .25s;white-space:nowrap}
.segm button.on{background:var(--card);color:var(--text);font-weight:600;box-shadow:0 1px 3px rgba(0,0,0,.08)}
.segm button .n{font-size:11px;opacity:.6;margin-left:4px}

/* tables */
.tw{overflow-x:auto}
table.tbl{width:100%;border-collapse:collapse;font-size:14px}
.tbl thead th{background:var(--soft);font-weight:500;color:var(--muted);text-align:left;padding:12px;font-size:13px;white-space:nowrap;user-select:none}
.tbl thead th.s{cursor:pointer}
.tbl thead th.s:hover{color:var(--text)}
.tbl thead th:first-child{border-radius:12px 0 0 12px}.tbl thead th:last-child{border-radius:0 12px 12px 0}
.tbl td{padding:13px 12px;border-bottom:1px solid var(--line);vertical-align:middle}
.tbl tbody tr{transition:background .2s}
.tbl tbody tr.click{cursor:pointer}
.tbl tbody tr:hover{background:var(--soft)}
.tbl tbody tr:last-child td{border-bottom:0}
.tbl .num{text-align:right;font-variant-numeric:tabular-nums}
.bulk{display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--ink);color:var(--inkText);border-radius:14px;margin-bottom:12px;animation:rise .3s both;font-size:13px}
.bulk .btn{background:rgba(127,127,127,.2);color:inherit}

/* stat tiles */
.stat{padding:18px 16px 16px;border-radius:18px;background:var(--soft);display:flex;flex-direction:column;min-height:150px;transition:background .4s,transform .25s}
.stat .h{display:flex;justify-content:space-between;align-items:center;font-size:14px;font-weight:500}
.stat .h span{width:28px;height:28px;border-radius:50%;background:var(--soft2);display:grid;place-items:center}
.stat .h .ico{width:14px;height:14px}
.stat .v{font-size:30px;font-weight:600;letter-spacing:-.02em;margin:auto 0 16px}
.stat .f{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.stat.hot{background:radial-gradient(120% 90% at 100% 0%,rgba(110,80,255,.55),transparent 55%),radial-gradient(80% 70% at 0% 100%,rgba(167,150,255,.18),transparent 60%),linear-gradient(160deg,var(--hot1),var(--hot2) 70%);color:var(--hotText);box-shadow:0 18px 34px -16px var(--glow)}
.stat.hot .h{color:color-mix(in srgb,var(--hotText) 80%,transparent)}
.stat.hot .h span{background:color-mix(in srgb,var(--hotText) 14%,transparent)}
.stat.hot .f{color:color-mix(in srgb,var(--hotText) 75%,transparent)}
.stat.hot .badge{background:color-mix(in srgb,var(--hotText) 16%,transparent);color:var(--hotText)}
.stats4{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:16px}
.kpi{display:flex;flex-direction:column;gap:6px}
.kpi b{font-size:26px;font-weight:600;letter-spacing:-.02em}

/* dashboard */
.dgrid1{display:grid;grid-template-columns:1fr 1.05fr 1.05fr;gap:20px}
.dgrid2{display:grid;grid-template-columns:1fr 2.1fr;gap:20px;margin-top:20px}
.big{font-size:28px;font-weight:600;letter-spacing:-.02em;margin:14px 0 10px}
.btns{display:flex;gap:12px;margin:22px 0 18px}
.minis{padding:14px 12px 12px}
.minis .hd{font-size:13px;font-weight:500;padding:0 2px 12px}
.minis .hd span{color:var(--muted);font-weight:400}
.ml{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.mini{background:var(--card);border-radius:14px;padding:12px 10px;transition:background .4s,transform .25s;display:block}
.mini .r{display:flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600}
.mini .r i{width:8px;height:8px;border-radius:50%;flex-shrink:0}
.mini b{display:block;font-size:15px;font-weight:600;margin:12px 0 2px;letter-spacing:-.01em}
.mini small{font-size:10.5px;color:var(--muted);display:block}

.chart{padding:16px 16px 10px}
.chart .h{display:flex;justify-content:space-between;font-size:13px;font-weight:600;margin-bottom:10px}
.legend{display:flex;gap:12px;font-weight:500;font-size:12px;flex-wrap:wrap}
.legend i{display:inline-block;width:9px;height:9px;border-radius:3px;margin-right:5px;vertical-align:-1px}
.bars{display:flex;gap:10px}
.yax{display:flex;flex-direction:column;justify-content:space-between;font-size:11px;color:var(--muted);padding-bottom:22px;text-align:right;min-width:30px}
.cols{flex:1;display:flex;justify-content:space-between;align-items:flex-end;gap:4px}
.col{display:flex;flex-direction:column;align-items:center;gap:6px;flex:1;min-width:0}
.stack{width:26px;max-width:80%;display:flex;flex-direction:column;gap:3px;justify-content:flex-end;cursor:pointer;position:relative}
.seg{border-radius:6px;transform-origin:bottom;transform:scaleY(0);transition:transform .9s cubic-bezier(.2,.8,.2,1),filter .2s;min-height:0}
.seg.p{background:repeating-linear-gradient(135deg,var(--accent) 0 3px,var(--stripe) 3px 6px)}
.seg.l{background:var(--loss)}
.seg.a{background:var(--accent)}
.drawn .seg{transform:scaleY(1)}
.stack:hover .seg{filter:brightness(1.1)}
.col small{font-size:11px;color:var(--muted)}
.tip{position:absolute;bottom:calc(100% + 8px);left:50%;transform:translate(-50%,4px);background:var(--ink);color:var(--inkText);font-size:11px;padding:6px 9px;border-radius:9px;white-space:nowrap;opacity:0;pointer-events:none;transition:.2s;z-index:3;line-height:1.5}
.stack:hover .tip{opacity:1;transform:translate(-50%,0)}

.limit .bar,.pbar{height:12px;border-radius:99px;background:repeating-linear-gradient(135deg,var(--soft2) 0 2px,transparent 2px 5px);overflow:hidden}
.limit .bar{margin:22px 0 10px}
.limit .bar div,.pbar div{height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,var(--accent2),var(--accent));box-shadow:0 0 14px -2px var(--glow);transition:width 1.2s cubic-bezier(.2,.8,.2,1)}
.pbar.thin{height:8px}
.pbar.ink div{background:var(--ink);box-shadow:none}
.limit .rw{display:flex;justify-content:space-between;font-size:12px;font-weight:600}
.limit .rw span{color:var(--muted);font-weight:400;font-size:11px}

/* hero (rewards style) */
.hero{position:relative;overflow:hidden;color:var(--hotText);border-radius:24px;padding:24px;background:radial-gradient(90% 80% at 85% 10%,rgba(110,80,255,.6),transparent 55%),radial-gradient(70% 60% at 10% 100%,rgba(167,150,255,.2),transparent 60%),linear-gradient(135deg,var(--hot1),var(--hot2));box-shadow:0 24px 44px -20px var(--glow)}
.hero .r1{display:flex;justify-content:space-between;align-items:center;font-size:12px;gap:10px}
.chip{display:inline-flex;align-items:center;gap:6px;background:color-mix(in srgb,var(--hotText) 13%,transparent);padding:6px 12px;border-radius:999px;font-weight:500}
.hero .r1>span:last-child{opacity:.75}
.hero .pts{font-size:52px;font-weight:600;letter-spacing:-.03em;margin:36px 0 8px}
.hero .pts small{font-size:16px;font-weight:500;opacity:.85;letter-spacing:0;margin-left:6px}
.hero .prog{height:10px;border-radius:99px;background:repeating-linear-gradient(135deg,color-mix(in srgb,var(--hotText) 30%,transparent) 0 2px,transparent 2px 5px)}
.hero .prog div{height:100%;width:0;background:var(--hotText);border-radius:99px;transition:width 1.3s cubic-bezier(.2,.8,.2,1)}
.hero .r2{display:flex;justify-content:space-between;font-size:11.5px;opacity:.85;margin:8px 0 20px}
.hero .r3{display:flex;align-items:center;gap:16px;font-size:12px;flex-wrap:wrap}
.hero .r3 span{opacity:.85}
.wbtn{background:#FAF7F3;color:#111;display:inline-flex;align-items:center;gap:8px;padding:11px 18px;border-radius:999px;font-weight:600;font-size:14px;transition:transform .15s}
.wbtn:hover{transform:translateY(-2px)}

/* tasks list */
.tasks .t{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}
.tasks .t:last-child{border-bottom:0}
.tasks .t .tt{flex:1;min-width:0}
.tasks .t .tt b{font-weight:500;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tasks .t.done .tt b{text-decoration:line-through;color:var(--muted)}
.tasks .t .ti{width:32px;height:32px;border-radius:10px;background:var(--soft);display:grid;place-items:center;color:var(--muted)}
.tasks .t .ti .ico{width:15px;height:15px}
.prio{width:7px;height:7px;border-radius:50%;flex-shrink:0}
.prio.high{background:var(--red)}.prio.med{background:var(--amber)}.prio.low{background:var(--faint)}
.tgroup{margin-bottom:18px}
.tgroup>h4{font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0 0 4px;display:flex;gap:8px;align-items:center}

/* kanban */
.board{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(270px,1fr);gap:16px;overflow-x:auto;padding-bottom:10px;align-items:start}
.kcol{background:var(--card);border-radius:22px;padding:14px;transition:background .3s,box-shadow .2s;min-height:200px}
.kcol.over{box-shadow:inset 0 0 0 2px var(--accent);background:var(--accentSoft)}
.kcol .kh{display:flex;align-items:center;gap:8px;padding:4px 4px 12px}
.kcol .kh i{width:9px;height:9px;border-radius:50%}
.kcol .kh b{font-size:14px;font-weight:600}
.kcol .kh .n{font-size:11px;background:var(--soft);padding:2px 8px;border-radius:99px;color:var(--muted);font-weight:600}
.kcol .kh .sum{margin-left:auto;font-size:12px;font-weight:600;color:var(--muted)}
.kcol .kbar{height:4px;border-radius:99px;background:var(--soft);margin:0 4px 12px;overflow:hidden}
.kcol .kbar div{height:100%;border-radius:99px}
.klist{display:flex;flex-direction:column;gap:10px;min-height:60px}
.dcard{background:var(--soft);border-radius:16px;padding:14px;cursor:grab;transition:transform .2s,box-shadow .2s,background .3s,opacity .2s;user-select:none}
.dcard:hover{transform:translateY(-2px);box-shadow:0 10px 24px -14px rgba(0,0,0,.35)}
.dcard.drag{opacity:.4}
.dcard b{font-size:14px;font-weight:600;display:block;margin-bottom:4px;line-height:1.35}
.dcard .co{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:6px}
.dcard .co .ico{width:13px;height:13px}
.dcard .ft{display:flex;align-items:center;justify-content:space-between;margin-top:14px}
.dcard .val{font-size:16px;font-weight:600;letter-spacing:-.01em}
.dcard .due{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:4px}
.dcard .due.late{color:var(--red)}
.dcard .due .ico{width:12px;height:12px}
.kadd{width:100%;padding:10px;border-radius:14px;border:1.5px dashed var(--soft2);color:var(--muted);font-size:13px;display:flex;align-items:center;justify-content:center;gap:6px;transition:.2s}
.kadd:hover{border-color:var(--accent);color:var(--accent)}

/* stepper */
.stepper{display:flex;gap:4px;margin:6px 0 4px}
.stepper button{flex:1;height:34px;font-size:11.5px;font-weight:500;background:var(--soft);color:var(--muted);transition:.25s;clip-path:polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%,8px 50%);padding:0 10px 0 14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.stepper button:first-child{clip-path:polygon(0 0,calc(100% - 8px) 0,100% 50%,calc(100% - 8px) 100%,0 100%);border-radius:10px 0 0 10px}
.stepper button.past{background:var(--accentSoft);color:var(--accent)}
.stepper button.cur{background:var(--accent);color:#fff;box-shadow:0 0 18px -4px var(--glow)}
.stepper button:hover:not(.cur){filter:brightness(.97)}

/* timeline */
.compose{border:1px solid var(--line);border-radius:18px;padding:12px;transition:border-color .2s}
.compose:focus-within{border-color:var(--accent)}
.compose textarea{border:0;outline:0;background:none;width:100%;resize:none;min-height:60px;line-height:1.5}
.compose .ct{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.tl{position:relative;margin-top:18px}
.tl:before{content:"";position:absolute;left:17px;top:6px;bottom:6px;width:1.5px;background:var(--line)}
.tli{display:flex;gap:14px;padding:0 0 18px;position:relative;animation:rise .4s both}
.tli .tdot{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--soft);color:var(--muted);flex-shrink:0;border:3px solid var(--card);position:relative;z-index:1}
.tli .tdot .ico{width:15px;height:15px}
.tli .tdot.note{background:var(--amberSoft);color:var(--amber)}
.tli .tdot.call{background:var(--greenSoft);color:var(--green)}
.tli .tdot.email{background:var(--blueSoft);color:var(--blue)}
.tli .tdot.meeting{background:var(--violetSoft);color:var(--violet)}
.tli .tdot.deal{background:var(--accentSoft);color:var(--accent)}
.tli .tb{flex:1;min-width:0;padding-top:2px}
.tli .tb .th{font-size:13px;display:flex;gap:6px;flex-wrap:wrap;align-items:baseline}
.tli .tb .th b{font-weight:600}
.tli .tb p{margin-top:6px;background:var(--soft);padding:10px 12px;border-radius:12px;font-size:13.5px;line-height:1.5;white-space:pre-wrap;word-break:break-word}
.tli .del{opacity:0;transition:.2s}
.tli:hover .del{opacity:1}

/* detail layout */
.dlayout{display:grid;grid-template-columns:320px 1fr 340px;gap:20px;align-items:start}
.profile{text-align:center;padding-top:28px}
.profile .av{margin:0 auto 14px}
.profile h2{font-size:22px;font-weight:600;letter-spacing:-.02em}
.qacts{display:flex;justify-content:center;gap:10px;margin:18px 0 6px}
.qacts button{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:11px;color:var(--muted)}
.qacts button span{width:42px;height:42px;border-radius:50%;background:var(--soft);display:grid;place-items:center;color:var(--text);transition:.2s}
.qacts button:hover span{background:var(--ink);color:var(--inkText)}
.props{text-align:left;margin-top:16px}
.props .p{display:flex;justify-content:space-between;gap:14px;padding:11px 0;border-bottom:1px solid var(--line);font-size:13px}
.props .p:last-child{border-bottom:0}
.props .p span:first-child{color:var(--muted);flex-shrink:0}
.props .p span:last-child{text-align:right;word-break:break-word}
.rel .ri{display:flex;align-items:center;gap:10px;padding:10px;border-radius:14px;transition:background .2s;cursor:pointer}
.rel .ri:hover{background:var(--soft)}
.rel .ri .rt{flex:1;min-width:0}
.rel .ri .rt b{font-weight:500;font-size:13.5px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rel .ri .rt small{font-size:11.5px;color:var(--muted)}
.rel .ri .rv{font-weight:600;font-size:13px}
.side{display:flex;flex-direction:column;gap:20px}

/* companies */
.cgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:18px}
.ccard{cursor:pointer;display:flex;flex-direction:column;gap:14px}
.ccard .lg{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;font-weight:700;font-size:18px;color:#fff}
.ccard .nums{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:12px;border-radius:14px;background:var(--soft)}
.ccard .nums div{font-size:11px;color:var(--muted)}
.ccard .nums b{display:block;color:var(--text);font-size:14px;margin-top:2px}

/* messages */
.chatwrap{display:grid;grid-template-columns:320px 1fr;height:calc(100vh - 240px);min-height:520px;padding:0;overflow:hidden}
.chats{border-right:1px solid var(--line);padding:18px;display:flex;flex-direction:column;gap:12px;min-height:0}
.chats .search{width:100%;min-width:0;border:0;background:var(--soft)}
.clist{overflow:auto;display:flex;flex-direction:column;gap:4px;flex:1}
.thread{display:flex;gap:10px;padding:11px;border-radius:16px;align-items:center;cursor:pointer;transition:background .2s}
.thread:hover{background:var(--soft)}
.thread.on{background:var(--accentSoft)}
.thread .tx{flex:1;min-width:0}
.thread b{font-size:13.5px;display:block;font-weight:600}
.thread small{font-size:12px;color:var(--muted);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.thread .tm{display:flex;flex-direction:column;align-items:flex-end;gap:6px;align-self:flex-start;font-size:10.5px;color:var(--muted)}
.thread .un{min-width:18px;height:18px;border-radius:99px;background:var(--accent);color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center;padding:0 5px}
.convo{display:flex;flex-direction:column;min-height:0}
.convo .hd{display:flex;align-items:center;gap:10px;padding:16px 22px;border-bottom:1px solid var(--line)}
.convo .hd b{font-size:14px;display:block}
.convo .hd small{font-size:11.5px;color:var(--green)}
.convo .hd .act{margin-left:auto;display:flex;gap:6px}
.msgs{flex:1;padding:20px 22px;display:flex;flex-direction:column;gap:10px;overflow:auto}
.day{align-self:center;font-size:11px;color:var(--muted);background:var(--soft);padding:4px 10px;border-radius:999px;margin:6px 0}
.bub{max-width:62%;background:var(--soft);padding:11px 14px 7px;border-radius:16px 16px 16px 6px;font-size:13.5px;line-height:1.45;animation:rise .35s cubic-bezier(.2,.7,.2,1) both;white-space:pre-wrap;word-break:break-word}
.bub time{display:block;text-align:right;font-size:10px;color:var(--muted);margin-top:4px}
.bub.me{align-self:flex-end;background:var(--ink);color:var(--inkText);border-radius:16px 16px 6px 16px}
.bub.me time{color:inherit;opacity:.6}
.msgbar{display:flex;align-items:center;gap:10px;margin:0 16px 16px;padding:7px 7px 7px 18px;border:1px solid var(--line);border-radius:999px;color:var(--muted)}
.msgbar input{flex:1;border:0;outline:0;background:none;min-width:0}
.send{width:38px;height:38px;border-radius:50%;background:var(--accent);color:#fff;box-shadow:0 6px 16px -6px var(--glow);display:grid;place-items:center;transition:transform .15s}
.send:active{transform:scale(.92)}
.tpls{display:flex;gap:6px;padding:0 16px 10px;flex-wrap:wrap}
.tpls button{font-size:12px;padding:6px 11px;border-radius:999px;background:var(--soft);color:var(--muted);transition:.2s}
.tpls button:hover{color:var(--text);background:var(--soft2)}

/* calendar */
.cal{display:grid;grid-template-columns:repeat(7,1fr);border-radius:18px;overflow:hidden;gap:1px;background:var(--line);border:1px solid var(--line)}
.cal .dh{background:var(--soft);padding:10px;font-size:12px;font-weight:600;color:var(--muted);text-align:center}
.cal .cd{background:var(--card);min-height:112px;padding:8px;display:flex;flex-direction:column;gap:4px;cursor:pointer;transition:background .2s;min-width:0}
.cal .cd:hover{background:var(--soft)}
.cal .cd.out{opacity:.45}
.cal .cd .dn{font-size:12px;font-weight:600;width:24px;height:24px;border-radius:50%;display:grid;place-items:center}
.cal .cd.today .dn{background:var(--accent);color:#fff;box-shadow:0 0 12px -2px var(--glow)}
.cal .ev{font-size:11px;padding:3px 7px;border-radius:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.cal .ev.task{background:var(--soft2)}
.cal .ev.task.done{text-decoration:line-through;opacity:.6}
.cal .ev.deal{background:var(--accentSoft);color:var(--accent)}
.cal .more{font-size:11px;color:var(--muted);padding-left:4px}

/* quotes */
.lines{width:100%;border-collapse:collapse;font-size:13px}
.lines th{text-align:left;font-weight:500;color:var(--muted);font-size:12px;padding:0 6px 8px}
.lines td{padding:4px 6px}
.lines .in{height:38px;border-radius:10px;padding:0 10px}
.totals{margin-left:auto;width:280px;margin-top:14px;font-size:14px}
.totals div{display:flex;justify-content:space-between;padding:6px 0}
.totals div:last-child{border-top:1px solid var(--line);margin-top:6px;padding-top:12px;font-weight:700;font-size:18px}

/* reports */
.donut{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.donut svg circle{transition:stroke-dasharray 1s cubic-bezier(.2,.8,.2,1)}
.dleg{display:flex;flex-direction:column;gap:10px;flex:1;min-width:160px}
.dleg div{display:flex;align-items:center;gap:8px;font-size:13px}
.dleg i{width:10px;height:10px;border-radius:3px}
.dleg span:last-child{margin-left:auto;font-weight:600}
.funnel .fr{display:grid;grid-template-columns:110px 1fr 84px;gap:12px;align-items:center;margin-bottom:10px;font-size:13px}
.funnel .fb{height:34px;border-radius:10px;background:var(--soft);overflow:hidden;position:relative}
.funnel .fb div{height:100%;border-radius:10px;width:0;transition:width 1s cubic-bezier(.2,.8,.2,1)}
.hbars .hr{display:grid;grid-template-columns:130px 1fr 60px;gap:12px;align-items:center;margin-bottom:12px;font-size:13px}

/* team */
.tcard{display:flex;flex-direction:column;gap:14px}
.tcard .between b{font-size:16px}

/* overlays */
.backdrop{position:fixed;inset:0;background:rgba(15,15,17,.35);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);z-index:80;animation:fade .25s both}
.backdrop.out{animation:fade .2s reverse both}
@keyframes fade{from{opacity:0}}
.modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto;background:var(--card);border-radius:26px;box-shadow:var(--pop);z-index:90;animation:pop .35s cubic-bezier(.2,.9,.3,1.1) both}
.modal.wide{width:min(900px,calc(100vw - 32px))}
.modal.out{animation:popOut .18s ease-in both}
@keyframes pop{from{opacity:0;transform:translate(-50%,-46%) scale(.96)}}
@keyframes popOut{to{opacity:0;transform:translate(-50%,-48%) scale(.97)}}
.modal .mh{display:flex;align-items:center;justify-content:space-between;padding:22px 24px 6px}
.modal .mh h3{font-size:20px}
.modal .mb{padding:16px 24px}
.modal .mf{display:flex;justify-content:flex-end;gap:10px;padding:8px 24px 22px}
.drawer{position:fixed;top:12px;right:12px;bottom:12px;width:min(520px,calc(100vw - 24px));background:var(--card);border-radius:26px;box-shadow:var(--pop);z-index:90;overflow:auto;animation:slideIn .45s cubic-bezier(.2,.8,.2,1) both}
.drawer.out{animation:slideOut .25s ease-in both}
@keyframes slideIn{from{transform:translateX(110%)}}
@keyframes slideOut{to{transform:translateX(110%)}}
.drawer .dh{position:sticky;top:0;background:var(--card);padding:20px 22px 12px;z-index:2;display:flex;align-items:flex-start;gap:12px}
.drawer .db{padding:6px 22px 24px;display:flex;flex-direction:column;gap:18px}
.toasts{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:200;align-items:center;pointer-events:none}
.toast{background:var(--ink);color:var(--inkText);padding:12px 16px;border-radius:14px;font-size:13.5px;font-weight:500;display:flex;align-items:center;gap:10px;box-shadow:var(--pop);animation:toastIn .4s cubic-bezier(.2,.9,.3,1.2) both;pointer-events:auto}
.toast .ico{width:16px;height:16px;color:var(--accent2)}
.toast button{color:var(--accent2);font-weight:600;margin-left:6px}
.toast.out{animation:toastOut .25s ease-in both}
@keyframes toastIn{from{opacity:0;transform:translateY(16px) scale(.95)}}
@keyframes toastOut{to{opacity:0;transform:translateY(8px)}}
.pop{position:absolute;top:calc(100% + 10px);right:0;width:360px;background:var(--card);border-radius:22px;box-shadow:var(--pop);z-index:70;padding:10px;animation:pop2 .25s cubic-bezier(.2,.9,.3,1.1) both;text-align:left}
@keyframes pop2{from{opacity:0;transform:translateY(-6px) scale(.98)}}
.pop .ph{padding:8px 10px 10px;display:flex;justify-content:space-between;align-items:center}
.pop .pi{display:flex;gap:12px;padding:10px;border-radius:14px;cursor:pointer;transition:background .2s;align-items:flex-start}
.pop .pi:hover{background:var(--soft)}
.pop .pi .ic{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;flex-shrink:0}
.pop .pi .ic .ico{width:15px;height:15px}
.pop .pi b{font-size:13px;font-weight:600;display:block}
.pop .pi small{font-size:12px;color:var(--muted)}
.menu{width:220px;padding:6px}
.menu button,.menu a{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;border-radius:12px;font-size:13.5px;transition:background .2s}
.menu button:hover,.menu a:hover{background:var(--soft)}
.menu .ico{width:16px;height:16px;color:var(--muted)}
.palette{position:fixed;left:50%;top:14vh;transform:translateX(-50%);width:min(620px,calc(100vw - 32px));background:var(--card);border-radius:24px;box-shadow:var(--pop);z-index:95;overflow:hidden;animation:pop3 .3s cubic-bezier(.2,.9,.3,1.1) both}
@keyframes pop3{from{opacity:0;transform:translate(-50%,-10px) scale(.98)}}
.palette .pin{display:flex;align-items:center;gap:12px;padding:18px 20px;border-bottom:1px solid var(--line);color:var(--muted)}
.palette .pin input{flex:1;border:0;outline:0;background:none;font-size:17px}
.palette kbd,.kbd{font:inherit;font-size:11px;padding:2px 7px;border-radius:6px;background:var(--soft);color:var(--muted);border:1px solid var(--line)}
.palette .res{max-height:52vh;overflow:auto;padding:8px}
.palette .grp{font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:10px 12px 6px}
.palette .it{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:12px;cursor:pointer}
.palette .it.sel{background:var(--soft)}
.palette .it .ix{width:32px;height:32px;border-radius:10px;background:var(--soft2);display:grid;place-items:center;flex-shrink:0}
.palette .it .ix .ico{width:15px;height:15px}
.palette .it b{font-weight:500;font-size:14px}
.palette .it small{font-size:12px;color:var(--muted);margin-left:auto}
.lock{position:fixed;inset:0;z-index:300;background:var(--bg);display:grid;place-items:center;animation:fade .4s both;text-align:center}
.lock .logo{width:64px;height:64px;font-size:30px;margin:0 auto 18px}
.confetti{position:fixed;width:8px;height:12px;z-index:250;pointer-events:none;border-radius:2px}

::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}

@media (max-width:1280px){
  .dlayout{grid-template-columns:300px 1fr}
  .dlayout>.side{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}
}
@media (max-width:1100px){
  .dgrid1{grid-template-columns:1fr 1fr}.dgrid1>:last-child{grid-column:1/-1}
  .dgrid2,.g3{grid-template-columns:1fr}
  .g4{grid-template-columns:1fr 1fr}
  .tools .hide-md,.user>div{display:none}
  .nav a{padding:11px 13px}
}
@media (max-width:860px){
  .app{padding:14px 14px 96px}
  .top{flex-wrap:wrap;gap:10px}
  .nav{order:3;width:100%;overflow-x:auto;margin:0;scrollbar-width:none}
  .tools{margin-left:auto}
  .rail{position:fixed;left:12px;right:12px;bottom:12px;top:auto;height:auto;min-height:0;flex-direction:row;z-index:60;gap:0}
  .rail .railgrp{flex-direction:row;border-radius:999px;box-shadow:var(--pop);overflow-x:auto;scrollbar-width:none}
  .rail .railgrp:not(#rail){display:none}
  .rail #rail{flex:1;justify-content:space-between}
  .rail .spacer{display:none}
  .tipr[data-tip]:hover:after{display:none}
  h1{font-size:30px}
  .dgrid1,.g2,.g4,.ml,.dlayout,.fgrid{grid-template-columns:1fr}
  .dlayout>.side{grid-template-columns:1fr}
  .chatwrap{grid-template-columns:1fr;height:auto}
  .chatwrap.has .chats{display:none}
  .chatwrap:not(.has) .convo{display:none}
  .search{min-width:0;flex:1}
  .cal .cd{min-height:70px}.cal .ev{display:none}
  .cal .cd.has:after{content:"";width:6px;height:6px;border-radius:50%;background:var(--accent);margin:2px auto 0}
  .pop{position:fixed;left:12px;right:12px;width:auto;top:80px}
  .totals{width:100%}
  .hero .pts{font-size:40px}
  .funnel .fr,.hbars .hr{grid-template-columns:90px 1fr 54px}
}
@media (prefers-reduced-motion:reduce){*{animation-duration:.01ms!important;transition-duration:.01ms!important}}
#view.static .reveal{animation:none;opacity:1;transform:none}
#view.static .seg,#view.static [data-w],#view.static circle{transition:none!important}

/* Brand sparkle ✦ with violet glow (from ramonrabadan.com hero) */
.spark{display:inline-block;width:.42em;height:.42em;vertical-align:.55em;margin-left:.12em;color:var(--ink);filter:drop-shadow(0 0 10px rgba(46,91,255,.75));animation:twinkle 3.2s ease-in-out infinite}
.spark svg{width:100%;height:100%;fill:currentColor}
@keyframes twinkle{50%{transform:rotate(18deg) scale(.82);filter:drop-shadow(0 0 16px rgba(46,91,255,.95))}}
.nav a.on{box-shadow:none}
.blob{box-shadow:0 6px 18px -8px var(--glow)}
.btn.dark{box-shadow:0 8px 20px -12px var(--glow)}
.tag.acc{color:var(--accent);background:var(--accentSoft)}
@media (prefers-reduced-motion:reduce){.spark{animation:none}}
