/* Ilorb Boards / CRM — Orbit brand tokens (connecting/ilorb.com/_docs/brand/logo), light + dark, no inline styles. */
:root[data-theme="light"]{
  --col:#eef0f6;--acc-ink:#fff;--ok-soft:rgba(15,138,95,.1);--bad-soft:rgba(200,35,44,.08);--warn-soft:rgba(161,92,0,.1);
  --logo-ring:#3b4cca;--logo-orb:#6d5cf0;--focus:#4338ca;--shadow-lg:0 12px 32px rgba(14,23,38,.16);
}
:root[data-theme="dark"]{
  --col:#0d1218;--acc-ink:#0e0c2b;--ok-soft:rgba(46,160,67,.14);--bad-soft:rgba(218,54,51,.14);--warn-soft:rgba(210,153,34,.14);
  --logo-ring:#8f9bff;--logo-orb:#fff;--focus:#8b87ff;--shadow-lg:0 12px 32px rgba(0,0,0,.5);
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{color-scheme:light}:root[data-theme="dark"]{color-scheme:dark}
a{color:var(--acc)}
h1,h2,h3,h4{letter-spacing:-.2px;margin:0}
h1{font-size:24px}h2{font-size:17px;text-transform:none;letter-spacing:-.2px;color:var(--txt);font-weight:650;margin:0 0 10px} /* opera.css h2 is a small uppercase label */h3{font-size:13px;text-transform:uppercase;letter-spacing:.4px;color:var(--mut);font-weight:700;margin-bottom:8px}h4{font-size:14.5px}
p{margin:0}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:6px}
.sr-only{position:absolute!important;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0;padding:0}
.skip{position:absolute;left:-9999px;top:8px;z-index:100;background:var(--card);padding:8px 12px;border-radius:8px}
.skip:focus{left:8px}
.muted{color:var(--mut)}.small{font-size:12.5px}.grow{flex:1;min-width:0}.center-text{text-align:center}
.center{display:grid;place-items:center;min-height:40vh}
.empty{padding:28px 0;text-align:center;color:var(--mut)}
.ic{display:inline-grid;place-items:center;flex:none}.ic svg{width:16px;height:16px}
#app{outline:none}

/* Orbit lockup (sign-in top bar) and symbol (side menu .mark) */
.logo{display:block;height:20px;width:auto;flex:none}
.logo-ring{fill:none;stroke:var(--logo-ring);stroke-width:13;stroke-linecap:round}.logo-orb{fill:var(--logo-orb)}.logo-word{fill:currentColor}

/* loader + splash (ilorb-loader 1.0) */
.ilorb-loader{--ilorb-ring:var(--logo-ring);--ilorb-orb:var(--logo-orb);--ilorb-size:24px;display:inline-block;flex:none;inline-size:var(--ilorb-size);block-size:var(--ilorb-size);line-height:0;vertical-align:middle}
.ilorb-loader svg{display:block;inline-size:100%;block-size:100%;overflow:visible;animation:ilorb-spin 1.1s cubic-bezier(.55,.1,.35,.9) infinite}
.ilorb-loader .ilorb-ring{fill:none;stroke:var(--ilorb-ring);stroke-width:13;stroke-linecap:round}.ilorb-loader .ilorb-orb{fill:var(--ilorb-orb)}
.ilorb-loader--16{--ilorb-size:16px}.ilorb-loader--16 .ilorb-ring{stroke-width:15}.ilorb-loader--24{--ilorb-size:24px}.ilorb-loader--48{--ilorb-size:48px}
.ilorb-loader--current{--ilorb-ring:currentColor;--ilorb-orb:currentColor}
@keyframes ilorb-spin{to{transform:rotate(360deg)}}@keyframes ilorb-pulse{50%{opacity:.35}}
@media (prefers-reduced-motion:reduce){.ilorb-loader svg{animation:none}.ilorb-loader .ilorb-orb{animation:ilorb-pulse 1.6s ease-in-out infinite}}
.ilorb-splash{position:fixed;inset:0;z-index:50;display:grid;place-items:center;background:var(--bg);transition:opacity .3s,visibility .3s}
.ilorb-splash.is-done{opacity:0;visibility:hidden;pointer-events:none}

/* controls */
input,select,textarea{font:inherit;font-size:14px;color:var(--txt);background:var(--card);border:1px solid var(--line);border-radius:8px;padding:7px 10px;min-height:36px;max-width:100%}
textarea{width:100%;resize:vertical}
input:focus,select:focus,textarea:focus{border-color:var(--acc);outline:2px solid var(--acc-soft);outline-offset:0}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--h,38px);padding:0 14px;border-radius:8px;border:1px solid transparent;background:var(--acc);color:var(--acc-ink);font:600 13.5px var(--font);cursor:pointer;text-decoration:none;white-space:nowrap}
.btn:disabled{opacity:.6;cursor:progress}
.btn.sm{min-height:32px;padding:0 10px;font-size:13px}
.btn.block{width:100%}
.btn.ghost{background:transparent;color:var(--txt);border-color:var(--line)}
.btn.ghost:hover{background:var(--acc-soft)}
.btn.danger{background:transparent;color:var(--bad);border-color:var(--bad-soft)}
.btn.danger:hover{background:var(--bad-soft)}
.btn,.icon-btn,.kb-add-btn,button.link,.chip,.member-chip{height:auto}
.icon-btn{display:inline-grid;place-items:center;width:36px;height:36px;border-radius:8px;border:1px solid var(--line);background:var(--card);color:var(--txt);cursor:pointer;padding:0;flex:none}
.icon-btn.sm{width:28px;height:28px;border-color:transparent;background:transparent;color:var(--mut)}
.icon-btn:hover{background:var(--acc-soft);color:var(--txt)}
button.link{background:none;border:0;color:var(--acc);font:inherit;cursor:pointer;padding:0;text-decoration:underline}
.row{display:flex;align-items:center;gap:8px;flex-wrap:nowrap} /* opera.css .row wraps; ours wraps only with .wrap */.row.wrap{flex-wrap:wrap}.row.end{justify-content:flex-end}.row.between{justify-content:space-between}
.stack{display:flex;flex-direction:column;gap:12px}
.field{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600;color:var(--mut)}
.field input,.field select,.field textarea{font-weight:400}
.check{display:flex;align-items:center;gap:8px;font-size:14px;margin-top:8px}
.check input,.items input{width:18px;height:18px;min-height:0;accent-color:var(--acc)}
.grid-form{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:12px;align-items:end}
.grid-form label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600;color:var(--mut)}
.span-all{grid-column:1/-1}
.inline-form{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.inline-form input{flex:1;min-width:140px}
.card-box{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:18px;box-shadow:var(--shadow)}
.form-error{color:var(--bad);font-size:13.5px;min-height:1px}
.pill-soft{font-size:12px;font-weight:600;border-radius:999px;padding:2px 9px;background:var(--acc-soft);color:var(--acc);white-space:nowrap}
.pill-soft.won{background:var(--ok-soft);color:var(--ok)}.pill-soft.lost{background:var(--bad-soft);color:var(--bad)}

/* pages */
section>.card-box+div>.card-box,section>form+div>.card-box{margin-top:12px}
.page{max-width:none;margin:0;padding:6px 0 32px;display:flex;flex-direction:column;gap:22px}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.page-head p{width:100%}
.grow-row{width:100%}
.page-pad{padding:14px 16px 0}
.auth{display:grid;place-items:center;min-height:calc(100vh - 52px - 40px);padding:12px 0}
.auth-box{width:100%;max-width:400px;display:flex;flex-direction:column;gap:14px}
.ws h2{margin-bottom:10px}
.board-grid{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
.board-tile{display:flex;flex-direction:column;justify-content:space-between;gap:16px;min-height:96px;padding:14px;border-radius:12px;text-decoration:none;color:#fff;background:var(--tile,#3b4cca);box-shadow:var(--shadow)}
.board-tile strong{font-size:15.5px}.board-tile span{font-size:12.5px;opacity:.9}
.board-tile:hover{filter:brightness(1.07)}
.new-board h2{margin-bottom:12px}
.new-board .row{margin-top:12px}
.search{position:relative;flex:1;max-width:760px;min-width:260px;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:12px;align-items:center}
.search .search-meta{gap:10px;flex-wrap:nowrap}.search .search-results{grid-column:1/-1}
.search-row{display:flex;align-items:center;gap:6px;background:var(--card);border:1px solid var(--line);border-radius:10px;padding:0 4px 0 10px}
.search-row input{border:0;flex:1;min-width:0}.search-row select{border:0;max-width:150px}
.search-results{list-style:none;margin:6px 0 0;padding:0;display:flex;flex-direction:column;gap:2px}
.search-results a{display:block;padding:8px 10px;border-radius:8px;text-decoration:none;color:var(--txt);background:var(--card);border:1px solid var(--line)}
.rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.rows li{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line);flex-wrap:wrap}
.key{display:block;word-break:break-all;padding:8px;background:var(--col);border-radius:8px;margin-top:6px}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none}
.tabs a{padding:9px 12px;text-decoration:none;color:var(--mut);font-weight:600;font-size:14px;border-bottom:2px solid transparent;white-space:nowrap}
.tabs a.on{color:var(--txt);border-bottom-color:var(--acc)}
.table-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:12px;background:var(--card)}
table{border-collapse:collapse;width:100%;font-size:14px}
th,td{text-align:left;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap}
th{font-size:12.5px;color:var(--mut);text-transform:uppercase;letter-spacing:.3px}
tbody tr:last-child td{border-bottom:0}

