:root{
  --bg:#f4f2ee; --panel:#ffffff; --ink:#1d232b; --muted:#66707c; --line:#e3dfd8;
  --brand:#24272c; --accent:#b82a42; --accent-dark:#931f34; --accent-tint:#fbe9ec; --accent-ink:#ffffff; --danger:#c0392b; --ok:#2f855a;
  --radius:14px; --shadow:0 1px 2px rgba(20,24,30,.06),0 2px 8px rgba(20,24,30,.05);
  --tap:48px;
  font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
}
*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);color:var(--ink);-webkit-text-size-adjust:100%}
body{font-size:16px;line-height:1.4;min-height:100vh}
a{color:inherit}
button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:3px solid rgba(184,42,66,.55);outline-offset:2px;border-radius:6px}
[hidden]{display:none!important}

/* Top bar */
.topbar{position:sticky;top:0;z-index:20;background:var(--brand);color:#fff;display:flex;align-items:center;gap:12px;
  padding:calc(env(safe-area-inset-top) + 8px) 16px 8px;min-height:56px}
.brand{display:flex;align-items:center;gap:10px;text-decoration:none;font-weight:700;letter-spacing:.2px;white-space:nowrap}
.logo{width:32px;height:32px;border-radius:9px;background:var(--accent);display:grid;place-items:center;font-weight:800;font-size:18px}
.brand-text{font-size:18px}
.tabs{display:flex;gap:4px;margin-left:auto}
.tabs a{text-decoration:none;padding:10px 14px;border-radius:10px;font-weight:600;font-size:15px;color:#cfd6df;min-height:44px;display:flex;align-items:center}
.tabs a.on{background:rgba(255,255,255,.14);color:#fff}
@media (max-width:640px){
  .topbar{padding-bottom:6px}
  .brand-text{font-size:17px}
  .tabs{position:fixed;left:0;right:0;bottom:0;margin:0;background:#fff;border-top:1px solid var(--line);
    padding:6px 8px calc(env(safe-area-inset-bottom) + 6px);justify-content:space-around;z-index:30}
  .tabs a{color:var(--muted);flex:1;justify-content:center;font-size:14px}
  .tabs a.on{background:#f1ebe2;color:var(--brand)}
  main{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
}

/* Generic */
main{outline:none}
.wrap{max-width:900px;margin:0 auto;padding:16px}
.loading{padding:40px;text-align:center;color:var(--muted)}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--tap);padding:0 18px;border-radius:12px;
  border:1px solid var(--line);background:#fff;font-weight:600;cursor:pointer;text-decoration:none;white-space:nowrap}
.btn:active{transform:translateY(1px)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.btn.dark{background:var(--brand);border-color:var(--brand);color:#fff}
.btn.danger{color:var(--danger);border-color:#f0c9c4}
.btn.small{min-height:38px;padding:0 12px;font-size:14px;border-radius:10px}
.btn.ghost{background:transparent;border-color:transparent}
.input,select.input,textarea.input{width:100%;min-height:var(--tap);padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:#fff;font-size:16px}
textarea.input{min-height:120px;resize:vertical;line-height:1.45}
label.f{display:block;font-size:13px;font-weight:600;color:var(--muted);margin:14px 0 6px}
.card{background:var(--panel);border-radius:var(--radius);box-shadow:var(--shadow);border:1px solid #ece8e1}
.section{padding:16px;margin-bottom:14px}
.section h2{font-size:17px;margin:0 0 12px;display:flex;align-items:center;justify-content:space-between;gap:8px}
.muted{color:var(--muted)}
.small{font-size:13px}
.pill{display:inline-flex;align-items:center;padding:3px 9px;border-radius:999px;font-size:12px;font-weight:700;letter-spacing:.2px;white-space:nowrap}
.t-Residential{background:#e5efff;color:#21508f}
.t-Projects{background:#ece6ff;color:#5137a5}
.t-Commercial{background:#e2f4ea;color:#23663f}
.t-WalkIn{background:#fff0dc;color:#8a5212}
.empty{padding:24px;text-align:center;color:var(--muted)}

/* Board */
.board-head{position:sticky;top:56px;z-index:10;background:var(--bg);padding:12px 16px 8px}
@supports (top: env(safe-area-inset-top)){ .board-head{top:calc(56px + env(safe-area-inset-top))} }
.searchrow{display:flex;gap:10px;max-width:900px}
.search{flex:1;position:relative}
.search input{padding-left:40px}
.search svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);opacity:.5}
.chips{display:flex;gap:8px;overflow-x:auto;padding:10px 0 2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;border:1px solid var(--line);background:#fff;border-radius:999px;padding:8px 14px;font-size:14px;font-weight:600;cursor:pointer;min-height:40px;white-space:nowrap}
.chip b{color:var(--accent);margin-left:4px}
.chip.on{background:var(--brand);color:#fff;border-color:var(--brand)}
.chip.on b{color:#f7b6c2}
.board{position:relative;display:flex;gap:14px;overflow-x:auto;padding:8px 16px 24px;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;align-items:flex-start;min-height:60vh}
.col{flex:none;width:300px;scroll-snap-align:start;background:#ebe7e0;border-radius:16px;padding:10px;scroll-margin-left:16px}
.col.drop{outline:3px dashed var(--accent);outline-offset:-3px}
.col-h{display:flex;align-items:center;justify-content:space-between;padding:4px 6px 10px;font-weight:700;font-size:15px}
.col-h .n{background:#fff;border-radius:999px;min-width:28px;height:24px;display:grid;place-items:center;font-size:13px;color:var(--muted);padding:0 8px}
.col-body{display:flex;flex-direction:column;gap:10px;min-height:40px}
.jc{position:relative;background:#fff;border-radius:12px;padding:12px 12px 10px;box-shadow:var(--shadow);border:1px solid #ece8e1;cursor:pointer;text-decoration:none;display:block}
.jc:hover{border-color:#d9cfbf}
.jc.dragging{opacity:.4}
.jc .who{font-weight:700;font-size:16px;padding-right:44px;line-height:1.25}
.jc .addr{color:var(--muted);font-size:14px;margin-top:3px;padding-right:30px}
.jc .meta{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin-top:9px;font-size:13px;color:var(--muted)}
.jc .due-late{color:var(--danger);font-weight:700}
.jc .move{position:absolute;top:6px;right:6px;width:40px;height:40px;border-radius:10px;border:none;background:transparent;display:grid;place-items:center;cursor:pointer;color:var(--muted)}
.jc .move:hover{background:#f3efe8}
@media (max-width:640px){
  .col{width:calc(100vw - 44px)}
  .board{gap:12px}
}

/* Job page */
.jobtop{display:flex;align-items:center;gap:8px;margin:2px 0 10px}
.back{min-height:44px;display:inline-flex;align-items:center;gap:4px;text-decoration:none;font-weight:600;color:var(--muted);padding:0 6px 0 0}
.jobtitle{font-size:23px;line-height:1.2;margin:4px 0 6px;font-weight:800}
.stagebar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:12px 0 16px}
.stagebar select{flex:1;min-width:200px;font-weight:700;background:#fff}
.info{display:grid;gap:2px}
.info a.row,.info div.row{display:flex;align-items:center;gap:12px;min-height:52px;padding:6px 4px;border-bottom:1px solid #f0ece6;text-decoration:none}
.info .row:last-child{border-bottom:none}
.info .ic{width:36px;height:36px;border-radius:10px;background:#f4efe7;display:grid;place-items:center;flex:none;font-size:17px}
.info .lab{font-size:12px;color:var(--muted);font-weight:600}
.info .val{font-size:16px;word-break:break-word}
.info a.row .val{color:var(--accent)}
.tasklist{display:flex;flex-direction:column}
.task{border-bottom:1px solid #f0ece6}
.task:last-child{border-bottom:none}
.task-row{display:flex;align-items:flex-start;gap:10px;padding:8px 0;min-height:52px}
.check{flex:none;width:30px;height:30px;margin:4px 2px;border-radius:9px;border:2px solid #c9c1b4;background:#fff;display:grid;place-items:center;cursor:pointer}
.check.on{background:var(--ok);border-color:var(--ok);color:#fff}
.task-main{flex:1;min-width:0;cursor:pointer;padding:4px 0}
.task-title{font-weight:600;word-break:break-word}
.task.done .task-title{text-decoration:line-through;color:var(--muted);font-weight:500}
.task-sub{display:flex;flex-wrap:wrap;gap:8px;font-size:13px;color:var(--muted);margin-top:3px}
.task-sub .late{color:var(--danger);font-weight:700}
.task-edit{padding:4px 0 14px 42px}
.task-edit .grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.task-desc{white-space:pre-wrap;font-size:14px;color:#3d4550;background:#faf8f5;border-radius:10px;padding:10px;margin:6px 0 0 42px}
.addtask{display:grid;grid-template-columns:1fr;gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid #f0ece6}
.addtask .grid3{display:grid;grid-template-columns:1fr 1fr auto;gap:10px}
@media (max-width:640px){ .addtask .grid3{grid-template-columns:1fr 1fr} .addtask .grid3 .btn{grid-column:1/-1} .task-edit{padding-left:0} .task-desc{margin-left:0} }
.files{display:grid;grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:10px}
.file{position:relative;border-radius:12px;overflow:hidden;background:#f4efe7;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;border:1px solid #ece8e1}
.file img{width:100%;height:100%;object-fit:cover}
.file .fname{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(transparent,rgba(0,0,0,.65));color:#fff;font-size:11px;padding:16px 6px 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file .doc{font-size:30px}
.file .ext{font-weight:800;font-size:13px;color:#8a5212;margin-top:4px}
.upload{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-top:12px}
.activity{list-style:none;margin:12px 0 0;padding:0}
.activity li{display:flex;gap:10px;padding:10px 0;border-bottom:1px solid #f0ece6;font-size:14px}
.activity li:last-child{border-bottom:none}
.activity .dot{flex:none;width:8px;height:8px;border-radius:50%;background:#cbbfae;margin-top:7px}
.activity .note .dot{background:var(--accent)}
.activity .txt{white-space:pre-wrap;word-break:break-word}
.activity .when{color:var(--muted);font-size:12px;margin-top:2px}
.notes-view{white-space:pre-wrap;font-size:15px;line-height:1.5;max-height:260px;overflow:hidden;position:relative}
.notes-view.open{max-height:none}
.notes-view:not(.open)::after{content:"";position:absolute;left:0;right:0;bottom:0;height:60px;background:linear-gradient(transparent,#fff)}
.saved{font-size:13px;color:var(--ok);font-weight:600}
.addnote{display:flex;gap:10px;margin-top:6px}
.addnote .input{min-height:var(--tap)}

/* My tasks */
.group-h{font-size:13px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);font-weight:700;margin:20px 4px 8px}
.group-h.late{color:var(--danger)}
.mt{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;margin-bottom:8px}
.mt .job{font-size:13px;color:#3d4550;text-decoration:none;font-weight:600}
.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:6px}
.toolbar select{width:auto;min-width:180px}
.h1{font-size:24px;font-weight:800;margin:6px 0 10px}

/* Sheet / modal */
.backdrop{position:fixed;inset:0;background:rgba(15,20,26,.45);z-index:50;display:flex;align-items:flex-end;justify-content:center;animation:fade .15s}
.sheet{background:#fff;width:100%;max-width:520px;max-height:88vh;overflow:auto;border-radius:20px 20px 0 0;padding:8px 16px calc(16px + env(safe-area-inset-bottom));animation:up .18s ease-out}
@media (min-width:641px){ .backdrop{align-items:center} .sheet{border-radius:20px;padding:16px 20px 20px} }
.sheet .grab{width:40px;height:5px;border-radius:3px;background:#ddd6cb;margin:4px auto 10px}
.sheet h3{margin:4px 0 12px;font-size:18px}
.stagelist{display:grid;gap:8px}
.stagelist button{min-height:52px;text-align:left;padding:0 16px;border-radius:12px;border:1px solid var(--line);background:#fff;font-weight:600;font-size:16px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}
.stagelist button.cur{background:var(--brand);color:#fff;border-color:var(--brand)}
.sheet .actions{display:flex;gap:10px;justify-content:flex-end;margin-top:18px}
@keyframes up{from{transform:translateY(30px);opacity:.4}to{transform:none;opacity:1}}
@keyframes fade{from{opacity:0}to{opacity:1}}
#toast{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom));transform:translateX(-50%) translateY(20px);background:var(--brand);color:#fff;padding:12px 18px;border-radius:12px;font-weight:600;opacity:0;pointer-events:none;transition:.2s;z-index:60;max-width:90vw;text-align:center}
#toast.show{opacity:1;transform:translateX(-50%)}
.fab{position:fixed;right:18px;bottom:calc(88px + env(safe-area-inset-bottom));z-index:25;width:58px;height:58px;border-radius:18px;background:var(--accent);color:#fff;border:none;font-size:30px;box-shadow:0 6px 18px rgba(184,42,66,.38);cursor:pointer;display:none}
@media (max-width:640px){ .fab{display:grid;place-items:center} .hide-m{display:none!important} }

/* Login */
.login{min-height:100vh;display:grid;place-items:center;padding:24px;background:linear-gradient(180deg,#ffffff 0%,#f6f3ef 60%,#efe9e2 100%)}
.login .card{width:100%;max-width:400px;padding:28px 24px}
.login .logo{width:52px;height:52px;font-size:28px;border-radius:14px;color:#fff;margin-bottom:12px}
.login h1{margin:0 0 4px;font-size:24px}
.login .err{color:var(--danger);font-weight:600;margin-top:10px;min-height:1.4em}
.table{width:100%;border-collapse:collapse}
.urow{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid #f0ece6;flex-wrap:wrap}
.urow:last-child{border-bottom:none}

.fcell{min-width:0}
.fmeta{font-size:11px;color:#7a7368;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ftask{font-size:11px;color:#8a5212;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.file .badge{position:absolute;top:6px;left:6px;background:#c0392b;color:#fff;font-size:10px;font-weight:800;padding:2px 5px;border-radius:5px}
.file.link{background:#fcf0f2}
.file.link .ext{color:var(--accent)}
.taskfiles{margin:8px 0 4px}

/* ---------- Mentions, bell, messages (2026-11-04) ---------- */
.mention{background:var(--accent-tint);color:var(--accent-dark);border-radius:6px;padding:0 4px;font-weight:700;white-space:nowrap}
.mention.me{background:var(--accent);color:#fff}
.nbadge{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:999px;background:var(--accent);color:#fff;font-size:11px;font-weight:800;line-height:1;margin-left:6px}
.bell{position:relative;flex:none;width:44px;height:44px;border-radius:12px;border:none;background:transparent;color:#cfd6df;display:grid;place-items:center;cursor:pointer}
.bell.on{background:rgba(255,255,255,.14);color:#fff}
@media (hover:hover){.bell:hover{background:rgba(255,255,255,.14);color:#fff}}
.bell .nbadge{position:absolute;top:3px;right:1px;margin:0;border:2px solid var(--brand)}
@media (max-width:640px){
  .bell{margin-left:auto}
  .tabs a{position:relative;padding:10px 4px}
  .tabs a .nbadge{position:absolute;top:-1px;right:calc(50% - 54px);margin:0}
}
.mention-pop{position:fixed;z-index:70;background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 8px 28px rgba(20,24,30,.18);padding:4px;min-width:220px;max-width:320px}
.mention-pop button{display:flex;align-items:center;gap:10px;width:100%;min-height:46px;border:none;background:transparent;border-radius:9px;padding:0 10px;text-align:left;cursor:pointer;font-size:15px}
.mention-pop button.sel,.mention-pop button:hover{background:#f4efe7}
.mention-pop .un{color:var(--muted);font-size:13px}
.av{flex:none;width:34px;height:34px;border-radius:50%;background:#e9dfd1;color:#6b4a22;display:grid;place-items:center;font-weight:800;font-size:13px}
.av.team{background:var(--brand);color:#fff;font-size:16px}
.mention-pop .av{width:28px;height:28px;font-size:12px}
/* Mentions sheet */
.nlist{display:flex;flex-direction:column;gap:2px;margin:0 -6px}
.nitem{display:block;text-decoration:none;padding:10px 10px;border-radius:12px;border-left:4px solid transparent}
.nitem.unread{background:#fdf1f3;border-left-color:var(--accent)}
.nitem .nwho{font-size:14px}
.nitem .ntext{font-size:14px;color:#3d4550;margin-top:3px;white-space:pre-wrap;word-break:break-word}
.nitem .when{font-size:12px;color:var(--muted);margin-top:3px}
.sheet .sh-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:4px 0 12px}
.sheet .sh-head h3{margin:0}
/* Task comments */
.tcomments{margin:8px 0 0 42px;display:flex;flex-direction:column;gap:6px}
.tcomment{background:#faf8f5;border-radius:10px;padding:8px 10px;font-size:14px;white-space:pre-wrap;word-break:break-word}
.tcomment .when{font-size:11px;color:var(--muted)}
.tcform{display:flex;gap:8px;margin:8px 0 4px 42px}
@media (max-width:640px){ .tcomments,.tcform{margin-left:0} }
/* Messages page */
.msgpage{display:grid;grid-template-columns:320px 1fr;max-width:1200px;margin:0 auto;height:calc(100vh - 56px - env(safe-area-inset-top));height:calc(100dvh - 56px - env(safe-area-inset-top))}
.convs{border-right:1px solid var(--line);overflow-y:auto;background:#fbfaf7;display:flex;flex-direction:column}
.convs-h{display:flex;align-items:center;justify-content:space-between;padding:14px 14px 6px}
.convs-h .h1{margin:0}
.conv{display:flex;align-items:center;gap:12px;padding:12px 14px;text-decoration:none;border-bottom:1px solid #f0ece6;min-height:68px}
.conv.on{background:var(--accent-tint)}
.conv .cmain{flex:1;min-width:0}
.conv .cname{font-weight:700;display:flex;justify-content:space-between;gap:8px}
.conv .cname .when{font-weight:500;font-size:12px;color:var(--muted);white-space:nowrap}
.conv .clast{font-size:14px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;justify-content:space-between;gap:8px}
.conv.unread .clast{color:var(--ink);font-weight:600}
.conv .nbadge{flex:none}
.conv-sec{font-size:12px;text-transform:uppercase;letter-spacing:.6px;color:var(--muted);font-weight:700;padding:14px 14px 6px}
.thread{display:flex;flex-direction:column;min-width:0;min-height:0;background:var(--bg)}
.thead{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line);background:#fff;min-height:60px}
.thead .back{padding:0 8px 0 0;font-size:16px}
.thead .tname{font-weight:800;font-size:17px;line-height:1.2}
.thead .tsub{font-size:12px;color:var(--muted)}
.msgs{flex:1;overflow-y:auto;padding:12px 14px 8px;display:flex;flex-direction:column;gap:2px;-webkit-overflow-scrolling:touch}
.msgs .older{align-self:center;margin:4px 0 10px}
.dayh{align-self:center;font-size:12px;font-weight:700;color:var(--muted);background:#ebe7e0;border-radius:999px;padding:3px 10px;margin:10px 0 6px}
.msg{display:flex;flex-direction:column;align-items:flex-start;max-width:82%;margin-top:6px}
.msg.cont{margin-top:1px}
.msg.mine{align-self:flex-end;align-items:flex-end}
.msg .mname{font-size:12px;font-weight:700;color:#6b4a22;margin:0 0 2px 10px}
.bubble{background:#fff;border:1px solid #ece8e1;border-radius:16px;padding:8px 12px;box-shadow:var(--shadow);min-width:0;max-width:100%}
.msg.mine .bubble{background:#fbe9ec;border-color:#f1cbd2}
.msg.mine .mention{background:#fff}
.mtext{white-space:pre-wrap;word-break:break-word;font-size:15px;line-height:1.4}
.mtext a{color:var(--accent)}
.msg .mtime{font-size:11px;color:var(--muted);margin:2px 8px 0}
.msg.flash .bubble{animation:flash 1.6s ease-out}
@keyframes flash{0%,40%{box-shadow:0 0 0 3px var(--accent)}100%{box-shadow:var(--shadow)}}
.mimg{display:block;max-width:240px;max-height:260px;border-radius:10px;margin:4px 0 2px}
.mfile{display:flex;align-items:center;gap:8px;text-decoration:none;background:#faf8f5;border-radius:10px;padding:8px 10px;margin:4px 0 2px;font-size:14px;font-weight:600;word-break:break-all}
.mjob{display:inline-flex;align-items:center;gap:6px;margin-top:6px;font-size:13px;font-weight:700;color:var(--accent);text-decoration:none;background:#fcf0f2;border-radius:8px;padding:4px 8px}
.composer{border-top:1px solid var(--line);background:#fff;padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
.cattach{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 8px}
.cchip{display:inline-flex;align-items:center;gap:6px;background:#f4efe7;border-radius:999px;padding:5px 6px 5px 12px;font-size:13px;font-weight:600;max-width:100%}
.cchip span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:220px}
.cchip button{border:none;background:#e3dacd;border-radius:50%;width:24px;height:24px;cursor:pointer;line-height:1}
.crow{display:flex;align-items:flex-end;gap:6px}
.cbtn{flex:none;height:44px;min-width:44px;border-radius:12px;border:1px solid var(--line);background:#fff;cursor:pointer;display:grid;place-items:center;font-size:13px;font-weight:700;color:var(--muted);padding:0 8px}
.crow textarea{flex:1;min-height:44px;max-height:140px;resize:none;padding:10px 12px;line-height:1.35}
.crow .csend{min-height:44px;padding:0 16px}
.convs .empty,.thread .empty{margin:auto}
@media (max-width:640px){
  .msgpage{display:block;height:calc(100vh - 56px - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:calc(100dvh - 56px - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  .convs{border-right:none;height:100%;background:var(--bg)}
  .conv{background:#fff}
  .msgpage .thread{height:100%}
  .msgpage.has-thread .convs{display:none}
  .msgpage:not(.has-thread) .thread{display:none}
  main.msgmain{padding-bottom:calc(58px + env(safe-area-inset-bottom))}
  .composer{padding-bottom:8px}
  .msg{max-width:88%}
  .mimg{max-width:200px}
  body.typing .tabs{display:none}
  body.typing .msgpage{height:calc(100vh - 56px - env(safe-area-inset-top));height:calc(100dvh - 56px - env(safe-area-inset-top))}
  body.typing main.msgmain{padding-bottom:0}
}

/* ---------- Header actions, clients, search, intake, task panel (2026-11-04) ---------- */
.tabs{margin-left:12px}
.hdr-actions{display:flex;align-items:center;gap:6px;margin-left:auto}
.hbtn{flex:none;height:40px;border-radius:11px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.08);color:#fff;display:inline-flex;align-items:center;gap:8px;padding:0 12px;font-weight:700;font-size:14px;cursor:pointer;white-space:nowrap}
.hsearch{color:#cfd6df;font-weight:600;min-width:150px}
.hnew{background:var(--accent);border-color:var(--accent)}
@media (max-width:1180px){ .brand-text{display:none} }
@media (max-width:980px){ .hs-label{display:none} .hsearch{min-width:0;width:40px;padding:0;justify-content:center} .tabs a{padding:10px 10px} }
@media (max-width:640px){
  .brand-text{display:inline}
  .tabs{margin-left:0}
  .tabs a{font-size:12.5px;padding:10px 2px}
  .tabs a .nbadge{right:calc(50% - 44px)}
  .bell{margin-left:0}
  .hdr-actions{gap:4px}
}
@media (max-width:370px){ .brand-text{display:none} }
.newmenu{position:fixed;z-index:65;background:#fff;border-radius:14px;box-shadow:0 12px 32px rgba(20,24,30,.22);border:1px solid var(--line);padding:6px;min-width:250px}
.newmenu button{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;border:none;background:transparent;border-radius:10px;padding:0 12px;font-size:16px;font-weight:600;text-align:left;cursor:pointer}
.newmenu button:hover,.newmenu button:focus-visible{background:#f4efe7}
.pagehead{display:flex;align-items:center;justify-content:space-between;gap:10px}
.clist{display:flex;flex-direction:column;gap:8px}
.crow-c{display:flex;align-items:center;gap:12px;padding:12px 14px;text-decoration:none;min-height:64px}
.crow-c .cmain{flex:1;min-width:0}
.crow-c .cname{font-weight:700}
.crow-c .csub{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.crow-c .ccount{text-align:right;font-size:14px;flex:none}
.cjobs{display:flex;flex-direction:column}
.cjob{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #f0ece6;text-decoration:none;min-height:56px}
.cjob:last-child{border-bottom:none}
.cjob .cmain{flex:1;min-width:0}
.stagepill{background:#ebe7e0;border-radius:999px;padding:2px 8px;font-weight:700;color:#4b5563}
.backdrop.top{align-items:flex-start}
.searchsheet{border-radius:0 0 20px 20px;max-height:90vh;padding:calc(12px + env(safe-area-inset-top)) 14px 16px;animation:fade .15s}
@media (min-width:641px){ .backdrop.top{padding-top:60px} .searchsheet{border-radius:20px;max-width:620px} }
.gres{margin-top:6px}
.gres .group-h{margin:14px 4px 6px}
.gitem{display:flex;flex-direction:column;gap:2px;padding:10px 8px;border-radius:10px;text-decoration:none;min-height:48px;justify-content:center}
.gitem:hover{background:#f4efe7}
.gitem span{font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.wrap.narrow{max-width:680px}
.intake .seg{display:flex;gap:8px;flex-wrap:wrap}
.intake .seg label,.sheet .seg label{position:relative}
.seg{display:flex;gap:8px;flex-wrap:wrap}
.seg input{position:absolute;opacity:0;pointer-events:none}
.seg span{display:inline-flex;align-items:center;min-height:42px;padding:0 14px;border:1px solid var(--line);border-radius:999px;background:#fff;font-weight:600;font-size:14px;cursor:pointer}
.seg input:checked+span{background:var(--brand);border-color:var(--brand);color:#fff}
.seg input:focus-visible+span{outline:3px solid rgba(184,42,66,.55);outline-offset:2px}
div.f{display:block;font-size:13px;font-weight:600;color:var(--muted);margin:14px 0 6px}
.intake-view{margin:0;display:grid;gap:8px}
.intake-view div{display:grid;grid-template-columns:200px 1fr;gap:10px;border-bottom:1px solid #f0ece6;padding-bottom:8px}
.intake-view dt{font-size:13px;color:var(--muted);font-weight:600}
.intake-view dd{margin:0;white-space:pre-wrap;word-break:break-word}
@media (max-width:640px){ .intake-view div{grid-template-columns:1fr;gap:2px} }
.tsec{margin:10px 0 0 42px;padding-top:8px;border-top:1px dashed #ece6dc}
.tsec-h{font-size:13px;font-weight:700;color:var(--muted);margin-bottom:6px}
.tsec .tcomments,.tsec .tcform{margin-left:0}
.linkbtn{border:none;background:none;color:var(--accent);font-size:12px;font-weight:600;cursor:pointer;padding:2px 4px}
.fmeta .linkbtn{color:var(--danger);display:block;padding:2px 0}
@media (max-width:640px){ .tsec{margin-left:0} }

/* ---------- Dash branding: logo + red accent (2026-11-04) ---------- */
.topbar{background:#fff;color:var(--ink);border-bottom:1px solid var(--line);box-shadow:0 1px 6px rgba(20,24,30,.05)}
.brand{flex:none}
.brandlogo{display:block;height:40px;width:auto}
.tabs a{color:var(--muted)}
.tabs a.on{background:var(--accent-tint);color:var(--accent-dark)}
@media (hover:hover){.tabs a:not(.on):hover{background:#f5f2ee;color:var(--ink)}}
.bell{color:var(--muted)}
.bell.on{background:var(--accent-tint);color:var(--accent-dark)}
@media (hover:hover){.bell:hover{background:#f5f2ee;color:var(--ink)}}
.bell .nbadge{border-color:#fff}
.hbtn{border-color:var(--line);background:#fff;color:var(--ink)}
.hsearch{color:var(--muted)}
.hnew{background:var(--accent);border-color:var(--accent);color:#fff}
@media (max-width:1180px){ .brandlogo{height:34px} }
@media (max-width:640px){
  .brandlogo{height:32px}
  .tabs a.on{background:var(--accent-tint);color:var(--accent-dark)}
}
@media (max-width:360px){ .brandlogo{height:27px} }
.login .card{text-align:left}
.loginlogo{display:block;width:min(280px,82%);height:auto;margin:6px auto 14px}
.login .lsub{text-align:center;margin-bottom:8px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Client link status (job page banner + job cards) */
.clientbar{display:flex;align-items:center;gap:12px;border-radius:14px;padding:12px 14px;margin:6px 0 10px;border:1px solid var(--line);background:#fff}
.clientbar.linked{border-left:5px solid var(--accent);background:#fff}
.clientbar .cb-av{flex:none;width:42px;height:42px;border-radius:50%;background:var(--accent-tint);color:var(--accent-dark);display:grid;place-items:center;font-weight:800;font-size:15px;text-decoration:none}
.clientbar .cb-main{flex:1;min-width:0}
.clientbar .cb-lab{font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;color:var(--muted)}
.clientbar .cb-name{display:block;font-size:17px;font-weight:800;color:var(--accent);text-decoration:none;line-height:1.25;overflow:hidden;text-overflow:ellipsis}
.clientbar .cb-chev{font-weight:600;opacity:.7}
.clientbar .cb-contact{display:flex;flex-wrap:wrap;gap:4px 14px;margin-top:4px;font-size:14px}
.clientbar .cb-contact a{color:var(--ink);text-decoration:none;font-weight:600;min-height:28px;display:inline-flex;align-items:center;overflow-wrap:anywhere}
.clientbar .cb-change{flex:none;align-self:flex-start;font-size:14px;min-height:36px}
.clientbar.none{background:#fff7e6;border-color:#f0d49a;border-left:5px solid #d99a1e}
.clientbar.none .cb-warn{flex:none;width:36px;height:36px;border-radius:50%;background:#fde7b4;color:#8a5a00;display:grid;place-items:center;font-size:19px;font-weight:800}
.clientbar.none .cb-name{color:#7a4f00;font-size:16px}
.clientbar.none .cb-sub{font-size:13px;color:#7a6440;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.clientbar.none .btn{flex:none}
.cltag{display:inline-flex;align-items:center;gap:3px;max-width:100%;font-size:12px;color:var(--muted);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cltag.none{color:#9a6a12;border:1px dashed #e2bf73;border-radius:999px;padding:1px 8px;background:#fffaf0;font-weight:600}
.unlinkbtn{flex:none;padding:0 14px;font-size:14px;color:var(--muted)}
.unlinkbtn b{margin-left:2px;color:#9a6a12}
.unlinkbtn.on{background:#fff3d6;border-color:#d99a1e;color:#7a4f00}
@media (max-width:640px){ .unlinkbtn{padding:0 12px} }

/* Drag & drop on the jobs board */
.jc{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
@media (hover:hover) and (pointer:fine){ .jc{cursor:grab} .jc:active{cursor:grabbing} }
.jc.dragging{opacity:.35;border-style:dashed}
.jc.ghost{position:fixed;z-index:1000;pointer-events:none;margin:0;transform:rotate(2.5deg) scale(1.03);box-shadow:0 14px 34px rgba(0,0,0,.22);opacity:1;cursor:grabbing}
body.dragging-job, body.dragging-job *{cursor:grabbing !important}
body.dragging-job{-webkit-user-select:none;user-select:none}
.board.dragmode{scroll-snap-type:none}
.col.drop{outline:3px dashed var(--accent);outline-offset:-3px;background:#f6e3e7}
.chip.drop{outline:2px dashed var(--accent);outline-offset:1px;background:#f6e3e7;color:var(--accent)}
/* Post edit / delete */
.activity .abody{flex:1;min-width:0}
.activity .when{display:flex;flex-wrap:wrap;align-items:center;gap:2px 6px}
.activity .edited, .tcomment .edited{color:var(--muted);font-size:11px;font-style:italic}
.activity .aacts{display:inline-flex;gap:2px;margin-left:auto}
.activity .aacts .linkbtn{font-size:12px;padding:4px 6px;min-height:28px}
.linkbtn.del{color:var(--danger)}
.aedit textarea{width:100%;min-height:72px;font-size:15px}
.aedit-actions{display:flex;gap:8px;justify-content:flex-end;margin-top:8px}

/* Board panning, ‹ › buttons and Fit mode */
@media (hover:hover) and (pointer:fine){
  .board{scroll-snap-type:none;cursor:grab}
  .jc{cursor:pointer} .jc:active{cursor:pointer}
}
.jc.lift{cursor:grabbing !important;transform:scale(1.02);box-shadow:0 10px 24px rgba(0,0,0,.18);border-color:var(--accent)}
body.panning-board, body.panning-board *{cursor:grabbing !important}
body.panning-board{-webkit-user-select:none;user-select:none}
.board.panning{scroll-behavior:auto}
.board .col-h{-webkit-user-select:none;user-select:none}
.pan-btn{position:fixed;top:55%;z-index:15;width:42px;height:64px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.94);box-shadow:0 4px 14px rgba(0,0,0,.14);font-size:34px;line-height:1;color:var(--ink);display:grid;place-items:center;cursor:pointer;padding:0 0 4px}
.pan-btn:hover{background:#fff;color:var(--accent)}
.pan-btn[hidden]{display:none}
.pan-l{left:6px} .pan-r{right:6px}
@media (max-width:640px), (pointer:coarse){ .pan-btn{display:none !important} }
.fitbtn{white-space:nowrap;background:#fff;border:1px solid var(--line)}
.fitbtn.on{background:var(--brand);color:#fff;border-color:var(--brand)}
@media (min-width:641px){
.board.fit{gap:8px;padding-left:10px;padding-right:10px}
.board.fit .col{flex:1 1 0;width:auto;min-width:96px;padding:6px;border-radius:12px}
.board.fit .col-h{font-size:12.5px;line-height:1.2;padding:2px 2px 7px;align-items:flex-start;gap:4px}
.board.fit .col-h .n{min-width:20px;height:18px;font-size:11px;padding:0 5px;flex:none}
.board.fit .col-body{gap:6px}
.board.fit .jc{padding:7px 7px 6px;border-radius:9px}
.board.fit .jc .who{font-size:13px;padding-right:0;overflow-wrap:anywhere}
.board.fit .jc .addr{font-size:11.5px;padding-right:0;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.board.fit .jc .meta{font-size:11px;gap:3px 5px;margin-top:5px}
.board.fit .jc .pill{font-size:10px;padding:1px 6px}
.board.fit .jc .cltag{font-size:10.5px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board.fit .jc .move{display:none}
}

/* ---------- Calendar (2026-11-04) ---------- */
.calwrap{max-width:1280px;margin:0 auto;padding:14px 16px 24px}
.calbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.calnav{display:flex;align-items:center;gap:6px;flex:1;min-width:0}
.calnav .btn{min-width:40px;padding:0 10px;font-size:15px}
#calprev,#calnext{font-size:22px;line-height:1;padding-bottom:3px}
.caltitle{font-size:22px;margin:0 0 0 8px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.seg{display:inline-flex;background:#ebe7e0;border-radius:11px;padding:3px;gap:2px}
.seg button{border:none;background:transparent;border-radius:9px;min-height:34px;padding:0 14px;font-weight:700;font-size:14px;color:var(--muted);cursor:pointer}
.seg button.on{background:#fff;color:var(--ink);box-shadow:0 1px 3px rgba(0,0,0,.12)}
.calfilters{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.calfilters select.input{width:auto;min-height:38px;padding:6px 10px;font-size:14px;border-radius:10px;max-width:220px}
.tgl{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;cursor:pointer;min-height:38px}
.tgl input{width:18px;height:18px;accent-color:var(--accent)}
.legend{display:flex;gap:4px;flex-wrap:wrap;margin-left:auto}
.lg{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;color:#4a525c;border:1px solid transparent;background:none;border-radius:999px;padding:3px 8px;cursor:pointer}
.lg i,.who i,.wp i{width:10px;height:10px;border-radius:50%;background:var(--c);display:inline-block;flex:none}
.lg.on{border-color:var(--c);background:#fff}
.lg.late{cursor:default}.lg.late i{background:#dc2626}
.calhint{text-align:center;margin:10px 0 0}
/* month */
.month{background:#fff;border:1px solid #e4dfd7;border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow)}
.mhead{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:#f8f6f2;border-bottom:1px solid #e4dfd7}
.mhead div{padding:7px 8px;font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.mgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-auto-rows:minmax(118px,auto)}
.mcell{border-right:1px solid #eee9e2;border-bottom:1px solid #eee9e2;padding:4px 4px 6px;min-width:0;cursor:pointer;transition:background .1s}
.mcell:nth-child(7n){border-right:none}
.mcell.out{background:#faf9f7}.mcell.out .dnum{color:#b3b8bf}
.mcell:hover{background:#fcfaf7}
.mday{display:flex;align-items:center;justify-content:space-between;padding:1px 3px 3px}
.dnum{font-size:13px;font-weight:700;color:#3d4550;width:24px;height:24px;display:grid;place-items:center;border-radius:50%}
.mcell.today .dnum{background:var(--accent);color:#fff}
.mitems{display:flex;flex-direction:column;gap:2px}
.ci{display:flex;align-items:center;gap:4px;min-width:0;font-size:12px;line-height:1.25;padding:3px 6px;border-radius:6px;cursor:pointer;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;white-space:nowrap;overflow:hidden}
.ci .cx{overflow:hidden;text-overflow:ellipsis;min-width:0}
.ci.ev{background:var(--c);color:#fff;font-weight:600}
.ci.ev .ct{font-weight:800;opacity:.92;flex:none}
.ci.tk{background:#fff;border:1px solid #e6e1d9;border-left:3px solid var(--c);color:#2d343c}
.ci .cj{color:var(--muted)}
.cb{flex:none;width:12px;height:12px;border:1.6px solid currentColor;border-radius:50%;opacity:.7;display:inline-grid;place-items:center;font-size:8px;font-weight:900}
.ci.tk.late,.crow.tk.late{border-left-color:#dc2626;background:#fef2f2;color:#b91c1c}
.ci.tk.late .cj{color:#c2410c}
.ci.tk.done,.crow.tk.done{opacity:.55}.ci.tk.done .cx,.crow.tk.done .cr-title{text-decoration:line-through}
.ci:hover{filter:brightness(.96)}
.more{border:none;background:none;text-align:left;font-size:12px;font-weight:700;color:var(--muted);padding:2px 6px;cursor:pointer;border-radius:6px}
.more:hover{background:#f1ede7;color:var(--ink)}
[data-drop].drop{background:var(--accent-tint)!important;outline:2px dashed var(--accent);outline-offset:-2px}
.ci.dragging,.crow.dragging{opacity:.35}
.cghost{position:fixed;z-index:90;pointer-events:none;box-shadow:0 10px 26px rgba(0,0,0,.25);transform:rotate(-2deg);opacity:.95}
body.caldragging{cursor:grabbing;user-select:none;-webkit-user-select:none}
/* week */
.week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.wcol{background:#fff;border:1px solid #e4dfd7;border-radius:12px;min-height:340px;display:flex;flex-direction:column;min-width:0;cursor:pointer}
.wcol.past{background:#fbfaf8}
.whead{display:flex;align-items:center;gap:6px;padding:8px 8px 6px;border-bottom:1px solid #eee9e2;font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase}
.whead b{font-size:18px;color:var(--ink)}
.wcol.today .whead b{background:var(--accent);color:#fff;border-radius:50%;width:30px;height:30px;display:grid;place-items:center;font-size:15px}
.wadd{margin-left:auto;border:none;background:#f3efe9;border-radius:8px;width:28px;height:28px;font-size:18px;font-weight:700;color:var(--muted);cursor:pointer}
.wadd:hover{background:var(--accent);color:#fff}
.witems{display:flex;flex-direction:column;gap:4px;padding:6px;flex:1}
.wempty{color:#c5c9ce;text-align:center;padding:10px 0}
.witems .ci{white-space:normal}
/* agenda rows (list + week events) */
.crow{display:flex;gap:10px;align-items:flex-start;padding:9px 10px;border-radius:10px;cursor:pointer;background:#fff;border:1px solid #ece8e1;border-left:4px solid var(--c);user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.crow + .crow{margin-top:6px}
.crow:hover{background:#fcfaf7}
.cr-time{flex:none;width:58px;font-size:13px;font-weight:800;color:var(--c);line-height:1.25}
.cr-time span{display:block;font-weight:600;color:var(--muted);font-size:12px}
.crow.tk .cr-time{color:var(--muted);font-weight:700;font-size:12px}
.crow.tk.late .cr-time{color:#b91c1c}
.cr-main{min-width:0;flex:1}
.cr-title{font-weight:700;font-size:15px;display:flex;align-items:center;gap:6px;flex-wrap:wrap;word-break:break-word}
.cr-sub{font-size:13px;color:var(--muted);margin-top:2px;word-break:break-word}
.crow.tk.late .cr-sub{color:#c2410c}
.evtype{display:inline-flex;align-items:center;font-size:11px;font-weight:700;color:#4a525c;background:#f1ede7;border-radius:999px;padding:2px 8px}
.week .crow{flex-direction:column;gap:2px;padding:6px 7px}
.week .crow .cr-time{width:auto;font-size:12px}.week .crow .cr-time span{display:inline;margin-left:4px}
.week .crow .cr-title{font-size:13px}.week .crow .cr-sub{font-size:12px}.week .crow .evtype{display:none}
.calbody.v-list{max-width:760px;margin:0 auto}
.cday{background:#fff;border:1px solid #e4dfd7;border-radius:var(--radius);padding:10px 12px 12px;margin-bottom:10px;box-shadow:var(--shadow)}
.cday.today{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset,var(--shadow)}
.cdh{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;min-height:32px;font-size:15px}
.cday.overdue{border-color:#fecaca;background:#fffafa}
.cday.overdue summary{cursor:pointer;list-style:none;margin-bottom:0}.cday.overdue[open] summary{margin-bottom:8px}
.cday.overdue summary b{color:#b91c1c}
.cadd{color:var(--accent);min-height:32px}
.cnone{padding:2px 2px 4px}
.clistmore{text-align:center;margin-top:6px}
/* event sheet */
.evhead{border-left:5px solid var(--c);padding-left:12px;margin-bottom:12px}
.evhead h3{margin:6px 0 4px}
.evtype.big{font-size:12.5px}
.evwhen{font-weight:700;color:#3d4550}
.evinfo{display:flex;flex-direction:column;gap:2px;margin:0 -6px}
.evrow{display:flex;gap:12px;align-items:flex-start;padding:9px 6px;border-radius:10px;text-decoration:none}
a.evrow:hover{background:#f6f3ee}
.evrow .ic{width:24px;text-align:center;flex:none}
.evrow .lab{font-size:12px;color:var(--muted);font-weight:600}
.evrow .val{font-size:15px;word-break:break-word}
a.evrow .val{color:var(--accent);font-weight:600}
.evnotes{white-space:pre-wrap}
.who{display:inline-flex;align-items:center;gap:5px;background:#f4f1ec;border-radius:999px;padding:3px 10px 3px 8px;margin:2px 4px 2px 0;font-size:14px;font-weight:600}
.typepick{display:flex;flex-wrap:wrap;gap:6px}
.tp{cursor:pointer}.tp input{position:absolute;opacity:0;pointer-events:none}
.tp span{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:999px;padding:7px 12px;font-size:14px;font-weight:600;background:#fff}
.tp.on span{background:var(--accent);border-color:var(--accent);color:#fff}
.tp input:focus-visible + span{outline:3px solid rgba(184,42,66,.55);outline-offset:2px}
.evdt{display:grid;grid-template-columns:1fr 1.4fr;gap:10px;align-items:end}
.ev-times{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.whopick{display:flex;flex-wrap:wrap;gap:6px}
.wp{cursor:pointer}.wp input{position:absolute;opacity:0;pointer-events:none}
.wp span{display:inline-flex;align-items:center;gap:7px;border:1.5px solid var(--line);border-radius:999px;padding:7px 12px;font-size:14px;font-weight:600;background:#fff}
.wp input:checked + span{border-color:var(--c);background:color-mix(in srgb,var(--c) 12%,#fff)}
.wp input:checked + span::after{content:"✓";color:var(--c);font-weight:900}
.wp input:focus-visible + span{outline:3px solid rgba(184,42,66,.55);outline-offset:2px}
/* job page upcoming */
.jevlist{display:flex;flex-direction:column;gap:6px}
.jev{display:flex;gap:12px;align-items:center;text-align:left;width:100%;border:1px solid #ece8e1;border-left:4px solid var(--c);background:#fff;border-radius:10px;padding:8px 10px;cursor:pointer}
.jev:hover{background:#fcfaf7}
.jdate{flex:none;width:40px;text-align:center;line-height:1.05}
.jdate small{display:block;font-size:11px;font-weight:800;color:var(--accent);text-transform:uppercase}
.jdate b{font-size:20px}
.jmain{display:flex;flex-direction:column;min-width:0}
.jt{font-weight:700;font-size:15px}
.js{font-size:13px;color:var(--muted)}
/* settings feed */
.copyrow{display:flex;gap:8px}.copyrow .input{font-size:13px;min-height:40px;color:#4a525c}
.icsbtns{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
@media (max-width:900px){
  .week{grid-template-columns:1fr;gap:8px}
  .wcol{min-height:0;cursor:default}
  .whead{text-transform:none;font-size:14px}
  .witems{padding:6px 8px 8px}
  .wempty{text-align:left;padding:2px 4px}
  .week .crow{flex-direction:row;gap:10px;padding:8px 10px}
  .week .crow .cr-time{width:58px;font-size:13px}.week .crow .cr-time span{display:block;margin:0}
  .week .crow .cr-title{font-size:15px}.week .crow .cr-sub{font-size:13px}
}
@media (max-width:640px){
  .calwrap{padding:10px 10px 20px}
  .calbar{gap:8px}
  .calnav{flex:1 1 100%;order:1}
  .caltitle{font-size:19px;margin-left:4px}
  .seg{order:2;flex:1}.seg button{flex:1;padding:0 8px}
  .calnew{order:3;min-height:40px}
  .calfilters{gap:6px}
  .calfilters select.input{flex:1;min-width:0;max-width:none}
  .legend{margin-left:0;width:100%}
  .mhead div{padding:5px 0;text-align:center;font-size:11px}
  .mgrid{grid-auto-rows:minmax(74px,auto)}
  .mcell{padding:2px 1px 3px}
  .mday{justify-content:center;position:relative;padding:1px 0 2px}
  .dnum{font-size:12px;width:22px;height:22px}
  .mcount{display:none}
  .ci{font-size:10px;padding:2px 3px;border-radius:4px;gap:2px}
  .ci .cb{display:none}
  .more{font-size:10px;padding:1px 3px}
  .evdt{grid-template-columns:1fr}
}
@media (max-width:640px){ .tabs a{font-size:11.5px;padding:10px 1px;letter-spacing:-.1px} .tabs a .nbadge{right:calc(50% - 40px)} }
@media (max-width:360px){ .tabs a{font-size:10.5px} }
.tabs a{white-space:nowrap}
.tl-short{display:none}
@media (max-width:1100px){ .tl-long{display:none} .tl-short{display:inline} }
@media (min-width:641px) and (max-width:900px){
  .tabs{overflow-x:auto;scrollbar-width:none;min-width:0;flex:0 1 auto}
  .tabs::-webkit-scrollbar{display:none}
  .tabs a{padding:10px 8px;font-size:14px}
  .brandlogo{height:30px;width:auto}
}

/* ===== 2026-11-09: threads, groups, archive, stages, knowledge, day view ===== */
.av.grp{background:#3b4b5c;color:#fff;font-size:16px}
.av.sm{width:28px;height:28px;font-size:11px}
.conv-sec-row{display:flex;align-items:center;justify-content:space-between}
.conv-sec-row .linkbtn{font-size:12px;font-weight:700;text-transform:none;letter-spacing:0}
.conv-hint{padding:4px 16px 10px}
.thead .tmain{flex:1;min-width:0}
.thead .tsub{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg .mtime{display:flex;gap:10px;align-items:center;min-height:18px}
.msg.mine .mtime{justify-content:flex-end}
.msg .rbtn{font-size:11.5px;font-weight:700;color:var(--accent);text-decoration:none;opacity:.0;transition:opacity .15s}
.msg:hover .rbtn,.msg:focus-within .rbtn,.msg.tsel .rbtn{opacity:1}
@media (hover:none){.msg .rbtn{opacity:.85}}
.treplies{display:inline-flex;gap:6px;align-items:baseline;margin:4px 8px 0;padding:5px 10px;border-radius:10px;background:#fff;border:1px solid #ece8e1;text-decoration:none;color:var(--ink);font-size:12.5px;max-width:100%}
.treplies b{color:var(--accent-dark,#8a1f31);white-space:nowrap}
.treplies span{color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.msg.mine .treplies{align-self:flex-end}
.msg.tsel .bubble{outline:2px solid var(--accent);outline-offset:1px}
.msgpage.has-tpanel{grid-template-columns:300px 1fr 380px;max-width:1500px}
.tpanel{display:flex;flex-direction:column;min-width:0;min-height:0;border-left:1px solid var(--line);background:#fff}
.tpanel[hidden]{display:none}
.tphead{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px;border-bottom:1px solid var(--line);min-height:60px}
.tphead .tname{font-weight:800;font-size:17px}.tphead .tsub{font-size:12px;color:var(--muted)}
.tplist{flex:1;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:12px}
.tmsg{display:flex;gap:10px;align-items:flex-start}
.tmsg .tbody{min-width:0;flex:1}
.tmsg .thd{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.tmsg .thd .del{margin-left:auto;font-size:12px}
.tmsg .mtext{margin-top:2px;overflow-wrap:anywhere}
.tmsg .mimg{max-width:220px;border-radius:10px;margin-top:6px}
.tmsg.troot{padding-bottom:10px}
.tmsg.flash{animation:flash 1.6s ease-out}
.tpsep{font-size:12px;color:var(--muted);font-weight:700;border-top:1px solid var(--line);padding-top:10px}
@media (max-width:1180px){.msgpage.has-tpanel{grid-template-columns:260px 1fr 340px}}
@media (max-width:980px){.msgpage.has-tpanel{grid-template-columns:1fr 360px}.msgpage.has-tpanel .convs{display:none}}
@media (max-width:640px){
  .tpanel{position:fixed;inset:calc(56px + env(safe-area-inset-top)) 0 0 0;z-index:40;border-left:none}
  body.typing .tpanel{inset:calc(56px + env(safe-area-inset-top)) 0 0 0}
  .msgpage.has-tpanel{display:block}
  .tcomposer{padding-bottom:calc(8px + env(safe-area-inset-bottom))}
}
.gmembers{display:grid;gap:6px;margin:8px 0}
.gm{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;cursor:pointer;min-height:44px}
.gm input{width:20px;height:20px;accent-color:var(--accent)}
/* archive */
.archbtn{text-decoration:none;white-space:nowrap}
.wrap.wide{max-width:1100px}
.alistc{padding:0;overflow:hidden}
.arow{display:flex;gap:12px;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line);text-decoration:none;color:var(--ink);min-height:56px}
.arow:last-child{border-bottom:none}
.arow:hover{background:#faf8f5}
.arow .amain{min-width:0;flex:1}
.arow .atitle{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.arow .amain .muted{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.arow .ameta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none;text-align:right}
.pill{display:inline-block;padding:2px 9px;border-radius:99px;background:#efeae3;color:#5b4a36;font-size:12px;font-weight:700}
.pill.lab-Completed{background:#e3f3e6;color:#1f6b33}.pill.lab-Cancelled{background:#f6e3e3;color:#8a2b2b}.pill.lab-OnHold{background:#fbf0d9;color:#87610c}
.archbanner{display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center;background:#f6f2ec;border:1px solid #e7dfd3;border-radius:12px;padding:10px 12px;margin:8px 0}
.archbanner .btn{margin-left:auto}
.wbadge{display:inline-block;font-size:10.5px;font-weight:700;color:#3b5b8a;background:#e7eef8;border-radius:6px;padding:0 6px;margin-left:4px}
.task.sub{margin-left:22px;border-left:2px solid #eee6da;padding-left:6px}
.task.sub.d2{margin-left:40px}.task.sub.d3{margin-left:56px}
.subar{color:var(--muted);font-weight:700}
@media (max-width:640px){.task.sub{margin-left:12px}.task.sub.d2{margin-left:22px}.task.sub.d3{margin-left:30px}.arow .ameta .muted{display:none}}
/* stages settings */
.stagerows{display:grid;gap:6px;margin-bottom:12px}
.srow{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:12px;flex-wrap:wrap;min-height:48px}
.srow.hid{opacity:.6}
.srow .sord{width:22px;text-align:center;color:var(--muted);font-weight:700}
.srow .sname{font-weight:700;flex:1;min-width:120px}
.srow .sacts{display:flex;gap:6px;flex-wrap:wrap}
.addstage{display:grid;grid-template-columns:1fr 220px auto;gap:8px}
@media (max-width:640px){.addstage{grid-template-columns:1fr}.srow .sacts{width:100%;justify-content:flex-end}}
/* knowledge */
.wikihead{display:flex;align-items:center;justify-content:space-between;gap:10px}
.wikihead .btn{text-decoration:none}
.wikibody{line-height:1.6;overflow-wrap:anywhere}
.wikibody h2{font-size:20px;margin:14px 0 6px}.wikibody h3{font-size:17px;margin:12px 0 4px}.wikibody h4{font-size:15px;margin:10px 0 4px}
.wikibody p{margin:6px 0}.wikibody ul,.wikibody ol{margin:6px 0 6px 22px;padding:0}.wikibody ul.chk{list-style:none;margin-left:4px}
.wikibody code{background:#f3efe9;border-radius:5px;padding:1px 5px;font-size:.92em}
.wikibody hr{border:none;border-top:1px solid var(--line);margin:12px 0}
.revbox{max-height:55vh;overflow:auto;border:1px solid var(--line);border-radius:12px;padding:10px 12px}
textarea.wbody{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:14px;line-height:1.5;min-height:300px}
.wfile{padding:6px 0;border-bottom:1px solid var(--line)}.wfile a{font-weight:600}
#wpv{margin-top:14px;border-top:1px solid var(--line);padding-top:10px}
/* day view */
.dayv{background:#fff;border:1px solid var(--line);border-radius:14px;overflow:hidden}
.dallday{display:grid;grid-template-columns:64px 1fr;border-bottom:2px solid var(--line);background:#fbfaf7}
.dadl{padding:10px 8px;font-size:12px;font-weight:700;color:var(--muted);border-right:1px solid var(--line)}
.dadi{padding:8px;display:flex;flex-direction:column;gap:6px;min-width:0}
.dadi .crow{margin:0}
.dgrid{position:relative}
.dhour{position:relative;border-bottom:1px solid #f0ece6;display:grid;grid-template-columns:64px 1fr}
.dhour .dhl{font-size:11.5px;color:var(--muted);padding:2px 8px 0 0;text-align:right;border-right:1px solid var(--line);transform:translateY(-8px);background:#fff}
.dhour:first-child .dhl{transform:none}
.dslot{border:none;background:transparent;width:100%;height:100%;cursor:pointer}
.dslot:hover{background:#faf6f0}
.devs{position:absolute;top:0;bottom:0;left:68px;right:6px;pointer-events:none}
.dev{position:absolute;pointer-events:auto;background:color-mix(in srgb,var(--c) 14%,#fff);border-left:4px solid var(--c);border-radius:8px;padding:4px 8px;overflow:hidden;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.dev-t{font-weight:700;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dev-s{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.dnow{position:absolute;left:64px;right:0;height:2px;background:#d92d20;pointer-events:none}
.dnow::before{content:"";position:absolute;left:-5px;top:-4px;width:10px;height:10px;border-radius:50%;background:#d92d20}
.dlate{margin-bottom:10px}
[data-dayview]{cursor:pointer}
@media (max-width:640px){.dallday{grid-template-columns:52px 1fr}.dhour{grid-template-columns:52px 1fr}.devs{left:56px}.dnow{left:52px}}

/* ---------- Message Center → Jobs (2026-11-10) ---------- */
.av.job{background:#f3e6c8;font-size:16px}
.jt-tools{display:flex;gap:10px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line);background:#fff;flex-wrap:wrap}
.jt-tools .input{flex:1;min-width:180px}
.jt-list{overflow-y:auto;flex:1;padding:4px 0 24px}
.jt-count{padding:8px 16px 4px}
.jt-row,.jt-hit{display:block;padding:11px 16px;border-bottom:1px solid #f0ece6;text-decoration:none;color:inherit;background:#fff}
.jt-row:hover,.jt-hit:hover{background:#fbf8f3}
.jt-top{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.jt-title{font-size:15.5px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jt-row.unread .jt-title{font-weight:900}
.jt-top .when{font-size:12px;color:var(--muted);white-space:nowrap}
.jt-meta{display:flex;gap:8px;align-items:center;margin:4px 0 3px;font-size:12px}
.jt-meta .nbadge{margin-left:auto}
.jt-last{font-size:14px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.jt-row.unread .jt-last{color:var(--ink)}
.jt-who{font-weight:700;color:#6b4a22}
.jt-task{font-size:12px;color:#7c6a55;font-weight:600;text-decoration:none}
a.jt-task:hover{text-decoration:underline}
.jt-more{display:block;margin:14px auto}
.pill.jt-arch{background:#ece7df;color:#5b5348}
.pill.jt-folder{background:#e3ecf5;color:#2f4a66}
.thead .jt-jlink{display:block;text-decoration:none;color:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.thead .jt-jlink:hover{text-decoration:underline}
.thead .tsub .stagepill,.thead .tsub .pill{font-size:11px;padding:1px 7px;margin-right:4px}
.thead .jt-back{font-size:22px;padding:0 6px 0 0;text-decoration:none}
.jt-msgs .msg.jt-msg{max-width:88%}
.jt-msgs .msg.jt-msg .mname{display:block}
.jt-msgs .msg.jt-root{max-width:100%;width:100%;margin:6px 0 10px}
.jt-msgs .msg.jt-root .bubble{background:#fff8e8;border-color:#f0dcae;width:100%}
.jt-rooth{font-size:12px;font-weight:800;color:#8a6420;margin:0 0 4px 10px;text-transform:uppercase;letter-spacing:.3px}
.jt-src{font-size:10px;font-weight:700;color:#8a8170;background:#efebe4;border-radius:5px;padding:0 5px;margin-left:4px;vertical-align:1px}
.jt-tasklbl{margin-bottom:3px}
.jt-tasklbl .jt-task{background:#f2ede5;border-radius:6px;padding:1px 7px;display:inline-block}
.jt-files{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.jt-files .jt-thumb{max-width:140px;max-height:120px;border-radius:10px;object-fit:cover}
.jt-new{display:flex;align-items:center;gap:8px;margin:10px 0 2px;color:var(--accent);font-size:12px;font-weight:800;align-self:stretch}
.jt-new:before,.jt-new:after{content:"";flex:1;height:1px;background:var(--accent);opacity:.5}
.jt-target{padding:0 4px 6px}
.jt-chip{display:inline-flex;gap:6px;align-items:center;background:#f2ede5;border-radius:999px;padding:3px 6px 3px 10px;font-size:13px}
.jt-chip button{border:none;background:#e3dbcf;border-radius:50%;width:22px;height:22px;cursor:pointer}
.jt-picks{max-height:55vh;overflow-y:auto}
.jt-acth{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:12px}
.jt-acth h2{margin:0}
.jtpage .thread{display:flex;flex-direction:column;min-height:0}
@media (max-width:640px){.jt-tools{padding:8px 10px}.jt-tools .seg{width:100%;justify-content:space-between}.jt-tools .seg button{flex:1}.jt-row,.jt-hit{padding:11px 12px}.jtpage .thead .btn.small{display:none}}
.jt-tasklast{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.jt-meta .stagepill,.jt-meta .pill,.jt-meta .muted{white-space:nowrap;flex:none}
@media (max-width:640px){.jt-tools{flex-direction:column;align-items:stretch}.jt-tools .input{min-width:0;width:100%}}

/* ---------- Quote in reply ---------- */
.mquote{display:block;border-left:3px solid var(--accent);background:rgba(60,40,20,.05);border-radius:8px;padding:5px 9px 6px;margin:0 0 6px;text-decoration:none;color:var(--ink);font-size:12.5px;line-height:1.35;max-width:100%;cursor:pointer;text-align:left}
.mquote b{display:block;color:var(--accent);font-size:12px;font-weight:700;margin-bottom:1px}
.mquote span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;word-break:break-word;color:#5d5850}
.mquote.gone span{font-style:italic;color:var(--muted)}
.mquote:hover{background:rgba(60,40,20,.09)}
.msg.mine .mquote{background:rgba(255,255,255,.6)}
.activity .mquote,.tcomment .mquote{margin:2px 0 6px;max-width:560px}
.cquote-slot{margin:0 0 8px}
.cquote{display:flex;gap:8px;align-items:flex-start;border-left:3px solid var(--accent);background:#f6f2ec;border-radius:10px;padding:7px 8px 7px 10px}
.cq-body{flex:1;min-width:0;font-size:13px;line-height:1.35}
.cq-body b{display:block;color:var(--accent);font-size:12.5px;margin-bottom:1px}
.cq-body span{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-wrap;word-break:break-word;color:#5d5850}
.cq-x{border:none;background:#e3dacd;border-radius:50%;width:28px;height:28px;cursor:pointer;flex:none;font-size:13px;line-height:1}
.tq-slot{margin:6px 0}
.thd .qlink{margin-left:8px;font-size:12px}
.tcomment [data-cquote]{font-size:12px}
.activity li.flash .abody,.tcomment.flash{animation:flash 1.6s ease-out;border-radius:8px}
.qacts button.danger-t{color:#b3261e}
@media (hover:none){.msg .bubble,.tmsg{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none}}

.minebtn b{color:var(--accent,#2f6fb3)}
.minebtn.on{background:#e3eefb;border-color:#2f6fb3;color:#1d4f86}
@media (max-width:640px){ .board-head .searchrow{flex-wrap:wrap;gap:8px} .board-head .searchrow .search{flex:1 1 100%} .board-head .searchrow .btn{height:38px;font-size:13.5px;padding:0 12px} }
.vbadge{display:inline-block;font-size:11.5px;font-weight:600;padding:1px 8px;border-radius:999px;margin-left:4px;vertical-align:1px}
.vbadge.ok{background:#e4f4e8;color:#1f6b35}
.vbadge.warn{background:#fff3d6;color:#7a4f00}

/* ---------- Message Center: two panes (2026-11-20) ----------
   Computer: Messages and Jobs side by side. Each pane shows its list + conversation when it's wide enough,
   otherwise the list or the conversation (with a back arrow). Phones / small screens: a toggle switches panes. */
.mshell{display:flex;flex-direction:column;height:calc(100vh - 56px - env(safe-area-inset-top));height:calc(100dvh - 56px - env(safe-area-inset-top))}
.mtoggle{display:none;gap:6px;padding:8px 10px;background:#fff;border-bottom:1px solid var(--line)}
.mtoggle a{flex:1;display:flex;align-items:center;justify-content:center;gap:6px;min-height:40px;border-radius:10px;text-decoration:none;font-weight:700;font-size:15px;color:var(--muted);background:#f4efe7}
.mtoggle a.on{background:var(--ink,#222);color:#fff}
.mtoggle a .nbadge{margin-left:2px}
.mpanes{flex:1;min-height:0;display:grid;grid-template-columns:1fr 1fr}
.mpane{position:relative;min-width:0;min-height:0;container-type:inline-size;overflow:hidden}
.mpane + .mpane{border-left:2px solid var(--line)}
.mpane .msgpage,.mpane .msgpage.has-tpanel{height:100%;max-width:none;margin:0;display:grid;grid-template-columns:minmax(240px,300px) 1fr}
.mpane .convs-h{gap:8px}
.mpane .thead .back{display:none}
.mempty{margin:auto;text-align:center;color:var(--muted);font-weight:600;font-size:15px;line-height:2}
.mpane .thread .mempty{font-size:15px}
#jpage .convs .jt-tools{padding:6px 12px 10px;border-bottom:1px solid var(--line)}
#jpage .convs .jt-tools .input{width:100%;margin-bottom:8px}
#jpage .convs .jt-list{flex:1}
.jt-row.on{background:var(--accent-tint)}
/* thread panel slides over the conversation inside its own pane */
.mpane .tpanel{position:absolute;top:0;right:0;bottom:0;width:min(440px,100%);z-index:6;box-shadow:-8px 0 24px rgba(0,0,0,.08)}
.mpane .msgpage.has-tpanel .convs{display:flex}
@container (max-width: 760px) {
  .mpane .msgpage,.mpane .msgpage.has-tpanel{display:block}
  .mpane .msgpage .convs,.mpane .msgpage .thread{height:100%}
  .mpane .msgpage.has-thread .convs{display:none}
  .mpane .msgpage:not(.has-thread) .thread{display:none}
  .mpane .thead .back{display:inline-flex}
  .mpane .tpanel{width:100%;box-shadow:none}
  .mpane .jt-open{display:none}
}
@media (max-width:1000px){
  .mtoggle{display:flex}
  .mpanes{grid-template-columns:1fr}
  .mshell[data-show="chat"] #pjobs,.mshell[data-show="jobs"] #pchat{display:none}
  .mpane + .mpane{border-left:none}
}
@media (max-width:640px){
  .mshell{height:calc(100vh - 56px - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom));height:calc(100dvh - 56px - 58px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  body.typing .mshell{height:calc(100vh - 56px - env(safe-area-inset-top));height:calc(100dvh - 56px - env(safe-area-inset-top))}
  body.typing .mtoggle{display:none}
  .mpane .tpanel{position:absolute;inset:0}
  .mtoggle{padding:6px 8px}
}
/* job posts: attachments + threads on the job page */
.addnote{align-items:center}
.addnote .nfile{height:var(--tap);min-width:var(--tap)}
.nattach{margin:8px 0 0}
.activity .jt-files{margin-top:6px}
.activity .jt-files .mimg{max-width:200px;max-height:200px}
.athread{font-size:12px;font-weight:700;color:var(--accent);text-decoration:none;margin-left:8px}
.athread:hover{text-decoration:underline}
.tmsg .jt-files .mimg{max-width:220px}
/* inline reply threads (job page posts + task notes) */
.ithr-t{font-size:12px;font-weight:700;color:var(--accent)}
.ithr-t.has{background:#fcf0f2;border-radius:8px;padding:2px 8px}
.ithread{margin:8px 0 2px;padding:8px 0 2px 12px;border-left:3px solid #f1cbd2;display:flex;flex-direction:column;gap:8px;white-space:normal}
.irep{display:flex;gap:8px;align-items:flex-start;font-size:14px}
.irep .av.sm{flex:none}
.irep-b{min-width:0;flex:1}
.irep-h{display:flex;gap:6px;align-items:baseline;flex-wrap:wrap}
.irep-h .when{font-size:11px;color:var(--muted)}
.irep .ctext{white-space:pre-wrap;word-break:break-word}
.irep.flash{animation:flash 1.6s ease-out;border-radius:8px}
.iform{display:flex;gap:6px;align-items:center}
.iform .input{flex:1;min-width:0;min-height:40px}
.iform .cbtn{height:40px;min-width:40px}
.tcomment .ithread{margin-left:0}
.tcomment .jt-files .mimg{max-width:180px;max-height:180px}
/* @everyone / @assignees */
.mention.grp{background:#fff3d6;color:#7a4f00}
.mention-pop .msp .un{display:block;font-size:12px;line-height:1.2}
.mention-pop .av.grp{background:#fff3d6;font-size:15px}
.echk{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-top:1px solid #f0ece6;cursor:pointer}
.echk input{width:22px;height:22px;margin-top:2px;flex:none;accent-color:var(--accent)}
/* ---------- Time tracking ---------- */
#timerbar{position:fixed;right:0;top:42%;z-index:45;display:flex;flex-direction:column;gap:8px;align-items:flex-end;pointer-events:none}
#timerbar[hidden]{display:none}
.tb-row{pointer-events:auto;display:flex;align-items:center;gap:6px;background:#2b1b1f;color:#fff;border-radius:999px 0 0 999px;padding:6px 6px 6px 12px;box-shadow:0 4px 16px rgba(0,0,0,.25);max-width:190px}
.tb-main{display:flex;flex-direction:column;min-width:0;color:#fff;text-decoration:none;line-height:1.15}
.tb-line{display:flex;align-items:center;gap:6px}
.tb-dot{width:8px;height:8px;border-radius:50%;background:#ff4d5e;flex:none;animation:tbpulse 1.4s ease-in-out infinite}
@keyframes tbpulse{0%,100%{opacity:1}50%{opacity:.35}}
.tb-time{font-variant-numeric:tabular-nums;font-weight:800;font-size:14px}
.tb-name{font-size:11px;color:#d9c7cb;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:110px}
.tb-stop{flex:none;border:none;background:#fff;color:#a01d33;font-weight:900;border-radius:50%;width:34px;height:34px;cursor:pointer;font-size:13px;display:grid;place-items:center}
.tb-stop:hover{background:#ffe3e7}
@media (max-width:640px){ #timerbar{top:auto;bottom:calc(140px + env(safe-area-inset-bottom))} }
.tbtnw{flex:none;display:flex;align-items:center}
.tmr{border:1px solid var(--line);background:#fff;border-radius:999px;min-width:40px;height:36px;padding:0 12px;cursor:pointer;font-weight:800;color:var(--accent);font-size:14px}
.tmr:hover{background:var(--accent-tint)}
.tmr.on{background:#a01d33;border-color:#a01d33;color:#fff;font-variant-numeric:tabular-nums}
.tsec-h .tbtnw{display:inline-flex;margin-left:8px;vertical-align:middle}
.ttime .tt-sum{margin:2px 0 6px}
.tt-list{display:flex;flex-direction:column;border-top:1px solid #f0ece6}
.tt-row{display:flex;flex-wrap:wrap;gap:4px 10px;align-items:baseline;padding:6px 0;border-bottom:1px solid #f0ece6;font-size:13.5px}
.tt-who{font-weight:600}.tt-day{color:var(--muted)}.tt-src{font-size:11px;color:var(--muted)}
.tt-note{flex-basis:100%;color:var(--muted);font-size:13px}
.tt-acts{margin-left:auto;display:flex;gap:8px}
.tt-live,.tt-others{color:#a01d33;font-weight:600;font-size:13px}
.tt-add{margin-top:8px}.tt-add summary{cursor:pointer;font-weight:700;color:var(--accent);font-size:13px}
.tt-form{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.tt-form .input{width:auto;flex:1 1 90px;min-width:80px}
.tm-at{display:flex;gap:8px}.tm-at .input{flex:1}
.tm-acts{margin:10px 0}
.tm-list{display:flex;flex-direction:column;gap:8px;margin:10px 0}
.tm-item{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#faf8f5;border-radius:10px;padding:10px 12px}
.card.mt{align-items:center}
/* ---------- Time reports (admins) ---------- */
.tabs a[hidden]{display:none}
@media (max-width:640px){ .tabs a.tab-desk{display:none} }
.rp-filters .rp-row{display:flex;flex-wrap:wrap;gap:10px 12px;align-items:flex-end}
.rp-filters .rp-row label{display:flex;flex-direction:column;min-width:150px;flex:1}
.rp-filters .rp-row label.rp-job{flex:2;min-width:220px}
.rp-filters .rp-row2{margin-top:12px;align-items:center}
.rp-filters .f{margin:0 0 4px}
.rp-filters label.rp-chk{flex-direction:row;align-items:center;gap:8px;flex:0 0 auto;min-width:0;font-size:14px}
.rp-filters #rp-csv{margin-left:auto}
.rp-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:0 0 14px}
.rp-stats .card{padding:14px 16px;display:flex;flex-direction:column;gap:2px}
.rp-stats span{font-size:12px;color:var(--muted);font-weight:700;text-transform:uppercase;letter-spacing:.5px}
.rp-stats b{font-size:22px}.rp-stats small{color:var(--muted)}
.rp-groups{display:flex;flex-direction:column}
.rp-g{display:grid;grid-template-columns:minmax(0,2fr) minmax(80px,3fr) 112px;gap:12px;align-items:center;padding:10px 4px;border:none;border-bottom:1px solid #f0ece6;background:none;text-align:left;cursor:pointer;font:inherit;color:inherit}
.rp-g:hover{background:#faf8f5}
.rp-gn{font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.rp-bar{height:10px;background:#f2eee8;border-radius:999px;overflow:hidden}.rp-bar span{display:block;height:100%;background:var(--accent);border-radius:999px}
.rp-gt{display:flex;flex-direction:column;align-items:flex-end;min-width:90px}
.rp-table-wrap{overflow-x:auto}
.rp-table{width:100%;border-collapse:collapse;font-size:13.5px}
.rp-table th,.rp-table td{padding:7px 8px;border-bottom:1px solid #f0ece6;text-align:left;vertical-align:top}
.rp-table th{font-size:12px;color:var(--muted);text-transform:uppercase;letter-spacing:.4px}
.rp-table td.num,.rp-table th.num{text-align:right;white-space:nowrap}
.rp-table a{color:inherit}
.rp-live{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.rp-live b{color:#a01d33;margin-right:4px}
.rp-livechip{background:#fbe9ec;border-radius:999px;padding:4px 10px;text-decoration:none;font-size:13px;color:var(--ink)}
@media (max-width:640px){ .rp-stats{grid-template-columns:repeat(2,1fr)} .rp-g{grid-template-columns:minmax(0,1fr) auto}.rp-bar{grid-column:1/-1;order:3} .rp-filters #rp-csv{margin-left:0;width:100%} }
