:root{
  --bg:#f4f5fa;--surface:#fff;--surface2:#f1f3f9;--surface3:#e9ecf6;--text:#141a2e;--text2:#3d4663;--muted:#7a829e;--line:#e8eaf3;
  --brand:#4f46e5;--brand2:#7c3aed;--brand-soft:#eceeff;--brand-ink:#fff;
  --good:#10b981;--good-soft:#dcfaee;--warn:#f59e0b;--warn-soft:#fff3d6;--bad:#ef4444;--bad-soft:#ffe3e3;--info:#0ea5e9;--info-soft:#dff3fd;
  --shadow:0 1px 2px rgba(20,24,50,.04),0 10px 30px -14px rgba(20,24,50,.16);--shadow-lg:0 24px 60px -20px rgba(20,24,50,.35);
  --r:16px;--r-sm:10px;--side:268px;--ease:cubic-bezier(.2,.8,.2,1);
}
:root[data-theme=dark]{
  --bg:#0b0e1d;--surface:#141830;--surface2:#1b2040;--surface3:#242a50;--text:#eef0fc;--text2:#c3c8e6;--muted:#8890b4;--line:#242a4b;
  --brand:#8b93ff;--brand2:#a78bfa;--brand-soft:#232a66;--brand-ink:#0b0e1d;
  --good-soft:#0f3a2e;--warn-soft:#44340f;--bad-soft:#4a1b24;--info-soft:#0e3347;
  --shadow:0 1px 2px rgba(0,0,0,.3),0 12px 30px -14px rgba(0,0,0,.6);--shadow-lg:0 24px 60px -20px rgba(0,0,0,.8);
}
*{box-sizing:border-box;margin:0}
html,body{height:100%}
body{font:14px/1.5 Inter,system-ui,-apple-system,Segoe UI,sans-serif;background:var(--bg);color:var(--text);-webkit-font-smoothing:antialiased;letter-spacing:-.005em}
button,input,select,textarea{font:inherit;color:inherit;letter-spacing:inherit}
button{cursor:pointer;background:none;border:0}
a{color:var(--brand);text-decoration:none}
::selection{background:var(--brand);color:var(--brand-ink)}
::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--surface3);border-radius:10px;border:2px solid transparent;background-clip:padding-box}
.ico{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;flex:none}
.ico.sm{width:15px;height:15px}.ico.lg{width:22px;height:22px}
.boot{height:100vh;display:grid;place-items:center}.spin{width:28px;height:28px;border-radius:50%;border:3px solid var(--surface3);border-top-color:var(--brand);animation:sp .7s linear infinite}
@keyframes sp{to{transform:rotate(360deg)}}
@keyframes up{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* shell */
.app{display:grid;grid-template-columns:var(--side) 1fr;min-height:100vh}
.side{position:sticky;top:0;height:100vh;background:var(--surface);display:flex;flex-direction:column;padding:18px 14px;gap:4px;overflow:auto;z-index:30}
.brand{display:flex;align-items:center;gap:11px;padding:4px 10px 18px;font-weight:600;font-size:16px;letter-spacing:-.02em}
.logo{width:34px;height:34px;border-radius:11px;background:linear-gradient(135deg,var(--brand),var(--brand2));display:grid;place-items:center;color:#fff;box-shadow:0 8px 18px -6px var(--brand)}
.brand small{display:block;font-weight:500;font-size:11.5px;color:var(--muted);letter-spacing:0;margin-top:-2px}
.nav{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:11px;color:var(--text2);font-weight:500;transition:background .15s,color .15s;width:100%;text-align:left}
.nav:hover{background:var(--surface2);color:var(--text)}
.nav.on{background:var(--brand-soft);color:var(--brand)}
.nav .badge{margin-left:auto}
.badge{background:var(--bad);color:#fff;border-radius:99px;font-size:11px;font-weight:600;padding:1px 7px;min-width:20px;text-align:center}
.side h6{font-size:11px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);font-weight:600;padding:16px 12px 6px;display:flex;align-items:center;justify-content:space-between}
.side h6 button{color:var(--muted);display:grid;place-items:center;width:22px;height:22px;border-radius:7px}.side h6 button:hover{background:var(--surface2);color:var(--text)}
.pdot{width:10px;height:10px;border-radius:4px;flex:none}
.side .grow{flex:1}
.me{display:flex;align-items:center;gap:10px;padding:10px;border-radius:12px;background:var(--surface2);margin-top:8px}
.me b{display:block;font-size:13px;line-height:1.2}.me span{font-size:11.5px;color:var(--muted)}
.main{min-width:0;display:flex;flex-direction:column}
.top{position:sticky;top:0;z-index:20;display:flex;align-items:center;gap:12px;padding:14px 32px;background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(14px)}
.search{position:relative;flex:1;max-width:520px}
.search input{width:100%;padding:10px 14px 10px 40px;border-radius:12px;border:0;background:var(--surface);box-shadow:var(--shadow);outline:2px solid transparent;transition:outline-color .15s}
.search input:focus{outline-color:var(--brand)}
.search .ico{position:absolute;left:13px;top:11px;color:var(--muted)}
.results{position:absolute;top:46px;left:0;right:0;background:var(--surface);border-radius:14px;box-shadow:var(--shadow-lg);padding:8px;max-height:420px;overflow:auto;z-index:50}
.results .hd{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.08em;padding:8px 10px 4px}
.results button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 10px;border-radius:9px}.results button:hover{background:var(--surface2)}
.spacer{flex:1}
.page{padding:8px 32px 56px;max-width:1500px;width:100%;animation:up .35s var(--ease)}
.pagehead{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:10px 0 22px;flex-wrap:wrap}
h1{font-size:28px;letter-spacing:-.03em;line-height:1.15;font-weight:600}
.sub{color:var(--muted);margin-top:4px}
h2{font-size:15px;font-weight:600;letter-spacing:-.01em}

/* controls */
.btn{display:inline-flex;align-items:center;gap:8px;padding:9px 15px;border-radius:11px;font-weight:500;background:var(--surface);box-shadow:var(--shadow);transition:transform .12s,background .15s,box-shadow .15s;white-space:nowrap}
.btn:hover{background:var(--surface2)}.btn:active{transform:scale(.97)}
.btn.primary{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff;box-shadow:0 6px 14px -10px rgba(196,35,28,.45)}.btn.primary:hover{filter:brightness(1.08)}
.btn.ghost{background:transparent;box-shadow:none;color:var(--text2)}.btn.ghost:hover{background:var(--surface2)}
.btn.danger{color:var(--bad)}
.btn.sm{padding:6px 11px;font-size:13px;border-radius:9px}
.btn:disabled{opacity:.5;pointer-events:none}
.iconbtn{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;color:var(--text2);background:var(--surface);box-shadow:var(--shadow);position:relative}.iconbtn:hover{background:var(--surface2)}
.iconbtn.flat{background:none;box-shadow:none}
.iconbtn .badge{position:absolute;top:-5px;right:-5px}
.inp,.sel,.txt{width:100%;padding:9px 12px;border-radius:10px;border:0;background:var(--surface2);outline:2px solid transparent;transition:outline-color .15s,background .15s}
.inp:focus,.sel:focus,.txt:focus{outline-color:var(--brand);background:var(--surface)}
.txt{resize:vertical;min-height:90px;line-height:1.55}
label.f{display:block;font-size:12px;font-weight:500;color:var(--muted);margin:0 0 5px}
.field{margin-bottom:14px}
.row{display:flex;gap:12px;align-items:center}.row>*{min-width:0}
.tabs{display:inline-flex;background:var(--surface);padding:4px;border-radius:13px;box-shadow:var(--shadow);gap:2px}
.tabs button{padding:7px 14px;border-radius:10px;font-weight:500;color:var(--muted);display:flex;gap:7px;align-items:center}
.tabs button:hover{color:var(--text)}.tabs button.on{background:var(--brand-soft);color:var(--brand)}

/* cards */
.card{background:var(--surface);border-radius:var(--r);box-shadow:var(--shadow);padding:20px}
.card>.hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.grid{display:grid;gap:18px}
.g4{grid-template-columns:repeat(4,1fr)}.g3{grid-template-columns:repeat(3,1fr)}
.dash{display:grid;gap:18px;grid-template-columns:repeat(12,1fr)}
.span4{grid-column:span 4}.span5{grid-column:span 5}.span6{grid-column:span 6}.span7{grid-column:span 7}.span8{grid-column:span 8}.span12{grid-column:span 12}
.stat{position:relative;overflow:hidden;padding:20px 22px}
.stat .lab{color:var(--muted);font-weight:500;font-size:13px;display:flex;align-items:center;gap:8px}
.stat .num{font-size:38px;font-weight:600;letter-spacing:-.04em;line-height:1.1;margin-top:10px}
.stat .hint{font-size:12.5px;color:var(--muted);margin-top:2px}
.stat .chip-ico{width:30px;height:30px;border-radius:10px;display:grid;place-items:center}
.stat.hero{background:linear-gradient(135deg,var(--brand),var(--brand2));color:#fff}
.stat.hero .lab,.stat.hero .hint{color:rgba(255,255,255,.8)}
.stat.hero .chip-ico{background:rgba(255,255,255,.2)}
.stat.hero::after{content:"";position:absolute;right:-40px;top:-40px;width:160px;height:160px;border-radius:50%;background:rgba(255,255,255,.12)}
.tone-good{background:var(--good-soft);color:var(--good)}.tone-bad{background:var(--bad-soft);color:var(--bad)}.tone-warn{background:var(--warn-soft);color:var(--warn)}.tone-info{background:var(--info-soft);color:var(--info)}.tone-brand{background:var(--brand-soft);color:var(--brand)}

/* avatars, chips */
.av{width:28px;height:28px;border-radius:50%;display:inline-grid;place-items:center;color:#fff;font-size:11px;font-weight:600;flex:none;letter-spacing:0}
.av.lg{width:40px;height:40px;font-size:14px}.av.sm{width:22px;height:22px;font-size:9px}
.chip{display:inline-flex;align-items:center;gap:6px;padding:2px 9px;border-radius:99px;font-size:12px;font-weight:500;background:var(--surface2);color:var(--text2);white-space:nowrap}
.chip.today{background:var(--warn-soft);color:var(--warn)}.chip.over{background:var(--bad-soft);color:var(--bad)}.chip.soon{background:var(--info-soft);color:var(--info)}
.chip.high{background:var(--bad-soft);color:var(--bad)}.chip.medium{background:var(--warn-soft);color:var(--warn)}.chip.low{background:var(--info-soft);color:var(--info)}
.chip.good{background:var(--good-soft);color:var(--good)}
.muted{color:var(--muted)}.small{font-size:12.5px}
.empty{text-align:center;padding:36px 20px;color:var(--muted)}
.empty .ico{width:34px;height:34px;opacity:.5;margin-bottom:8px}

/* tasks */
.tlist{display:flex;flex-direction:column}
.trow{display:flex;align-items:center;gap:12px;padding:9px 10px;border-radius:11px;cursor:pointer;transition:background .12s}
.trow:hover{background:var(--surface2)}
.trow .ttl{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.trow.done .ttl{text-decoration:line-through;color:var(--muted)}
.trow .meta{display:flex;align-items:center;gap:10px;flex:none}
.chk{width:20px;height:20px;border-radius:50%;border:2px solid var(--surface3);display:grid;place-items:center;flex:none;transition:all .15s;color:transparent;background:transparent}
.chk:hover{border-color:var(--good);color:var(--good)}
.chk.on{background:var(--good);border-color:var(--good);color:#fff}
.chk .ico{width:12px;height:12px;stroke-width:3}
.quick{display:flex;gap:8px;padding:6px 10px}
.quick input{flex:1;border:0;background:transparent;outline:0;padding:6px 0}
.quick input::placeholder{color:var(--muted)}
.group{margin-bottom:6px}
.ghead{display:flex;align-items:center;gap:8px;padding:10px 10px 6px;font-weight:600;cursor:pointer;user-select:none}
.ghead .cnt{color:var(--muted);font-weight:500;font-size:12.5px}
.ghead .ico{transition:transform .15s;color:var(--muted)}.group.closed .ghead .ico.chev{transform:rotate(-90deg)}.group.closed .gbody{display:none}
.gbody{min-height:14px}
.dragging{opacity:.4}
.dropline{height:3px;background:var(--brand);border-radius:3px;margin:2px 10px}

/* board */
.board{display:flex;gap:16px;overflow-x:auto;padding-bottom:20px;align-items:flex-start;min-height:60vh}
.col{width:306px;flex:none;background:var(--surface2);border-radius:var(--r);padding:12px}
.col .chd{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 12px;font-weight:600}
.col .chd .cnt{background:var(--surface);border-radius:99px;font-size:12px;padding:1px 9px;color:var(--muted);margin-left:8px}
.col .cards{display:flex;flex-direction:column;gap:10px;min-height:20px}
.tcard{background:var(--surface);border-radius:13px;padding:13px 14px;box-shadow:var(--shadow);cursor:grab;transition:transform .15s var(--ease),box-shadow .15s}
.tcard:hover{transform:translateY(-2px)}
.tcard .tt{font-weight:500;margin:6px 0 10px;line-height:1.35}
.tcard.done .tt{text-decoration:line-through;color:var(--muted)}
.tcard .foot{display:flex;align-items:center;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:12px}
.tags{display:flex;gap:5px;flex-wrap:wrap}
.tag{font-size:11px;font-weight:500;padding:1px 8px;border-radius:6px;background:var(--brand-soft);color:var(--brand)}
.addcard{width:100%;padding:9px;border-radius:11px;color:var(--muted);font-weight:500;display:flex;gap:6px;align-items:center;justify-content:center;margin-top:8px}.addcard:hover{background:var(--surface);color:var(--text)}
.prog{height:6px;border-radius:99px;background:var(--surface3);overflow:hidden}.prog i{display:block;height:100%;border-radius:99px;background:var(--good);transition:width .6s var(--ease)}

/* timeline */
.tl{overflow:auto;background:var(--surface);border-radius:var(--r);box-shadow:var(--shadow);position:relative}
.tl-head{display:flex;position:sticky;top:0;z-index:3;background:var(--surface)}
.tl-name{width:260px;flex:none;position:sticky;left:0;background:var(--surface);z-index:2;padding:10px 16px;font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tl-days{display:flex}
.tl-day{width:36px;flex:none;text-align:center;font-size:11px;color:var(--muted);padding:8px 0;line-height:1.2}.tl-day b{display:block;color:var(--text2);font-size:12px}
.tl-day.today{color:var(--brand)}.tl-day.we{background:var(--surface2)}
.tl-row{display:flex;height:42px;align-items:center}.tl-row:hover .tl-name,.tl-row:hover{background:var(--surface2)}
.tl-row .tl-name{font-weight:500;cursor:pointer}
.tl-track{position:relative;height:100%}
.tl-bar{position:absolute;top:9px;height:24px;border-radius:8px;color:#fff;font-size:12px;font-weight:500;padding:0 9px;line-height:24px;cursor:pointer;overflow:hidden;white-space:nowrap;box-shadow:0 6px 14px -8px rgba(0,0,0,.4)}
.tl-today{position:absolute;top:0;bottom:0;width:2px;background:var(--brand);opacity:.6;z-index:1}
.tl-sec{background:var(--surface2);font-weight:600;font-size:12px;text-transform:uppercase;letter-spacing:.07em;color:var(--muted);padding:6px 16px}

/* calendar */
.cal{background:var(--surface);border-radius:var(--r);box-shadow:var(--shadow);overflow:hidden}
.cal-hd{display:grid;grid-template-columns:repeat(7,1fr);padding:10px 0;color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.07em;text-align:center}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr)}
.cell{min-height:118px;padding:6px;border-top:1px solid var(--line);border-left:1px solid var(--line);cursor:pointer;min-width:0;transition:background .12s}
.cell:nth-child(7n+1){border-left:0}.cell:hover{background:var(--surface2)}
.cell.out{background:color-mix(in srgb,var(--surface2) 55%,transparent)}.cell.out .dn{opacity:.4}
.dn{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-weight:500;font-size:12.5px;margin-bottom:3px}
.cell.today .dn{background:var(--brand);color:#fff}
.ev{display:flex;gap:5px;align-items:center;font-size:12px;font-weight:500;padding:2px 7px;border-radius:7px;margin-bottom:3px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;cursor:pointer}
.ev:hover{filter:brightness(.95)}
.ev.task{background:var(--surface3);color:var(--text2)}.ev.task.done{text-decoration:line-through;opacity:.6}
.ev .t{opacity:.7;font-weight:500}
.more{font-size:11.5px;color:var(--muted);font-weight:500;padding-left:6px}
.calwrap{display:grid;grid-template-columns:1fr 280px;gap:18px;align-items:start}
.legend{display:flex;flex-direction:column;gap:2px}
.legend label{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:9px;cursor:pointer;font-weight:500}.legend label:hover{background:var(--surface2)}
.legend input{accent-color:var(--brand)}
.embed{width:100%;height:calc(100vh - 190px);min-height:520px;border:0;border-radius:var(--r);background:#fff;box-shadow:var(--shadow)}

/* drive */
.dfiles{display:flex;flex-direction:column}
.dfile{display:grid;grid-template-columns:36px 1fr 150px 90px 90px;gap:12px;align-items:center;padding:9px 12px;border-radius:11px;cursor:pointer}
.dfile:hover{background:var(--surface2)}
.dfile .ficon{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:var(--surface2);overflow:hidden}
.dfile .ficon img{width:100%;height:100%;object-fit:cover}
.crumbs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-weight:500}
.crumbs button{padding:3px 8px;border-radius:8px;color:var(--text2)}.crumbs button:hover{background:var(--surface2)}
.drop-on{outline:2px dashed var(--brand);outline-offset:-6px;background:var(--brand-soft)}

/* panel & modal */
.scrim{position:fixed;inset:0;background:rgba(10,12,28,.42);backdrop-filter:blur(3px);z-index:80;animation:fade .2s}
@keyframes fade{from{opacity:0}}
.panel{position:fixed;top:0;right:0;bottom:0;width:min(680px,100vw);background:var(--surface);z-index:90;box-shadow:var(--shadow-lg);display:flex;flex-direction:column;animation:slide .3s var(--ease)}
@keyframes slide{from{transform:translateX(40px);opacity:0}}
.panel .ph{display:flex;align-items:center;gap:10px;padding:14px 22px;border-bottom:1px solid var(--line)}
.panel .pb{flex:1;overflow:auto;padding:22px 26px 40px}
.panel .ttlinp{font-size:23px;font-weight:600;letter-spacing:-.02em;width:100%;border:0;background:transparent;outline:0;padding:6px 0;border-radius:8px}
.panel .ttlinp:focus{background:var(--surface2);padding-left:10px}
.meta-grid{display:grid;grid-template-columns:130px 1fr;gap:10px 14px;align-items:center;margin:14px 0 22px}
.meta-grid>span{color:var(--muted);font-weight:500;font-size:13px;display:flex;gap:8px;align-items:center}
.sect{margin-top:26px}.sect>h3{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--muted);margin-bottom:10px;display:flex;justify-content:space-between;align-items:center}
.cm{display:flex;gap:11px;margin-bottom:16px}.cm .bubble{background:var(--surface2);padding:10px 14px;border-radius:4px 14px 14px 14px;flex:1;white-space:pre-wrap;word-break:break-word}
.cm .who{font-weight:500;font-size:13px}.cm .when{color:var(--muted);font-size:12px;margin-left:6px;font-weight:400}
.att{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:11px;background:var(--surface2);margin-bottom:6px}
.att .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}
.modal{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(560px,94vw);max-height:92vh;background:var(--surface);border-radius:20px;box-shadow:var(--shadow-lg);z-index:95;display:flex;flex-direction:column;animation:pop .22s var(--ease)}
.modal.wide{width:min(860px,96vw)}
@keyframes pop{from{opacity:0;transform:translate(-50%,-47%) scale(.97)}}
.modal .mh{display:flex;align-items:center;justify-content:space-between;padding:18px 22px 6px}.modal .mh h2{font-size:18px;font-weight:600}
.modal .mb{padding:12px 22px 6px;overflow:auto}.modal .mf{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}
.pop{position:absolute;right:0;top:44px;width:380px;background:var(--surface);border-radius:16px;box-shadow:var(--shadow-lg);z-index:60;max-height:70vh;overflow:auto;padding:8px;animation:up .2s var(--ease)}
.nitem{display:flex;gap:10px;padding:10px;border-radius:11px;cursor:pointer;align-items:flex-start}.nitem:hover{background:var(--surface2)}.nitem.unread{background:var(--brand-soft)}
#toasts{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:200;align-items:center}
.toast{background:#151a2e;color:#fff;padding:11px 18px;border-radius:12px;box-shadow:var(--shadow-lg);font-weight:500;animation:up .25s var(--ease);max-width:90vw}
.toast.err{background:#b91c1c}
.menu{position:absolute;background:var(--surface);border-radius:13px;box-shadow:var(--shadow-lg);padding:6px;z-index:100;min-width:190px;animation:up .15s var(--ease)}
.menu button{display:flex;align-items:center;gap:10px;width:100%;text-align:left;padding:8px 11px;border-radius:9px;font-weight:500}.menu button:hover{background:var(--surface2)}.menu .danger{color:var(--bad)}

/* charts */
.chart text{fill:var(--muted);font-size:11px;font-family:inherit}
.legend-i{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);font-weight:500;margin-left:14px}.legend-i i{width:9px;height:9px;border-radius:3px}
.bar-row{display:flex;align-items:center;gap:12px;padding:7px 0}
.bar-row .bn{width:128px;flex:none;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:500}
.bar-row .bt{flex:1;height:9px;border-radius:99px;background:var(--surface2);overflow:hidden;display:flex}
.bar-row .bt i{display:block;height:100%}
.feed{display:flex;flex-direction:column;gap:14px}
.feed .it{display:flex;gap:11px;align-items:flex-start}.feed .it p{line-height:1.4}.feed .it small{color:var(--muted)}

/* auth */
.auth{min-height:100vh;display:grid;grid-template-columns:1.1fr 1fr}
.auth .art{background:linear-gradient(140deg,#312e81,#4f46e5 45%,#7c3aed);color:#fff;padding:56px;display:flex;flex-direction:column;justify-content:space-between;position:relative;overflow:hidden}
.auth .art::before,.auth .art::after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.08)}
.auth .art::before{width:520px;height:520px;right:-180px;bottom:-160px}.auth .art::after{width:300px;height:300px;left:-110px;top:30%}
.auth .art h1{font-size:44px;line-height:1.08;max-width:520px;position:relative;z-index:1}
.auth .art p{opacity:.85;max-width:440px;font-size:16px;margin-top:16px;position:relative;z-index:1}
.auth .pills{display:flex;gap:10px;flex-wrap:wrap;position:relative;z-index:1}.auth .pills span{background:rgba(255,255,255,.14);padding:7px 14px;border-radius:99px;font-weight:500;font-size:13px;backdrop-filter:blur(6px)}
.auth .form{display:grid;place-items:center;padding:36px;overflow:auto}
.auth .box{width:min(430px,100%)}
.auth .box h2{font-size:26px;font-weight:600;letter-spacing:-.03em;margin-bottom:6px}
.err-msg{background:var(--bad-soft);color:var(--bad);padding:10px 14px;border-radius:11px;font-weight:500;margin-bottom:14px}
.steps{counter-reset:s;display:flex;flex-direction:column;gap:10px;margin:8px 0 18px}
.steps li{list-style:none;counter-increment:s;display:flex;gap:12px;color:var(--text2)}
.steps li::before{content:counter(s);width:22px;height:22px;border-radius:50%;background:var(--brand-soft);color:var(--brand);font-weight:600;font-size:12px;display:grid;place-items:center;flex:none;margin-top:1px}
code,.code{background:var(--surface2);padding:2px 7px;border-radius:7px;font:12.5px ui-monospace,Menlo,monospace;word-break:break-all}
.hide-d{display:none}
.menu-btn{display:none}
@media(max-width:1180px){.span4,.span5,.span6,.span7,.span8{grid-column:span 12}.g4{grid-template-columns:repeat(2,1fr)}.calwrap{grid-template-columns:1fr}}
@media(max-width:860px){
  .app{grid-template-columns:1fr}.side{position:fixed;left:0;transform:translateX(-100%);transition:transform .25s var(--ease);width:280px;box-shadow:var(--shadow-lg)}.side.open{transform:none}
  .menu-btn{display:grid}.top,.page{padding-left:16px;padding-right:16px}.g4,.g3{grid-template-columns:1fr 1fr}.auth{grid-template-columns:1fr}.auth .art{display:none}
  .trow .meta .hide-m{display:none}.dfile{grid-template-columns:36px 1fr 70px}.dfile .hm{display:none}.cell{min-height:80px}.meta-grid{grid-template-columns:100px 1fr}
}

/* ===== ChronoTask-inspired refinement: floating sidebar, rounded canvas, calm blue accent ===== */
:root{--bg:#e5e7ec;--canvas:#f6f7f9;--brand:#2f6df6;--brand2:#5a5cf0;--brand-soft:#e6eeff;--surface2:#f0f2f6;--line:#eceef3}
:root[data-theme=dark]{--bg:#080a14;--canvas:#0f1325;--brand:#6c93ff;--brand2:#8b8cff;--brand-soft:#1c2a5c}
body{background:var(--bg)}
.app{padding:16px;gap:16px;grid-template-columns:calc(var(--side) - 12px) 1fr}
.side{top:16px;height:calc(100vh - 32px);border-radius:26px;box-shadow:var(--shadow);padding:20px 14px 14px}
.main{background:var(--canvas);border-radius:26px;min-height:calc(100vh - 32px);box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--surface) 70%,transparent)}
.top{border-radius:26px 26px 0 0;top:16px;padding:18px 30px 10px;background:color-mix(in srgb,var(--canvas) 85%,transparent)}
.page{padding:6px 30px 48px}
.nav{font-weight:500}.nav.on{background:var(--surface2);color:var(--text)}.nav.on .ico{color:var(--brand)}
.side h6{font-size:11px;padding-top:20px}
.logo{border-radius:12px;box-shadow:0 8px 18px -8px var(--brand)}
.card{box-shadow:0 1px 2px rgba(20,24,50,.03),0 6px 22px -14px rgba(20,24,50,.14)}
.search input,.iconbtn,.btn,.tabs{box-shadow:0 1px 2px rgba(20,24,50,.05),0 4px 14px -10px rgba(20,24,50,.2)}
.tabs{background:transparent;box-shadow:none;padding:0;gap:6px}
.tabs button{border-radius:11px;padding:7px 14px;color:var(--muted)}
.tabs button.on{background:var(--surface);color:var(--brand);box-shadow:0 1px 2px rgba(20,24,50,.06),0 4px 12px -8px rgba(20,24,50,.25)}
.stat.hero{background:linear-gradient(135deg,#2f6df6,#5a5cf0)}
.col{background:color-mix(in srgb,var(--surface2) 80%,var(--bg));padding:12px 12px 8px}
.chk.on{background:var(--brand);border-color:var(--brand)}
.chk:hover{border-color:var(--brand);color:var(--brand)}
.prog i{background:var(--info)}
.chip{border-radius:8px}

/* task panel – floating white sheet */
.panel{top:16px;right:16px;bottom:16px;width:min(700px,calc(100vw - 32px));border-radius:26px;overflow:hidden}
.panel .ph{padding:16px 22px;border-bottom:1px solid var(--line)}
.panel .pb{padding:22px 30px 40px}
.panel .ttlinp{font-size:26px;font-weight:600;letter-spacing:-.03em;margin-bottom:6px}
.meta-grid{grid-template-columns:150px 1fr;gap:6px 14px;margin:12px 0 18px}
.meta-grid>span{padding:6px 0;font-weight:500;font-size:14px}
.meta-grid .inp,.meta-grid .sel{background:transparent;padding:7px 10px;margin-left:-10px;width:auto;min-width:200px;max-width:100%;font-weight:500}
.meta-grid .inp:hover,.meta-grid .sel:hover{background:var(--surface2)}
.meta-grid .inp:focus,.meta-grid .sel:focus{background:var(--surface)}
.descwrap{background:var(--canvas);border-radius:16px;padding:6px 8px}
.descbox{background:transparent;min-height:84px;font-size:14px;color:var(--text2)}
.descbox:focus{background:var(--surface)}
.sect>h3{text-transform:none;letter-spacing:0;font-size:14px;font-weight:500;color:var(--muted)}
.sect>h3 a{color:var(--brand);font-weight:500;cursor:pointer}
.attgrid{display:flex;gap:12px;flex-wrap:wrap}
.attcard{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:16px;background:var(--surface);box-shadow:0 0 0 1px var(--line),0 6px 18px -14px rgba(20,24,50,.3);min-width:220px;flex:1 1 220px;max-width:310px}
.attadd{width:54px;min-height:70px;border-radius:16px;display:grid;place-items:center;box-shadow:0 0 0 1px var(--line);color:var(--text2)}.attadd:hover{background:var(--surface2)}
.ptabs{display:flex;gap:26px;margin:28px -30px 14px;padding:0 30px;border-bottom:1px solid var(--line)}
.ptabs button{padding:10px 0;font-weight:500;color:var(--muted);position:relative;display:flex;gap:8px;align-items:center}
.ptabs button.on{color:var(--brand)}
.ptabs button.on::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;border-radius:2px;background:var(--brand)}
.ptabs .cnt{background:var(--surface2);color:var(--muted);border-radius:6px;font-size:12px;padding:0 7px}
.ptabs button.on .cnt{background:var(--brand-soft);color:var(--brand)}
.subrow{display:flex;align-items:center;gap:12px;padding:12px 2px;border-bottom:1px solid var(--line)}
.subrow .ttl{flex:1;cursor:pointer;font-weight:500}.subrow.done .ttl{text-decoration:line-through;color:var(--muted)}
.subrow .chk{border-radius:6px}.subrow .chk.on{border-radius:6px}
.scrim{background:rgba(30,32,40,.35)}
@media(max-width:860px){.app{padding:8px;gap:8px}.main{border-radius:20px}.panel{inset:8px;width:auto}.side{top:8px;height:calc(100vh - 16px)}.meta-grid{grid-template-columns:110px 1fr}.meta-grid .inp,.meta-grid .sel{min-width:0;width:100%}}

/* =====================================================================
   SIMBA BRAND: red · black · white. No grey type. Overrides above.
   ===================================================================== */
:root{
  --bg:#1e1f21;--canvas:#ffffff;--surface:#ffffff;--surface2:#f6f6f7;--surface3:#d9d9dc;--line:#e8e8ea;
  --text:#1e1f21;--text2:#1e1f21;--muted:#2e2f31;
  --brand:#c4231c;--brand2:#c4231c;--brand-soft:#ffe8e6;--brand-ink:#fff;
  --good:#1e1f21;--good-soft:#1e1f21;--warn:#c4231c;--warn-soft:#ffe8e6;--bad:#c4231c;--bad-soft:#c4231c;--info:#1e1f21;--info-soft:#efefef;
  --shadow:0 0 0 1px #ececec;--shadow-lg:0 30px 70px -20px rgba(0,0,0,.55);
}
:root[data-theme=dark]{
  --canvas:#252628;--surface:#2e2f31;--surface2:#38393b;--surface3:#4a4b4e;--line:#3a3b3e;
  --text:#ffffff;--text2:#ffffff;--muted:#f1f1f1;--brand:#e5534b;--brand2:#e5534b;--brand-soft:#3a0f0d;--brand-ink:#fff;
  --good:#ffffff;--good-soft:#ffffff;--warn:#e5534b;--warn-soft:#3a0f0d;--bad:#e5534b;--bad-soft:#e5534b;--info:#ffffff;--info-soft:#3a3b3e;
  --shadow:0 0 0 1px #3a3b3e;
}
body{background:#1e1f21}
::placeholder{color:#8f1712;opacity:1}
:root[data-theme=dark] ::placeholder{color:#e8e8e8}
a{color:var(--brand)}
.muted,.small.muted,.sub{color:var(--muted)}
.sub{font-weight:500}
h1{font-weight:600;letter-spacing:-.035em}

/* frame: black desk, white canvas */
.app{padding:14px;gap:0;grid-template-columns:262px 1fr}
.side{background:transparent;box-shadow:none;border-radius:0;color:#fff;
  --text:#fff;--text2:#fff;--muted:#fff;--surface2:#2e2f31;--surface:#252628;--line:#3a3b3e;--surface3:#444}
.side .brand{color:#fff}.side .brand small{color:#fff;font-weight:500;opacity:1}
.logo{background:#c4231c;border-radius:10px;box-shadow:none}
.nav{color:#fff;border-radius:10px;font-weight:500}
.nav:hover{background:#2e2f31;color:#fff}
.nav.on{background:#c4231c;color:#fff}.nav.on .ico{color:#fff}
.side h6{color:#e8625a;font-weight:600;letter-spacing:.14em}
.side h6 button{color:#fff}.side h6 button:hover{background:#2e2f31}
.me{background:#2a2b2d}.me b{color:#fff}.me span{color:#fff;font-weight:500}
.side .iconbtn{background:transparent;box-shadow:none;color:#fff}.side .iconbtn:hover{background:#3a3b3e}
.side .badge{background:#fff;color:#1e1f21}
.main{background:var(--canvas);border-radius:22px;box-shadow:none}
.top{background:color-mix(in srgb,var(--canvas) 92%,transparent);border-radius:22px 22px 0 0}
.search input{background:var(--surface2);box-shadow:none;color:var(--text)}
.search input:focus{outline-color:#1e1f21}
:root[data-theme=dark] .search input:focus{outline-color:#fff}
.search .ico{color:var(--text)}

/* controls */
.btn{background:var(--surface);box-shadow:0 0 0 1.5px #1e1f21;color:#1e1f21;font-weight:600;border-radius:10px}
:root[data-theme=dark] .btn{box-shadow:0 0 0 1.5px #fff;color:#fff}
.btn:hover{background:#1e1f21;color:#fff}
:root[data-theme=dark] .btn:hover{background:#fff;color:#1e1f21}
.btn.primary{background:#c4231c;color:#fff;box-shadow:none}
.btn.primary:hover{background:#1e1f21;filter:none}
:root[data-theme=dark] .btn.primary:hover{background:#fff;color:#1e1f21}
.btn.ghost{background:transparent;box-shadow:none;color:var(--text)}.btn.ghost:hover{background:var(--surface2);color:var(--text)}
.btn.danger{color:var(--brand)}
.iconbtn{background:var(--surface);box-shadow:0 0 0 1px var(--line);color:var(--text)}
.iconbtn:hover{background:var(--surface2)}.iconbtn.flat{box-shadow:none;background:none}
.inp,.sel,.txt{background:var(--surface2);color:var(--text)}
.inp:focus,.sel:focus,.txt:focus{outline-color:#1e1f21;background:var(--surface)}
:root[data-theme=dark] .inp:focus,:root[data-theme=dark] .sel:focus,:root[data-theme=dark] .txt:focus{outline-color:#fff}
label.f{color:var(--text);font-weight:600;text-transform:uppercase;letter-spacing:.08em;font-size:11px}
.tabs button{color:var(--text);font-weight:500}
.tabs button.on{background:#1e1f21;color:#fff;box-shadow:none}
:root[data-theme=dark] .tabs button.on{background:#fff;color:#1e1f21}
.badge{background:#c4231c;color:#fff}

/* cards: white, hairline, no tinted edges */
.card{background:var(--surface);box-shadow:0 0 0 1px var(--line)}
.card>.hd h2,h2{font-weight:600}
.stat .lab{color:var(--text);font-weight:600}
.stat .num{font-family:Inter,system-ui,sans-serif;font-weight:400;font-size:52px;letter-spacing:0;line-height:1;margin-top:14px}
.stat .hint{color:var(--muted)}
.stat.hero{background:#1e1f21;color:#fff}
:root[data-theme=dark] .stat.hero{background:#c4231c}
.stat.hero .lab,.stat.hero .hint{color:#fff}
.stat.hero .chip-ico{background:#c4231c;color:#fff}
.stat.hero::after{background:#c4231c;opacity:1;width:120px;height:120px;right:-30px;top:-30px;border-radius:0;transform:rotate(18deg)}
:root[data-theme=dark] .stat.hero::after{background:#1e1f21}
.tone-good{background:#1e1f21;color:#fff}.tone-bad{background:#c4231c;color:#fff}.tone-warn{background:#ffe8e6;color:#c4231c}.tone-info{background:#1e1f21;color:#fff}.tone-brand{background:#ffe8e6;color:#c4231c}
:root[data-theme=dark] .tone-good,:root[data-theme=dark] .tone-info{background:#fff;color:#1e1f21}
:root[data-theme=dark] .tone-warn,:root[data-theme=dark] .tone-brand{background:#3a0f0d;color:#e8625a}

/* chips: type is always black or white or red */
.chip{background:var(--surface2);color:var(--text);font-weight:600;border-radius:7px}
.chip.today{background:#1e1f21;color:#fff}
.chip.over{background:#c4231c;color:#fff}
.chip.soon{background:#ffe8e6;color:#9c1b15}
.chip.high{background:#c4231c;color:#fff}.chip.medium{background:#1e1f21;color:#fff}.chip.low{background:var(--surface2);color:var(--text)}
.chip.good{background:#1e1f21;color:#fff}
:root[data-theme=dark] .chip.today,:root[data-theme=dark] .chip.medium,:root[data-theme=dark] .chip.good{background:#fff;color:#1e1f21}
:root[data-theme=dark] .chip.soon{background:#3a0f0d;color:#ff7a70}
.tag{background:#1e1f21;color:#fff;border-radius:5px}
:root[data-theme=dark] .tag{background:#fff;color:#1e1f21}

/* tasks */
.chk{border:2px solid #1e1f21;border-radius:50%}
:root[data-theme=dark] .chk{border-color:#fff}
.chk:hover{border-color:#c4231c;color:#c4231c}
.chk.on{background:#c4231c;border-color:#c4231c;color:#fff}
.trow:hover{background:var(--surface2)}
.trow.done .ttl,.tcard.done .tt,.subrow.done .ttl{color:var(--muted);opacity:.7}
.trow .ttl{font-weight:500}
.small{color:inherit}.small.muted{color:var(--muted)}
.prog{background:var(--surface2)}.prog i{background:#c4231c}
.col{background:var(--surface2)}
.col .chd .cnt{background:#1e1f21;color:#fff}
:root[data-theme=dark] .col .chd .cnt{background:#fff;color:#1e1f21}
.tcard{background:var(--surface);box-shadow:0 0 0 1px var(--line)}
.tcard:hover{box-shadow:0 0 0 2px #1e1f21}
:root[data-theme=dark] .tcard:hover{box-shadow:0 0 0 2px #fff}
.addcard{color:var(--text);font-weight:600}
.ghead .cnt,.ghead .ico{color:var(--text)}
.cell.today .dn{background:#c4231c;color:#fff}
.cell.out{background:var(--surface2)}
.cal-hd{color:var(--text);font-weight:600}
.ev.task{background:#1e1f21;color:#fff}
:root[data-theme=dark] .ev.task{background:#fff;color:#1e1f21}
.more{color:var(--text)}
.tl-day{color:var(--text)}.tl-day.today{color:#c4231c}.tl-today{background:#c4231c;opacity:1}
.tl-sec{background:#1e1f21;color:#fff}
:root[data-theme=dark] .tl-sec{background:#fff;color:#1e1f21}
.tl-bar{box-shadow:none;border-radius:6px}
.legend-i{color:var(--text)}
.bar-row .bt{background:var(--surface2)}
.feed .it small{color:var(--muted)}
.nitem.unread{background:#ffe8e6}:root[data-theme=dark] .nitem.unread{background:#3a0f0d}
.panel .ttlinp:focus{background:var(--surface2)}
.descwrap{background:var(--surface2)}
.ptabs button{color:var(--text)}.ptabs button.on{color:#c4231c}.ptabs button.on::after{background:#c4231c;height:3px}
.ptabs .cnt{background:var(--surface2);color:var(--text)}.ptabs button.on .cnt{background:#c4231c;color:#fff}
.meta-grid>span{color:var(--text)}
.attcard{box-shadow:0 0 0 1px var(--line)}
.toast{background:#1e1f21;color:#fff;border-radius:10px}.toast.err{background:#c4231c}
.err-msg{background:#c4231c;color:#fff;border-radius:8px;font-weight:600}
.steps li::before{background:#1e1f21;color:#fff}
:root[data-theme=dark] .steps li::before{background:#c4231c}
.chart text{fill:var(--text);font-weight:500}
.empty{color:var(--text)}
.menu button.danger,.menu .danger{color:var(--brand)}
code,.code{background:var(--surface2);color:var(--text)}
.scrim{background:rgba(0,0,0,.6)}

/* ===================== AUTH — editorial poster, not a template ===================== */
.auth2{min-height:100vh;display:grid;grid-template-columns:1.2fr 1fr;background:#1e1f21}
.poster{color:#fff;padding:36px 44px 40px;display:flex;flex-direction:column;justify-content:space-between;min-height:100vh;position:relative}
.poster::after{content:"";position:absolute;top:0;right:0;bottom:0;width:10px;background:#c4231c}
.ptop{display:flex;justify-content:space-between;align-items:center}
.mark{background:#c4231c;color:#fff;font-family:Inter,system-ui,sans-serif;font-size:26px;letter-spacing:.04em;padding:6px 14px 4px;line-height:1}
.pdate{font-weight:600;letter-spacing:.16em;font-size:12px}
.pbig{font-family:Inter,system-ui,sans-serif;font-weight:400;text-transform:uppercase;font-size:clamp(70px,10.5vw,176px);line-height:.9;letter-spacing:-.005em;display:flex;flex-direction:column;margin:30px 0}
.pbig span{display:block}.pbig .red{color:#c4231c}
.pbig i{font-style:normal;color:#c4231c;position:absolute;right:68px;margin-top:0;display:none}
.ledger{list-style:none;padding:0;border-top:2px solid #fff}
.ledger li{display:grid;grid-template-columns:48px 190px 1fr auto;gap:12px;align-items:baseline;padding:14px 0;border-bottom:1px solid #fff;font-size:15px}
.ledger b{font-family:Inter,system-ui,sans-serif;font-weight:400;color:#c4231c;font-size:18px;letter-spacing:.05em}
.ledger span{font-weight:600;text-transform:uppercase;letter-spacing:.06em}
.ledger em{font-style:normal;font-weight:500}.ledger u{text-decoration:none;color:#c4231c;font-weight:600;font-size:18px}
.auth2 .form{background:#fff;color:#1e1f21;display:flex;flex-direction:column;justify-content:space-between;padding:36px 52px;overflow:auto;min-height:100vh;
  --text:#1e1f21;--text2:#1e1f21;--muted:#2e2f31;--surface:#fff;--surface2:#f6f6f7;--line:#1e1f21}
.ftop{display:flex;justify-content:space-between;font-weight:600;letter-spacing:.16em;font-size:11px}
.fbot{font-weight:500;font-size:12.5px;letter-spacing:.04em}
.auth2 .box{width:min(430px,100%);margin:34px auto}
.step{font-weight:600;letter-spacing:.18em;font-size:11px;color:#c4231c;margin-bottom:10px}
.auth2 .box h2{font-family:Inter,system-ui,sans-serif;font-weight:400;text-transform:uppercase;font-size:64px;line-height:.95;letter-spacing:0;margin-bottom:10px}
.fsub{font-weight:500;margin-bottom:28px;font-size:15px}
.auth2 .field{margin-bottom:20px}
.auth2 label.f{font-size:11px;letter-spacing:.14em;margin-bottom:2px}
.auth2 .inp,.auth2 .sel{background:transparent;border-radius:0;border-bottom:2px solid #1e1f21;padding:10px 0;font-size:17px;font-weight:500;outline:0;box-shadow:none}
.auth2 .inp:focus,.auth2 .sel:focus{border-bottom-color:#c4231c;background:transparent;outline:0}
.auth2 .inp::placeholder{color:#555;font-weight:500}
.auth2 .sel{padding-left:0}
.auth2 .btn.primary.go{width:100%;display:flex;justify-content:space-between;align-items:center;border-radius:0;padding:18px 22px;font-size:14px;letter-spacing:.14em;text-transform:uppercase;font-weight:600;background:#c4231c;color:#fff;box-shadow:none;margin-top:6px}
.auth2 .btn.primary.go:hover{background:#1e1f21}
.auth2 .btn.primary.go span:last-child{font-size:20px;transition:transform .2s}
.auth2 .btn.primary.go:hover span:last-child{transform:translateX(6px)}
.auth2 .err-msg{border-radius:0}
.auth2 hr{background:#1e1f21!important;height:2px!important}
@media(max-width:900px){.auth2{grid-template-columns:1fr}.poster{min-height:0;padding:24px}.pbig{font-size:64px;margin:20px 0}.ledger{display:none}.poster::after{display:none}.auth2 .form{min-height:0;padding:28px 24px}.auth2 .box h2{font-size:48px}.app{padding:8px}}
@media(max-width:860px){.side{background:#1e1f21;border-radius:0}}
.side .pdot{outline:2px solid #fff;outline-offset:0}
::placeholder{color:#8f1712}
:root[data-theme=dark] ::placeholder{color:#ff9a92}
.auth2 .inp::placeholder{color:#8f1712}
:root[data-theme=dark] .pdot{outline:1.5px solid #fff}
:root[data-theme=dark] .av{outline:1.5px solid #fff}
:root[data-theme=dark] .tl-bar{outline:1.5px solid #fff}

/* normal-width type (no condensed display font) */
.stat .num{font-weight:600;font-size:44px;letter-spacing:-.04em}
.mark{font-weight:600;font-size:18px;letter-spacing:.02em;padding:9px 13px}
.pbig{font-weight:600;font-size:clamp(40px,5.6vw,88px);line-height:1;letter-spacing:-.045em;text-transform:none;margin:28px 0}
.ledger b{font-weight:600;font-size:15px}
.auth2 .box h2{font-weight:600;font-size:44px;line-height:1.05;letter-spacing:-.04em;text-transform:none}
@media(max-width:900px){.pbig{font-size:44px}.auth2 .box h2{font-size:36px}}

/* brand logo */
.brandlogo{display:block;background:#fff;border-radius:12px;padding:6px 14px;width:fit-content}
.brandlogo img{height:40px;width:auto;display:block}
.side .brandlogo{width:100%;margin:2px 0 4px;padding:8px 10px;text-align:center}
.side .brandlogo img{height:46px;margin:0 auto}
.brandtag{color:#fff;font-weight:600;letter-spacing:.2em;font-size:10.5px;text-transform:uppercase;padding:2px 4px 14px}
.poster .brandlogo{padding:6px 12px}.poster .brandlogo img{height:46px}
.side h6.collapsible{cursor:pointer;user-select:none;padding-right:8px}
.side h6.collapsible:hover{color:#fff}
.side h6 .chev{transition:transform .18s var(--ease);width:14px;height:14px}.side h6 .chev.shut{transform:rotate(-90deg)}
.side h6 .gcount{background:#2e2f31;color:#fff;border-radius:99px;font-size:10.5px;padding:0 7px;letter-spacing:0;font-weight:600}

/* My tasks — Asana-style */
.utabs{display:flex;gap:30px;border-bottom:1px solid var(--line);margin:0}
.utabs a{display:flex;align-items:center;gap:8px;padding:10px 2px;font-weight:600;color:var(--text);position:relative}
.utabs a:hover{color:var(--brand)}
.utabs a.on{color:var(--brand)}
.utabs a.on::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:3px;background:var(--brand);border-radius:3px}
.mtlist{background:var(--surface);border-radius:var(--r);box-shadow:0 0 0 1px var(--line);padding:0 0 8px}
.mthead,.mtrow{display:grid;grid-template-columns:minmax(0,1fr) 130px 260px 80px;gap:12px;align-items:center;padding:0 16px}
.mthead{height:38px;font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;border-bottom:1px solid var(--line)}
.mtrow{min-height:42px;border-bottom:1px solid var(--line);cursor:pointer}
.mtrow:hover{background:var(--surface2)}
.mtrow .c1{display:flex;align-items:center;gap:12px;min-width:0}
.mtrow .ttl{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mtrow.done .ttl{text-decoration:line-through;opacity:.65}
.mtrow .c3{overflow:hidden}.mtrow .c3 .chip{max-width:100%;overflow:hidden;text-overflow:ellipsis}
.mtrow .c4{display:flex;justify-content:flex-end}
.dueover{color:var(--brand);font-weight:600}.duetoday{font-weight:600}
.mtlist .ghead{padding:14px 16px 8px;font-size:15px}
.mtquick{padding:4px 16px 4px 17px}
.mtlist .group{margin:0}
@media(max-width:860px){.mthead,.mtrow{grid-template-columns:minmax(0,1fr) 90px 40px}.mthead .c3,.mtrow .c3{display:none}}
/* quick-add rows: icon and text on one centre line */
.quick{align-items:center;gap:12px}
.quick .ico{flex:none;display:block;color:var(--text)}
.quick input{line-height:1.4;padding:7px 0;height:auto;font-weight:500}
.mtquick{padding-left:18px}
.side .nav.showmore{font-size:13px;font-weight:600;color:#e8625a;padding:7px 12px}
.side .nav.showmore:hover{background:#2e2f31;color:#fff}
.side .nav.showmore .ico{transform:none}

/* avatars with photos, project tiles */
.av{position:relative;overflow:hidden}
.av img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.av.xl{width:84px;height:84px;font-size:28px}
.ptile{display:inline-grid;place-items:center;border-radius:28%;color:#fff;font-weight:600;overflow:hidden;position:relative;flex:none;letter-spacing:0;box-shadow:0 0 0 1px rgba(0,0,0,.12)}
.ptile img{width:100%;height:100%;object-fit:contain;padding:10%}
.side .ptile{box-shadow:0 0 0 1.5px #fff}
:root[data-theme=dark] .ptile{box-shadow:0 0 0 1.5px #fff}
.me .av{flex:none}

/* complete checkbox: centred tick + hover label */
.chk{position:relative;width:22px;height:22px;padding:0;display:inline-grid;place-items:center;line-height:0}
.chk .ico{width:13px;height:13px;stroke-width:3.2;display:block;margin:0}
.chk:hover{border-color:#c4231c;color:#c4231c;background:#ffe8e6}
:root[data-theme=dark] .chk:hover{background:#3a0f0d;color:#e8625a;border-color:#e8625a}
.chk.on:hover{background:#1e1f21;border-color:#1e1f21;color:#fff}
:root[data-theme=dark] .chk.on:hover{background:#fff;border-color:#fff;color:#1e1f21}
.chk[data-tip]:hover::after{content:attr(data-tip);position:absolute;left:calc(100% + 10px);top:50%;transform:translateY(-50%);background:#1e1f21;color:#fff;font:600 12px/1 Inter,system-ui,sans-serif;letter-spacing:0;padding:8px 11px;border-radius:7px;white-space:nowrap;z-index:70;pointer-events:none;box-shadow:0 8px 20px -8px rgba(0,0,0,.5)}
:root[data-theme=dark] .chk[data-tip]:hover::after{background:#fff;color:#1e1f21}

/* lighter overall weight: regular body, medium UI, semibold only for titles */
body{font-weight:400}
h1{font-weight:600;letter-spacing:-.025em}
h2{font-weight:600}
.nav,.tabs button,.utabs a,.ptabs button,.btn,.chip,.trow .ttl,.mtrow .ttl,.tcard .tt,.subrow .ttl{font-weight:500}
.btn{font-weight:500}
.stat .num{font-weight:500}
.pbig,.auth2 .box h2{font-weight:600}
label.f{font-weight:600;letter-spacing:.06em}
.side h6{font-weight:600}
.col .chd,.ghead,.mthead{font-weight:600}
.tag,.badge{font-weight:600}
b,strong{font-weight:600}
/* hover label sits above the circle so it never covers the title */
.chk[data-tip]:hover::after{left:-4px;top:auto;bottom:calc(100% + 8px);transform:none}
/* long project chips never push the row out of its card */
.trow .meta{min-width:0;max-width:62%;flex:0 1 auto}
.trow .meta .chip{max-width:190px;overflow:hidden;text-overflow:ellipsis;display:inline-block;vertical-align:middle}
.trow .ttl{min-width:90px}
:root[data-theme=dark] .btn.primary,:root[data-theme=dark] .btn.primary:hover{box-shadow:none}
:root[data-theme=dark] .btn.primary:hover{background:#e8625a;color:#fff}

/* Inbox */
.inday{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;padding:14px 20px 6px}
.inrow{display:flex;align-items:center;gap:14px;padding:12px 20px 12px 10px;cursor:pointer;border-bottom:1px solid var(--line)}
.inrow:hover{background:var(--surface2)}
.indot{width:8px;height:8px;border-radius:50%;flex:none;background:transparent}
.inrow.unread .indot{background:#c4231c}
.inrow.unread .intext{font-weight:600}
.intext{flex:1;min-width:0;line-height:1.4}
.intime{font-size:12.5px;white-space:nowrap}
.inact{display:flex;gap:2px;min-width:72px;justify-content:flex-end;opacity:0;transition:opacity .12s}
.inrow:hover .inact{opacity:1}

/* dropdowns: custom chevron, always inset from the right border */
:root{--chev:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e1f21' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>")}
:root[data-theme=dark]{--chev:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>")}
select,select.sel{-webkit-appearance:none;appearance:none}
select.sel,.meta-grid select.sel,.auth2 select.sel{
  background-image:var(--chev)!important;background-repeat:no-repeat!important;background-position:right 14px center!important;background-size:14px!important;
  padding-right:42px!important;text-overflow:ellipsis;cursor:pointer}
.auth2 select.sel{background-position:right 4px center!important;padding-right:30px!important}
.meta-grid select.sel{min-width:210px}
/* native date picker icon: keep clear of the border too */
input[type=date].inp,input[type=time].inp{padding-right:14px}
input[type=date]::-webkit-calendar-picker-indicator,input[type=time]::-webkit-calendar-picker-indicator{margin:0 0 0 8px;padding:2px;cursor:pointer;opacity:.85}
:root[data-theme=dark] input[type=date]::-webkit-calendar-picker-indicator,:root[data-theme=dark] input[type=time]::-webkit-calendar-picker-indicator{filter:invert(1)}

/* ===================== ALIGNMENT PASS ===================== */
/* counts: uniform pills, centred on the text line */
.cnt,.gcount{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 8px;border-radius:99px;
  background:var(--surface2);color:var(--text);font-size:12px;font-weight:500;line-height:1;font-variant-numeric:tabular-nums;margin-left:0;vertical-align:middle}
.ghead,.col .chd{align-items:center}
.ghead{display:flex;gap:10px}
.ghead .cnt{margin-left:0}
.col .chd>span:first-child{display:inline-flex;align-items:center;gap:10px}
.col .chd .cnt{margin-left:0}
.ptabs .cnt{height:20px;min-width:20px;padding:0 6px;font-size:12px}
.side h6 .gcount{height:18px;min-width:18px;font-size:10.5px;padding:0 6px}
.side h6 .row{align-items:center}
/* numbers never jitter */
.stat .num,.pct,.intime,.mtrow .c2,.cell .dn{font-variant-numeric:tabular-nums}
/* chips: icon + text on one centre line, long names truncate inside */
.chip{display:inline-flex;align-items:center;gap:6px;line-height:1.5;max-width:100%}
.chip .ico{flex:none}
.chip .cname,.trow .meta .chip .cname{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.trow .meta .chip,.mtrow .c3 .chip{display:inline-flex;max-width:190px;overflow:hidden;text-overflow:clip;vertical-align:middle}
.mtrow .c3 .chip{max-width:100%}
.trow .meta>span.small,.mtrow .c1 .small,.tcard .foot span{display:inline-flex;align-items:center;gap:4px}
/* table: header cells sit exactly over their columns */
.mthead .c4{text-align:right}.mtrow .c4{justify-content:flex-end}
.mthead>div,.mtrow>div{min-width:0}
/* sidebar: every label starts on the same x */
.side .nav>.ico{width:18px;height:18px;margin:0 3px}
.side .nav>.ico.sm{width:15px;height:15px;margin:0 4.5px}
.side .nav>.ptile{width:24px;height:24px}
.side .nav{gap:12px;min-height:40px}
.side .nav.showmore{min-height:36px}
/* task panel property grid */
.meta-grid>div{min-width:0}
.meta-grid>span{min-height:36px;align-items:center}
.meta-grid>div{display:flex;align-items:center;min-height:36px}
.meta-grid .row{width:100%}
/* feeds & rows */
.feed .it .av{margin-top:-1px}
.stat .lab{min-height:30px}
.pagehead h1{display:flex;align-items:center}
.fbot{display:flex;justify-content:space-between;align-items:center;gap:12px}
.fbot .flinks{display:flex;gap:18px}.fbot a{color:#1e1f21;font-weight:500;text-decoration:none;border-bottom:1.5px solid #c4231c}.fbot a:hover{color:#c4231c}

/* full-width pages: nothing stops mid-screen */
.page{max-width:none;width:100%}
.page.settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.page.settings>.pagehead{grid-column:1/-1;margin-bottom:4px}
.page.settings>.card{margin-bottom:0!important}
.page.settings>:nth-child(2){order:1}.page.settings>:nth-child(5){order:2}
.page.settings>:nth-child(3){order:3;grid-column:1/-1}.page.settings>:nth-child(4){order:4;grid-column:1/-1}
.page.settings .steps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 28px}
@media(max-width:1100px){.page.settings{grid-template-columns:1fr}.page.settings>*{grid-column:1/-1!important}.page.settings .steps{grid-template-columns:1fr}}
.inrow{padding-right:24px}.inday{padding-left:24px}
.card.empty{width:100%}

/* search placeholders clear only when you click into the field */
.search input::placeholder,input[placeholder^="Search"]::placeholder,input[placeholder^="Filter"]::placeholder{transition:opacity .12s}
.search input:focus::placeholder,
input[placeholder^="Search"]:focus::placeholder,
input[placeholder^="Filter"]:focus::placeholder{opacity:0!important;color:transparent!important}

/* Goals */
.glist .mthead,.glist .mtrow{grid-template-columns:minmax(0,1fr) 120px 230px 150px 70px}
.glist .c5{display:flex;align-items:center}
.glist .c4{justify-content:flex-end}.glist .mthead .c4{text-align:right}
.goalgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:14px}
.goaltile{display:flex;flex-direction:column;gap:12px;padding:16px;border-radius:14px;background:var(--surface2);color:var(--text)}
.goaltile:hover{box-shadow:0 0 0 2px var(--text)}
@media(max-width:860px){.glist .mthead,.glist .mtrow{grid-template-columns:minmax(0,1fr) 130px 40px}.glist .c2,.glist .c3{display:none}}

/* logo sits directly on the dark background — no white tile */
.brandlogo,.side .brandlogo,.poster .brandlogo{background:transparent;padding:0;border-radius:0;box-shadow:none;width:fit-content}
.brandlogo img{height:54px;width:auto}
.side .brandlogo{width:100%;margin:6px 0 8px;padding:0 10px;text-align:left}
.side .brandlogo img{height:60px;margin:0}
.poster .brandlogo img{height:60px}

/* drive skeleton rows */
.dfile.skel{cursor:default}.dfile.skel:hover{background:transparent}
.sk{height:12px;border-radius:6px;background:linear-gradient(90deg,var(--surface2),var(--surface3),var(--surface2));background-size:200% 100%;animation:shim 1.1s linear infinite}
.dfile.skel .ficon{background:var(--surface2)}
@keyframes shim{to{background-position:-200% 0}}
.me .av{box-shadow:0 0 0 1.5px #fff}

/* new wordmark logo ("SIMBA Organiser" + lion) */
.brandlogo img{height:auto;width:100%;max-width:210px}
.side .brandlogo{margin:8px 0 10px;padding:0 8px}
.side .brandlogo img{height:auto;width:100%;max-width:196px}
.poster .brandlogo img{height:auto;width:230px;max-width:100%}
.top .logo img{height:auto;width:190px}

/* "viewing as" bar */
.impbar{position:sticky;top:0;z-index:300;display:flex;align-items:center;justify-content:center;gap:14px;flex-wrap:wrap;padding:9px 16px;background:#c4231c;color:#fff;font-weight:500}
.impbar b{font-weight:600}
.impbar .btn{background:#fff;color:#1e1f21;box-shadow:none}.impbar .btn:hover{background:#1e1f21;color:#fff}
body.imp .side{top:60px;height:calc(100vh - 76px)}
body.imp .top{top:44px}

/* logo: smaller */
.side .brandlogo{margin:6px 0 4px;padding:0 12px}
.side .brandlogo img{width:124px;max-width:100%;height:auto}
.poster .brandlogo img{width:150px;max-width:100%;height:auto}
.top .logo img{width:130px;height:auto}

/* sidebar group headings: icon + bold */
.side h6{font-size:13.5px;font-weight:700;letter-spacing:0;text-transform:none;color:#fff;padding:20px 12px 8px}
.side h6 .ico:not(.chev){color:#e8625a;width:16px;height:16px}
.side h6 .chev{width:13px;height:13px}

/* "viewing as" bar: button always readable (beats the dark-theme .btn rules) */
:root .impbar .btn,:root[data-theme=dark] .impbar .btn{background:#fff!important;color:#1e1f21!important;box-shadow:none!important;font-weight:600}
:root .impbar .btn:hover,:root[data-theme=dark] .impbar .btn:hover{background:#1e1f21!important;color:#fff!important}

/* ============================ MOBILE APP (PWA) ============================ */
.mob-logo,.tabbar{display:none}
#offbar{display:none}body.offline #offbar{display:block}
#offbar{position:fixed;top:0;left:0;right:0;z-index:400;background:#1e1f21;color:#fff;text-align:center;font:500 12.5px/1 Inter,system-ui,sans-serif;padding:calc(env(safe-area-inset-top) + 8px) 10px 8px}
#ptr{display:none}
.sheetlist{display:flex;flex-direction:column;padding:2px 0 10px}
.sheetrow{display:flex;align-items:center;gap:14px;width:100%;padding:11px 6px;border-radius:14px;font-weight:500;font-size:16px;text-align:left;color:var(--text)}
.sheetrow:hover,.sheetrow:active{background:var(--surface2)}
.sico{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--surface2);flex:none}
.sheethd{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:18px 6px 4px}
.installcard{display:flex;align-items:center;gap:14px;padding:14px 16px;margin:0 0 16px;border-radius:18px}
.installcard img{border-radius:12px;flex:none}

@media (max-width:860px){
  html{-webkit-text-size-adjust:100%}
  body{background:var(--canvas);overscroll-behavior-y:none;-webkit-tap-highlight-color:transparent}
  a,button,.trow,.mtrow,.tcard,.dfile,.sheetrow{touch-action:manipulation}
  input,textarea,select,.inp,.sel,.txt,.quick input{font-size:16px!important}
  .app{display:block;padding:0}
  .side{display:none!important}
  .main{border-radius:0;min-height:100vh;background:var(--canvas);box-shadow:none}
  .top{position:sticky;top:0;z-index:40;border-radius:0;padding:calc(env(safe-area-inset-top) + 10px) 14px 10px;gap:10px;background:color-mix(in srgb,var(--canvas) 94%,transparent);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px)}
  body.imp .top{top:44px}
  .mob-logo{display:block;flex:none}.mob-logo img{width:36px;height:36px;display:block;border-radius:10px}
  .menu-btn,.top .newtask,.top #themebtn,.top .spacer{display:none!important}
  .top .search{max-width:none;flex:1;min-width:0}
  .search input{padding:12px 14px 12px 42px;border-radius:15px}
  .iconbtn{width:44px;height:44px;border-radius:15px}
  .impbar{padding-top:calc(env(safe-area-inset-top) + 9px);font-size:13px}
  body.imp .impbar~* .tabbar{bottom:0}

  .page{padding:6px 16px calc(112px + env(safe-area-inset-bottom))}
  .pagehead{margin:8px 0 16px;gap:12px}
  h1{font-size:26px}
  .stat .num{font-size:34px}.stat{padding:16px}
  .g4{grid-template-columns:1fr 1fr;gap:12px}
  .card{border-radius:18px;padding:16px}
  .dash{gap:14px}
  .goalgrid{grid-template-columns:1fr}
  .grid[style*="auto-fill"]{grid-template-columns:1fr!important}
  .attgrid .attcard{max-width:none}
  .page.settings{grid-template-columns:1fr}

  /* bottom tab bar */
  .tabbar{display:grid;grid-template-columns:1fr 1fr 76px 1fr 1fr;align-items:end;position:fixed;left:0;right:0;bottom:0;z-index:120;
    height:calc(66px + env(safe-area-inset-bottom));padding:6px 6px env(safe-area-inset-bottom);
    background:color-mix(in srgb,var(--surface) 90%,transparent);-webkit-backdrop-filter:blur(20px) saturate(1.5);backdrop-filter:blur(20px) saturate(1.5);border-top:1px solid var(--line)}
  .tabbar .tab{position:relative;display:flex;flex-direction:column;align-items:center;gap:3px;padding:7px 0 9px;font-size:11px;font-weight:500;color:var(--text);text-decoration:none}
  .tabbar .tab .ico{width:24px;height:24px}
  .tabbar .tab.on{color:#c4231c;font-weight:600}
  :root[data-theme=dark] .tabbar .tab.on{color:#e5534b}
  .tabbar .tbadge{position:absolute;top:3px;left:calc(50% + 7px);min-width:18px;height:18px;border-radius:99px;background:#c4231c;color:#fff;font:600 10.5px/18px Inter,system-ui,sans-serif;text-align:center;padding:0 5px;font-style:normal}
  .tabbar .fab{justify-self:center;align-self:start;margin-top:-20px;width:60px;height:60px;border-radius:50%;background:#c4231c;color:#fff;display:grid;place-items:center;
    box-shadow:0 12px 24px -8px rgba(196,35,28,.55),0 0 0 6px var(--canvas);transition:transform .15s var(--ease)}
  .tabbar .fab:active{transform:scale(.92)}
  .tabbar .fab .ico{width:26px;height:26px;stroke-width:2.4}

  /* dialogs and panels become bottom sheets */
  .scrim{background:rgba(20,20,24,.5)}
  .modal,.modal.wide{left:0;right:0;top:auto;bottom:0;transform:none;width:100%;max-width:none;max-height:92vh;border-radius:24px 24px 0 0;padding-bottom:env(safe-area-inset-bottom);animation:sheetUp .28s var(--ease)}
  .modal::before{content:"";display:block;width:42px;height:5px;border-radius:5px;background:var(--surface3);margin:9px auto 0}
  .modal .mh{padding:12px 20px 4px}.modal .mb{padding:10px 20px 6px}
  .modal .mf{position:sticky;bottom:0;background:var(--surface);padding:12px 20px calc(14px + env(safe-area-inset-bottom))}
  .modal .mf .btn{flex:1;justify-content:center;padding:14px}
  .panel{top:max(env(safe-area-inset-top),12px);left:0;right:0;bottom:0;width:100%;border-radius:24px 24px 0 0;animation:sheetUp .3s var(--ease)}
  .panel .ph{padding:12px 14px}.panel .pb{padding:18px 18px calc(36px + env(safe-area-inset-bottom))}
  .panel .ttlinp{font-size:22px}
  .meta-grid{grid-template-columns:100px 1fr;gap:4px 10px}
  .meta-grid .inp,.meta-grid .sel,.meta-grid select.sel{min-width:0;width:100%;margin-left:0}
  .ptabs{gap:20px}
  .menu{min-width:220px}
  @keyframes sheetUp{from{transform:translateY(60px);opacity:0}}

  /* lists */
  .trow{min-height:56px;padding:8px 4px;gap:12px}
  .chk{width:26px;height:26px}.chk .ico{width:15px;height:15px}
  .chk[data-tip]:hover::after{display:none}
  .trow .meta .chip{max-width:120px}
  .mthead{display:none}
  .mtrow{min-height:58px;grid-template-columns:minmax(0,1fr) 84px 36px}
  .mtrow .c3{display:none}
  .glist .mtrow{grid-template-columns:minmax(0,1fr) 90px 34px}
  .ghead{padding:14px 6px 8px}
  .quick{padding:10px 6px}
  .board{scroll-snap-type:x mandatory;gap:12px;margin:0 -16px;padding:0 16px 24px;scroll-padding:16px}
  .col{width:84vw;max-width:340px;scroll-snap-align:start}
  .utabs{overflow-x:auto;gap:24px;scrollbar-width:none}.utabs::-webkit-scrollbar{display:none}
  .utabs a{white-space:nowrap;padding:12px 2px}
  .tabs{overflow-x:auto;max-width:100%;scrollbar-width:none}.tabs::-webkit-scrollbar{display:none}.tabs button{white-space:nowrap}

  /* calendar: dots, tap a day for the list */
  .cell{min-height:58px;padding:4px 3px}
  .cell .ev{display:inline-block;width:7px;height:7px;padding:0;margin:1px;border-radius:50%;font-size:0;overflow:hidden}
  .cell .ev *{display:none}.cell .more{display:none}
  .cal-hd{font-size:10px;padding:8px 0}
  .calwrap{grid-template-columns:1fr}
  .dfile{grid-template-columns:40px minmax(0,1fr) 64px;padding:11px 8px}

  #toasts{bottom:calc(92px + env(safe-area-inset-bottom))}
  #ptr{display:grid;position:fixed;top:calc(env(safe-area-inset-top) + 10px);left:50%;transform:translate(-50%,-70px);width:42px;height:42px;border-radius:50%;background:var(--surface);color:var(--text);box-shadow:var(--shadow-lg);place-items:center;z-index:350;transition:transform .2s var(--ease)}
  #ptr.spin .ico{animation:sp .7s linear infinite}
}
@media (display-mode:standalone){ body{user-select:none;-webkit-user-select:none} input,textarea{user-select:text;-webkit-user-select:text} }

/* Home: My tasks is tall; Goals and Coming up stack beside it */
@media (min-width:1181px){ .dash .card.tall{grid-row:span 2} }
@media (max-width:1180px){ .dash .card.tall{grid-row:auto} }

/* Home: no tall card any more — plain rows */
.dash .card.tall{grid-row:auto}
@media (max-width:860px){
  .trow .meta .hide-m{display:none!important}
  .trow .meta{max-width:none;gap:8px}
  .trow .meta .chip{max-width:none}
  .trow .ttl{min-width:0;flex:1}
  .stat.hero::after{width:46px;height:46px;right:-12px;top:-12px;left:auto;bottom:auto;border-radius:0;transform:rotate(18deg)}
  .stat .lab{font-size:12.5px}
  .installcard{align-items:flex-start;gap:12px}
  .installcard b{display:block;font-size:15px}
  .installcard .small{font-size:12.5px;line-height:1.35;margin-top:2px}
  .installcard .btn{align-self:center}
}

/* My tasks table: Name | Due date | Collaborators | Projects */
.mtlist:not(.glist) .mthead,.mtlist:not(.glist) .mtrow{grid-template-columns:minmax(0,1fr) 130px 150px 260px}
.avstack{display:flex;align-items:center}
.avstack .av{box-shadow:0 0 0 2px var(--surface);margin-left:-7px}.avstack .av:first-child{margin-left:0}
.avstack .avmore{margin-left:6px;font-size:12px;font-weight:600}
.mtrow:hover .avstack .av{box-shadow:0 0 0 2px var(--surface2)}
@media(max-width:860px){.mtlist:not(.glist) .mthead,.mtlist:not(.glist) .mtrow{grid-template-columns:minmax(0,1fr) 90px}.mtrow .c6,.mthead .c6{display:none}}

/* ===== headings: smaller, Asana-like ===== */
h1,.pagehead h1{font-size:22px;font-weight:600;letter-spacing:-.015em;line-height:1.25}
h2,.card>.hd h2,.card>.hd>h2{font-size:14px;font-weight:600;letter-spacing:0}
.panel .ttlinp{font-size:20px;font-weight:600;letter-spacing:-.01em}
.modal .mh h2{font-size:16px;font-weight:600}
.stat .num{font-size:34px}
.stat .lab{font-size:13px}
.ghead{font-size:14px;font-weight:600}
.col .chd{font-size:14px}
.sect>h3{font-size:13px}
.sub{font-size:13px;margin-top:2px}
.pagehead{margin:6px 0 18px}
.goaltile b{font-size:14px;font-weight:600}
.sheethd{font-size:11.5px}
h1 svg.ico{width:15px;height:15px}
@media(max-width:860px){ h1,.pagehead h1{font-size:20px} .panel .ttlinp{font-size:19px} .stat .num{font-size:30px} }

/* headings win over any inline sizes */
h1,.pagehead h1,.page h1{font-size:22px!important;font-weight:600}
.mtlist .ghead,.ghead{font-size:14px!important}
@media(max-width:860px){ h1,.pagehead h1,.page h1{font-size:20px!important} }

/* attachments: small "+" button */
.attgrid{align-items:center;gap:10px}
.attadd{width:34px;height:34px;min-height:0;flex:none;border-radius:10px;display:grid;place-items:center;box-shadow:0 0 0 1px var(--line);color:var(--text)}
.attadd .ico{width:16px;height:16px}
.attadd:hover{background:var(--surface2);box-shadow:0 0 0 1px var(--text)}

/* task panel tabs stay pinned while you scroll their content */
.panel .ptabs{position:sticky;top:-1px;z-index:6;background:var(--surface)}

/* tab bar can reach the very top, even when a tab has little content */
.panel .pb{--pad-top:22px}
.panel .ptabs{top:calc(-1 * var(--pad-top))}
.panel .tabbody{min-height:calc(100vh - 170px)}
@media(max-width:860px){ .panel .pb{--pad-top:18px} .panel .tabbody{min-height:calc(100vh - 150px)} }

/* ===== board cards like the reference + smaller task names ===== */
.tcard{padding:14px 14px 12px;border-radius:14px;display:flex;flex-direction:column;gap:11px;cursor:grab}
.tcard .tc-top{display:flex;gap:10px;align-items:flex-start}
.tcard .tc-top .chk{margin-top:1px;flex:none}
.tcard .tt{font-size:13.5px;font-weight:400;line-height:1.45;margin:0;color:var(--text);min-width:0;overflow-wrap:anywhere}
.tcard.done .tt{text-decoration:line-through;opacity:.65}
.tcard .tc-proj{display:flex}
.tcard .tc-proj .chip{background:var(--surface2);font-weight:400;font-size:12px;padding:3px 10px 3px 7px;gap:7px;max-width:100%}
.psq{width:12px;height:12px;border-radius:3px;flex:none;display:inline-block}
.tcard .tc-foot{display:flex;align-items:center;gap:12px;font-size:12px;min-height:20px}
.tcard .tc-foot .spacer{flex:1}
.tcard .tcdate{font-weight:400}.tcdate.over{color:#c4231c;font-weight:500}.tcdate.today{font-weight:600}
.tcard .tcmeta{display:inline-flex;align-items:center;gap:5px;font-size:12px}
.tcard .tcmeta .ico{width:14px;height:14px}
/* task names everywhere: smaller, regular weight */
.trow .ttl,.mtrow .ttl,.subrow .ttl{font-size:13.5px;font-weight:400}
.mtrow.done .ttl,.trow.done .ttl{font-weight:400}
.panel .ttlinp{font-size:18px;font-weight:600}
@media(max-width:860px){ .tcard .tt{font-size:14px} .trow .ttl,.mtrow .ttl,.subrow .ttl{font-size:14px} .panel .ttlinp{font-size:17px} }

/* completion circle: smaller (Asana-sized), with a generous invisible tap area */
.chk{width:16px;height:16px;border-width:1.5px}
.chk .ico{width:10px;height:10px;stroke-width:3.6}
.chk::before{content:"";position:absolute;inset:-9px}
.tcard .tc-top .chk{margin-top:2px}
.tcard .tc-top{gap:9px}
.subrow .chk{border-radius:5px}
@media(max-width:860px){ .chk{width:20px;height:20px} .chk .ico{width:12px;height:12px} .chk::before{inset:-12px} .tcard .tc-top .chk{margin-top:0} }

/* Home: four equal cards on one line */
.span3{grid-column:span 3}
.card.span3 .goalgrid{grid-template-columns:1fr}
.card.span3 .bar-row .bn{width:84px}
.card.span3 .goaltile{padding:14px}
@media(max-width:1180px){.span3{grid-column:span 6}}
@media(max-width:860px){.span3{grid-column:span 12}}
.card.span3 a .row{min-width:0}
.card.span3 a .row .cname{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.card.span3 a .row+.small{flex:none}

/* ===== ONE button size, sitewide: 36px ===== */
.btn,.btn.sm,.btn.primary,.btn.ghost,.btn.danger,.btn.primary.sm,.btn.ghost.sm{
  box-sizing:border-box;height:36px;min-height:36px;padding:0 16px;font-size:13.5px;font-weight:500;line-height:1;gap:8px;border-radius:10px;
  display:inline-flex;align-items:center;justify-content:center;white-space:nowrap}
.btn .ico,.btn.sm .ico{width:16px;height:16px}
.iconbtn:not(.flat){width:36px;height:36px;border-radius:10px}
.iconbtn:not(.flat) .ico{width:17px;height:17px}
select.sel,.sel:not(textarea){height:36px;padding-top:0;padding-bottom:0;font-size:13.5px}
.row>select.sel,.toolbar select.sel{width:auto}
.auth2 .btn.primary.go{height:46px;min-height:46px;padding:0 20px;font-size:13.5px}
@media(max-width:860px){
  .btn,.btn.sm,.btn.primary,.btn.ghost,.btn.danger{height:40px;min-height:40px;font-size:14px;padding:0 16px}
  .iconbtn:not(.flat){width:40px;height:40px}
  select.sel,.sel:not(textarea){height:40px}
  .modal .mf .btn{height:44px;min-height:44px}
}

/* logo: equal breathing room above and below */
.side{padding-top:0}
.side .brandlogo{margin:24px 0 24px;padding:0 12px}
body.imp .side .brandlogo{margin-top:18px}
/* icons inside buttons are never touched by the empty-state illustration style */
.empty .btn .ico,.empty .btn.sm .ico{width:16px;height:16px;opacity:1;margin:0}
.side .brandlogo{margin:24px 0 20px}
body.imp .side .brandlogo{margin-top:18px}

/* separator between the logo and the navigation */
.side .brandlogo{margin:24px 0 12px}
body.imp .side .brandlogo{margin-top:18px}
.side-sep{height:1px;background:#3a3b3e;margin:0 12px 12px;flex:none}

/* centred dialog header (day popup on the calendar) */
.modal.ctr .mh{position:relative;justify-content:center;padding-top:18px}
.modal.ctr .mh h2{text-align:center;width:100%;padding:0 44px}
.modal.ctr .mh .iconbtn{position:absolute;right:14px;top:12px}
.modal.ctr .mb{text-align:center}
.modal.ctr .mb .ev,.modal.ctr .mb .ev.task{text-align:left}

/* sidebar: three untitled groups, Team sits with Projects */
.side-sep.thin{margin:8px 12px}
.side h6{padding-top:12px}

/* tighter menus */
.side{gap:1px}
.side .nav{min-height:34px;padding:6px 12px;gap:11px;font-size:14px}
.side .nav>.ptile{width:22px;height:22px}
.side .nav.showmore{min-height:28px;padding:4px 12px}
.side h6{padding:10px 12px 4px}
.side-sep.thin{margin:6px 12px}
.me{margin-top:6px}
.menu{padding:4px}
.menu button{padding:7px 10px;gap:9px}
@media(max-width:860px){ .sheetrow{padding:8px 6px;gap:12px} .sico{width:34px;height:34px} .sheethd{padding:12px 6px 2px} }

/* logo sits close to the top edge */
.side .brandlogo{margin:4px 0 12px}
body.imp .side .brandlogo{margin-top:4px}

/* ============================ MESSAGES ============================ */
.page.msgpage{padding-top:10px}
.msgs{display:grid;grid-template-columns:340px minmax(0,1fr);height:calc(100vh - 118px);min-height:460px;background:var(--surface);border-radius:var(--r);box-shadow:0 0 0 1px var(--line);overflow:hidden}
.mlist{border-right:1px solid var(--line);display:flex;flex-direction:column;min-width:0;padding:16px 12px 8px;overflow:hidden}
.mlist-hd{display:flex;flex-direction:column;gap:10px;padding:0 4px 4px}
.mlist-hd h1{font-size:18px!important}
.mlist-hd .btn{flex:1}
.mconvs{flex:1;overflow:auto;margin:0 -4px;padding:0 4px}
.mconv{display:flex;gap:12px;align-items:center;padding:10px;border-radius:12px;color:var(--text);text-decoration:none!important}
.mconv:hover{background:var(--surface2)}.mconv.on{background:var(--surface2);box-shadow:inset 3px 0 0 #c4231c}
.mconv .av.lg{width:40px;height:40px;flex:none}
.mc-body{flex:1;min-width:0}
.mc-top,.mc-bot{display:flex;align-items:center;gap:8px;justify-content:space-between}
.mc-top b{font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mc-time{font-size:12px;flex:none}
.mc-prev{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.mc-unread{font-style:normal;background:#c4231c;color:#fff;border-radius:99px;font-size:11.5px;font-weight:600;min-width:20px;height:20px;line-height:20px;text-align:center;padding:0 6px;flex:none}
.gav{background:#1e1f21!important;color:#fff;display:inline-grid;place-items:center}
:root[data-theme=dark] .gav{background:#f6f6f7!important;color:#1e1f21}
.mthread{display:flex;flex-direction:column;min-width:0;min-height:0}
.mthread-hd{display:flex;align-items:center;gap:12px;padding:12px 18px;border-bottom:1px solid var(--line)}
.mthread-hd .av.lg{width:38px;height:38px}
.mt-name{font-size:15px;font-weight:600;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mt-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mback{display:none}
.mbody{flex:1;overflow:auto;padding:16px 20px;display:flex;flex-direction:column;gap:2px}
.mmore{text-align:center;padding:4px 0 10px}
.mday{text-align:center;margin:14px 0 8px;font-size:12px;font-weight:600}
.mday span{background:var(--surface2);border-radius:99px;padding:3px 12px}
.mmsg{display:flex;align-items:flex-end;gap:10px;max-width:78%;position:relative}
.mmsg.first{margin-top:10px}
.mmsg.mine{align-self:flex-end;flex-direction:row-reverse}
.mmsg .av{flex:none;margin-bottom:2px}.av-gap{width:28px;flex:none}
.mcol{display:flex;flex-direction:column;min-width:0}
.mmsg.mine .mcol{align-items:flex-end}
.mmeta{font-size:12px;display:flex;gap:8px;align-items:baseline;margin:0 4px 3px}
.mmeta b{font-weight:600}
.mbub{background:var(--surface2);color:var(--text);padding:8px 13px;border-radius:16px;border-bottom-left-radius:5px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.45;font-size:14px}
.mmsg.mine .mbub{background:var(--text);color:var(--canvas);border-radius:16px;border-bottom-right-radius:5px}
.mmsg.mine .mbub a{color:inherit}
.mbub a{text-decoration:underline;text-decoration-color:#c4231c;text-underline-offset:2px}
.mbub.gone{background:transparent;box-shadow:inset 0 0 0 1px var(--line);font-style:italic}
.mmsg.mine .mbub.gone{color:var(--text)}
.medited{font-size:11px;opacity:.8}
.medit{width:min(480px,70vw)}
.mact{opacity:0;align-self:center;transition:opacity .12s}.mmsg:hover .mact{opacity:1}
.mcomposer{display:flex;align-items:flex-end;gap:10px;padding:12px 16px;border-top:1px solid var(--line)}
.mcomposer textarea{flex:1;resize:none;border:0;background:var(--surface2);color:var(--text);border-radius:14px;padding:10px 14px;font:inherit;line-height:1.4;max-height:140px;outline:2px solid transparent}
.mcomposer textarea:focus{outline-color:var(--text);background:var(--surface)}
.mempty{margin:auto;text-align:center;padding:30px}
.mempty .ico{width:38px;height:38px;opacity:.5;margin-bottom:8px}
@media(max-width:860px){
  .page.msgpage{padding:0 0 calc(76px + env(safe-area-inset-bottom))}
  .msgs{display:block;height:calc(100dvh - 150px - env(safe-area-inset-bottom));border-radius:0;box-shadow:none;background:transparent;min-height:0}
  .mlist{border:0;height:100%;padding:12px 16px 0}.mthread{display:none;height:100%;background:var(--surface)}
  .msgs.show-thread .mlist{display:none}.msgs.show-thread .mthread{display:flex}
  .mback{display:grid}
  .mmsg{max-width:88%}
  .mcomposer{padding:10px 12px}.mcomposer .msend{width:44px;padding:0;font-size:0;gap:0}.mcomposer .msend .ico{width:18px;height:18px}
  .mact{opacity:1}
}

/* messages: the search box must not stretch the column */
.mlist .search{flex:none}

/* the login poster headline is a display heading: exempt from the page-title size rule */
h1.pbig,.poster h1.pbig{font-size:clamp(40px,5.6vw,88px)!important;font-weight:600;letter-spacing:-.045em;line-height:1}
@media(max-width:900px){h1.pbig,.poster h1.pbig{font-size:44px!important}}

/* a deleted message of yours stays readable */
.mmsg.mine .mbub.gone{background:transparent;color:var(--text);box-shadow:inset 0 0 0 1px var(--line)}

/* board: columns share the width, so five fit without scrolling */
.board{gap:12px;padding-bottom:16px;overflow-x:auto}
.col{flex:1 1 0;width:auto;min-width:176px;padding:10px}
.board>button.col{flex:0 0 112px;min-width:112px;align-self:stretch;max-height:120px;font-size:13px}
.col .chd{padding:2px 4px 10px;font-size:13.5px}
.col .chd>span:first-child{gap:8px;min-width:0}
.col .chd>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.col .cards{gap:8px}
.tcard{padding:11px 11px 10px;gap:9px;border-radius:12px}
.tcard .tt{font-size:13px;line-height:1.4}
.tcard .tc-top{gap:8px}
.tcard .tc-foot{gap:8px;font-size:11.5px}
.tcard .tc-proj .chip{font-size:11.5px;padding:2px 8px 2px 6px}
@media(max-width:860px){ .col{flex:0 0 84vw;max-width:340px;min-width:0} .board>button.col{flex:0 0 120px} }

/* Home 'My tasks' list under the summaries: tighter rows (summary cards untouched) */
@media(min-width:861px){
  .dash .tlist .trow{padding:5px 8px;gap:10px;min-height:0}
  .dash .tlist .quick{padding:4px 8px}
  .dash .card>.hd{margin-bottom:8px}
}

/* task panel: collaborators — people first, the "add" control always on its own line underneath */
.collab{display:flex;flex-direction:column;align-items:flex-start;gap:8px;min-width:0;width:100%}
.collab-chips{display:flex;flex-wrap:wrap;gap:6px;max-width:100%}
.collab select.sel{width:auto;min-width:200px;max-width:100%}
.meta-grid>div:has(.collab){align-items:flex-start;padding-top:2px}
.meta-grid>span:has(+ div .collab){align-items:flex-start;padding-top:8px}

/* ===== text fields: no glowing outline or border on hover or focus, anywhere ===== */
input:hover,input:focus,input:focus-visible,textarea:hover,textarea:focus,textarea:focus-visible,select:hover,select:focus,select:focus-visible,
.inp:hover,.inp:focus,.sel:hover,.sel:focus,.txt:hover,.txt:focus,.search input:hover,.search input:focus,.mcomposer textarea:focus,.ttlinp:hover,.ttlinp:focus,
.quick input:focus,.auth2 .inp:focus,.auth2 .sel:focus{outline:none!important;outline-color:transparent!important;box-shadow:none!important}
.search input,.inp,.sel,.txt,.mcomposer textarea{transition:background .12s}

/* ===== placeholders vanish the moment you click in to type, in every field ===== */
input:focus::placeholder,textarea:focus::placeholder{opacity:0!important;color:transparent!important}
input:focus::-webkit-input-placeholder,textarea:focus::-webkit-input-placeholder{opacity:0!important;color:transparent!important}
input:focus::-moz-placeholder,textarea:focus::-moz-placeholder{opacity:0!important}

/* ===== task panel > Collaborators: label lines up with the first row; "+ Add collaborator" is a proper button ===== */
.meta-grid>span:has(+ div .collab){align-self:start;min-height:30px;height:30px;padding-top:0;align-items:center}
.meta-grid>div:has(.collab){align-self:start;align-items:flex-start;padding-top:0;min-height:30px}
.collab{gap:8px;align-items:flex-start}
.collab-chips{gap:6px}
.collab .chip{height:30px;min-height:30px;display:inline-flex;align-items:center;gap:7px;padding:0 8px 0 4px;border-radius:9px;font-size:13px;font-weight:400}
.collab .chip .av{width:22px;height:22px;flex:none}
.collab select.sel{margin-left:0!important;width:auto;min-width:176px;height:30px!important;padding:0 36px 0 12px!important;border-radius:9px;font-size:13px;
  background-color:var(--surface2)!important;color:var(--text);cursor:pointer}
.collab select.sel:hover{background-color:var(--surface3)!important}

/* task panel header: readable project name */
.ph-project-wrap{display:flex;align-items:center;gap:10px;min-width:0;flex:0 1 auto;max-width:56%}
.ph-project{display:inline-flex;align-items:center;gap:9px;min-width:0;font-size:14.5px;font-weight:500;color:var(--text)!important;text-decoration:none}
.ph-project span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
a.ph-project:hover{text-decoration:underline;text-decoration-color:#c4231c;text-underline-offset:3px}
.panel .ph .ptile{box-shadow:0 0 0 1px var(--line)}

/* task panel: progress slider */
.progctl{display:flex;flex-direction:column;gap:6px;width:100%}
.prange{flex:1;accent-color:#c4231c;height:4px;cursor:pointer;min-width:0}
.linkbtn{background:none;border:0;padding:0;font:inherit;color:var(--text);text-decoration:underline;text-decoration-color:#c4231c;text-underline-offset:3px;cursor:pointer}
.meta-grid>div:has(.progctl){align-items:flex-start}
.meta-grid>span:has(+ div .progctl){align-self:start;min-height:30px;height:30px}
.meta-grid>div:has(.progctl){align-self:start;min-height:30px}

/* task panel: date, repeat and priority controls share one width, so their right-hand icons form a straight line */
.meta-grid .ctl{width:210px!important;min-width:210px!important;max-width:100%}
.meta-grid input.ctl[type=date]{padding-right:14px}
.meta-grid input.ctl[type=date]::-webkit-calendar-picker-indicator{box-sizing:border-box;width:20px;height:20px;padding:2px;margin:0 0 0 8px}
.meta-grid select.ctl{background-position:right 17px center!important;background-size:14px!important}

/* progress: typeable percentage next to the slider */
.meta-grid .pnum{width:62px!important;min-width:62px!important;height:30px;padding:0 8px;margin-left:0;text-align:right;background:var(--surface2);border-radius:8px;font-size:13px;-moz-appearance:textfield;appearance:textfield}
.meta-grid .pnum::-webkit-outer-spin-button,.meta-grid .pnum::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}

/* task popup: narrower */
.panel{width:min(560px,calc(100vw - 32px))}
.panel .pb{padding-left:26px;padding-right:26px}
.ptabs{margin-left:-26px;margin-right:-26px;padding-left:26px;padding-right:26px}
@media(max-width:860px){.panel{width:100%}}

/* Team page: your own card comes first and stands out */
.me-card{background:var(--surface2);box-shadow:0 0 0 1px var(--line)}
.chip.you{margin-left:8px;background:var(--text);color:var(--canvas);font-weight:600;font-size:11px;padding:1px 8px;vertical-align:middle}

/* Drive table: column rules, roomier name cell */
.dfile{padding:0 12px;min-height:56px;gap:0;grid-template-columns:48px minmax(0,1fr) 170px 100px 110px}
.dfile > :nth-child(n+2){align-self:stretch;display:flex;align-items:center;border-left:1px solid var(--line,#e6e6e6);padding-left:16px;min-width:0}
.dfile > .ficon{align-self:center;border-left:0;padding-left:0;width:36px;height:36px;display:grid}
.dfile .dname{gap:18px!important}
.dfile > :last-child{justify-content:flex-end;padding-right:4px}
.dfile.skel > :nth-child(n+2){border-left-color:transparent}
.dfiles > .dfile + .dfile{border-top:1px solid var(--line,#e6e6e6);border-radius:0}
@media (max-width:760px){.dfile{grid-template-columns:44px minmax(0,1fr) 70px}}
.dfile{grid-template-columns:48px minmax(0,1fr) 64px 170px 100px 110px}
.dfile > .dgo{justify-content:center;padding-left:0}
.dfile .dname{gap:0!important}
@media (max-width:760px){.dfile{grid-template-columns:44px minmax(0,1fr) 48px 70px}}

/* Messages: tidy New message / New group */
.mempty > .ico{width:38px;height:38px;opacity:.5;margin-bottom:8px}
.mempty .btn .ico{width:16px;height:16px;opacity:1;margin:0}
.mempty .row{gap:10px!important}
.mempty .row .btn{min-width:150px;justify-content:center}
.mlist-hd{padding:4px 8px 8px;gap:12px}
.mlist-hd > .row{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
.mlist-hd .btn{width:100%;min-width:0;justify-content:center;padding-left:10px;padding-right:10px;white-space:nowrap}
.mlist .search,.mlist .msearch{margin-left:8px;margin-right:8px}
.mlist-hd{padding:4px 0 8px}
.mlist-hd h1{padding-left:8px}
.dfile.dhead{cursor:default;min-height:38px;font-size:12px;color:var(--muted);border-top:1px solid var(--line,#e6e6e6);border-bottom:1px solid var(--line,#e6e6e6);background:var(--surface2);border-radius:0;margin-top:8px}
.dfile.dhead:hover{background:var(--surface2)}
.dfile.dhead > :last-child{justify-content:flex-start;padding-right:0}
.dfile.dhead + .dfiles .dfile:first-child{border-top:0}

/* Calendar: today's whole day cell is highlighted */
.cell.today,.cell.today:hover{background:color-mix(in srgb,#c4231c 12%,var(--surface,#fff))}
.cell.today.out{background:color-mix(in srgb,#c4231c 12%,var(--surface,#fff))}
.dfile.dhead{position:sticky;top:var(--toph,68px);z-index:5}
.card:has(> div > .dfiles),.card:has(.dfiles){overflow:visible}

/* Notification settings */
.nsrow{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 2px;border-bottom:1px solid var(--line)}
.nsrow:last-of-type{border-bottom:0}
.sw{position:relative;display:inline-block;width:42px;height:24px;flex:none}
.sw input{position:absolute;opacity:0;inset:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:1}
.sw span{position:absolute;inset:0;border-radius:999px;background:#c9c9cd;transition:background .15s}
.sw span::after{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;transition:transform .15s}
.sw input:checked + span{background:#c4231c}.sw input:checked + span::after{transform:translateX(18px)}
.nshead,.nstype{display:grid;grid-template-columns:minmax(0,1fr) 64px 64px 64px;align-items:center;gap:6px}
.nshead{padding:16px 2px 8px;font-size:12px;color:var(--muted);border-bottom:1px solid var(--line)}
.nshead > :first-child{font-weight:500;font-size:13px;color:var(--text)}
.nscell{display:flex;justify-content:center;text-align:center}
.nset.paused .nshead,.nset.paused .nstype{opacity:.45;pointer-events:none}
@media (max-width:560px){.nshead,.nstype{grid-template-columns:minmax(0,1fr) 46px 46px 46px}.nstype .small{display:none}}

/* Portfolios */
.ptable{display:flex;flex-direction:column}
.prow{display:grid;grid-template-columns:minmax(180px,1.5fr) 118px minmax(160px,1.2fr) 52px 70px 100px minmax(120px,1fr) 110px 110px;align-items:center;gap:0;min-height:54px;padding:0 14px;color:inherit!important;text-decoration:none;border-top:1px solid var(--line)}
.prow *{color:inherit}.prow .muted{color:var(--muted)}.prow .dueover{color:#c4231c}.prow .duetoday{color:#c4231c}
.prow > *{min-width:0;padding:0 12px;border-left:1px solid var(--line);align-self:stretch;display:flex;align-items:center}
.prow > :first-child{border-left:0;padding-left:0}
a.prow:hover{background:var(--surface2)}
.prow.phead{min-height:40px;border-top:0;background:var(--surface2);font-size:12px;color:var(--muted)}
.prow.phead .phd{all:unset;cursor:pointer;display:flex;align-items:center;width:100%;height:100%}.prow.phead .phd.on{color:var(--text)}
.prow .num{justify-content:flex-end;font-variant-numeric:tabular-nums}
.pname{gap:10px}.pname .plogo{width:26px;height:26px;border-radius:7px;object-fit:cover;flex:none}
.pprog{gap:10px}.pprog .prog{height:7px}
.stbtn{display:inline-flex;align-items:center;gap:7px;height:28px!important;padding:0 10px!important;font-size:12.5px}
.sdot{width:8px;height:8px;border-radius:50%;background:#1e1f21;flex:none}.sdot.medium{background:#e0a02a}.sdot.high{background:#c4231c}.sdot.soon{background:#8a8a90}
@media (max-width:980px){.prow{grid-template-columns:minmax(0,1fr) 110px 110px}.prow > :nth-child(n+4){display:none}.prow.phead > :nth-child(n+4){display:none}}

/* ===== Phone / installed app: smaller type, roomier bottom bar, no overflow ===== */
@media (max-width:860px){
  html,body{font-size:13px}
  h1{font-size:17px!important}
  h2{font-size:14px!important}
  .sub,.small{font-size:12px}
  .btn{font-size:13px}
  .inp,input,select,textarea,.sel{font-size:14px!important}
  .tabs button,.tabs a{font-size:13px}
  .tabbar{grid-template-columns:1fr 1fr 1fr 64px 1fr 1fr 1fr;padding-left:2px;padding-right:2px}
  .tabbar .tab{font-size:10px;gap:2px;padding:7px 0 8px}
  .tabbar .tab .ico{width:21px;height:21px}
  .tabbar .fab{width:54px;height:54px;margin-top:-18px}
  .tabbar .tbadge{left:calc(50% + 5px)}
  .stat .num{font-size:24px!important}
  .stat .lab{font-size:12px}
  .stat .hint{font-size:11.5px}
  .trow .ttl,.tcard .ttl,.mtrow .ttl{font-size:13px}
  .pagehead{flex-wrap:wrap;gap:10px}
  .pagehead > .row{flex-wrap:wrap;width:100%;gap:8px}
  .pagehead > .row .btn{flex:1 1 auto;min-width:0;justify-content:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mttools{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
  .mttools .spacer,.mttools > .small{display:none}
  .mttools > .btn{grid-column:1 / -1}
  .mttools select{width:100%!important}
  .card{border-radius:16px}
}

/* ===== Bottom bar: floating glass ===== */
@media (max-width:860px){
  .tabbar{left:12px;right:12px;bottom:calc(10px + env(safe-area-inset-bottom));height:66px;padding:0 6px;align-items:center;border-radius:28px;border:1px solid rgba(255,255,255,.55);
    background:linear-gradient(180deg,rgba(255,255,255,.62),rgba(255,255,255,.38));
    -webkit-backdrop-filter:blur(26px) saturate(190%);backdrop-filter:blur(26px) saturate(190%);
    box-shadow:0 12px 32px rgba(20,20,30,.16),inset 0 1px 0 rgba(255,255,255,.75),inset 0 -1px 0 rgba(255,255,255,.25)}
  :root[data-theme=dark] .tabbar{border-color:rgba(255,255,255,.12);background:linear-gradient(180deg,rgba(60,60,66,.58),rgba(30,31,33,.5));box-shadow:0 12px 32px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.16)}
  .tabbar .tab{height:52px;padding:0;justify-content:center;border-radius:20px;margin:0 1px;transition:background .18s,color .18s,transform .12s;color:#2a2b2e}
  :root[data-theme=dark] .tabbar .tab{color:#e9e9ec}
  .tabbar .tab:active{transform:scale(.94)}
  .tabbar .tab.on{background:rgba(196,35,28,.12);color:#c4231c}
  :root[data-theme=dark] .tabbar .tab.on{background:rgba(229,83,75,.2);color:#ff7a72}
  .tabbar .fab{align-self:center;margin-top:0;width:52px;height:52px;border:1px solid rgba(255,255,255,.35);background:linear-gradient(160deg,#e0372f,#b01e18);
    box-shadow:0 8px 18px rgba(196,35,28,.4),inset 0 1px 0 rgba(255,255,255,.4)}
  .tabbar .tbadge{top:2px}
  #view,.main{padding-bottom:calc(96px + env(safe-area-inset-bottom))}
}

/* Reports */
.rrow{display:grid;grid-template-columns:minmax(160px,1.4fr) minmax(180px,1.6fr) 90px 90px 90px 100px;align-items:center;min-height:50px;padding:0 14px;border-top:1px solid var(--line);color:inherit!important;text-decoration:none}
.rrow > *{min-width:0;padding:0 12px;border-left:1px solid var(--line);align-self:stretch;display:flex;align-items:center}.rrow > :first-child{border-left:0;padding-left:0}
.rrow.rtask{grid-template-columns:minmax(220px,2fr) minmax(120px,1fr) minmax(140px,1fr) 90px 100px}
a.rrow:hover{background:var(--surface2)}
.rrow.rhead{min-height:40px;border-top:0;background:var(--surface2);font-size:12px;color:var(--muted)}
.rrow .num{justify-content:flex-end;font-variant-numeric:tabular-nums}
.rrow .dueover{color:#c4231c}.rrow.rtotal{background:var(--surface2);font-weight:600}
.rbar{gap:10px}.rbar .prog{height:7px}
@media (max-width:760px){.rrow{grid-template-columns:minmax(0,1fr) 90px 60px}.rrow > :nth-child(n+4){display:none}.rrow.rtask{grid-template-columns:minmax(0,1fr) 90px}.rrow.rtask > :nth-child(n+3){display:none}.rfilters select,.rfilters input{flex:1 1 140px}}

/* ===== Phone: Asana-style bar (six tabs) with the create button floating above it; roomy task rows; compact summary tiles ===== */
@media (max-width:860px){
  .tabbar{grid-template-columns:repeat(6,1fr)}
  .tabbar .tab span{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .tabbar .fab{position:absolute;right:4px;bottom:calc(100% + 14px);width:52px;height:52px;background:#e8473f;box-shadow:0 10px 22px rgba(196,35,28,.38),inset 0 1px 0 rgba(255,255,255,.35)}

  .card.stat{padding:10px 12px!important;min-height:0!important;border-radius:14px}
  .card.stat::before,.card.stat::after{display:none!important}
  .stat .lab{gap:8px;font-size:11.5px!important;line-height:1.2}
  .stat .lab .chip-ico{width:24px!important;height:24px!important;border-radius:8px!important}
  .stat .lab .chip-ico .ico{width:13px;height:13px}
  .stat .num{font-size:20px!important;line-height:1.1;margin:6px 0 1px!important}
  .stat .hint{font-size:11px!important;line-height:1.25;margin:0!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  .mtlist:not(.glist) .mtrow{display:grid!important;grid-template-columns:28px minmax(0,1fr) auto!important;column-gap:12px;row-gap:2px;align-items:start;padding:12px 4px!important;min-height:0!important;border-bottom:1px solid var(--line)}
  .mtlist:not(.glist) .mtrow .c1{display:contents}
  .mtlist:not(.glist) .mtrow .c1 > .chk{grid-column:1;grid-row:1 / 3;align-self:start;margin-top:1px}
  .mtlist:not(.glist) .mtrow .c1 > .ttl{grid-column:2;grid-row:1;white-space:normal;font-size:14px;line-height:1.3;color:var(--text);overflow:visible}
  .mtlist:not(.glist) .mtrow .c1 > :not(.chk):not(.ttl){display:none}
  .mtlist:not(.glist) .mtrow .c3{grid-column:2;grid-row:2;padding:0!important;border:0!important;display:block}
  .mtlist:not(.glist) .mtrow .c3 .chip{background:none!important;padding:0!important;height:auto!important;font-size:12px;color:var(--muted)}
  .mtlist:not(.glist) .mtrow .c3 .pdot{display:none}
  .mtlist:not(.glist) .mtrow .c2{grid-column:3;grid-row:1 / 3;align-self:center;padding:0!important;border:0!important}
  .mtlist:not(.glist) .mtrow .c2 span{display:inline-block;padding:5px 10px;border-radius:6px;font-size:12px;background:#f1f1f3;color:#5a5a60;white-space:nowrap}
  .mtlist:not(.glist) .mtrow .c2 .dueover{background:#fdecea;color:#c4231c}
  .mtlist:not(.glist) .mtrow .c2 .duetoday{background:#e3f4ea;color:#1a8f4c}
  .mtlist:not(.glist) .mtrow.done .ttl{color:var(--muted)}
  .mtlist:not(.glist) .mtrow .c6,.mthead{display:none!important}
}

/* bottom bar: full pill, smaller create button */
@media (max-width:860px){
  .tabbar{border-radius:999px;height:62px;padding:0 8px}
  .tabbar .tab{border-radius:999px;height:48px}
  .tabbar .fab{width:42px;height:42px;right:6px;bottom:calc(100% + 12px)}
  .tabbar .fab .ico{width:20px;height:20px}
}

/* Phone Home: the summary keeps only "My open tasks" and "Overdue" */
@media (max-width:860px){
  .dash .grid.g4 > a.stat:nth-child(2),.dash .grid.g4 > a.stat:nth-child(4){display:none}
  .dash .grid.g4{grid-template-columns:1fr 1fr}
}

/* Drive on a phone: icon, name, open button. No column table. */
@media (max-width:860px){
  .dfile.dhead{display:none}
  .dfile{grid-template-columns:44px minmax(0,1fr) 40px!important;min-height:58px;padding:0 4px!important}
  .dfile > .hm,.dfile > :last-child:not(.ficon):not(.dname):not(.dgo){display:none!important}
  .dfile > :nth-child(n+2){border-left:0!important;padding-left:0!important}
  .dfile > .ficon{width:36px;height:36px}
  .dfile .dname{padding-left:4px!important}
  .dfile .dname span{white-space:normal!important;line-height:1.3;font-size:14px}
  .dfile > .dgo{justify-content:center;padding:0!important}
  .dfiles > .dfile + .dfile{border-top:1px solid var(--line)}
  #view .card:has(.dfiles){padding:10px 8px!important}
  /* toolbar: search on its own row, then buttons in a tidy two-column grid */
  .dbar{display:grid!important;grid-template-columns:1fr 1fr;gap:8px!important}
  .dbar .inp{grid-column:1 / -1;max-width:none!important;width:100%}
  .dbar .spacer{display:none}
  .dbar .btn{width:100%;justify-content:center}
  .dbar .btn.primary{grid-column:auto}
}
@media (max-width:860px){ .pagehead > a.btn{width:100%;justify-content:center} }

/* bottom bar: glass hover + glass active (no tinted red) */
@media (max-width:860px){
  .tabbar .tab,.tabbar .tab.on{position:relative;isolation:isolate;-webkit-tap-highlight-color:transparent}
  .tabbar .tab::before{content:"";position:absolute;inset:3px 2px;border-radius:999px;z-index:-1;opacity:0;transition:opacity .2s,transform .2s;transform:scale(.92);
    background:linear-gradient(180deg,rgba(255,255,255,.85),rgba(255,255,255,.45));border:1px solid rgba(255,255,255,.8);
    -webkit-backdrop-filter:blur(14px) saturate(180%);backdrop-filter:blur(14px) saturate(180%);
    box-shadow:0 6px 16px rgba(20,20,30,.12),inset 0 1px 0 rgba(255,255,255,.95),inset 0 -1px 0 rgba(255,255,255,.4)}
  .tabbar .tab:hover::before,.tabbar .tab:active::before{opacity:.7;transform:scale(1)}
  .tabbar .tab.on::before{opacity:1;transform:scale(1)}
  .tabbar .tab.on,:root[data-theme=dark] .tabbar .tab.on{background:transparent;color:#c4231c}
  :root[data-theme=dark] .tabbar .tab.on{color:#ff8a82}
  :root[data-theme=dark] .tabbar .tab::before{background:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,.08));border-color:rgba(255,255,255,.22);box-shadow:0 6px 16px rgba(0,0,0,.4),inset 0 1px 0 rgba(255,255,255,.3)}
  .tabbar .tab:active{transform:scale(.95)}
}
@media (max-width:860px){
  .dash .grid.g4 > a.stat:nth-child(2),.dash .grid.g4 > a.stat:nth-child(4){display:none!important}
}

/* Phone Home: tighter task rows, icon sits next to its label */
@media (max-width:860px){
  .tlist .trow{padding:5px 4px!important;min-height:0!important;gap:10px!important}
  .tlist .trow .chk{width:20px!important;height:20px!important;flex:none}
  .tlist .trow .ttl{font-size:13px;min-width:0}
  .tlist .trow .meta .chip,.tlist .trow .meta .duechip{height:24px;padding:0 8px;font-size:11.5px}
  .tlist .trow .av{width:22px;height:22px}
  .dash .card > .hd{margin-bottom:6px}
  .dash .card .tlist + .quick,.dash .card .quick{margin-top:4px}
  .stat .lab{gap:6px!important;min-height:0!important}
  .stat .lab .chip-ico{margin:0!important;width:22px!important;height:22px!important;border-radius:7px!important;flex:none}
  .stat .lab .chip-ico .ico{width:12px;height:12px}
}

/* Phone: compact "Create task" row */
@media (max-width:860px){
  .quick{padding:2px 4px!important;gap:8px!important;min-height:0}
  .quick .ico{width:14px!important;height:14px!important}
  .quick input{font-size:13px!important;padding:4px 0!important;height:28px!important;line-height:1.2!important}
  .dash .card > .btn.ghost.sm,.dash .tlist > .btn.ghost.sm{margin:2px 0 0 4px!important;height:28px;font-size:12px}
}

/* Phone: sheets, panels and menus open above the bottom bar (they were hiding behind it) */
@media (max-width:860px){
  .scrim{z-index:130}
  .panel{z-index:140}
  .modal{z-index:140}
  .menu{z-index:150}
  #toasts{z-index:300}
  .modal .mb{padding-bottom:calc(8px + env(safe-area-inset-bottom))}
}
/* bottom bar: the glass selector wraps the icon only, so it never touches the label */
@media (max-width:860px){
  .tabbar .tab{gap:4px!important;justify-content:center}
  .tabbar .tab::before{inset:auto!important;top:4px;left:50%;width:54px;height:28px;margin-left:-27px;transform:scale(.92)}
  .tabbar .tab:hover::before,.tabbar .tab:active::before,.tabbar .tab.on::before{transform:scale(1)}
  .tabbar .tab .ico{position:relative;z-index:1}
  .tabbar .tab span{position:relative;z-index:1}
}
@media (max-width:860px){
  .tabbar .tab::before{inset:4px auto auto 50%!important;margin-left:-27px;width:54px;height:28px}
}

/* project dashboard charts */
.pdash .chart svg text.ax{font-size:11px;fill:var(--text)}
.pdash .legend{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 16px;margin-top:10px;font-size:12px}
.pdash .legend .lg{display:inline-flex;align-items:center;gap:6px}.pdash .legend i{width:10px;height:10px;border-radius:3px;display:inline-block}
.pdash .card.stat .num{font-size:30px}
@media (max-width:860px){.pdash .card.span6{grid-column:1 / -1}.pdash .grid.g4{grid-template-columns:1fr 1fr}.pdash .card.stat .num{font-size:22px!important}}

/* bottom bar: active / hover only recolour the icon and label (no pill, no borders) */
@media (max-width:860px){
  .tabbar .tab::before{display:none!important}
  .tabbar .tab,.tabbar .tab.on,.tabbar .tab:hover,.tabbar .tab:active{background:transparent!important;border:0!important;box-shadow:none!important;outline:0}
  .tabbar .tab{transition:color .15s}
  .tabbar .tab:hover,.tabbar .tab:active,.tabbar .tab.on{color:#c4231c}
  :root[data-theme=dark] .tabbar .tab:hover,:root[data-theme=dark] .tabbar .tab:active,:root[data-theme=dark] .tabbar .tab.on{color:#ff8a82}
}

/* Phone keyboard: panels and sheets shrink to the visible area so the keyboard never covers what you type in */
@media (max-width:860px){
  body.kbd .tabbar{display:none!important}
  body.kbd .panel{top:var(--vvt,0)!important;bottom:auto!important;height:var(--vvh,100%)!important;max-height:var(--vvh,100%)!important}
  body.kbd .panel .pb{padding-bottom:24px}
  body.kbd .modal{top:auto!important;bottom:var(--kb,0)!important;max-height:calc(var(--vvh,100vh) - 12px)!important;padding-bottom:0!important}
  body.kbd .modal .mb{overflow:auto;padding-bottom:12px}
  body.kbd #toasts{bottom:calc(var(--kb,0px) + 16px)}
}

/* clickable summary tiles */
button.card.stat.clickable{all:unset;box-sizing:border-box;display:block;width:100%;cursor:pointer;background:var(--surface);border-radius:var(--r-card,20px);padding:var(--stat-pad,18px 20px);transition:transform .12s,box-shadow .15s,background .15s;box-shadow:var(--shadow-sm,0 1px 2px rgba(0,0,0,.05))}
button.card.stat.clickable:hover{background:var(--surface2);transform:translateY(-1px)}
button.card.stat.clickable:active{transform:scale(.985)}

/* light mode: no grey outlines around cards, tiles, tabs or inputs; a soft shadow gives them their shape instead */
:root:not([data-theme=dark]){--shadow:0 1px 2px rgba(20,22,30,.04),0 8px 22px -16px rgba(20,22,30,.16)}
:root:not([data-theme=dark]) .card,:root:not([data-theme=dark]) .tabs,:root:not([data-theme=dark]) .search input,:root:not([data-theme=dark]) .iconbtn{border-color:transparent}
:root:not([data-theme=dark]) .main{box-shadow:none}
:root:not([data-theme=dark]) .modal,:root:not([data-theme=dark]) .panel{border:0}
:root:not([data-theme=dark]) .card.stat.hero{box-shadow:none}
:root:not([data-theme=dark]) .card,:root:not([data-theme=dark]) .tcard,:root:not([data-theme=dark]) .mtlist,:root:not([data-theme=dark]) .attcard,:root:not([data-theme=dark]) .attadd,:root:not([data-theme=dark]) .iconbtn{box-shadow:var(--shadow)}
:root:not([data-theme=dark]) .card.stat.hero{box-shadow:none}

/* light mode: the page is a soft off-white so the white cards and tiles stand out from it */
:root:not([data-theme=dark]){--canvas:#f2f3f5}
:root:not([data-theme=dark]) .main{background:var(--canvas)}
:root:not([data-theme=dark]) .top .search input,:root:not([data-theme=dark]) .page > .row .sel,:root:not([data-theme=dark]) .page > .row .inp,:root:not([data-theme=dark]) .page > .row .search input,:root:not([data-theme=dark]) .rfilters .sel,:root:not([data-theme=dark]) .rfilters .inp,:root:not([data-theme=dark]) .dbar .inp,:root:not([data-theme=dark]) .mttools .sel{background:#fff}

/* ===================== Dynamic feel: hover and press effects (mouse devices only) ===================== */
@media (hover:hover) and (pointer:fine){
  /* smooth everything that reacts */
  .btn,.iconbtn,.nav,.tabs button,.utabs a,.chip,.tcard,.card,.goaltile,.trow,.mtrow,.prow,.rrow,.dfile,.inrow,.nitem,.sheetrow,.cell,.ev,.av,.col .addcard,.quick,.ghead,.avstack .av,.mmsg,.mconv{transition:background-color .16s ease,color .16s ease,box-shadow .2s ease,transform .18s cubic-bezier(.2,.8,.2,1),opacity .16s ease}

  /* buttons and icon buttons */
  .btn:hover,.iconbtn:hover{transform:translateY(-1px);box-shadow:0 6px 16px -8px rgba(20,22,30,.35)}
  .btn:active,.iconbtn:active{transform:translateY(0) scale(.97);box-shadow:none}
  .btn.primary:hover{background:#a81d17;color:#fff}
  .iconbtn:hover{background:var(--surface2)}

  /* sidebar */
  .side .nav:hover{background:rgba(255,255,255,.09);color:#fff;transform:translateX(3px)}
  .side .nav:hover .ico{color:#fff;transform:scale(1.1)}
  .side .nav .ico{transition:transform .18s ease,color .16s}

  /* tiles and cards that lead somewhere lift; plain cards just deepen their shadow */
  .card.stat:hover,button.card.stat.clickable:hover,.goaltile:hover,.tcard:hover{transform:translateY(-3px);box-shadow:0 14px 28px -16px rgba(20,22,30,.32)}
  .card:not(.stat):hover{box-shadow:0 10px 28px -16px rgba(20,22,30,.22)}
  .card.stat.hero:hover{box-shadow:0 16px 30px -16px rgba(196,35,28,.55)}
  .tcard:active,.card.stat:active{transform:translateY(-1px) scale(.99)}

  /* list rows: soft highlight, the title picks up the brand red */
  .trow:hover,.mtrow:hover,.inrow:hover,.nitem:hover,.sheetrow:hover,a.prow:hover,a.rrow:hover,.dfile:not(.dhead):not(.skel):hover{background:var(--surface2)}
  .trow:hover .ttl,.mtrow:hover .ttl,.tcard:hover .tt,a.rrow:hover .cname,a.prow:hover .pname .cname,.dfile:hover .dname span{color:#c4231c}
  .chk:hover{border-color:#c4231c;background:rgba(196,35,28,.08);transform:scale(1.08)}
  .chk{transition:background-color .15s,border-color .15s,transform .15s}
  .ghead:hover{background:var(--surface2)}

  /* tabs */
  .tabs button:not(.on):hover{background:var(--surface2);transform:translateY(-1px)}
  .utabs a:not(.on):hover{color:#c4231c}
  .utabs a:hover .ico{transform:scale(1.12)}

  /* calendar */
  .cell:hover{background:color-mix(in srgb,#c4231c 6%,var(--surface))}
  .cell:hover .dn{transform:scale(1.15)}
  .cell .dn{transition:transform .18s}
  .ev:hover{transform:translateY(-1px) scale(1.03);filter:brightness(.97);box-shadow:0 4px 10px -6px rgba(20,22,30,.4)}

  /* people and chips */
  .av:hover{transform:scale(1.12);z-index:2}
  .avstack .av:hover{transform:translateY(-2px) scale(1.12)}
  .chip:hover{background:var(--surface3)}
  .col .addcard:hover,.quick:hover{background:var(--surface2)}
  .quick:hover .ico{color:#c4231c}

  /* charts */
  .pdash svg rect{transition:opacity .15s,filter .15s}
  .pdash svg rect:hover{filter:brightness(1.12);opacity:.92}
  .pdash svg path:hover{filter:brightness(1.1)}
  .pdash svg circle:hover{r:5}

  /* messages */
  .mconv:hover{background:var(--surface2)}
}
@media (prefers-reduced-motion:reduce){*{transition-duration:.01ms!important;animation-duration:.01ms!important}}

/* calendar: readable text on the tinted event chips and cells in light mode */
.ev:not(.task) .t{color:var(--text)!important;opacity:.7}
.ev:not(.task) span:not(.t){color:var(--text)!important}
.cell .more{color:var(--text);font-weight:500}
.cell.out .dn{opacity:.5}
:root:not([data-theme=dark]) .cell .dn{color:var(--text)}
:root:not([data-theme=dark]) .cell.out{background:#eceef1}
:root:not([data-theme=dark]) .cell.out .ev{opacity:.8}

/* Calendars list on the side: a small collapsible card, closed by default */
.callist{padding:12px 16px}
.callist .calhd{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;cursor:pointer}
.callist .calhd h2{margin:0}
.callist .calhd .chev{transition:transform .2s}
.callist .calhd[aria-expanded=true] .chev{transform:rotate(180deg)}

/* "Add Google Meet video call": a clear, full-width option instead of a tiny checkbox */
.meetcard{display:flex;align-items:center;gap:14px;width:100%;padding:14px 16px;margin-top:6px;border-radius:14px;background:var(--surface2);cursor:pointer;transition:background .15s,box-shadow .15s}
.meetcard:hover{background:var(--surface3)}
.meetcard .mico{width:44px;height:44px;border-radius:12px;display:grid;place-items:center;background:#1e1f21;color:#fff;flex:none;transition:background .15s}
.meetcard .mico .ico{width:22px;height:22px}
.meetcard .mtxt{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.meetcard .mtxt b{font-size:14.5px;font-weight:600}
.meetcard .mtxt small{font-size:12px;color:var(--muted)}
.meetcard.on{background:rgba(196,35,28,.08)}
.meetcard.on .mico{background:#c4231c}

/* Calendars menu (top right of the calendar) */
.calmenu{position:relative}
.calpop{position:absolute;right:0;top:calc(100% + 8px);z-index:60;min-width:250px;background:var(--surface);border-radius:14px;box-shadow:var(--shadow-lg);padding:8px;display:flex;flex-direction:column;animation:up .15s var(--ease,ease)}
.calpop label{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:9px;cursor:pointer;font-size:13.5px}
.calpop label:hover{background:var(--surface2)}
.calpop input{accent-color:#c4231c}
.callist{display:none}
.linkbtn{all:unset;cursor:pointer;color:#c4231c;font-size:13px;text-decoration:underline;text-underline-offset:3px}
.linkbtn:hover{color:#8f1712}

/* ===== Sign-in: floating card, artwork on the left, form on the right ===== */
.auth3{min-height:100vh;display:grid;place-items:center;padding:28px;position:relative;overflow:hidden;background:#1e1f21;color:#1e1f21}
.a3bg{position:absolute;inset:0;background:radial-gradient(60% 70% at 12% 18%,#e0372f 0,transparent 62%),radial-gradient(55% 65% at 88% 86%,#8f1712 0,transparent 62%),linear-gradient(140deg,#1e1f21,#2a0e0d 70%)}
.a3bg::before{content:"";position:absolute;width:120vmin;height:120vmin;left:50%;top:50%;transform:translate(-50%,-46%);clip-path:polygon(50% 0,100% 100%,0 100%);background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,0));filter:blur(2px)}
.a3card{position:relative;width:min(1060px,100%);min-height:min(660px,calc(100vh - 56px));border-radius:30px;background:#f7f7f8;padding:12px;display:grid;grid-template-columns:1.05fr 1fr;gap:12px;box-shadow:0 44px 100px -34px rgba(0,0,0,.7)}
.a3art{position:relative;overflow:hidden;border-radius:22px;background:linear-gradient(160deg,#d62a22 0%,#8f1712 46%,#1e1f21 100%);color:#fff;padding:32px 34px;display:flex;flex-direction:column;justify-content:space-between;min-height:560px}
.a3logo img{height:44px;display:block}
.a3tri{position:absolute;left:50%;top:15%;width:74%;aspect-ratio:1;transform:translateX(-50%);clip-path:polygon(50% 0,100% 100%,0 100%);background:linear-gradient(180deg,rgba(255,255,255,.34),rgba(255,255,255,.04));pointer-events:none}
.a3tri::after{content:"";position:absolute;inset:14% 22% 0 22%;clip-path:polygon(50% 0,100% 100%,0 100%);background:linear-gradient(180deg,rgba(30,31,33,.55),rgba(30,31,33,.05))}
.a3tag{position:relative;display:flex;flex-direction:column;gap:2px;font-size:clamp(26px,3vw,38px);line-height:1.12;letter-spacing:-.02em}
.a3tag span{font-weight:400}.a3tag b{font-weight:600}
.a3tag small{margin-top:12px;font-size:14px;letter-spacing:0;opacity:.9;font-weight:400}
.a3form{display:flex;flex-direction:column;justify-content:space-between;padding:34px 52px 22px;overflow:auto;max-height:calc(100vh - 80px)}
.a3in{width:min(380px,100%);margin:auto}
.a3in h2{font-size:30px;font-weight:600;letter-spacing:-.03em;text-align:center;margin:0 0 6px}
.a3in .fsub{text-align:center;font-size:13.5px;margin:0 0 26px}
.a3mlogo{display:none}
.auth3 .field{margin-bottom:16px}
.auth3 label.f{font-size:12.5px;letter-spacing:0;text-transform:none;font-weight:500;margin-bottom:6px;display:block}
.auth3 .inp,.auth3 .sel{width:100%;background:#ececee;border:0;border-radius:11px;padding:13px 14px;font-size:14.5px;outline:0;box-shadow:none;transition:background .15s}
.auth3 .inp:hover{background:#e6e6e9}.auth3 .inp:focus{background:#e1e1e5;box-shadow:none}
.auth3 .btn.primary.go{width:100%;display:flex;justify-content:center;border-radius:11px;padding:14px;font-size:14.5px;background:#1e1f21;color:#fff;box-shadow:none;margin-top:6px;letter-spacing:0}
.auth3 .btn.primary.go:hover{background:#c4231c}
.auth3 .btn.primary.go span:last-child{display:none}
.auth3 .linkbtn{display:block;text-align:center;width:100%}
.auth3 .err-msg{border-radius:11px;margin-bottom:14px}
.a3foot{display:flex;justify-content:space-between;align-items:center;font-size:12px;padding-top:18px}
.a3foot .flinks{display:flex;gap:16px}.a3foot a{color:#1e1f21;text-decoration:underline;text-underline-offset:3px}
@media (max-width:900px){
  .auth3{padding:0;background:#fff;place-items:stretch}.a3bg,.a3art{display:none}
  .a3card{border-radius:0;min-height:100vh;grid-template-columns:1fr;padding:0;background:#fff;box-shadow:none}
  .a3form{padding:28px 22px 18px;max-height:none}
  .a3mlogo{display:block;text-align:center;margin-bottom:22px}.a3mlogo img{height:58px}
}

/* sign-in: the lion photograph fills the left panel; the logo sits on top of the form */
.a3art{background:#1e1f21 url(/assets/login-lion.jpg) center 60%/cover no-repeat;padding:0}
.a3art::before{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(196,35,28,.16),rgba(20,8,8,.30))}
.a3tri,.a3logo,.a3tag{display:none}
.a3mlogo{display:block;text-align:center;margin-bottom:26px}.a3mlogo img{height:64px;display:inline-block}
.auth3 label.f{color:#1e1f21}
.a3in .fsub{color:#4a4a50}

/* show / hide password */
.pwbox{position:relative}
.pwbox .inp{padding-right:46px!important}
.pweye{all:unset;position:absolute;right:6px;top:50%;transform:translateY(-50%);width:36px;height:36px;display:grid;place-items:center;border-radius:9px;cursor:pointer;color:#1e1f21;transition:background .15s,color .15s}
.pweye:hover{background:rgba(30,31,33,.08);color:#c4231c}
.pweye .ico{width:19px;height:19px}
.auth3 .inp,.auth3 .sel{color:#1e1f21;-webkit-text-fill-color:#1e1f21}

/* "Forgot password?" dialog */
.modal.ctr .mh:has(h2:empty){position:absolute;right:0;top:0;padding:0;z-index:2;background:none;border:0}
.modal.ctr .mh:has(h2:empty) h2{display:none}
.fgt{display:flex;flex-direction:column;align-items:center;gap:12px;padding:14px 8px 6px;text-align:center}
.fgt .fgt-ico{width:60px;height:60px;border-radius:50%;display:grid;place-items:center;background:rgba(196,35,28,.1);color:#c4231c}
.fgt .fgt-ico .ico{width:26px;height:26px}
.fgt h2{margin:6px 0 0;font-size:21px!important;font-weight:600;letter-spacing:-.02em}
.fgt p{margin:0 0 6px;max-width:320px;font-size:13.5px;line-height:1.55;color:#4a4a50}
.fgt .inp{width:100%;text-align:center;background:#ececee;border:0;border-radius:11px;padding:13px 14px;font-size:14.5px;outline:0;box-shadow:none;color:#1e1f21}
.fgt .inp:focus{background:#e1e1e5}
.fgt .err-msg{width:100%}
.fgt .btn.primary.go{width:100%;justify-content:center;border-radius:11px;padding:14px;font-size:14.5px;background:#1e1f21;color:#fff;box-shadow:none;margin-top:4px}
.fgt .btn.primary.go:hover{background:#c4231c}
.fgt .linkbtn{margin-top:4px}

/* sign-in photo: original, untouched */
.a3art::before{display:none!important}
.a3art{background:#1e1f21 url(/assets/login-lion.jpg) center 60%/cover no-repeat}
/* forgot-password dialog follows the theme (light or dark) */
.fgt h2{color:var(--text)}
.fgt p{color:var(--text2)}
.fgt .inp{background:var(--surface2);color:var(--text);-webkit-text-fill-color:var(--text)}
.fgt .inp:focus{background:var(--surface3)}
.fgt .btn.primary.go{background:#c4231c;color:#fff}
.fgt .btn.primary.go:hover{background:#a81d17}

/* sign-in background: the washed-out favicon lion instead of a triangle */
.a3bg::before{clip-path:none!important;filter:none!important;background:url(/assets/icon-512.png) center/contain no-repeat!important;width:112vmin;height:112vmin;opacity:.1;transform:translate(-50%,-50%)}

/* ===== Sign-in on a phone / installed app: photo header, white sheet with the form ===== */
@media (max-width:900px){
  .auth3{display:block;padding:0;background:#1e1f21;min-height:100vh;min-height:100dvh}
  .a3bg{display:none}
  .a3card{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh;background:transparent;border-radius:0;padding:0;box-shadow:none;gap:0}
  .a3art{display:block;flex:none;height:34vh;min-height:210px;max-height:320px;border-radius:0;background-position:center 55%}
  .a3art::after{content:"";position:absolute;inset:auto 0 0 0;height:46%;background:linear-gradient(180deg,rgba(30,31,33,0),rgba(30,31,33,.55))}
  .a3form{flex:1;position:relative;margin-top:-30px;background:#fff;border-radius:28px 28px 0 0;padding:0 24px calc(18px + env(safe-area-inset-bottom));max-height:none;overflow:visible;justify-content:flex-start}
  .a3in{width:100%;max-width:420px;margin:0 auto;padding-top:0}
  .a3mlogo{display:block;text-align:center;margin:-34px 0 14px}
  .a3mlogo img{height:64px;background:#fff;border-radius:18px;padding:8px 14px;box-shadow:0 8px 22px -10px rgba(0,0,0,.35);box-sizing:content-box}
  .a3in h2{font-size:24px;margin:6px 0 4px}
  .a3in .fsub{font-size:13px;margin:0 0 20px}
  .auth3 .field{margin-bottom:14px}
  .auth3 label.f{font-size:12px;margin-bottom:5px}
  .auth3 .inp{padding:13px 14px;font-size:14px!important}
  .auth3 .btn.primary.go{padding:14px;font-size:14px;margin-top:8px}
  .a3foot{margin-top:auto;padding-top:22px;font-size:11.5px}
}

/* Sign-in with the keyboard open: the photo folds away so the whole form, including Sign in, stays in view and nothing scrolls */
@media (max-width:900px){
  body.kbd .auth3{height:var(--vvh,100dvh);min-height:0;overflow:hidden}
  body.kbd .a3card{height:var(--vvh,100dvh);min-height:0}
  body.kbd .a3art{display:none}
  body.kbd .a3form{margin-top:0;border-radius:0;padding-top:12px;padding-bottom:10px;justify-content:center}
  body.kbd .a3mlogo{margin:0 0 4px}
  body.kbd .a3mlogo img{height:44px;padding:6px 12px;box-shadow:none}
  body.kbd .a3in h2{font-size:20px;margin:2px 0 8px}
  body.kbd .a3in .fsub,body.kbd .a3foot{display:none}
  body.kbd .auth3 .field{margin-bottom:10px}
  body.kbd .auth3 .inp{padding:11px 14px}
  body.kbd .auth3 .btn.primary.go{margin-top:4px;padding:12px}
  body.kbd .a3in .linkbtn{margin-top:2px}
  .a3form,.a3card,.auth3{transition:none}
}

/* My tasks list on a phone: the tick circle sits inside the card, close to the task name */
@media (max-width:860px){
  .mtlist:not(.glist) .mtrow{grid-template-columns:22px minmax(0,1fr) auto!important;column-gap:9px!important;padding:12px 14px 12px 16px!important}
  .mtlist:not(.glist) .ghead{padding-left:14px}
  .mtlist:not(.glist) .quick{padding-left:16px!important}
}