/* board page */
.board-page{display:flex;flex-direction:column;height:100%;min-height:0}
.board-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px 6px;flex-wrap:wrap}
.board-title{font-size:19px;font-weight:700;border-color:transparent;background:transparent;min-width:0;width:auto;max-width:60vw}
.board-title:hover{border-color:var(--line)}
.h-board{font-size:20px}
.live-dot{width:10px;height:10px;border-radius:50%;background:var(--line);flex:none;animation:none;margin-right:0;display:inline-block} /* opera.css pulses every .live-dot: ours pulses only when live */
.live-dot.on{background:var(--ok);box-shadow:0 0 0 3px var(--ok-soft)}
.filters{display:flex;align-items:center;gap:8px;padding:6px 16px 10px;flex-wrap:wrap;color:var(--mut)}
.filters .osel{min-width:0;max-width:200px}.filters input.num{width:118px;min-width:0;flex:0 0 118px}
.filter-count{margin-left:auto;white-space:nowrap}
.filters input{min-width:160px;flex:1;max-width:280px}
.summary{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;padding:4px 16px 8px}
.stat{background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:flex;flex-direction:column;gap:2px}
.stat strong{font-size:18px}
.stat-label{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--mut)}
.stat.won strong{color:var(--ok)}.stat.lost strong{color:var(--bad)}

/* kanban */
.kb-root{flex:1;display:flex;min-height:0}
.kb-board{display:flex;align-items:flex-start;gap:12px;overflow-x:auto;padding:4px 16px 16px;flex:1;height:100%;min-height:0;scroll-snap-type:x proximity;scroll-padding:16px}
/* house rule (owner, 14/11): sideways scroll only where it IS the content, and then light and smooth —
   smooth + snapping columns, no rubber-band into the page, a thin scrollbar that only shows on hover/drag */
.kb-board{scroll-behavior:smooth;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scrollbar-width:thin;scrollbar-color:transparent transparent;transition:scrollbar-color .2s}
.kb-board:hover,.kb-board:focus-within{scrollbar-color:var(--scroll) transparent}
.kb-board::-webkit-scrollbar{height:6px}
.kb-board::-webkit-scrollbar-thumb{background:transparent;border:0;border-radius:6px}
.kb-board:hover::-webkit-scrollbar-thumb{background:var(--scroll)}
body.kb-dragging .kb-board{scroll-behavior:auto} /* drag auto-scroll must follow the pointer, not ease */
.kb-col{flex:0 0 280px;background:var(--col);border:1px solid var(--line);border-radius:12px;display:flex;flex-direction:column;max-height:100%;scroll-snap-align:start;border-top:3px solid var(--col-accent,var(--line))}
.kb-col-head{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:10px 8px 6px 12px}
.kb-col-title{display:flex;align-items:center;gap:8px;min-width:0}
.kb-col-title h3{margin:0;text-transform:none;letter-spacing:0;font-size:14.5px;color:var(--txt);overflow-wrap:anywhere} /* long names wrap: never cut, never widen the column */
.kb-col-head{min-width:0}.kb-col-title{flex:1 1 auto}.kb-tools{flex:none}
.kb-col-name{all:unset;cursor:text;border-radius:6px;padding:1px 3px;margin:-1px -3px;min-width:0}
.kb-col-name:hover{background:var(--card)}.kb-col-name:focus-visible{outline:2px solid var(--acc)}
.kb-col-name-input{height:30px;font-size:14.5px;font-weight:700;width:100%;min-width:0}
.kb-count{font-size:12px;font-weight:700;color:var(--mut);background:var(--card);border-radius:999px;padding:0 7px}
.kb-tools{display:flex;gap:0}
.kb-col-meta{padding:0 12px 6px;font-size:13px}
.stage-rows li{gap:8px;flex-wrap:wrap}
.stage-rows input.grow{min-width:0;flex:1}
.swatch{width:36px;height:36px;padding:2px;border:1px solid var(--line);border-radius:8px;background:var(--card);cursor:pointer;flex:none}
.deal-lost{margin:2px 0 0;font-style:italic;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.stage-total{display:flex;align-items:center;gap:8px;justify-content:space-between}
.stage-total.won strong{color:var(--ok)}.stage-total.lost strong{color:var(--bad)}
.kb-list{list-style:none;margin:0;padding:4px 8px 8px;display:flex;flex-direction:column;gap:8px;overflow-y:auto;min-height:12px}
.kb-card{background:var(--card);border:1px solid var(--line);border-radius:10px;padding:9px 10px;box-shadow:var(--shadow);cursor:grab;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;display:flex;flex-direction:column;gap:6px;touch-action:manipulation}
.kb-card:hover{border-color:color-mix(in srgb,var(--acc) 40%,var(--line))}
.kb-card-title{font-size:14px;line-height:1.35;overflow-wrap:anywhere}
.kb-card-title.done{text-decoration:line-through;color:var(--mut)}
.kb-card-foot{display:flex;align-items:center;justify-content:space-between;gap:6px}
.kb-placeholder{opacity:.35;border-style:dashed}
.kb-col-grip{cursor:grab;touch-action:pan-x pan-y}
.kb-col-placeholder{opacity:.35;outline:2px dashed var(--line);outline-offset:-2px}
.kb-ghost{position:fixed;left:0;top:0;z-index:60;pointer-events:none;box-shadow:var(--shadow-lg);opacity:.96;cursor:grabbing}
.kb-grabbed{outline:3px solid var(--acc);outline-offset:1px;transform:scale(1.02)}
body.kb-dragging,body.kb-dragging *{cursor:grabbing!important}
.kb-add{padding:0 8px 8px}
.kb-add-btn{width:100%;display:flex;align-items:center;gap:6px;background:none;border:0;color:var(--mut);font:600 13.5px var(--font);padding:8px;border-radius:8px;cursor:pointer;text-align:left}
.kb-add-btn:hover{background:var(--acc-soft);color:var(--txt)}
.kb-add-form{display:flex;flex-direction:column;gap:6px}
.kb-new-list{background:transparent;border-style:dashed;padding:10px;gap:8px;border-top-width:1px}
.badges{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.badge{display:inline-flex;align-items:center;gap:3px;font-size:12px;color:var(--mut);border-radius:6px;padding:1px 4px;text-decoration:none}
.badge .ic svg{width:13px;height:13px}
.badge.due.overdue{background:var(--bad-soft);color:var(--bad);font-weight:600}
.badge.due.soon{background:var(--warn-soft);color:var(--warn);font-weight:600}
.badge.due.done,.badge.ok{background:var(--ok-soft);color:var(--ok)}
.badge.src{background:var(--acc-soft);color:var(--acc)}
.deal-value{font-weight:700;font-size:15px}
.deal-who{display:flex;flex-wrap:wrap;gap:10px}.deal-who span{display:inline-flex;align-items:center;gap:3px}
.deal-who .ic svg{width:13px;height:13px}

/* the open card is a screen over the board (not a modal); long lists scroll inside their own area so the
   screen never grows without limit (owner, 14/11): activity, comments, attachments, checklist items */
.card-screen{height:100%;overflow-y:auto;overscroll-behavior:contain;padding:14px 16px 24px;outline:none}
.cs-head{display:flex;align-items:center;gap:10px;margin-bottom:14px}
.cs-title{flex:1;min-width:0}
.card-screen .activity,.card-screen .comments,.card-screen .attachments,.card-screen .checklist .items{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;padding-right:4px}
.card-screen .activity{max-height:340px}
.card-screen .comments{max-height:340px}
.card-screen .attachments{max-height:280px}
.card-screen .chk-items{max-height:280px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.card-screen .cd-side{align-self:start;position:sticky;top:0}
@media (max-width:640px){.card-screen{padding:6px 2px 24px}.card-screen .activity{max-height:60dvh}.card-screen .cd-side{position:static}}

/* custom fields */
.kb-fields{display:flex;flex-wrap:wrap;gap:4px}
.kb-field{background:var(--bg);border:1px solid var(--line);color:var(--txt)}
.cf-filter-val{display:contents}
.cf-section .cf-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px;margin-top:6px}
.req{color:var(--bad)}
.cf-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.cf-row{display:flex;flex-direction:column;gap:10px}
.cf-row-head{display:flex;align-items:center;gap:10px}.cf-row-head input{flex:1;min-width:0;font-weight:600}
.cf-flags{gap:16px;align-items:flex-end}.cf-flags .check{margin-top:0}
.cf-default{min-width:200px;max-width:320px}
.cf-opts{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}.cf-opts li{gap:8px}.cf-opts input{flex:1;min-width:0}.cf-opts .osel{max-width:140px}
.cf-new{display:grid;grid-template-columns:minmax(0,1fr) 220px auto;gap:10px;align-items:center}
@media (max-width:640px){.cf-new{grid-template-columns:1fr}.cf-row-head{flex-wrap:wrap}.cf-row-head input{flex-basis:100%}}

/* list tables become stacked cards on phones (house rule: no sideways scroll; the label sits next to the value) */
@media (max-width:640px){
  .table-wrap{overflow:visible;border:0;background:none}
  .table-wrap thead{display:none}
  .table-wrap table,.table-wrap tbody{display:block}
  .table-wrap tr{display:block;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:6px 12px;margin-bottom:8px}
  .table-wrap td{display:flex;justify-content:space-between;align-items:baseline;gap:12px;border:0;padding:5px 0;white-space:normal;text-align:right;overflow-wrap:anywhere}
  .table-wrap td::before{content:attr(data-label);color:var(--mut);font-size:12.5px;text-align:left;flex:none}
  .list-filters{grid-template-columns:1fr 1fr}
}
.list-filters input[type=search]{flex:1;min-width:200px;max-width:360px}

/* copy section + archive */
.copy-sec{display:flex;flex-direction:column;gap:8px}.copy-body{gap:8px}.copy-keep{gap:4px}.copy-keep .check{margin-top:0}
.cd-danger{gap:8px}
.arch-rows li{gap:8px;flex-wrap:wrap}

/* board Share side panel (not a modal) */
.board-page{position:relative}
.share-panel{position:absolute;top:0;right:0;bottom:0;width:min(420px,100%);background:var(--card);border-left:1px solid var(--line);box-shadow:var(--shadow-lg);z-index:30;overflow-y:auto;overscroll-behavior:contain;padding:14px 16px 24px;display:flex;flex-direction:column;gap:16px;outline:none}
.sp-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.sp-head h2{margin:0}
.sp-sec{display:flex;flex-direction:column;gap:8px}.sp-sec h3{margin:0}
.sp-invite{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px;align-items:center}
.sp-invite input{min-width:0}
.sp-link{display:flex;flex-direction:column;gap:6px}
.sp-note{display:flex;flex-direction:column;gap:4px}
.sp-people li{gap:10px;flex-wrap:nowrap}.sp-people .osel{max-width:140px}
@media (max-width:640px){.share-panel{position:fixed;top:52px;width:100%;border-left:0}.sp-invite{grid-template-columns:1fr 1fr}.sp-invite input{grid-column:1/-1}}

/* CRM deal page, timeline, activities (milestones 1-2) */
.deal-page{gap:14px}
.deal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;flex-wrap:wrap}
.deal-title{font-size:22px;margin:0;overflow-wrap:anywhere}
.deal-sub{gap:10px;margin-top:4px;align-items:center}
.deal-actions{align-items:flex-end;gap:10px}
.field.inline{min-width:200px}
.deal-grid{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:14px;align-items:start}
.deal-main,.deal-side{display:flex;flex-direction:column;gap:14px;min-width:0}
.deal-form .grid-form{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.kv{display:grid;grid-template-columns:auto minmax(0,1fr);gap:4px 12px;margin:0;font-size:13.5px}.kv dt{color:var(--mut)}.kv dd{margin:0;overflow-wrap:anywhere}
.timeline{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px;max-height:620px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.tl{display:flex;align-items:flex-start;gap:10px;padding:8px 4px;border-radius:8px}
.tl-dot{flex:none;width:10px;height:10px;border-radius:50%;margin-top:6px;background:var(--line2)}
.tl-note .tl-dot{background:var(--acc)}.tl-stage .tl-dot{background:var(--sky,#0284c7)}.tl-won .tl-dot{background:var(--ok)}.tl-lost .tl-dot{background:var(--bad)}
.tl-activity_done .tl-dot{background:var(--ok)}.tl-msg .tl-dot{background:#25d366}
.tl-body{flex:1;min-width:0}.tl-body p{margin:2px 0 0;overflow-wrap:anywhere}
.msg-bubble{display:inline-block;max-width:100%;padding:6px 10px;border-radius:10px;background:var(--bg);border:1px solid var(--line);white-space:pre-wrap}
.tl-msg.out .msg-bubble{background:var(--acc-soft);border-color:transparent}
.act-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.act-row{display:flex;align-items:center;gap:10px;padding:8px 6px;border-radius:8px}
.act-row:hover{background:var(--bg)}
.act-row.done .act-title{text-decoration:line-through;color:var(--mut)}
.act-title{font-weight:600;font-size:14px;overflow-wrap:anywhere}
.act-ic{flex:none;display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;background:var(--acc-soft);color:var(--acc)}
.act-call .ic,.act-call{color:var(--ok)}.act-ic.act-call{background:var(--ok-soft)}.act-ic.act-meeting{background:var(--warn-soft);color:var(--warn)}
.act-form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:center}
.act-form>input:not([type]){grid-column:1/-1}.act-form>input[type=datetime-local]{min-width:0;width:100%}
.act-form>.osel,.act-form>select{min-width:0;width:100%}.act-form>button{justify-self:start}
.act-form .osel{min-width:0}
@media (max-width:1100px){.deal-grid{grid-template-columns:1fr}}
@media (max-width:640px){.deal-actions{width:100%}.field.inline{flex:1}}

/* checklists (owner, 14/11): grouped surfaces, progress bar (green when complete), clean item rows */
.chk{background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:flex;flex-direction:column;gap:10px;margin-bottom:10px}
.chk-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.chk-title{margin:0;font-size:15px;font-weight:650;overflow-wrap:anywhere}
.chk-count{font-size:12.5px;color:var(--mut);font-variant-numeric:tabular-nums}
.chk-actions{margin-left:auto;display:flex;align-items:center;gap:6px}
.chk-bar{height:6px;border-radius:999px;background:var(--line);overflow:hidden}
.chk-fill{display:block;height:100%;border-radius:inherit;background:var(--acc);transition:width .25s ease,background .25s}
.chk.complete .chk-fill{background:var(--ok)}
.chk-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.chk-item{display:flex;align-items:center;gap:10px;padding:6px 6px;border-radius:8px;min-height:38px;flex-wrap:wrap}
.chk-item:hover,.chk-item:focus-within{background:var(--card)}
.chk-text{flex:1;min-width:0;font-size:14px;overflow-wrap:anywhere;cursor:pointer}
.chk-item.done .chk-text{text-decoration:line-through;color:var(--mut)}
.chk-meta{display:inline-flex;align-items:center;gap:6px}
.chk-item-actions{display:none;align-items:center;gap:6px}
.chk-item:hover .chk-item-actions,.chk-item:focus-within .chk-item-actions{display:flex}
.chk-item-actions .osel{max-width:150px}.chk-due{height:30px;font-size:12.5px;width:auto}
.chk-add{display:flex;gap:8px}.chk-add input{flex:1;min-width:0}
.chk-hidden{margin:0}
/* themed checkbox (both themes) */
input.chk-box{appearance:none;-webkit-appearance:none;flex:none;width:18px;height:18px;min-height:0;max-width:none;margin:0;border:1.6px solid var(--line2);border-radius:5px;background:var(--card);display:inline-grid;place-items:center;cursor:pointer;transition:background .12s,border-color .12s;padding:0}
input.chk-box::after{content:"";width:9px;height:5px;border-left:2px solid var(--on-acc,#fff);border-bottom:2px solid var(--on-acc,#fff);transform:rotate(-45deg) translate(1px,-1px);opacity:0}
input.chk-box:checked{background:var(--acc);border-color:var(--acc)}input.chk-box:checked::after{opacity:1}
input.chk-box:focus-visible{outline:2px solid var(--acc);outline-offset:2px}
input.chk-box.sm{width:15px;height:15px;border-radius:4px}input.chk-box.sm::after{width:7px;height:4px}
/* checklist on the card front: compact, tickable */
.kb-chk{display:flex;flex-direction:column;gap:3px;padding:6px 8px;border-radius:8px;background:var(--bg);border:1px solid var(--line);cursor:default}
.kb-chk-head{display:flex;align-items:center;gap:6px;font-size:12.5px;font-weight:600;min-width:0}
.kb-chk-head .ic svg{width:13px;height:13px}.kb-chk.complete .kb-chk-head{color:var(--ok)}
.kb-chk-title{flex:1;min-width:0;overflow-wrap:anywhere}
.kb-chk-count{font-size:11.5px;color:var(--mut);font-variant-numeric:tabular-nums}
.kb-chk-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px}
.kb-chk-items li{display:flex;align-items:flex-start;gap:7px;font-size:12.5px;line-height:1.3;padding:2px 0}
.kb-chk-items li .chk-box{margin-top:1px}
.kb-chk-items li label{flex:1;min-width:0;overflow-wrap:anywhere;cursor:pointer}
.kb-chk-items li.done label{text-decoration:line-through;color:var(--mut)}
.kb-chk-more{all:unset;font-size:12px;color:var(--acc);cursor:pointer;padding:2px 0}.kb-chk-more:hover{text-decoration:underline}
.kb-chk-more:focus-visible{outline:2px solid var(--acc);border-radius:4px}
@media (max-width:640px){.chk-item-actions{display:flex;width:100%;padding-left:28px}}

/* files on the card + viewer (owner, 14/11) */
.kb-cover{display:block;width:calc(100% + 20px);margin:-9px -10px 0;padding:0;border:0;background:var(--col);border-radius:10px 10px 0 0;overflow:hidden;cursor:zoom-in;height:auto}
.kb-cover img{display:block;width:100%;max-height:180px;object-fit:cover}
.kb-files{display:flex;flex-direction:column;gap:4px}
.kb-file{display:flex;align-items:center;gap:8px;width:100%;min-width:0;padding:5px 6px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--txt);text-decoration:none!important;font-weight:400;height:auto;cursor:pointer;text-align:left}
.kb-file:hover{border-color:var(--line2)}
.kb-more{align-self:flex-start}
.ft-ic{flex:none;display:inline-grid;place-items:center;width:30px;height:30px;border-radius:6px;background:var(--acc-soft);color:var(--acc);font-size:10px;font-weight:800;letter-spacing:.3px}
.ft-ic.ft-pdf{background:var(--bad-soft);color:var(--bad)}.ft-ic.ft-video,.ft-ic.ft-audio{background:var(--ok-soft);color:var(--ok)}
.ft-meta{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.ft-name{font-size:12.5px;overflow-wrap:anywhere}.ft-size{font-size:11px;color:var(--mut)}
.att-open{padding:0;border:0;background:none;height:auto;cursor:zoom-in;border-radius:6px;flex:none}
.att-open .file-ic{width:64px;height:48px}
.viewer{border:0;padding:0;margin:0;width:100vw;height:100dvh;max-width:100vw;max-height:100dvh;background:rgba(8,10,14,.94);color:#f2f4f7}
.viewer::backdrop{background:rgba(8,10,14,.6)}
.viewer[open]{display:flex;flex-direction:column}
.vw-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.08)}
.vw-head{display:flex;align-items:baseline;gap:10px;min-width:0}
.vw-title{font-weight:600;overflow-wrap:anywhere}
.vw-count{color:#aab2bf;font-size:13px;white-space:nowrap}
.viewer .icon-btn,.viewer .btn.ghost{background:rgba(255,255,255,.08);color:#f2f4f7;border-color:rgba(255,255,255,.14)}
.vw-body{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;gap:10px;padding:14px}
.vw-stage{flex:1;min-width:0;height:100%;display:flex;align-items:center;justify-content:center}
.vw-img{max-width:100%;max-height:100%;object-fit:contain;border-radius:6px}
.vw-pdf{width:100%;height:100%;border:0;border-radius:6px;background:#fff}
.vw-media{max-width:100%;max-height:100%;border-radius:6px;background:#000}
.vw-audio,.vw-other{display:flex;flex-direction:column;align-items:center;gap:14px;text-align:center}
.vw-tile{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:12px;background:rgba(255,255,255,.08)}
.vw-tile .ft-size{color:#aab2bf}
.vw-nav{flex:none;width:44px;height:44px}
@media (max-width:640px){.vw-nav{position:absolute;bottom:18px}.vw-prev{left:18px}.vw-next{right:18px}.vw-body{padding:8px;position:relative}}

/* chips (labels) — fixed palette, readable in both themes */
.chips{display:flex;flex-wrap:wrap;gap:4px}
.chip{display:inline-flex;align-items:center;min-height:18px;min-width:36px;padding:0 8px;border-radius:5px;font-size:12px;font-weight:600;color:#fff;border:0;background:var(--chip,#6b7280)}
.chips.pick .chip{min-height:30px;cursor:pointer;opacity:.55;font-size:13px}
.chips.pick .chip.on{opacity:1;box-shadow:0 0 0 2px var(--card),0 0 0 4px var(--chip)}
.c-green{--chip:#1f7a46;--tile:#1f7a46}.c-yellow{--chip:#8a6a00;--tile:#8a6a00}.c-orange{--chip:#b5530b;--tile:#b5530b}.c-red{--chip:#b42318;--tile:#b42318}
.c-purple{--chip:#6b3fc4;--tile:#6b3fc4}.c-blue{--chip:#1d5fc2;--tile:#1d5fc2}.c-sky{--chip:#0e7490;--tile:#0e7490}.c-lime{--chip:#4d7c0f;--tile:#4d7c0f}
.c-pink{--chip:#be185d;--tile:#be185d}.c-gray{--chip:#566070;--tile:#566070}.c-indigo{--chip:#3b4cca;--tile:#3b4cca}
.member-chip{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:var(--card);color:var(--txt);border-radius:999px;padding:3px 10px 3px 3px;cursor:pointer;font:13px var(--font);min-height:32px}
.member-chip.on{border-color:var(--acc);background:var(--acc-soft)}
.avatar{display:inline-grid;place-items:center;width:30px;height:30px;border-radius:50%;font-size:12px;font-weight:700;color:#fff;flex:none;background:var(--av)}
.avatar.sm{width:24px;height:24px;font-size:10.5px}
.avatars{display:flex}.avatars .avatar+.avatar{margin-left:-6px;box-shadow:0 0 0 2px var(--card)}
.tone-0{--av:#3b4cca}.tone-1{--av:#1f7a46}.tone-2{--av:#b5530b}.tone-3{--av:#6b3fc4}.tone-4{--av:#0e7490}.tone-5{--av:#be185d}.tone-6{--av:#566070}.tone-7{--av:#1d5fc2}

/* dialogs */
.dlg{border:1px solid var(--line);border-radius:16px;padding:0;background:var(--card);color:var(--txt);width:min(520px,calc(100vw - 24px));max-height:calc(100vh - 32px);box-shadow:var(--shadow-lg)}
.dlg.wide{width:min(920px,calc(100vw - 24px))}
.dlg::backdrop{background:rgba(10,12,16,.45)}
.dlg-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--card);z-index:2}
.dlg-title{font-size:17px;flex:1;min-width:0}
.dlg-body{padding:16px;display:flex;flex-direction:column;gap:14px}
.card-title-input{width:100%;font-size:17px;font-weight:700;border-color:transparent;padding-left:4px}
.card-title-input:hover{border-color:var(--line)}
.card-detail{display:grid;grid-template-columns:minmax(0,1fr) 250px;gap:22px}
.cd-main,.cd-side{display:flex;flex-direction:column;gap:20px;min-width:0}
.cd-side .field{margin-bottom:8px}
.cd-side select,.cd-side input[type=date]{width:100%}
.checklist{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
progress{width:100%;height:6px;accent-color:var(--acc)}
.items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
.items li{display:flex;align-items:center;gap:8px;padding:4px 0}
.items li label{flex:1;font-size:14px}
.items li.done label{text-decoration:line-through;color:var(--mut)}
.attachments,.comments,.activity,.label-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.attachments li,.comments li{display:flex;gap:10px;align-items:flex-start}
.thumb{width:64px;height:48px;object-fit:cover;border-radius:6px;border:1px solid var(--line)}
.file-ic{display:grid;place-items:center;width:64px;height:48px;border-radius:6px;background:var(--col)}
.cmt-body{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;margin-top:2px}
.activity li{display:flex;flex-direction:column;font-size:13.5px;gap:1px}
.label-list li{display:flex;align-items:center;gap:8px}.label-list input{flex:1}
.ext{display:flex;align-items:center;gap:6px;font-size:13.5px;background:var(--acc-soft);padding:8px 10px;border-radius:8px;flex-wrap:wrap}

/* toasts */
.toasts{position:fixed;bottom:16px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:200;width:min(420px,calc(100vw - 32px))}
/* opera.css has its own single .toast (display:none until shown); ours stack in .toasts and are always shown */
.toasts .toast{display:block;position:static;border:0;z-index:auto;background:var(--txt);color:var(--bg);padding:10px 14px;border-radius:10px;font-size:14px;box-shadow:var(--shadow-lg)}
.toasts .toast.error{background:var(--bad);color:#fff}

/* phones (390) */
@media (max-width:640px){
  .page{padding:2px 0 32px;gap:18px}
  h1{font-size:21px}
  .body.full{overflow-y:auto}
  .board-page{height:auto}
  .kb-board{padding:4px 12px 20px;scroll-snap-type:x mandatory;height:auto}
  .kb-col{flex-basis:calc(100vw - 56px);max-height:none}
  .kb-list{overflow:visible}
  .summary{grid-template-columns:repeat(2,minmax(0,1fr));padding:4px 12px 8px}
  .filters{padding:6px 12px 10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .filters>.ic,.filters>.i{display:none}.filters input.num{width:100%;flex:none}.filters input[type=search]{grid-column:1/-1}.filters input,.filters .osel{width:100%;max-width:none;min-width:0;flex:none}
  .filters .filter-count{grid-column:1/-1;margin-left:0;text-align:right}
  .board-bar{padding:10px 12px 4px}
  .board-bar>.row.grow{flex:1 1 100%;min-width:0} /* the title gets the whole line; buttons go below (never cut text) */
  .board-title{max-width:none;width:100%;min-width:0}
  .card-detail{grid-template-columns:1fr}
  .dlg,.dlg.wide{width:100vw;max-width:100vw;max-height:100dvh;height:100dvh;border-radius:0;margin:0}
  .search{min-width:0;max-width:none;width:100%;grid-template-columns:minmax(0,1fr)}
  .grid-form{grid-template-columns:1fr}
  th,td{padding:8px 10px}
}

/* CRM milestone 4: pipelines, probability, lost reasons, deal fields */
.stat.weighted strong{color:var(--acc)}
.pill-soft.prob{background:transparent;border:1px solid var(--line);color:var(--mut);font-variant-numeric:tabular-nums}
.deal-fields{display:flex;flex-wrap:wrap;gap:4px;margin:2px 0}.deal-fields .chip{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.filters input.num-wide{width:150px;min-width:0;flex:0 0 150px}
.board-bar .osel,.board-bar select{max-width:240px}
.reason-set{border:0;margin:0;padding:0;gap:6px}.reason-set legend{font-weight:600;margin-bottom:6px;padding:0}
.radio-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--line);border-radius:10px;cursor:pointer}
.radio-row:has(input:checked){border-color:var(--acc);background:var(--acc-soft)}
.radio-row input{width:auto;height:auto;margin:0;flex:none}
.settings-page{max-width:980px}
.set-section .rows li{gap:8px;align-items:center}
.set-rows input.grow{min-width:140px;flex:1 1 180px}
.prob-wrap{gap:4px;flex:none}.prob-in{width:76px;flex:none}
.add-row{gap:8px}.add-row input.grow{min-width:160px;flex:1 1 200px}.add-row .prob-in{width:76px}
.set-jump{display:flex;flex-wrap:wrap;gap:6px}.set-jump .chip{cursor:pointer;border:0;font:inherit}
.set-section{scroll-margin-top:72px}
@media (max-width:720px){
  .summary .stat.weighted{grid-column:1/-1}
  .filters input.num-wide{width:100%;flex:none}
  .set-rows input.grow,.add-row input.grow{flex:1 1 100%}
}

/* CRM milestone 6: reports. Series colours validated for both themes (dataviz validator: light #2a78d6/#eb6834 on
   #fff, dark #3987e5/#d95926 on #121820 — all checks pass). Text never wears the series colour. */
:root[data-theme="light"]{--viz-1:#2a78d6;--viz-2:#eb6834;--viz-grid:#e1e0d9}
:root[data-theme="dark"]{--viz-1:#3987e5;--viz-2:#d95926;--viz-grid:#2c2c2a}
.reports-page .rep-filters{padding:0}
.rep-kpis{padding:0;margin:4px 0 14px}
.rep-body[aria-busy=true]{opacity:.6;transition:opacity .2s}
.rep-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-bottom:14px}
.rep-card{min-width:0}
.rep-empty{padding:18px 0}
.hbars{display:flex;flex-direction:column;gap:8px}
.hbar-row{display:grid;grid-template-columns:minmax(80px,30%) minmax(0,1fr) auto;align-items:center;gap:10px}
.hbar-label{font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hbar-track{display:flex;align-items:center;gap:8px;min-width:0;width:100%}
.hbar{display:block;height:14px;min-width:2px;width:calc((100% - 96px) * var(--w, 0) / 100);border-radius:0 4px 4px 0;background:var(--viz-1);flex:none;cursor:default;outline-offset:2px}
.hbar.s2{background:var(--viz-2)}
.hbar-val{font-size:12px;font-weight:600;white-space:nowrap;font-variant-numeric:tabular-nums}
.hbar-extra{white-space:nowrap}
.viz-legend{display:flex;flex-wrap:wrap;gap:14px;list-style:none;margin:0 0 8px;padding:0;font-size:12px;color:var(--mut)}
.viz-legend li{display:inline-flex;align-items:center;gap:6px}
.sw{width:10px;height:10px;border-radius:2px;background:var(--viz-1)}.sw.s2{background:var(--viz-2)}
.cols{display:flex;align-items:flex-end;gap:6px;height:190px;border-bottom:1px solid var(--viz-grid);padding-top:4px}
.col-group{flex:1 1 0;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:4px}
.col-bars{flex:1;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px}
.col{display:block;flex:0 1 14px;min-width:3px;border-radius:4px 4px 0 0;background:var(--viz-1);outline-offset:2px}
.col.s2{background:var(--viz-2)}.col.zero{min-height:0}
.col-label{height:16px;line-height:16px;white-space:nowrap;margin-bottom:-22px}
.col-label.skip{visibility:hidden}
.cols-wrap{padding-bottom:24px}
.viz-tip{position:fixed;z-index:60;pointer-events:none;max-width:280px;background:var(--txt);color:var(--card);font-size:12px;line-height:1.35;padding:6px 9px;border-radius:8px;box-shadow:var(--shadow-lg)}
.viz-table summary{cursor:pointer;font-size:13px;color:var(--acc);width:max-content}
.viz-table .table-wrap{margin-top:8px}
.ext.warn{color:var(--mut)}
@media (max-width:1100px){.rep-grid{grid-template-columns:minmax(0,1fr)}}
@media (max-width:720px){
  .rep-kpis .stat.weighted{grid-column:auto}.rep-kpis .stat.acts{grid-column:1/-1}
  .hbar-row{grid-template-columns:minmax(0,1fr) auto;row-gap:2px}
  .hbar-row .hbar-label{grid-column:1/-1}
  .cols{height:150px;gap:3px}
}
.viz-table th{white-space:normal}

/* Boards notifications: the bell, the menu badge, the screen */
.bell{position:relative}
.bell-badge{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--bad);color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;box-shadow:0 0 0 2px var(--card)}
.nav-badge{margin-left:auto;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--bad);color:#fff;font-size:11px;font-weight:700;line-height:20px;text-align:center}
.ntf-page{max-width:880px}
.ntf-group{margin-bottom:14px}
.ntf-day{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;color:var(--mut);margin:6px 0 8px}
.ntf-rows{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:6px}
.ntf-row{width:100%;height:auto;min-height:0;line-height:1.4;white-space:normal;justify-content:flex-start;display:flex;align-items:flex-start;gap:12px;text-align:left;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:12px 14px;cursor:pointer;color:inherit;font:inherit}
.ntf-row:hover{border-color:var(--line2)}
.ntf-row.unread{border-color:var(--acc);background:var(--acc-soft)}
.ntf-ic{flex:none;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--col);color:var(--mut)}
.ntf-ic.k-due{color:var(--bad)}.ntf-ic.k-mention{color:var(--acc)}
.ntf-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.ntf-text{font-weight:600;overflow-wrap:anywhere}
.ntf-excerpt{overflow-wrap:anywhere}
.ntf-dot{flex:none;width:9px;height:9px;border-radius:50%;background:var(--acc);margin-top:6px}
.ntf-prefs{display:flex;flex-direction:column;gap:10px}
.ntf-pref{align-items:flex-start;gap:10px;flex-wrap:nowrap}.ntf-pref>span{overflow-wrap:anywhere}

/* CRM milestone 3: tags, duplicates, CSV import */
.tag-chip{display:inline-flex;align-items:center;gap:4px}
.chip-x{border:0;background:transparent;color:inherit;padding:0;width:16px;height:16px;display:inline-grid;place-items:center;cursor:pointer;border-radius:50%}
.chip-x svg{width:12px;height:12px}
textarea.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}
.dup-group .radio-row span{overflow-wrap:anywhere}

/* Sign in with Ilorb Account */
.oidc-btn{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:4px}
.auth-or{display:flex;align-items:center;gap:10px;margin:6px 0}.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:var(--line)}

/* Board views: segmented switch, table, calendar (competitor P0 #3) */
.seg{display:inline-flex;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--card)}
.seg-btn{height:32px;padding:0 10px;border:0;background:transparent;color:var(--mut);font:inherit;font-size:13px;display:inline-flex;align-items:center;gap:6px;cursor:pointer}
.seg-btn+.seg-btn{border-left:1px solid var(--line)}
.seg-btn[aria-pressed=true]{background:var(--acc-soft);color:var(--acc);font-weight:600}
.seg-btn span.i svg,.seg-btn svg{width:15px;height:15px}
.view-root{padding:4px 16px 24px}
.cards-table td{vertical-align:top}.cards-table .chips{flex-wrap:wrap}
.th-sort{border:0;background:transparent;font:inherit;font-weight:700;text-transform:inherit;letter-spacing:inherit;color:inherit;padding:0;cursor:pointer;height:auto;white-space:nowrap}
.link-btn{border:0;background:transparent;padding:0;height:auto;font:inherit;color:var(--acc);text-align:left;cursor:pointer;white-space:normal}
.cal-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}.cal-title{font-size:17px;min-width:160px;text-align:center;text-transform:capitalize}
.cal-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--line);gap:1px}
.cal-wd{background:var(--card);padding:6px 8px;font-size:12px;font-weight:700;color:var(--mut);text-transform:capitalize}
.cal-day{background:var(--card);min-height:112px;padding:6px;display:flex;flex-direction:column;gap:3px;min-width:0}
.cal-day.other{background:var(--bg)}.cal-day.other .cal-num{opacity:.5}
.cal-day.today .cal-num{background:var(--acc);color:var(--acc-ink);border-radius:999px;padding:0 7px}
.cal-day.drop{outline:2px dashed var(--acc);outline-offset:-3px}
.cal-num{font-size:12px;font-weight:700;align-self:flex-start}
.cal-chip{display:block;width:100%;height:auto;min-height:22px;text-align:left;font:inherit;font-size:12px;line-height:1.3;padding:3px 6px;border-radius:6px;border:1px solid var(--line);background:var(--col);color:var(--txt);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
.cal-chip.done{text-decoration:line-through;opacity:.7}
.cal-chip[class*=" c-"]{border-left-width:4px}
.cal-agenda{display:none;list-style:none;margin:0;padding:0}
.cal-agenda-empty{display:none}
@media (max-width:720px){
  .cal-grid{display:none}.cal-agenda{display:flex;flex-direction:column;gap:10px}.cal-agenda-empty{display:block}
  .cal-agenda li{display:flex;flex-direction:column;gap:6px;background:var(--card);border:1px solid var(--line);border-radius:12px;padding:10px}
  .cal-agenda .cal-chip{white-space:normal}
  .view-root{padding:4px 12px 24px}
  .board-bar .seg{order:-1}
}

/* Templates gallery, More menu */
.tpl-h{font-size:15px;margin:6px 0 0}
.tpl-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:10px}
.tpl-tile{display:flex;flex-direction:column;align-items:flex-start;gap:4px;height:auto;min-height:96px;padding:12px;text-align:left;white-space:normal;border:1px solid var(--line);border-radius:12px;background:var(--card);color:var(--txt);font:inherit;cursor:pointer}
.tpl-tile:hover{border-color:var(--line2)}
.tpl-tile.on{border-color:var(--acc);box-shadow:0 0 0 2px var(--acc-soft);background:var(--acc-soft)}
.tpl-lists{color:var(--mut);overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.more-menu{position:relative}.more-menu>summary{list-style:none;cursor:pointer}.more-menu>summary::-webkit-details-marker{display:none}
.more-list{position:absolute;right:0;top:calc(100% + 6px);z-index:30;min-width:220px;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow-lg);padding:6px;display:flex;flex-direction:column}
.more-list a{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:8px;color:var(--txt);text-decoration:none;font-size:14px}
.more-list a:hover{background:var(--col)}
.tpl-pick .btn{justify-content:flex-start}
ol.steps{margin:0;padding-left:18px}
@media (max-width:720px){.more-list{right:auto;left:0}}

/* CRM milestone 5: deal products, quotes (screen, print/PDF, the customer's page), product catalogue */
.pill-soft.draft{background:var(--col);color:var(--mut)}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px}
.num-in{width:96px;min-width:0;text-align:right;font-variant-numeric:tabular-nums}
.num-in.qty,.num-in.pct{width:72px}
.lines-table td,.lines-table th{vertical-align:middle}
.lines-table th.num,.qd-table th.num,.qd-table td.num{text-align:right}
.lines-table td:first-child{min-width:180px}
.lines-table td:first-child input{width:100%}
.act-cell{width:40px;text-align:right}
.row.nowrap{flex-wrap:nowrap}
.line-add select{flex:1 1 240px;min-width:0;max-width:420px}
.line-add input.grow{flex:1 1 180px}
.quote-rows li{gap:10px}
.quote-rows .num{font-variant-numeric:tabular-nums}
.notice{margin:0;padding:10px 14px;border-radius:10px;background:var(--warn-soft);color:var(--txt);border:1px solid var(--line)}
.qd-totals{display:grid;grid-template-columns:auto auto;justify-content:end;gap:4px 24px;margin:0;font-variant-numeric:tabular-nums}
.qd-totals dt{color:var(--mut);text-align:right}.qd-totals dd{margin:0;text-align:right}
.qd-totals .qd-grand{font-size:17px;font-weight:750;color:var(--txt);padding-top:6px;border-top:1px solid var(--line)}
.qd-totals.compact .qd-grand{font-size:15px}

.quote-doc{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:28px;display:flex;flex-direction:column;gap:20px;max-width:900px;width:100%;margin:0 auto;box-shadow:var(--shadow)}
.qd-head{display:flex;justify-content:space-between;gap:24px;flex-wrap:wrap;padding-bottom:16px;border-bottom:1px solid var(--line)}
.qd-from{display:flex;flex-direction:column;gap:2px;min-width:0;max-width:60%}
.qd-logo{max-width:180px;max-height:64px;object-fit:contain;align-self:flex-start;margin-bottom:6px}
.qd-company{font-size:18px}
.qd-meta{display:flex;flex-direction:column;align-items:flex-end;gap:4px;text-align:right}
.qd-kind{font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.6px;color:var(--mut)}
.qd-number{font-size:22px;font-weight:750}
.qd-dates{display:grid;grid-template-columns:auto auto;gap:2px 12px;margin:0;font-size:13px}.qd-dates dt{color:var(--mut)}.qd-dates dd{margin:0}
.qd-status{margin-top:4px}
.qd-to{display:flex;flex-direction:column;gap:2px}
.qd-title{margin:0;font-size:19px}
.qd-table table{width:100%}
.qd-table .strong{font-weight:700}
.qd-notes h3{margin:0 0 6px}.qd-notes p{margin:0}
.qd-accepted{margin:0;padding:10px 14px;border-radius:10px;background:var(--ok-soft);color:var(--ok);font-weight:600}
.qd-rejected{margin:0;padding:10px 14px;border-radius:10px;background:var(--bad-soft);color:var(--bad);font-weight:600}
.quote-page .deal-title{overflow-wrap:anywhere}

/* the customer's page: no app shell, the document centred */
body.public-quote{margin:0;background:var(--bg);color:var(--txt);min-height:100dvh}
.quote-public{max-width:940px;margin:0 auto;padding:20px 16px 40px;gap:16px}
.qp-top{max-width:900px;width:100%;margin:0 auto}
.lang-switch .btn.on{border-color:var(--acc);color:var(--acc)}
.qp-actions,.qp-done{max-width:900px;width:100%;margin:0 auto}
.qp-done.won h2{color:var(--ok)}.qp-done.lost h2{color:var(--bad)}
.qp-actions input{max-width:420px}
.qp-foot{text-align:center}
.qp-missing{max-width:560px;margin:10vh auto;text-align:center;align-items:center}

@media (max-width:640px){
  .quote-doc{padding:16px;border-radius:12px;gap:16px}
  .qd-from{max-width:100%}
  .qd-meta{align-items:flex-start;text-align:left}
  .qd-totals{justify-content:stretch;grid-template-columns:1fr auto}
  .num-in,.num-in.qty,.num-in.pct{width:110px}
  .lines-table td:first-child{min-width:0}
  .lines-table td:first-child input{width:auto;flex:1}
  .act-cell{width:auto}
  .line-add select,.line-add input{flex:1 1 100%;max-width:none}
}

/* print / Save as PDF: only the document, on white, A4 */
@page{size:A4;margin:14mm}
@media print{
  :root{--card:#fff;--bg:#fff;--txt:#111;--mut:#555;--line:#ccc;--col:#f2f2f2}
  html,body{background:#fff!important;color:#111}
  .side,.topbar,.scrim,.no-print,#toasts,.skip,dialog{display:none!important}
  .shell,.mainc,.body,#app,.page{display:block!important;overflow:visible!important;height:auto!important;padding:0!important;margin:0!important;max-width:none!important}
  .quote-doc{border:0;box-shadow:none;padding:0;max-width:none;border-radius:0}
  .qd-table{border:0}
  .qd-table thead{display:table-header-group}
  .qd-table tr{break-inside:avoid}
  .qd-table table,.qd-table tbody{display:table}.qd-table tbody{display:table-row-group}
  .qd-table tr{display:table-row;border:0;padding:0;margin:0;background:none}
  .qd-table td{display:table-cell;text-align:inherit;padding:6px 8px;border-bottom:1px solid #ddd}
  .qd-table td::before{content:none}
  .pill-soft{border:1px solid #999;background:none!important;color:#111!important}
  a{color:inherit;text-decoration:none}
}

/* Boards automations (competitor P0 #6) */
.au-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:10px}
.au-rule{display:flex;flex-direction:column;gap:6px}
.au-rule.off{opacity:.7}
.au-rule p{margin:0}
.au-text{overflow-wrap:anywhere}
.au-name{gap:8px;align-items:center}
.au-actions{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px}
.au-action{gap:8px;align-items:center}
.au-action select{min-width:0;max-width:260px}
.au-action input[type=number]{width:84px}
@media (max-width:640px){.au-action select,.au-action input.grow{flex:1 1 100%;max-width:none}}
/* the deal's products table fits its box at desktop width (no sideways scroll; was cut at 1440 with the side column) */
@media (min-width:641px){
  .lines-table th,.lines-table td{padding-left:6px;padding-right:6px}
  .lines-table td:first-child{min-width:140px}
  .lines-table .num-in{width:84px}
  .lines-table .num-in.qty,.lines-table .num-in.pct{width:58px}
  .lines-table td:nth-last-child(2){white-space:nowrap}
}

/* the board name is never cut: its row keeps the name's width, the buttons wrap (desktop; phones already stack) */
@media (min-width:641px){
  .board-bar>.row.grow{flex:0 1 auto;min-width:min(100%,max-content)}
  .board-title{width:auto;max-width:min(60vw,640px)}
  .board-bar>.row.wrap{margin-left:auto;justify-content:flex-end} /* house rule: buttons on the right, also when they wrap */
}
