/* =====================================================================
   OfficeTask - design system v3 (work-management style: bold status
   cells, colored groups, flat surfaces, Figtree type)
   ===================================================================== */
:root {
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --app-bg: #eceff8; --surface: #ffffff; --surface-2: #f6f7fb; --hover: #dcdfec; --row-hover: #f5f6f8;
  --line: #e6e9ef; --border: #d0d4e4; --border-2: #c3c6d4;
  --text: #323338; --text-2: #676879; --text-3: #9699a6;
  --primary: #0073ea; --primary-h: #0060b9; --primary-sel: #cce5ff; --primary-text: #0060b9;
  /* status labels */
  --s-todo: #c4c4c4; --s-progress: #fdab3d; --s-stuck: #df2f4a; --s-review: #a25ddc; --s-done: #00c875;
  /* priority labels */
  --p-high: #401694; --p-medium: #5559df; --p-low: #579bfc;
  --p-medium-bg: #e4e5fc; --p-medium-tx: #3a3db3; --p-low-bg: #e6f1ff; --p-low-tx: #1d5fbf;
  --danger: #d83a52; --danger-bg: #ffebef; --warn: #e6900a; --warn-bg: #fff4e0; --ok: #00854d; --ok-bg: #e5f9ef;
  --danger-text: #d83a52; --ui-bg: #e7e9ef; --primary-hl: #f0f7ff; --review-bg: #f6f0fd; --review-line: #d9c2f2;
  --r-sm: 4px; --r: 8px; --r-lg: 16px;
  --sh-sm: 0 1px 4px rgba(0,0,0,.08);
  --sh: 0 4px 12px rgba(0,0,0,.1);
  --sh-lg: 0 6px 20px rgba(0,0,0,.2);
  --sb-w: 248px; --top-h: 52px; --pb-h: 30px; --bn-h: 62px;
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23676879' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow-x: hidden; }
body { font: 400 14px/20px var(--font); color: var(--text); background: var(--app-bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; touch-action: manipulation; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); line-height: 1.3; }
p { margin: 0; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.i-sm { width: 16px; height: 16px; } .i-xs { width: 14px; height: 14px; } .i-lg { width: 20px; height: 20px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
/* screen-reader text. top/left 0 keeps it inside its box, so it can never widen a scroller or the page */
.sr { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.sp { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.wrap { flex-wrap: wrap; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.hide { display: none !important; }
.m-only { display: none; }
@media (max-width: 767px) { .m-only { display: inline; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ============ Prototype bar ============ */
.proto-bar { height: var(--pb-h); background: #323338; color: #c5c7d0; font-size: 12px; line-height: 16px; display: flex; align-items: center; gap: 10px; padding: 0 14px; overflow: hidden; white-space: nowrap; }
.proto-tag { background: #ffcb00; color: #323338; font-weight: 700; font-size: 11px; padding: 2px 7px; border-radius: 3px; letter-spacing: .03em; text-transform: uppercase; cursor: help; }
.proto-bar .seg { background: rgba(255,255,255,.1); padding: 2px; border-radius: 4px; border: 0; }
.proto-bar .seg button { height: 22px; font-size: 12px; color: #c5c7d0; padding: 0 10px; border-radius: 3px; border-right: 0; }
.proto-bar .seg button:hover { background: rgba(255,255,255,.12); }
.proto-bar .seg button.on { background: #fff; color: var(--text); box-shadow: none; }
.proto-bar a { color: #8fc2ff; }
@media (max-width: 400px) { .proto-bar .pb-lbl { display: none; } .proto-bar { gap: 6px; padding: 0 8px; } }

/* ============ App shell: floating white panels on grey ============ */
.app { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: calc(100dvh - var(--pb-h)); padding: 8px 8px 8px 0; gap: 0; }
.sb { display: flex; flex-direction: column; min-height: 0; z-index: 40; background: transparent; }
.sb-head { height: var(--top-h); display: flex; align-items: center; gap: 10px; padding: 0 20px; flex: none; }
.logo { width: 30px; height: 30px; border-radius: 8px; background: var(--primary); display: grid; place-items: center; color: #fff; flex: none; }
.logo .i { width: 18px; height: 18px; stroke-width: 2.8; }
.brand { font-weight: 700; color: var(--text); font-size: 18px; letter-spacing: -.01em; line-height: 1.1; }
.brand small { display: block; font-weight: 400; font-size: 12px; color: var(--text-2); letter-spacing: 0; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.sb-sec-row { display: flex; align-items: center; gap: 2px; margin-top: 14px; padding-bottom: 2px; }
.sb-sec { flex: 1; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-2); height: 28px; padding: 0 10px; display: flex; align-items: center; gap: 8px; border-radius: 4px; }
a.sb-sec:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.sb-sec .see { font-size: 12px; font-weight: 400; color: var(--text-2); margin-left: auto; }
a.sb-sec:hover .see { color: var(--primary); }
a.sb-sec.on { background: var(--primary-sel); color: var(--text); }
.sb-sec-row > button { flex: none; color: var(--text-2); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 4px; }
.sb-sec-row > button:hover { background: var(--hover); color: var(--text); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 4px; color: var(--text); font-size: 14px; font-weight: 400; width: 100%; text-align: left; position: relative; }
.nav-item + .nav-item { margin-top: 2px; }
.nav-item:hover { background: var(--hover); text-decoration: none; }
.nav-item .i { color: var(--text-2); }
.nav-item.on { background: var(--primary-sel); font-weight: 500; }
.nav-item.on .i { color: var(--text); }
.nav-badge { margin-left: auto; height: 18px; min-width: 18px; padding: 0 6px; border: 0; border-radius: 9px; background: #e7e9ef; color: #323338; font-size: 12px; line-height: 18px; font-weight: 500; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav-item.on .nav-badge:not(.hot) { background: #fff; }
.nav-badge.hot { background: #d83a52; color: #fff; }
/* report state in words ("3 missing", "Not sent"): amber, never a bare count */
.nav-tag { height: 20px; margin-left: auto; padding: 0 6px; }
.proj-item { font-size: 14px; height: 32px; }
.proj-item .pdot { width: 10px; height: 10px; border-radius: 2px; flex: none; margin: 0 4px; }
.proj-item .cnt { margin-left: auto; font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.sb-foot { padding: 10px 16px; display: flex; align-items: center; gap: 10px; flex: none; }
.sb-foot .who { min-width: 0; flex: 1; }
.sb-foot .who b { display: block; color: var(--text); font-size: 14px; font-weight: 500; }
.sb-foot .who span { font-size: 12px; color: var(--text-2); }

.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: hidden; }
.topbar { min-height: 64px; display: flex; align-items: center; gap: 8px; padding: 12px 28px 8px; flex: none; position: relative; z-index: 30; }
.topbar .tb-menu { display: none; position: relative; }
.tb-menu .mdot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #d83a52; box-shadow: 0 0 0 2px #fff; }
.tb-title { min-width: 0; margin-right: 8px; }
.tb-title h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -.1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-title p { font-size: 14px; line-height: 20px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-search { position: relative; width: 260px; max-width: 30vw; margin-left: auto; }
.tb-search .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; width: 16px; height: 16px; }
.tb-search input { width: 100%; height: 36px; border: 1px solid var(--border-2); background: #fff; border-radius: 4px; padding: 0 10px 0 34px; font-size: 14px; outline: none; }
.tb-search input::placeholder { color: #676879; }
.tb-search input:hover { border-color: var(--text); }
.tb-search input:focus { border-color: var(--primary); }
.topbar.no-search .tb-search, .topbar.no-search .tb-msearch { display: none !important; }
.tb-acts { display: flex; align-items: center; gap: 8px; flex: none; }
.topbar.no-search .tb-acts { margin-left: auto; }
.tb-acts .sent { color: var(--text); }
.tb-acts .sent .i { color: #00854d; }
.kbd { font-size: 12px; line-height: 16px; color: var(--text-2); border: 1px solid var(--line); border-radius: 3px; padding: 0 5px; background: var(--surface-2); }
.bell { position: relative; }
/* small count on the bell's top-right corner; the bell itself stays visible */
.bell .dotc { position: absolute; top: 7px; right: 7px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--s-stuck); color: #fff; font-size: 10px; line-height: 16px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; border: 1.5px solid #fff; box-sizing: content-box; transform: translate(50%, -50%); pointer-events: none; }

/* position: relative makes the content area the box for any absolutely placed child, so nothing can stretch the page sideways */
.content { flex: 1; overflow: auto; padding: 8px 28px 32px; min-height: 0; position: relative; overflow-x: hidden; }
.content.flush { padding: 0; overflow: hidden; display: flex; border-top: 1px solid var(--line); }
.page { max-width: 1560px; }

/* ============ Buttons & inputs ============ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 4px; font-size: 14px; font-weight: 400; border: 1px solid var(--border-2); background: #fff; color: var(--text); white-space: nowrap; transition: background .12s, border-color .12s; }
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active:not([disabled]) { transform: scale(.97); }
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); color: #fff; }
.btn-success { background: #00854d; border-color: #00854d; color: #fff; }
.btn-success:hover { background: #007038; border-color: #007038; color: #fff; }
.btn-danger-ghost { border-color: transparent; background: transparent; color: #d83a52; }
.btn-danger-ghost:hover { background: var(--danger-bg); color: #b63546; }
.btn-soft-success { background: #fff; border-color: var(--s-done); color: var(--ok); }
.btn-soft-success:hover { background: var(--ok-bg); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--hover); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 14px; }
.btn-xs { height: 28px; padding: 0 8px; font-size: 13px; gap: 4px; }
.btn-xs .i { width: 14px; height: 14px; }
.btn-icon { width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: 4px; color: var(--text-2); }
.btn-icon:hover { background: var(--hover); color: var(--text); }
.btn-icon.sm { width: 32px; height: 32px; }
.btn-icon.xs { width: 26px; height: 26px; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

.input, .select, .textarea { width: 100%; height: 40px; border: 1px solid var(--border-2); border-radius: 4px; background: #fff; padding: 0 12px; font-size: 14px; outline: none; color: var(--text); transition: border-color .12s; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text); }
.input::placeholder, .textarea::placeholder { color: #676879; }
.textarea { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 32px; background: #fff var(--chev) no-repeat right 12px center; cursor: pointer; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); }
.select-sm { height: 32px; font-size: 14px; padding-left: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .lbl { font-size: 14px; font-weight: 500; color: var(--text); }
.req::after { content: ' *'; color: var(--danger); }
.hint { font-size: 13px; color: var(--text-2); }

.seg { display: inline-flex; border: 1px solid var(--border-2); border-radius: 4px; padding: 0; overflow: hidden; flex: none; background: #fff; }
.seg button { height: 34px; padding: 0 14px; font-size: 14px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; border-right: 1px solid var(--border-2); }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--hover); }
.seg button.on { background: var(--primary-sel); color: var(--text); font-weight: 500; }
.seg button .i { width: 16px; height: 16px; }
.seg.seg-pri button.on[data-v="high"] { background: var(--p-high); color: #fff; }
.seg.seg-pri button.on[data-v="medium"] { background: var(--p-medium); color: #fff; }
.seg.seg-pri button.on[data-v="low"] { background: var(--p-low); color: #323338; }
/* text button that reads like a link */
.link { color: var(--primary); font-size: 14px; font-weight: 500; padding: 0; border-radius: 2px; }
.link:hover { text-decoration: underline; color: var(--primary-h); }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; justify-content: center; padding: 0 8px; }
/* checkbox with label (e.g. "I'm blocked") */
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); cursor: pointer; }
.check input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }
/* hours stepper: [-] [ 1.5 ] [+] */
.hrs { display: inline-flex; align-items: center; gap: 2px; }
.hrs .btn-icon.xs { width: 28px; height: 28px; }
.hrs input.num-in, .tbl .hrs input.num-in { width: 52px; height: 28px; border: 1px solid var(--border); border-radius: 4px; background: #fff; text-align: center; padding: 0 4px; font-variant-numeric: tabular-nums; outline: none; -moz-appearance: textfield; }
.hrs input.num-in::-webkit-outer-spin-button, .hrs input.num-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hrs input.num-in:hover, .tbl .hrs input.num-in:hover { border-color: var(--text); }
.hrs input.num-in:focus, .tbl .hrs input.num-in:focus { border-color: var(--primary); }

.fchip { height: 32px; padding: 0 12px; border-radius: 4px; border: 1px solid var(--border-2); background: #fff; font-size: 14px; color: var(--text); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none; }
.fchip:hover { background: var(--hover); }
.fchip.on { background: var(--primary-sel); border-color: var(--primary); }
.fchip .c { font-size: 12px; color: var(--text-2); }

.toggle { position: relative; width: 40px; height: 22px; border-radius: 11px; background: var(--border-2); transition: background .15s; flex: none; }
.toggle::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.on { background: var(--primary); }
.toggle.on::after { transform: translateX(18px); }

/* ============ View tabs + toolbar ============ */
/* one tab style for every view switch; build with tabsEl() */
.tabbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs { display: flex; align-items: stretch; gap: 2px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--line); flex: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tabbar .tabs { box-shadow: none; align-self: flex-end; }
.tab { height: 40px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); border-bottom: 2px solid transparent; white-space: nowrap; border-radius: 4px 4px 0 0; flex: none; }
.tab:hover { background: var(--hover); }
.tab.on { border-bottom-color: #0073ea; font-weight: 500; }
.tab.on:hover { background: transparent; }
.tab .i { width: 16px; height: 16px; color: var(--text-2); }
.tab.on .i { color: var(--text); }
.tab .c { display: inline-grid; place-items: center; min-width: 18px; height: 18px; background: #e7e9ef; border-radius: 9px; padding: 0 6px; font-size: 12px; line-height: 18px; font-weight: 500; color: #323338; font-variant-numeric: tabular-nums; }
.tabs-sm .tab { height: 36px; padding: 0 12px; }
.filterbar { display: flex; align-items: center; gap: 4px; margin-bottom: 18px; flex-wrap: wrap; }
.tabbar .filterbar { margin: 0 0 0 auto; border: 0; padding: 4px 0; }
.fbtn { height: 32px; padding: 0 10px; border-radius: 4px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); white-space: nowrap; border: 1px solid transparent; }
.fbtn:hover { background: var(--hover); }
.fbtn .i { color: var(--text-2); }
.fbtn b { font-weight: 600; }
.fbtn.on { background: var(--primary-sel); }
.fbtn.on .i { color: var(--text); }
/* "Group by: Date | Project" inside the filter bar */
.gb { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); height: 32px; }
.gb-l { font-size: 14px; color: var(--text-2); white-space: nowrap; }
/* built with tabsEl, drawn as a small two-way toggle so it does not compete with the view tabs */
.gb .tabs { box-shadow: none; border: 1px solid var(--border-2); border-radius: 4px; gap: 0; overflow: hidden; }
.gb .tab { height: 30px; padding: 0 10px; border-bottom: 0; border-radius: 0; }
.gb .tab + .tab { border-left: 1px solid var(--border-2); }
.gb .tab.on { background: var(--primary-sel); }
.gb .tab.on:hover { background: var(--primary-sel); }
.result-n { font-size: 14px; color: var(--text-2); white-space: nowrap; margin-left: 12px; }
.result-n b { color: var(--text); font-weight: 600; }

/* popovers / menus / pickers */
.menu { position: fixed; z-index: 95; background: #fff; border-radius: var(--r); box-shadow: var(--sh-lg); padding: 6px; min-width: 200px; max-height: min(480px, 72vh); overflow-y: auto; animation: pop .12s ease-out; }
.menu button, .dd-i { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 32px; padding: 0 8px; border-radius: 4px; font-size: 14px; text-align: left; color: var(--text); }
.menu button:hover, .dd-i:hover { background: var(--hover); }
.dd-i.on { background: var(--primary-sel); }
.dd-i .ck { margin-left: auto; color: var(--primary); }
.dd-i .dsub { margin-left: auto; font-size: 12px; color: var(--text-2); }
.dd-i.on .dsub { display: none; }
.dd-h { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-2); padding: 6px 8px 4px; }
.dd-sep { height: 1px; background: var(--line); margin: 6px 0; }
.dd-range { padding: 4px 6px 4px; display: flex; flex-direction: column; gap: 8px; }
.dd-range .row input { height: 36px; font-size: 14px; padding: 0 8px; }
.menu .danger { color: var(--danger); }
.dd-dot { width: 14px; height: 14px; border-radius: 3px; flex: none; }
.dd-dot.blank { background: transparent; }
.dd-dot.ring { background: #fff; box-shadow: inset 0 0 0 2px var(--text-2); }
.menu.w-280 { width: 280px; } .menu.w-200 { width: 200px; }
/* label picker (status / priority) */
.picker { width: 200px; padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.menu.picker .pk { height: 32px; min-height: 32px; border-radius: 4px; color: #fff; justify-content: center; font-size: 14px; font-weight: 500; padding: 0 8px; transition: filter .1s; position: relative; }
.menu.picker .pk:hover { filter: brightness(.92); }
.picker .pk.cur::after { content: ''; position: absolute; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.menu.picker .pk[data-v=todo], .menu.picker .pk[data-v=progress], .menu.picker .pk[data-v=done], .menu.picker .pk[data-v=low] { color: #323338; }
.picker .pk[data-v=todo].cur::after, .picker .pk[data-v=progress].cur::after, .picker .pk[data-v=done].cur::after, .picker .pk[data-v=low].cur::after { background: #323338; }
.picker .pk-h { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-2); text-align: center; padding: 2px 0 4px; }
/* action rows inside the status picker (Approve / Send back) */
.menu .pk-act { height: 32px; justify-content: flex-start; gap: 8px; padding: 0 8px; font-size: 14px; font-weight: 500; color: var(--text); }
.menu .pk-act .i { width: 16px; height: 16px; }
.menu .pk-act.ok { color: #00854d; }
.menu .pk-act.ok:hover { background: var(--ok-bg); }
.menu .pk-act.warn { color: #a4152b; }
.menu .pk-act.warn:hover { background: var(--danger-bg); }

/* ============ Labels, chips, avatars ============ */
.pchip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; line-height: 16px; color: var(--text-2); min-width: 0; white-space: nowrap; }
.pchip i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
/* small state tags: tinted. Solid white-on-colour is only for full-size status cells */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.tag .i { width: 13px; height: 13px; }
.tag-gray { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
.tag-done { background: #e5f9ef; color: #00854d; border-color: #bbdbc9; }
.tag-warn { background: #fff4e0; color: #8a5300; border-color: #fed59e; }
.tag-danger { background: #ffebef; color: #a4152b; border-color: #f4c3cb; }
.tag-review { background: #f6f0fd; color: #5c2a85; border-color: #d9c2f2; }
.tag-info { background: #f0f7ff; color: #0060b9; border-color: #aed4fc; }
.tag-primary { background: var(--primary-sel); color: var(--text); }
.st, .pri { display: inline-flex; align-items: center; justify-content: center; height: 26px; min-width: 104px; padding: 0 10px; font-size: 13px; font-weight: 500; color: #fff; white-space: nowrap; border-radius: 0; }
/* text rule for every label: dark text on light fills (To do, Working on it, Done, Low), white on dark fills (Stuck, Waiting approval, High, Medium) */
.st-todo { background: var(--s-todo); color: #323338; } .st-progress { background: var(--s-progress); color: #323338; } .st-stuck { background: var(--s-stuck); } .st-review { background: var(--s-review); } .st-done { background: var(--s-done); color: #323338; }
.pri { min-width: 80px; }
.pri-high { background: var(--p-high); } .pri-medium { background: var(--p-medium-bg); color: var(--p-medium-tx); } .pri-low { background: var(--p-low-bg); color: var(--p-low-tx); }
.menu.picker .pk[data-v=medium] { background: var(--p-medium-bg) !important; color: var(--p-medium-tx); }
.menu.picker .pk[data-v=low] { background: var(--p-low-bg) !important; color: var(--p-low-tx); }
.picker .pk[data-v=medium].cur::after { background: var(--p-medium-tx); }
.picker .pk[data-v=low].cur::after { background: var(--p-low-tx); }
.pri .i { display: none; }
.due { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.due .i { width: 15px; height: 15px; display: none; }
.due.today { font-weight: 600; }
.due.overdue { color: var(--danger); }
.due.overdue .i { display: inline-block; }
.due.faint { color: var(--text-3); }

.av { --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; font-size: calc(var(--s) * .4); font-weight: 600; flex: none; position: relative; color: #fff; }
.av-xs { --s: 24px; } .av-sm { --s: 26px; } .av-md { --s: 32px; } .av-lg { --s: 40px; }
.av.on::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--s-done); border: 2px solid #fff; }
.av-c0 { background: #323338; } .av-c1 { background: #0086c0; } .av-c2 { background: #e2445c; } .av-c3 { background: #00a36c; }
.av-c4 { background: #ff7a00; } .av-c5 { background: #784bd1; } .av-c6 { background: #037f4c; }
.av-open { background: #fff; color: var(--text-3); border: 1.5px dashed var(--border-2); }
/* small overlap only, so the next avatar never covers the previous one's second letter */
.av-stack { display: inline-flex; align-items: center; } .av-stack .av { box-shadow: 0 0 0 2px #fff; font-size: 10px; letter-spacing: -.02em; } .av-stack .av + .av { margin-left: -2px; }
.av-stack .av-more { background: #e7e9ef; color: #323338; font-size: 11px; font-weight: 600; }
.who-cell { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--text); }

.prog { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; position: relative; }
.prog > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--s-done); }
.prog.green > i { background: var(--s-done); }

/* battery = stacked status bar */
.battery { display: flex; width: 100%; height: 24px; border-radius: 4px; overflow: hidden; background: var(--line); }
.battery i { display: block; height: 100%; min-width: 3px; }
.battery i + i { box-shadow: -1px 0 0 #fff; }
.battery.lg { height: 36px; border-radius: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text); }
.legend span i { width: 12px; height: 12px; border-radius: 2px; }
.legend span b { font-weight: 600; font-variant-numeric: tabular-nums; }
.legend span em { font-style: normal; color: var(--text-2); }

/* ============ Cards & widgets ============ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); min-width: 0; overflow: hidden; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 0 18px; min-height: 52px; }
.card-h h3 { font-size: 16px; font-weight: 600; }
.card-h .cnt { font-size: 14px; color: var(--text-2); }
.card-b { padding: 4px 18px 18px; }
.card-b.flush { padding: 0; border-top: 1px solid var(--line); }
.card-f { border-top: 1px solid var(--line); padding: 12px 18px; display: flex; align-items: center; gap: 8px; }
.empty { padding: 28px 16px; text-align: center; color: var(--text-2); font-size: 14px; }
.empty .i { width: 26px; height: 26px; display: block; margin: 0 auto 8px; color: var(--text-3); }

/* one-time tip (tipOnce) */
.tip { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 8px 0 14px; background: #f0f7ff; border-radius: 4px; margin-bottom: 12px; font-size: 14px; color: var(--text); }
.tip > .i { color: var(--primary); }
.tip > span { flex: 1; min-width: 0; padding: 8px 0; }
.tip > .btn-icon { flex: none; }
/* one summary line instead of stat cards */
.sumline { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; min-height: 36px; font-size: 14px; color: var(--text-2); margin-bottom: 12px; }
.sumline b { color: var(--text); font-weight: 600; }
.sumline a { color: var(--primary); }
.sumline.warn { min-height: 44px; background: #fff4e0; box-shadow: inset 4px 0 0 #e6900a; padding: 0 12px 0 16px; border-radius: 4px; color: #8a5300; }
.sumline.warn b { color: #8a5300; }

/* two independent columns (Home, Team): main + 380px side */
.dash2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* compact number tiles: only the number carries colour */
.stats { display: grid; gap: 16px; }
.stats.s4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home .stats { margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 10px 16px; min-height: 60px; max-height: 64px; color: inherit; text-decoration: none !important; transition: border-color .12s, box-shadow .12s; min-width: 0; }
.stat:hover { border-color: var(--border); box-shadow: var(--sh-sm); }
.stat::before { display: none; }
.stat-v { font-size: 28px; line-height: 32px; font-weight: 600; margin: 0; font-variant-numeric: tabular-nums; color: var(--text); flex: none; }
.stat-l { font-size: 14px; font-weight: 400; color: var(--text-2); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-go { margin-left: auto; color: var(--text-3); opacity: 0; transition: opacity .12s; }
.stat:hover .stat-go, .stat:focus-visible .stat-go { opacity: 1; }
.t-danger .stat-v { color: #d83a52; }
.t-done .stat-v { color: #00854d; }
.t-calm .stat-v { color: var(--text-3); }
.t-review .stat-v { color: #7e3fb8; }
.home-due { margin-top: 16px; }

/* card header counts that are links ("3 overdue · 5 due today") */
.card-h .cnt-l { color: var(--text-2); }
.card-h .cnt-l:hover { color: var(--primary); }
.card-h .cnt-l.danger { color: #d83a52; font-weight: 500; }
.w-more { display: flex; align-items: center; height: 36px; padding: 0 16px; font-size: 14px; color: var(--primary); border-top: 1px solid var(--line); }

/* list rows inside widgets */
.lrow { display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--line); min-height: 52px; color: inherit; }
.lrow:last-child { border-bottom: 0; }
.lrow.click { cursor: pointer; }
.lrow.click:hover { background: var(--row-hover); text-decoration: none; }
.lrow .main-t { flex: 1; min-width: 0; padding: 4px 0; }
.lrow .main-t b { display: block; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow .main-t > span { display: block; font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.time { font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Team workload (Home) */
.wl-row { min-height: 44px; }
.wl-who { flex: 0 0 116px !important; }
.dn-row { min-height: 44px; }
.dn-ck { width: 20px; height: 20px; border-radius: 50%; background: var(--s-done); color: #fff; display: grid; place-items: center; flex: none; }
.dn-ck .i { stroke-width: 3; width: 12px; height: 12px; }
.wl-bar { flex: 1; min-width: 72px; }
.wl-bar .battery { height: 20px; }
.wl-n { width: 22px; flex: none; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.wl-late { width: 48px; flex: none; margin-left: -6px; white-space: nowrap; }
.wl-late .late { font-size: 12px; line-height: 16px; color: var(--danger-text); font-weight: 500; }
.wl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 0 16px 10px; margin-top: -8px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.wl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.wl-legend i { width: 10px; height: 10px; border-radius: 2px; }

/* "Needs you" card: one section per kind of work, each with a coloured edge */
.ny-sec + .ny-sec { border-top: 1px solid var(--line); }
.ny-h { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 16px; background: var(--surface-2); box-shadow: inset 4px 0 0 var(--sc); border-bottom: 1px solid var(--line); }
.ny-h b { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text); }
.ny-h .c { display: inline-grid; place-items: center; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px; background: #e7e9ef; color: #323338; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.ny-h .btn { height: 24px; }
.ny-row { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px 4px 16px; border-bottom: 1px solid var(--line); }
.ny-sec .ny-row:last-child { border-bottom: 0; }
.ny-row.click { cursor: pointer; }
.ny-row.click:hover { background: var(--row-hover); }
.ny-row.rs-on { background: var(--primary-hl); }
.ny-t { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.ny-l1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ny-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; color: var(--text); }
.ny-l1 > .pchip, .ny-l1 > .tag { flex: none; }
.ny-l1 > .tag { height: 20px; }
.ny-l2 { font-size: 12px; line-height: 16px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* approvals: what was handed in (note, images, proof link) */
.ny-l2.dl { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 2px; font-size: 13px; line-height: 18px; }
.dl-note { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.dl-a { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 22px; padding: 0 6px; border-radius: 4px; font-size: 12px; color: var(--primary-text); background: var(--primary-hl); white-space: nowrap; }
.dl-a:hover { background: var(--primary-sel); text-decoration: none; }
.dl-none { color: var(--text-3); font-style: italic; }
.ny-l2 .sl-dot { color: var(--text-3); flex: none; }
.ny-all { color: var(--ok); font-weight: 500; }
.ny-all .i { color: var(--ok); }
.ny-acts { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.ny-chips .missing-list { flex: 1; min-width: 0; gap: 6px; }
.ny-chips .mchip { height: 28px; font-size: 13px; }
.ny div.rs-inline { padding-left: 16px; }

/* compact task row for widgets: title | person | status | priority | due */
.wrow { display: grid; grid-template-columns: minmax(0, 1fr) 36px 130px 96px 96px; min-height: 44px; align-items: stretch; border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; }
.wrow.no-pri { grid-template-columns: minmax(0, 1fr) 36px 130px 96px; }
.card-b .wrow:last-child, .day-list .wrow:last-child { border-bottom: 0; }
.wrow:hover { background: var(--row-hover); }
.wrow > div { display: flex; align-items: center; min-width: 0; }
.wrow .t { gap: 8px; padding: 0 12px 0 16px; }
.wr-n { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; color: var(--text); text-align: left; }
.wr-n:hover { color: var(--primary); }
/* project names are never cut: the title gives way first */
.wrow .t > .pchip { flex: none; }
.wrow .t > .tag, .wrow .t > .t-meta { flex: none; }
.wr-acts { margin-left: auto; flex: none; display: inline-flex; }
.wr-p { justify-content: center; }
.wr-who { width: 100%; height: 100%; display: grid; place-items: center; }
.wr-who:hover:not([disabled]) { background: var(--hover); }
.wr-who[disabled] { cursor: inherit; }
.wrow > .wr-l { align-items: stretch; border-left: 1px solid #fff; }
.wr-d { justify-content: center; padding: 0 8px; }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters .select { width: auto; height: 34px; max-width: 200px; }

/* ============ Main table (grouped by project) ============ */
.mgroup { margin-bottom: 24px; --gc: var(--primary); }
.mg-h { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; cursor: pointer; user-select: none; }
.mg-h .chev { color: var(--gc); width: 20px; height: 20px; stroke-width: 2.5; transition: transform .15s; }
.mgroup.closed .mg-h .chev { transform: rotate(-90deg); }
.mg-h h3 { font-size: 18px; font-weight: 500; color: var(--gc); }
.mg-h .cnt { font-size: 14px; color: var(--text-2); }
.mg-h > .btn { cursor: pointer; }
.mtable { --cols: 6px minmax(300px, 1fr) 164px 164px 128px 136px; }
/* employee view: no Person column */
.mtable.no-person { --cols: 6px minmax(300px, 1fr) 140px 104px 112px; }
.mrow { display: grid; grid-template-columns: var(--cols); min-height: 40px; background: #fff; }
.mrow > div { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); display: flex; align-items: center; justify-content: center; min-width: 0; position: relative; }
.mrow > .mstrip { background: var(--gc); border: 0; }
.mhead > div { border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); height: 38px; }
.mhead > .mstrip { border-top: 0; border-top-left-radius: 6px; }
.mhead > .mitem { justify-content: flex-start; padding-left: 16px; }
/* Task cell: click anywhere opens the task. Title wraps to 2 lines; chip + counts follow it or drop under it */
.mrow > .mitem { justify-content: flex-start; padding: 5px 46px 5px 14px; gap: 10px; cursor: pointer; }
.mrow.t:hover > div:not(.mstrip) { background: var(--row-hover); }
.m-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.m-txt > .pchip, .m-txt > .tag, .m-txt > .t-meta { flex: none; }
.m-txt > .tag { height: 20px; padding: 0 6px; }
.m-name { flex: 0 1 auto; min-width: 0; font-size: 14px; line-height: 20px; color: var(--text); outline: none; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; cursor: pointer; border-radius: 2px; }
.mrow.t:hover .m-name { color: var(--primary-text); }
.m-name:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.t-meta { display: flex; align-items: center; gap: 8px; flex: none; color: var(--text-2); }
.t-meta .m { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; color: var(--text-2); }
.t-meta .m .i { width: 15px; height: 15px; }
.t-meta .m.m-cl { font-variant-numeric: tabular-nums; }
.t-meta .m.m-cl.all { color: var(--ok); }
.m-txt > .pchip { max-width: none; }
/* updates bubble on the right edge; on row hover an "Open" label shows next to it */
.m-open { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 4px; display: grid; place-items: center; color: var(--text-2); }
.m-open:hover { background: var(--hover); color: var(--text); }
.m-open.has { color: var(--primary); }
.m-open .n { position: absolute; right: 0; bottom: 1px; min-width: 15px; height: 15px; border-radius: 8px; background: var(--primary); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; padding: 0 3px; }
.m-open .ol { position: absolute; right: calc(100% + 4px); top: 50%; transform: translateY(-50%); height: 26px; padding: 0 8px 0 6px; display: none; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--border-2); border-radius: 4px; font-size: 13px; color: var(--text); white-space: nowrap; box-shadow: var(--sh-sm); }
.m-open .ol .i { color: var(--text-2); }
.mrow.t:hover .m-open .ol, .mrow.t:focus-within .m-open .ol { display: inline-flex; }
/* round tick (employee lists): one tap finishes the task (sends it for approval) */
.m-ck { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 1.5px solid var(--border-2); background: #fff; color: transparent; transition: background .12s, border-color .12s, color .12s; }
.m-ck .i { width: 13px; height: 13px; stroke-width: 3; }
.m-ck:hover { border-color: var(--s-done); color: var(--s-done); background: var(--ok-bg); }
.m-ck.s-done { background: var(--s-done); border-color: var(--s-done); color: #fff; }
.m-ck.s-review { background: var(--review-bg); border-color: var(--s-review); color: var(--s-review); }
.m-ck.s-review .i { stroke-width: 2.4; }
.m-ck-sp { width: 22px; flex: none; }
/* Waiting approval (admin): Approve | Send back fill the status cell */
.mrow > .mc-appr { display: flex; align-items: stretch; justify-content: stretch; }
.mc-appr button { flex: 1 1 50%; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 4px; padding: 0 4px; font-size: 13px; font-weight: 500; white-space: nowrap; transition: filter .1s; }
.mc-appr .ap-ok { background: #00854d; color: #fff; }
.mc-appr .ap-ok:hover { background: #007038; }
.mc-appr .ap-back { background: var(--review-bg); color: #5c2a85; border-left: 1px solid #fff; }
.mc-appr .ap-back:hover { background: #ecdffa; }
.mc-appr .ap-ok .i { width: 14px; height: 14px; stroke-width: 2.5; }
/* Open to anyone (employee list): a light "Take" button in a neutral cell, so it never outshines the person's own work */
.mrow > .mc-take { padding: 0 8px; }
.take-b { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 14px; border: 1px solid #aed4fc; border-radius: 4px; background: var(--primary-hl); color: var(--primary-text); font-size: 14px; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s; }
.take-b:hover { background: var(--primary-sel); border-color: var(--primary); }
.take-b .i { width: 14px; height: 14px; }
.mc-lbl { padding: 0 !important; }
.lblc { width: 100%; height: 100%; color: #fff; font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; position: relative; transition: filter .1s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.lblc:hover:not([disabled]) { filter: brightness(.94); }
.lblc:hover:not([disabled])::after { content: ''; position: absolute; top: 0; right: 0; border-style: solid; border-width: 0 10px 10px 0; border-color: transparent #fff transparent transparent; opacity: .9; }
.lblc[disabled] { cursor: default; }
.lblc.todo { background: var(--s-todo); color: #323338; } .lblc.progress { background: var(--s-progress); color: #323338; } .lblc.stuck { background: var(--s-stuck); } .lblc.review { background: var(--s-review); } .lblc.done { background: var(--s-done); color: #323338; }
/* priority stays quieter than Status: only High is a solid cell, Medium and Low are light tints */
.lblc.high { background: var(--p-high); } .lblc.medium { background: var(--p-medium-bg); color: var(--p-medium-tx); } .lblc.low { background: var(--p-low-bg); color: var(--p-low-tx); }
.mc-btn { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; font-size: 14px; min-width: 0; }
.mc-btn:hover:not([disabled]) { background: var(--hover) !important; }
.mc-btn[disabled] { cursor: default; }
.mc-btn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-btn .nm.open { color: var(--text-2); }
.date-hidden { position: absolute; left: 50%; bottom: 0; width: 1px; height: 1px; opacity: 0; pointer-events: none; border: 0; padding: 0; }
.madd > div { border-right: 0; }
.madd > .mstrip { opacity: .45; }
.madd > .madd-in { grid-column: 2 / -1; justify-content: flex-start; padding: 0 16px; border-right: 1px solid var(--line); }
.madd input { width: 100%; border: 1px solid transparent; outline: none; background: transparent; font-size: 14px; height: 30px; padding: 0 6px; margin-left: -6px; border-radius: 3px; }
.madd input::placeholder { color: #676879; }
.madd input:hover { border-color: var(--border); }
.madd input:focus { border-color: var(--primary); background: #fff; }
.mfoot > div { border-right: 0; border-bottom: 0; height: 40px; }
.mfoot > .mstrip { background: transparent; }
.mfoot > .msum { border: 1px solid var(--line); border-top: 0; border-left: 0; padding: 0 8px; }
.mfoot > :nth-child(3) { border-left: 1px solid var(--line); }
.mfoot .rng { font-size: 12px; line-height: 16px; color: var(--text-2); }
/* the summary in words, right under the task titles: "1 done · 2 working · 3 to do" */
.mfoot > .msum-t { justify-content: flex-end; padding: 0 14px; font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* filtered lists: one column header for the page, so later groups start with a top line */
@media (min-width: 768px) {
  .mtable.nohead > .mrow:first-child > div:not(.mstrip) { border-top: 1px solid var(--line); }
  .mtable.nohead > .mrow:first-child > .mstrip { border-top-left-radius: 6px; }
}
/* "Show 2 more" row under a limited group */
.mrow.mmore { min-height: 36px; }
.mrow.mmore > .mmore-b { grid-column: 2 / -1; display: flex; align-items: center; gap: 6px; padding: 0 16px; font-size: 14px; color: var(--primary); background: #fff; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; }
.mrow.mmore > .mmore-b:hover { background: var(--row-hover); }
.mtable.collapsed { display: none; }
@keyframes flash { from { background: #cce5ff; } to { background: #fff; } }
.mrow.flash > div:not(.mstrip) { animation: flash 1s; }
.m-more { margin: -8px 0 24px; }

/* ============ Kanban ============ */
.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; align-items: start; overflow-x: auto; padding-bottom: 8px; position: relative; }
.tcard, .due { position: relative; }
.col { background: var(--surface-2); border-radius: var(--r); display: flex; flex-direction: column; min-height: 160px; max-height: calc(100dvh - 260px); overflow: hidden; }
.col-h { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 44px; font-size: 15px; font-weight: 500; color: #fff; background: var(--sc); }
.col-h .n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 8px; border-radius: 10px; background: rgba(255,255,255,.3); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.col-h .btn-icon { color: #fff; }
.col-h .btn-icon:hover { background: rgba(255,255,255,.2); color: #fff; }
.col[data-drop=todo] .col-h, .col[data-drop=progress] .col-h, .col[data-drop=done] .col-h, .col[data-drop=todo] .col-h .btn-icon, .col[data-drop=progress] .col-h .btn-icon { color: #323338; }
.col-b { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; flex: 1; transition: background .12s; }
.col.drop .col-b { background: var(--primary-sel); }
.tcard { background: #fff; border-radius: var(--r); padding: 12px 14px; box-shadow: var(--sh-sm); cursor: pointer; text-align: left; width: 100%; display: flex; flex-direction: column; gap: 10px; border: 1px solid transparent; transition: box-shadow .12s; }
.tcard:hover { box-shadow: var(--sh); }
.tcard.dragging { opacity: .5; }
.tc-top { display: flex; align-items: center; gap: 6px; }
.tc-id { margin-left: auto; font-size: 12px; line-height: 16px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tc-title { font-size: 15px; line-height: 1.4; color: var(--text); }
.tc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tc-meta .pri { min-width: 0; height: 24px; border-radius: 4px; font-size: 12px; }
.tc-foot { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); flex-wrap: wrap; }
.tc-meta .t-meta { margin-left: auto; }
/* waiting approval: Send back | Approve always on their own row at the bottom */
.tc-acts { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-top: 10px; margin-top: -2px; border-top: 1px solid var(--line); }
.open-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--primary); }

/* ============ Calendar ============ */
.cal { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.cal-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-h h3 { font-size: 16px; font-weight: 500; min-width: 170px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow div { font-size: 13px; color: var(--text-2); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.cal-grid { grid-auto-rows: minmax(150px, auto); }
.cal-legend { gap: 14px; margin-left: auto; }
.cal-day { min-height: 150px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-grid .cal-day:nth-last-child(-n+7) { border-bottom: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.out { background: var(--surface-2); }
.cal-day.out .cal-n { color: var(--text-3); }
.cal-n { font-size: 13px; color: var(--text); padding: 2px 6px; align-self: flex-start; border-radius: 12px; font-variant-numeric: tabular-nums; }
.cal-day.today .cal-n { background: var(--primary); color: #fff; font-weight: 600; }
/* light tint of the project colour + a 3px project bar + dark text (readable on every colour). Solid green = Done only */
/* titles wrap to two lines so you can tell tasks apart */
.cal-chip { display: flex; align-items: flex-start; gap: 5px; min-height: 24px; flex: none; font-size: 12px; line-height: 16px; padding: 4px 6px 4px 9px; border-radius: 3px; background: color-mix(in srgb, var(--pc) 15%, #fff); color: var(--text); box-shadow: inset 3px 0 0 var(--pc); text-align: left; width: 100%; min-width: 0; }
.cal-chip:hover { background: color-mix(in srgb, var(--pc) 26%, #fff); }
.cal-chip span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.cal-chip .i { margin-top: 1px; }
.cal-chip.is-done { background: #00854d; color: #fff; box-shadow: none; padding-left: 6px; }
.cal-chip.is-done:hover { background: #007038; }
.cal-chip.is-done .i { stroke-width: 3; }
.cal-chip.overdue { color: #a4152b; font-weight: 500; }
.cal-chip.overdue .i { color: var(--danger); }
.cal-more { font-size: 12px; color: var(--primary); padding: 0 6px; text-align: left; }
.agenda .ag-day { padding: 10px 18px 6px; font-size: 14px; font-weight: 600; background: var(--surface-2); border-bottom: 1px solid var(--line); }

/* ============ Item panel (task detail) ============ */
.scrim { position: fixed; inset: 0; background: rgba(41,47,76,.12); z-index: 70; animation: fade .15s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: #fff; z-index: 71; display: flex; flex-direction: column; border-left: 1px solid #d0d4e4; box-shadow: -8px 0 24px rgba(0,0,0,.12); animation: slideIn .2s ease-out; }
.drawer:focus { outline: none; }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: translateY(4px); opacity: 0; } to { transform: none; opacity: 1; } }
.dr-head { display: flex; align-items: center; gap: 8px; padding: 0 12px 0 24px; height: 56px; flex: none; border-bottom: 1px solid var(--line); }
.dr-id { font-size: 12px; line-height: 16px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.dr-head > .btn-icon, .dr-head > .btn { flex: none; }
.dr-body { flex: 1; overflow-y: auto; padding: 16px 24px 28px; position: relative; }
.dr-title { font-size: 20px; line-height: 28px; font-weight: 500; outline: none; border: 1px solid transparent; border-radius: 4px; padding: 2px 6px; margin: 0 -7px 8px; }
.dr-title[contenteditable]:hover { border-color: var(--border); cursor: text; }
.dr-title[contenteditable]:focus { border-color: var(--primary); }
/* summary strip: status, priority, person, due date */
.dr-sum { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.dr-sum .lblc { flex: none; width: 140px; height: 32px; border-radius: 4px; }
.dr-sum .lblc.dr-pr { width: 96px; }
.dr-pill { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px 0 6px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: 14px; color: var(--text); white-space: nowrap; min-width: 0; max-width: 100%; }
.dr-pill > .i { color: var(--text-2); margin-left: 2px; }
.dr-pill .nm { overflow: hidden; text-overflow: ellipsis; }
.dr-pill .nm.open { color: var(--text-2); }
.dr-pill .due.overdue .i { display: none; }
button.dr-pill:hover:not([disabled]) { background: var(--hover); border-color: var(--border); }
button.dr-pill[disabled] { cursor: default; }
.dr-due { position: relative; display: inline-flex; min-width: 0; }
/* tabs stay visible while the panel scrolls */
.dr-tabs { position: sticky; top: 0; z-index: 3; background: #fff; margin: 0 -24px 16px; padding: 0 16px; max-width: none; }
/* the brief: pinned under the summary strip, before updates */
.brief-b { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; padding: 10px 12px 12px 14px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: 6px; }
.bf-h { display: flex; align-items: center; gap: 8px; min-height: 24px; margin: -2px -4px -2px 0; }
.bf-h b { font-size: 14px; line-height: 20px; font-weight: 600; }
.bf-h .btn-xs { height: 26px; color: var(--text-2); }
.bf-desc { font-size: 14px; line-height: 21px; color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.bf-desc.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
.bf-sum { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; line-height: 18px; color: var(--text-2); text-align: left; }
.bf-sum span { display: inline-flex; align-items: center; gap: 5px; }
.bf-sum:hover { color: var(--primary-text); }
.brief-b .voice-list, .brief-b .thumbs { margin-bottom: 0; }
.brief-b .thumbs { grid-template-columns: repeat(auto-fill, minmax(120px, 160px)); }
.bf-ck { border-top: 1px solid var(--line); padding-top: 8px; }
.bf-ck-h { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.bf-ck-h b { font-weight: 600; color: var(--text-2); }
.bf-ck-h .prog { width: 96px; height: 6px; }
.brief-b .checklist .ci { padding: 4px 2px; }
.cbox[disabled] { cursor: default; opacity: .7; }
.dr-pane { min-height: 120px; }
.dr-pane > .composer { margin-bottom: 16px; }
.dr-none { padding: 4px 0; }
.dr-sys-btn { margin-top: 12px; color: var(--text-2); }
.cmts-sys { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-left: 4px; }
/* send back: ask what needs changing */
.sb-note { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 6px 4px 12px; margin-bottom: 8px; border-radius: 4px; background: var(--warn-bg); color: #8a5300; font-size: 14px; }
.sb-note b { color: #8a5300; }
.sb-note > span { flex: 1; min-width: 0; }
/* admin: what the person handed in */
.submitted { background: #f6f0fd; border: 1px solid #d9c2f2; border-radius: 8px; padding: 12px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 10px; }
.sub-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.sub-h b { font-weight: 600; color: #5c2a85; }
.sub-h .time { margin-left: auto; }
.sub-b { display: flex; flex-direction: column; gap: 8px; }
.sub-b .cmt-t { margin-top: 0; }
.sub-b .voice, .sub-b .lnk, .sub-rep .lnk { background: #fff; }
.sub-b .thumbs, .sub-b .voice-list { margin-bottom: 0; }
.sub-rep { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sub-l { font-size: 12px; line-height: 16px; font-weight: 600; color: #5c2a85; }
.sub-row { display: flex; flex-direction: column; gap: 6px; }
.sub-f { display: flex; align-items: center; gap: 8px; padding-top: 2px; }
.sub-f .btn-ghost:hover { background: rgba(255,255,255,.7); }
/* files tab */
.fsec { margin-bottom: 20px; }
.fsec h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.fsec h4 .cnt { font-size: 12px; font-weight: 500; color: var(--text-2); }
.f-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; min-width: 0; }
.f-row > .voice, .f-row > .lnk { flex: 1; min-width: 0; }
.f-by { font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; flex: none; }
.f-img { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f-img .thumb { width: 100%; }
.dr-title[contenteditable]:hover { border-color: var(--border); }
.dr-title:focus { border-color: var(--primary); }
.banner { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.banner .i { flex: none; }
.banner.b-open { background: var(--primary-sel); color: var(--text); }
.banner.b-review { background: #f3e9fb; color: #5c2a85; }
.banner.b-done { background: var(--ok-bg); color: var(--ok); }
.banner.b-over { background: var(--danger-bg); color: #a4152b; }
/* Details tab: two properties per row */
.props { display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px minmax(0, 1fr); grid-auto-rows: minmax(36px, auto); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-bottom: 4px; }
.prop { display: contents; }
.prop > span { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 8px; padding: 0 12px; min-height: 36px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.prop > span .i { width: 16px; height: 16px; }
.prop > .pv { border-bottom: 1px solid var(--line); min-height: 36px; display: flex; align-items: stretch; min-width: 0; }
.prop:nth-child(odd) > .pv { border-right: 1px solid var(--line); }
.prop:nth-last-child(-n+2) > span, .prop:nth-last-child(-n+2) > .pv { border-bottom: 0; }
.pv .lblc { min-height: 36px; }
.pv .mc-btn { justify-content: flex-start; padding: 0 12px; }
.pv .pv-t { display: flex; align-items: center; padding: 0 12px; font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv .cell-sel { appearance: none; border: 0; background: transparent var(--chev) no-repeat right 12px center; width: 100%; min-width: 0; padding: 0 30px 0 12px; font-size: 14px; color: var(--text); cursor: pointer; outline: none; }
.pv .cell-sel:hover { background-color: var(--row-hover); }
.pv .cell-sel:disabled { background-image: none; cursor: default; color: var(--text); opacity: 1; }
.sec { padding-top: 20px; margin-top: 20px; border-top: 1px solid var(--line); }
.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sec-h h4 { font-size: 16px; font-weight: 500; }
.sec-h .cnt { font-size: 14px; color: var(--text-2); }
.desc { font-size: 14px; line-height: 1.6; color: var(--text); outline: none; border: 1px solid transparent; border-radius: 4px; padding: 8px 10px; margin: 0 -11px; min-height: 40px; white-space: pre-wrap; }
.desc:empty::before { content: attr(data-ph); color: #676879; }
.desc[contenteditable]:hover { border-color: var(--border); }
.desc:focus { border-color: var(--primary); }

.voice { display: flex; align-items: center; gap: 12px; padding: 6px 14px 6px 6px; border: 1px solid var(--line); border-radius: 24px; background: #fff; max-width: 380px; }
.voice .play { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; flex: none; }
.voice .play:hover { background: var(--primary-h); }
.voice .play .i { width: 14px; height: 14px; fill: currentColor; stroke: none; }
.voice .wave { flex: 1; display: flex; align-items: center; gap: 2px; height: 26px; min-width: 90px; }
.voice .wave i { flex: 1; background: #b5d6fa; border-radius: 1px; min-width: 2px; }
.voice .wave i.p { background: var(--primary); }
.voice .vt { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 500; flex: none; }
.voice .vby { font-size: 12px; color: var(--text-2); flex: none; }
.voice-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; margin-bottom: 10px; }
.thumb { aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; border: 1px solid var(--line); position: relative; cursor: zoom-in; background: #f5f6f8; padding: 0; transition: border-color .12s; }
.thumb:hover { border-color: var(--border); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* file name on a white bar with dark text */
.thumb .nm { position: absolute; left: 0; right: 0; bottom: 0; font-size: 12px; line-height: 16px; padding: 4px 8px; background: #fff; color: var(--text); border-top: 1px solid var(--line); text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* sample image: neutral tile with a quiet line drawing in a light tint */
.ph { width: 100%; height: 100%; display: grid; place-items: center; background: #f5f6f8; padding: 8px 12px 30px; }
.ph svg { width: 100%; height: 100%; max-width: 150px; display: block; }
.ph .pf { fill: color-mix(in srgb, var(--tc) 15%, #fff); }
.ph .ps { fill: #fff; stroke: color-mix(in srgb, var(--tc) 40%, #fff); stroke-width: 1.5; }
.ph .pl { fill: color-mix(in srgb, var(--tc) 50%, #fff); }
.ph.big { padding: 40px; }
.ph.big svg { max-width: 480px; }
.links { display: flex; flex-direction: column; gap: 6px; }
.lnk { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; font-size: 14px; min-width: 0; color: var(--text); }
.lnk:hover { text-decoration: none; background: var(--row-hover); }
.lnk .fav { width: 30px; height: 30px; border-radius: 4px; background: var(--primary-sel); color: var(--primary); display: grid; place-items: center; flex: none; }
.lnk .lt { min-width: 0; flex: 1; }
.lnk .lt b { display: block; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lnk .lt span { display: block; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ref-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.checklist .ci { display: flex; align-items: center; gap: 12px; padding: 6px 4px; border-radius: 4px; font-size: 14px; }
.checklist .ci:hover { background: var(--row-hover); }
.checklist .ci.d span { color: var(--text-3); text-decoration: line-through; }
.cbox { width: 20px; height: 20px; border-radius: 4px; border: 1.5px solid var(--border-2); display: grid; place-items: center; color: transparent; background: #fff; flex: none; }
.cbox .i { width: 13px; height: 13px; stroke-width: 3; }
.cbox.on { background: var(--s-done); border-color: var(--s-done); color: #fff; }
.ci-add { display: flex; align-items: center; gap: 12px; padding: 6px 4px; color: var(--text-2); }
.ci-add input { border: 0; outline: none; flex: 1; font-size: 14px; background: transparent; min-width: 0; color: var(--text); }
.ci-add input::placeholder { color: #676879; }

.cmts { display: flex; flex-direction: column; gap: 12px; }
.cmt { display: grid; grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; padding: 12px 14px; box-shadow: none; border: 1px solid var(--line); border-radius: 8px; }
.cmt > .av { float: none; grid-row: span 2; }
.cmt-b { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.cmt-b:empty { display: none; }
.cmt-b .voice-list, .cmt-b .thumbs { margin-bottom: 0; }
.cmt-h { display: flex; gap: 8px; font-size: 14px; line-height: 20px; min-height: 20px; align-items: center; }
.cmt-h b { font-weight: 500; }
.cmt-h .time { margin-left: auto; font-size: 12px; }
.cmt-t { font-size: 14px; line-height: 20px; color: var(--text); margin-top: 2px; white-space: pre-wrap; overflow-wrap: anywhere; clear: none; }
.cmt-sys { font-size: 14px; color: var(--text-2); display: flex; align-items: center; gap: 10px; padding: 2px 4px; }
.cmt-sys b { color: var(--text); font-weight: 500; }
.cmt-sys .i { width: 15px; height: 15px; color: var(--text-3); }

.composer { border-top: 1px solid var(--line); padding: 12px 20px; flex: none; background: #fff; }
.composer-box { border: 1px solid var(--border-2); border-radius: 4px; background: #fff; }
.composer-box:hover { border-color: var(--text); }
.composer-box:focus-within { border-color: var(--primary); }
.composer textarea { width: 100%; border: 0; outline: none; resize: none; padding: 10px 12px 4px; font-size: 14px; min-height: 42px; max-height: 160px; display: block; background: transparent; }
.composer textarea::placeholder { color: #676879; }
.composer-tools { display: flex; align-items: center; gap: 2px; padding: 2px 6px 6px; }
/* task updates: composer sits at the top of the Updates tab, with labelled buttons */
.composer.labelled { border-top: 0; padding: 0; background: transparent; }
.composer.labelled textarea { min-height: 52px; }
.composer.labelled .composer-tools { gap: 4px; padding: 4px 6px 6px; flex-wrap: wrap; }
.composer.labelled .composer-tools .btn-ghost { color: var(--text-2); padding: 0 8px; }
.composer.labelled .composer-tools .btn-ghost:hover { color: var(--text); }
.lnk-slot { padding: 0 8px; }
.lnk-slot:empty { display: none; }
/* recording bar, inside the composer above the buttons */
.rec-slot:empty { display: none; }
.rec-slot .rec { height: 32px; margin: 2px 6px 4px; padding: 0 2px 0 10px; gap: 8px; border-radius: 4px; background: #fff0f2; color: var(--text); }
.rec-slot .rec .dot { width: 8px; height: 8px; background: #df2f4a; }
.rec-slot .rec .num { color: var(--text-2); }
.composer-att { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 12px; }
.composer-att:empty { display: none; }
.att-pill { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--text); max-width: 220px; }
.att-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-pill button { color: var(--text-2); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 3px; }
.att-pill button:hover { background: var(--hover); color: var(--text); }
.rec { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 4px; background: var(--danger-bg); color: #a4152b; font-size: 14px; margin-bottom: 8px; }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--s-stuck); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .3; } }

/* ============ Modal ============ */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: start center; padding: 8vh 16px 16px; overflow-y: auto; background: rgba(41,47,76,.7); animation: fade .15s ease; }
.modal { width: min(660px, 100%); background: #fff; border-radius: var(--r); box-shadow: var(--sh-lg); animation: pop .15s ease-out; display: flex; flex-direction: column; max-height: calc(100dvh - 10vh - 16px); overflow: hidden; }
.modal.sm { width: min(480px, 100%); }
/* action sheet (phone "+" button) */
.modal.sheet { width: min(400px, 100%); }
.sheet-h { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-2); padding: 14px 20px 6px; }
.sheet-list { display: flex; flex-direction: column; padding: 0 8px 8px; }
.sheet-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 12px; border-radius: 4px; font-size: 16px; color: var(--text); text-align: left; }
.sheet-row:hover { background: var(--hover); }
.sheet-row .ico { width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center; background: var(--primary-hl); color: var(--primary); flex: none; }
.sheet-row small { display: block; font-size: 12px; line-height: 16px; color: var(--text-2); }
.sheet-cancel { border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.sheet-cancel .btn { width: 100%; height: 44px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px 24px; flex: none; }
.modal-h h3 { font-size: 22px; font-weight: 500; }
.modal-b { padding: 12px 24px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-b > * { flex-shrink: 0; }
.modal.qa-wide { width: min(820px, 100%); }
/* New task / Add many header: tabs on a baseline */
.modal-h.qa-h { padding: 8px 12px 0 16px; align-items: flex-end; border-bottom: 1px solid var(--line); }
.qa-h .tabs { box-shadow: none; }
.qa-h .btn-icon { align-self: center; margin-bottom: 2px; }
.modal.qa .modal-b, .modal.qa-wide .modal-b { padding-top: 16px; }
.modal-f { display: flex; align-items: center; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); flex: none; }
.qa-title { border: 1px solid var(--border-2); border-radius: 4px; outline: none; font-size: 18px; width: 100%; padding: 8px 12px; color: var(--text); }
.qa-title:hover { border-color: var(--text); }
.qa-title:focus { border-color: var(--primary); }
.qa-title::placeholder { color: #676879; }
.qa-desc { border: 1px solid var(--border-2); border-radius: 4px; outline: none; width: 100%; resize: vertical; font-size: 14px; line-height: 1.5; min-height: 64px; padding: 8px 12px; color: var(--text); }
.qa-desc:hover { border-color: var(--text); }
.qa-desc:focus { border-color: var(--primary); }
.qa-desc::placeholder { color: #676879; }
.qa-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.qa-grid.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.qa-grid.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
#qa-more[hidden] { display: none; }
.qa-more { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.qa-more > .qa-grid { width: 100%; }
.qa-defs { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.qa-defs > .lbl { color: var(--text-2); font-weight: 500; }
.qa-defs .field > label, .qa-defs .field > .lbl { font-weight: 400; color: var(--text-2); font-size: 12px; line-height: 16px; }
.qa-defs .seg button { height: 34px; }
.qa-defs .select, .qa-defs .input { height: 36px; }
.modal.qa { width: min(680px, 100%); }
.modal.qa .qa-grid .select { height: 36px; }
.qa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-who { height: 32px; padding: 0 10px 0 5px; gap: 6px; }
.qa-who .av { --s: 20px; font-size: 9px; }
.qa-who .av-open { border-width: 1px; }
.qa-who .av-open .i { width: 12px; height: 12px; }
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; position: relative; }
.quick-dates .fchip { height: 32px; }
.quick-dates .fchip .i { color: var(--text-2); }
.att-zone { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
#qa-rec:empty, #qa-lnk:empty, #rec-ref:empty { display: none; }
.att-prev { display: flex; flex-direction: column; gap: 10px; }
.att-prev:empty { display: none; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.sw { width: 32px; height: 32px; border-radius: 4px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border-2); display: grid; place-items: center; color: #fff; }
.sw.on { box-shadow: 0 0 0 2px var(--text); }
.member-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.mp { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 4px; border-radius: 17px; border: 1px solid var(--border-2); font-size: 14px; color: var(--text); }
.mp.on { background: var(--primary-sel); border-color: var(--primary); }
/* Add many: live preview, one row per line */
.bulk-prev { border: 1px solid var(--line); border-radius: 4px; flex: none; max-height: 280px; overflow-y: auto; }
.bulk-prev .br { display: grid; grid-template-columns: 20px minmax(0, 1fr) 110px 120px 72px 64px 84px; gap: 8px; align-items: center; min-height: 36px; padding: 0 8px 0 12px; font-size: 14px; border-bottom: 1px solid var(--line); }
.bulk-prev .br:last-child { border-bottom: 0; }
.bulk-prev .n { color: var(--text-2); font-size: 12px; font-variant-numeric: tabular-nums; }
.bulk-prev .bt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-prev .bc { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 6px; border-radius: 4px; font-size: 12px; color: var(--text-2); min-width: 0; max-width: 100%; justify-self: start; white-space: nowrap; }
.bulk-prev .bc i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.bulk-prev .bc .av { --s: 18px; font-size: 8px; }
.bulk-prev .bc .i { color: var(--text-2); }
.bulk-prev .bc.set { background: var(--primary-hl); color: var(--text); box-shadow: inset 0 0 0 1px #aed4fc; }
.bulk-prev button.bc { cursor: pointer; }
.bulk-prev button.bc:hover { background: var(--hover); color: var(--text); }
.bulk-prev button.pri { cursor: pointer; }
.bulk-prev button.pri:hover { filter: brightness(.92); }
.qa-grid.qa-g-due { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.bulk-prev .pri { min-width: 0; width: 100%; height: 24px; border-radius: 4px; font-size: 12px; padding: 0 4px; }
.bulk-prev .ba { display: inline-flex; gap: 2px; justify-content: flex-end; }
.bulk-prev .ba .btn-icon.xs { width: 24px; height: 24px; position: relative; }
.bulk-prev .ba .cd { position: absolute; top: -2px; right: -2px; min-width: 14px; height: 14px; border-radius: 7px; background: var(--primary); color: #fff; font-size: 10px; line-height: 14px; font-weight: 600; text-align: center; padding: 0 3px; }
.bulk-prev .bp-empty { padding: 10px 12px; font-size: 14px; color: var(--text-2); text-align: center; }
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.85); display: grid; place-items: center; padding: 24px; animation: fade .15s ease; }
.lightbox .lb-img { width: min(900px, 92vw); aspect-ratio: 16/10; border-radius: 6px; overflow: hidden; }
.lightbox .lb-img img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.lightbox .lb-cap { color: #e4e7ec; font-size: 14px; margin-top: 10px; text-align: center; }
.lightbox .btn-icon { position: absolute; top: 16px; right: 16px; color: #fff; background: rgba(255,255,255,.15); }

/* ============ Notifications / toasts ============ */
.pop { position: absolute; top: calc(100% + 6px); right: 0; width: 400px; max-width: calc(100vw - 24px); background: #fff; border-radius: var(--r); box-shadow: var(--sh-lg); z-index: 50; animation: pop .12s ease-out; overflow: hidden; }
.pop-h { display: flex; align-items: center; gap: 8px; padding: 14px 18px 8px; font-weight: 600; font-size: 18px; line-height: 24px; }
.pop-b { max-height: min(520px, calc(100dvh - 180px)); overflow-y: auto; }
.pop-sec { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-2); padding: 10px 18px 6px; border-top: 1px solid var(--line); }
.pop-b > .pop-sec:first-child { border-top: 0; }
.notif-r { display: flex; align-items: flex-start; gap: 8px; padding: 0 18px 0 0; }
.notif-r:hover { background: var(--row-hover); }
.notif-r + .notif-r { border-top: 1px solid var(--line); }
.notif-r > .btn, .notif-r > .tag { flex: none; margin-top: 10px; }
.notif { display: flex; gap: 12px; padding: 10px 0 10px 18px; font-size: 14px; line-height: 20px; color: var(--text-2); cursor: pointer; text-align: left; flex: 1; min-width: 0; }
.notif b { color: var(--text); font-weight: 500; }
.notif .ndot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); margin-top: 6px; flex: none; }
.notif.read .ndot { background: transparent; }
.pop-f { border-top: 1px solid var(--line); padding: 6px 10px; display: flex; align-items: center; }
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center; pointer-events: none; }
.toast { background: #323338; color: #fff; padding: 8px 8px 8px 14px; min-height: 40px; min-width: 200px; border-radius: 4px; font-size: 14px; display: flex; align-items: center; gap: 10px; box-shadow: var(--sh-lg); animation: pop .15s ease-out; pointer-events: auto; max-width: calc(100vw - 32px); }
.toast.ok { background: #00854d; }
.toast.err { background: #d83a52; }
.toast > span { flex: 1; min-width: 0; }
.toast .i { color: #fff; }
.toast button { color: #fff; font-weight: 600; font-size: 14px; padding: 3px 8px; border-radius: 3px; border: 1px solid rgba(255,255,255,.7); }
.toast button:hover { background: rgba(255,255,255,.15); }

/* ============ Generic table ============ */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 14px; font-weight: 400; color: var(--text-2); padding: 0 14px; height: 40px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); white-space: nowrap; background: #fff; position: sticky; top: 0; z-index: 2; }
.tbl th:last-child, .tbl td:last-child { border-right: 0; }
.tbl td { padding: 6px 14px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: middle; height: 46px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--row-hover); }
.tbl tr.ok td { background: #f2fbf6; }
.tbl .ed { outline: none; border: 1px solid transparent; border-radius: 3px; padding: 4px 6px; margin: -5px -7px; min-height: 28px; overflow-wrap: break-word; }
.tbl .ed[contenteditable]:hover { border-color: var(--border); }
.tbl .ed:focus { background: #fff; border-color: var(--primary); }
.tbl .ed:empty::before { content: attr(data-ph); color: #676879; }
.tbl input.num-in { width: 64px; height: 32px; border: 1px solid transparent; border-radius: 3px; background: transparent; padding: 0 8px; text-align: right; font-variant-numeric: tabular-nums; outline: none; }
.tbl input.num-in:hover { border-color: var(--border); }
.tbl input.num-in:focus { border-color: var(--primary); background: #fff; }
.tbl .grp td { background: var(--surface-2); height: 50px; }
.tbl td.num { white-space: nowrap; }
.tbl .cell { display: flex; align-items: center; gap: 8px; }
.tbl .cell-sel { appearance: none; border: 1px solid transparent; background: transparent; padding: 4px 8px; margin-left: -9px; border-radius: 3px; font-size: 14px; cursor: pointer; outline: none; max-width: 100%; }
.tbl .cell-sel:hover { border-color: var(--border); }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); }
.card .tbl-wrap { border: 0; border-radius: 0; }
.reply { font-size: 14px; color: var(--ok); display: flex; align-items: center; gap: 6px; margin-top: 3px; }

/* read-only label cells fill the whole table cell */
.rep-tbl td.mc-lbl, .rep-adm td.mc-lbl, .rq-tbl td.mc-lbl { position: relative; padding: 0; }
.rep-tbl td.mc-lbl .lblc, .rep-adm td.mc-lbl .lblc, .rq-tbl td.mc-lbl .lblc { position: absolute; inset: 0; width: auto; height: auto; }
span.lblc { cursor: default; }
span.lblc:hover { filter: none !important; }
span.lblc:hover::after { content: none !important; }
.menu button[disabled] { color: var(--text-3); cursor: default; }
.menu button[disabled]:hover { background: transparent; }
.dd-dot.sm { width: 8px; height: 8px; display: inline-block; margin-right: 6px; border-radius: 2px; }
.dd-gen { color: var(--text-2); }
.rep-menu .dd-i .rt-code { flex: none; margin-right: 0; }

/* ---- Daily report: employee (works like a sheet) ---- */
.rep-h { gap: 12px; }
.rep-nav { display: inline-flex; align-items: center; gap: 8px; }
.rep-dots { display: inline-flex; align-items: center; gap: 6px; }
.rep-dot { width: 24px; height: 24px; border-radius: 50%; padding: 0; display: inline-grid; place-items: center; font-size: 12px; line-height: 1; font-weight: 600; background: var(--ui-bg); color: var(--text-2); flex: none; }
.rep-dot:not([disabled]):hover { filter: brightness(.93); }
.rep-dot[disabled] { cursor: default; }
.rep-dot.s-sent { background: var(--s-done); color: #323338; }
.rep-dot.s-draft { background: var(--s-progress); color: #323338; }
.rep-dot.s-missed { background: var(--s-stuck); color: #fff; }
.rep-dot.s-late { background: #fff; color: #8a5300; box-shadow: inset 0 0 0 2px var(--s-progress); }
.rep-dot.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
.rep-dot.s-late.on { box-shadow: inset 0 0 0 2px var(--s-progress), 0 0 0 2px #fff, 0 0 0 4px var(--primary); }
.rep-card { overflow: clip; } /* lets the Submit footer stick to the bottom of the screen */
/* fits a 760px content area (1024 laptop) with no sideways scroll */
.rep-tbl { table-layout: fixed; min-width: 0; }
.rep-tbl col.rc-task { width: 28%; } .rep-tbl col.rc-hrs { width: 84px; } .rep-tbl col.rc-st { width: 140px; } .rep-tbl col.rc-lnk { width: 112px; }
.rep-tbl th { height: 36px; padding: 0 12px; }
.rep-tbl td { height: 44px; padding: 4px 12px; vertical-align: top; }
.rep-tbl td.c-hrs, .rep-tbl td.c-lnk { vertical-align: middle; }
.rep-tbl td.c-hrs { padding: 4px 8px; }
.rep-task { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: calc(100% + 16px); margin: 0 -8px; min-height: 36px; padding: 2px 26px 2px 8px; border: 1px solid transparent; border-radius: 4px; text-align: left; color: var(--text); background: transparent var(--chev) no-repeat right 8px center; }
.rep-task:hover { border-color: var(--border-2); }
.rep-task .rt-1 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; font-size: 14px; line-height: 20px; overflow: hidden; overflow-wrap: anywhere; }
.rt-ph { color: #676879; }
.rep-new-task.unset { border: 1px dashed var(--border-2); background-color: #fff; }
.rep-new-task.unset:hover { border-color: var(--text-2); }
.rep-task .rt-2 { display: flex; max-width: 100%; min-width: 0; line-height: 16px; }
.rep-task.ro { background-image: none; padding-right: 8px; cursor: default; }
button.rep-task.ro { cursor: pointer; }
button.rep-task.ro:hover { border-color: transparent; }
button.rep-task.ro:hover .rt-1 { color: var(--primary); }
.rt-code { color: var(--text-2); font-size: 12px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.rt-other { color: var(--text-2); }
.rep-work { display: block; width: calc(100% + 16px); margin: 0 -8px; min-height: 36px; max-height: 160px; padding: 6px 8px; border: 1px solid transparent; border-radius: 4px; background: transparent; resize: none; font: inherit; font-size: 14px; line-height: 20px; color: var(--text); outline: none; field-sizing: content; white-space: pre-wrap; overflow-wrap: break-word; }
.rep-work::placeholder { color: #676879; }
.rep-work:hover { border-color: var(--border-2); }
.rep-work:focus { border-color: var(--primary); background: #fff; }
.rep-txt { white-space: pre-wrap; overflow-wrap: break-word; line-height: 20px; padding: 8px 0; }
.rep-hv { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.rep-hv b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
/* hours: one small field with an "h" after it (arrow keys step by 0.5) */
.hrs-in { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 8px 0 2px; border: 1px solid transparent; border-radius: 4px; cursor: text; color: var(--text-2); font-size: 13px; }
.hrs-in:hover { border-color: var(--border-2); }
.hrs-in:focus-within { border-color: var(--primary); background: #fff; }
.tbl .hrs-in input.num-in { width: 34px; height: 28px; padding: 0 2px; border: 0; text-align: right; font-size: 14px; color: var(--text); background: transparent; -moz-appearance: textfield; }
.hrs-in input.num-in::-webkit-outer-spin-button, .hrs-in input.num-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hrs-in input.num-in::placeholder { color: var(--text-3); }
/* Link cell: grey "+ Add link" text only. Delete has its own narrow column at the row end */
.rep-tbl td.c-lnk { position: relative; }
.rep-tbl col.rc-del { width: 40px; }
.rep-tbl td.c-del { padding: 4px; vertical-align: middle; text-align: center; }
.rep-tbl td.c-del .rep-del { position: static; transform: none; opacity: 0; transition: opacity .12s; }
.rep-tbl tr:hover td.c-del .rep-del, .rep-tbl td.c-del .rep-del:focus-visible { opacity: 1; }
@media (hover: none) { .rep-tbl td.c-del .rep-del { opacity: 1; } }
.rep-lk { display: flex; align-items: center; min-width: 0; }
.rep-lnk { font-size: 13px; color: var(--text-2); padding: 4px 6px; margin-left: -6px; border-radius: 4px; white-space: nowrap; }
.rep-lnk:hover { color: var(--primary); background: var(--primary-hl); }
.rep-dom { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; min-width: 0; font-size: 12px; line-height: 16px; }
.rep-dom a { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
.rep-dom .btn-icon.xs { width: 22px; height: 22px; flex: none; }
.rep-lnk-in { width: calc(100% + 8px); margin: 0 -4px; height: 32px; border: 1px solid var(--primary); border-radius: 4px; padding: 0 6px; font-size: 12px; outline: none; background: #fff; }
/* delete: a visible x at the end of every editable row */
.rep-del { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.rep-del:hover { color: var(--danger); background: var(--danger-bg); }
.rep-more { display: none; }
/* suggested entries (tasks I touched today): not entries yet, so muted with a dashed outline */
.rep-tbl tr.rep-sg td { height: auto; padding: 6px 8px; background: #fff; }
.rep-tbl tbody tr.rep-sg:hover td { background: #fff; }
.sg-box { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 44px; padding: 5px 6px 5px 10px; border: 1px dashed var(--border-2); border-radius: 6px; background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.sg-tag { flex: none; height: 20px; display: inline-flex; align-items: center; padding: 0 6px; border-radius: 4px; background: #fff; border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--text-2); }
.sg-t { flex: 0 1 auto; min-width: 0; max-width: 44%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.sg-box > .pchip { flex: none; }
.sg-q { flex: 0 1 auto; min-width: 0; color: var(--text-2); }
.sg-acts { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.sg-acts .btn .i { color: var(--primary); }
.rep-tbl tr.need td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.rep-tbl tr.need .rep-work:placeholder-shown, .rep-tbl tr.need .hrs-in:has(input:placeholder-shown) { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
/* add line: task picker | what | hours | Add. Sheet-like: plain cells, a border only on hover/focus */
.rep-tbl tbody tr.rep-add-r td { background: #fafbfd; }
.rep-tbl tbody tr.rep-add-r:hover td { background: #fafbfd; }
.rep-add-r td { height: 52px; vertical-align: middle; }
.rep-add { width: 100%; min-width: 0; height: 36px; border: 1px solid transparent; border-radius: 4px; padding: 0 8px; outline: none; background: transparent; font-size: 14px; color: var(--text); }
.rep-add::placeholder { color: #676879; }
.rep-add:hover { border-color: var(--border-2); background: #fff; }
.rep-add:focus { border-color: var(--primary); background: #fff; }
input.rep-add-h, .tbl input.rep-add-h { width: 52px; height: 36px; border: 1px solid transparent; border-radius: 4px; background: transparent; text-align: center; padding: 0 4px; -moz-appearance: textfield; }
input.rep-add-h:hover, .tbl input.rep-add-h:hover { border-color: var(--border-2); background: #fff; }
input.rep-add-h::-webkit-outer-spin-button, input.rep-add-h::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.rep-add-h:focus, .tbl input.rep-add-h:focus { border-color: var(--primary); background: #fff; }
.rep-add-r .rep-new-task.unset { border-color: transparent; background-color: transparent; }
.rep-add-r .rep-new-task.unset:hover { border-color: var(--border-2); background-color: #fff; }
.rep-add-r td.c-addgo { padding-left: 12px; }
/* ONE "Quick add" line under the add row: same white sheet, no band of its own */
.rep-quick { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 10px 12px 12px; }
.rq-l { font-size: 13px; font-weight: 500; color: var(--text-2); margin-right: 2px; white-space: nowrap; }
.rep-chip { height: 30px; padding: 0 10px 0 8px; gap: 5px; max-width: 320px; background: #fff; }
.rep-chip .i { color: var(--primary); }
.rep-chip .rt-code { margin-right: 0; }
.rep-chip:hover { border-color: var(--primary); background: var(--primary-hl); }
.rep-chip.gen { color: var(--text-2); }
.rq-new { flex: none; margin-left: 2px; padding: 0 6px; height: 18px; display: inline-flex; align-items: center; border-radius: 9px; background: #e5f4ff; color: #0060b9; font-size: 11px; font-weight: 500; }
.mrep .rep-quick { padding: 0 12px 10px 16px; }
/* outside a sheet (My day card, phone report) the add fields keep a visible outline */
.mrep-add .rep-add, .mrep-add input.rep-add-h { border-color: var(--border-2); background: #fff; }
.mrep-add .rep-add:focus, .mrep-add input.rep-add-h:focus { border-color: var(--primary); }
.mrep-add .rep-new-task.unset { border-style: solid; }
/* week dots: label + legend */
.rep-wk { display: inline-flex; align-items: center; gap: 8px; }
.rw-l { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.rw-lg { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.rw-lg > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.rw-lg i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.rw-lg i.s-sent { background: var(--s-done); } .rw-lg i.s-draft { background: var(--s-progress); } .rw-lg i.s-missed { background: var(--s-stuck); } .rw-lg i.s-off { background: var(--ui-bg); box-shadow: inset 0 0 0 1px var(--border); }
/* the last report, read only, under today's sheet */
.rep-last { margin-top: 16px; }
.rl-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 48px; padding: 6px 12px 6px 16px; }
.rl-h h3 { font-size: 15px; font-weight: 600; }
.rl-n { font-size: 13px; color: var(--text-2); }
.rl-r { display: grid; grid-template-columns: minmax(0, 30%) minmax(0, 1fr) 56px; gap: 12px; align-items: center; min-height: 34px; padding: 4px 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.rl-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.rl-w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-hr { text-align: right; font-variant-numeric: tabular-nums; }
.rep-foot { position: sticky; bottom: 0; z-index: 3; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -4px 8px rgba(0,0,0,.06); }
.rf-info { display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; min-width: 0; }
.rf-line { display: inline-flex; align-items: center; gap: 10px; }
.rf-n { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.rf-n b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rf-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--ui-bg); overflow: hidden; flex: none; }
.rf-bar i { display: block; height: 100%; border-radius: 3px; }
.rf-bar.sm { width: 64px; }
.rf-due, .rf-warn { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.rf-due { color: var(--text-2); }
.rf-warn { color: #d83a52; font-weight: 500; }
.rf-warn.soft { color: var(--text-2); font-weight: 400; }
.rf-go { height: 40px; }
.rep-foot.sent { background: #e5f9ef; }
.rf-msg { display: inline-flex; align-items: center; gap: 8px; color: #00854d; font-weight: 500; }
.rep-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rep-empty .i { margin-bottom: 4px; }
.rep-empty b { color: var(--text); font-weight: 600; }
.rep-empty .btn { margin-top: 10px; }

/* ---- Daily reports: admin ---- */
.ra-h { gap: 8px 12px; }
.ra-date { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs.tg { box-shadow: none; border: 1px solid var(--border-2); border-radius: 4px; gap: 0; overflow: hidden; }
.tabs.tg .tab { height: 34px; padding: 0 14px; border-bottom: 0; border-radius: 0; }
.tabs.tg .tab + .tab { border-left: 1px solid var(--border-2); }
.tabs.tg .tab.on, .tabs.tg .tab.on:hover { background: var(--primary-sel); }
.ra-f .select { width: auto; max-width: 180px; }
.ra-sum { display: flex; align-items: center; gap: 10px 28px; flex-wrap: wrap; min-height: 64px; padding: 10px 20px; margin-bottom: 12px; overflow: visible; }
.ra-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ra-t + .ra-t { padding-left: 28px; border-left: 1px solid var(--line); }
.ra-big { font-size: 14px; line-height: 24px; color: var(--text-2); white-space: nowrap; }
.ra-big b { font-size: 20px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; margin-right: 2px; }
.ra-sub { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; color: var(--text-2); white-space: nowrap; }
.ra-sub .sl-dot { color: var(--text-3); }
.ra-bar { display: flex; width: 120px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--ui-bg); flex: none; }
.ra-bar i { display: block; height: 100%; }
.ra-bar i + i { box-shadow: -1px 0 0 #fff; }
.ra-lg { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 5px; border-radius: 4px; font-size: 13px; color: var(--text); }
.ra-lg i { width: 8px; height: 8px; border-radius: 2px; }
.ra-lg:hover { background: var(--hover); }
.ra-lg.on { background: var(--primary-sel); font-weight: 500; }
.ra-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.ra-t.ra-miss { flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; flex: 1 1 auto; }
.ra-ml { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.ra-miss .btn { margin-left: 4px; }
.rep-adm { table-layout: fixed; }
.rep-adm th { height: 36px; padding: 0 12px; }
.rep-adm td { height: 44px; padding: 4px 12px; }
.tbl .rep-adm tr.grp td, .rep-adm tr.grp td { height: 40px; padding: 0 14px 0 8px; background: var(--surface-2); }
.rep-adm tbody tr.grp:hover td { background: var(--surface-2); }
.rg { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rg-chev { flex: none; width: 26px; height: 26px; display: inline-grid; place-items: center; }
.rg-chev .i { transition: transform .15s; }
tr.grp.closed .rg-chev .i { transform: rotate(-90deg); }
.rg-who { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rg-who b { font-size: 14px; font-weight: 600; white-space: nowrap; }
.rg-who span { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rg-h { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); white-space: nowrap; }
.rg-h b { font-size: 14px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.rep-adm td.c-task { line-height: 20px; }
.rt-a { display: block; color: var(--text); }
.rt-a:hover { color: var(--primary); text-decoration: none; }
.rt-sub { display: flex; align-items: center; gap: 6px; min-width: 0; line-height: 16px; }
.rt-sub .rt-code { margin: 0; }
.rep-adm td.c-work { line-height: 20px; overflow-wrap: break-word; }
.rep-adm td.c-hrs { text-align: right; font-variant-numeric: tabular-nums; }
.rep-adm td.c-hrs b { font-weight: 600; }
.rep-adm td.c-lnk { text-align: center; padding: 4px; }
/* people with no report: one row at the bottom */
.rep-adm tr.ns-row td, .tbl .rep-adm tr.ns-row td { background: #fff; height: 48px; }
.rep-adm tbody tr.ns-row:hover td { background: #fff; }
.ns-row .rg-chev { color: var(--danger); }
.ns-l { font-size: 14px; font-weight: 600; color: #a4152b; white-space: nowrap; }
.ns-row .mchip { height: 28px; font-size: 13px; }
.rep-week { table-layout: fixed; min-width: 860px; }
.rep-week th.wk-d, .rep-week th.wk-n { text-align: center; padding: 0 6px; }
.rep-week th.today { color: var(--primary); font-weight: 600; }
.rep-week td { height: 44px; padding: 4px 12px; }
.rep-week td.wk-c { padding: 2px; }
.wk-cell { width: 100%; height: 40px; border-radius: 4px; font-size: 13px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; }
.wk-cell:not([disabled]):hover { box-shadow: inset 0 0 0 1px var(--text-2); }
.wk-cell[disabled] { cursor: default; }
.wk-cell.s-sent { background: #e5f9ef; }
.wk-cell.s-late { background: #e5f9ef; box-shadow: inset 0 0 0 2px var(--s-progress); }
.wk-cell.s-draft { background: #fff4e0; }
.wk-cell.s-missed { background: #ffebef; color: #a4152b; }
.wk-cell.s-off { background: #f6f7fb; color: var(--text-3); font-weight: 400; }
.wk-cell.s-none, .wk-cell.s-future { color: var(--text-3); }
.rep-week td.wk-n { text-align: center; font-variant-numeric: tabular-nums; }
.rep-week td.wk-n.miss { color: #a4152b; font-weight: 600; }
.wk-legend { gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.wk-legend > span:not(.sp):not(.hint) { display: inline-flex; align-items: center; gap: 6px; }
.wk-legend i { width: 14px; height: 14px; border-radius: 3px; }
.wk-legend i.s-sent { background: #e5f9ef; box-shadow: inset 0 0 0 1px #bbdbc9; }
.wk-legend i.s-draft { background: #fff4e0; box-shadow: inset 0 0 0 1px #fed59e; }
.wk-legend i.s-missed { background: #ffebef; box-shadow: inset 0 0 0 1px #f4c3cb; }
.wk-legend i.s-off { background: #f6f7fb; box-shadow: inset 0 0 0 1px var(--line); }

/* ---- Requests ---- */
.rq-bar { margin-bottom: 12px; }
.rq-tbl { table-layout: fixed; }
.rq-tbl th { height: 36px; }
.rq-tbl td { height: 48px; padding: 6px 14px; }
.rq-t { font-size: 14px; font-weight: 500; line-height: 20px; overflow-wrap: break-word; }
.rq-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--text-2); min-width: 0; }
.rq-sub .av { --s: 20px; font-size: 9px; }
.rq-sub .sl-dot { color: var(--text-3); }
.rq-tbl td.c-at, .rq-tbl td.c-need { white-space: nowrap; }
.rq-tbl td.c-need .nb { font-size: 14px; color: var(--text); }
.rq-tbl td.c-need.faint .nb { color: var(--text-2); }
.rq-tbl td.c-need .tag { margin-left: 6px; height: 20px; padding: 0 6px; }
.rq-ok { display: inline-grid; place-items: center; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); vertical-align: -2px; }
.rq-ok .i { width: 11px; height: 11px; stroke-width: 3; }
.reply b { font-weight: 600; }
.rq-tbl td.c-act { text-align: right; white-space: nowrap; }
.rq-tbl td.c-act .btn + .btn { margin-left: 6px; }
.rq-tbl tr.dim td { background: var(--surface-2); }
.rq-tbl tr.dim .rq-t { color: var(--text-2); font-weight: 400; }
.rq-tbl tr.rq-grp td { height: 40px; padding: 0 8px; background: #fff; }
.rq-tbl tbody tr.rq-grp:hover td, .rq-tbl tbody tr.rq-add:hover td, .rq-tbl tbody tr.rq-empty:hover td { background: #fff; }
.rq-tg { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: 4px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.rq-tg:hover { background: var(--hover); color: var(--text); }
.rq-tg .c { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 6px; border-radius: 9px; background: #e7e9ef; font-size: 12px; color: #323338; }
.rq-add td { height: 56px; }
.rq-add-in { display: flex; align-items: center; gap: 10px; color: var(--text-3); }
.rq-add-in input:not([type=checkbox]) { flex: 1; min-width: 0; height: 36px; border: 1px dashed var(--border-2); border-radius: 4px; padding: 0 10px; outline: none; font-size: 14px; background: #fff; color: var(--text); }
.rq-add-in input:not([type=checkbox])::placeholder { color: #676879; }
.rq-add-in input:not([type=checkbox]):focus { border-style: solid; border-color: var(--primary); }
.rq-add-in .check { flex: none; }
.rq-add-x { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 0 26px; }
/* need-by chips + attach image (Ask admin) */
.ask-need { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.an-l { font-size: 13px; color: var(--text-2); margin-right: 2px; white-space: nowrap; }
.ask-need .fchip, .ask-img { height: 28px; padding: 0 10px; font-size: 13px; }
.ask-need .fchip .i, .ask-img .i { color: var(--text-2); }
.ask-pick { position: relative; display: inline-flex; }
.ask-img { cursor: pointer; }
.ask-img.on { background: var(--primary-hl); border-color: var(--primary); }
.rq-need { display: block; font-size: 12px; line-height: 16px; color: var(--text-2); margin-top: 2px; }
.rq-img { display: inline-flex; align-items: center; gap: 3px; margin-left: 8px; font-size: 12px; font-weight: 400; color: var(--text-2); vertical-align: middle; }
.ask-proj { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px 0 10px; border: 1px solid var(--border-2); border-radius: 4px; background: #fff; color: var(--text-2); flex: none; max-width: 200px; }
.ask-proj:hover { border-color: var(--text); }
.ask-proj .pchip { font-size: 13px; color: var(--text); }
tr.rs-on td { background: var(--primary-hl) !important; }
tr.rs-inline td { background: var(--primary-hl); padding: 6px 14px 12px; height: auto; }
div.rs-inline { padding: 6px 14px 12px; background: var(--primary-hl); border-bottom: 1px solid var(--line); }
.rs-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rs-l { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.input.rs-in { width: 260px; flex: 0 1 260px; height: 32px; }
.rs-chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.rs-chips .fchip { height: 28px; padding: 0 10px; font-size: 13px; }
/* Ask admin popover */
.ask-pop { position: fixed; z-index: 60; width: 360px; max-width: calc(100vw - 16px); background: #fff; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.2); padding: 16px; animation: pop .12s ease-out; }
.ask-b { display: flex; flex-direction: column; gap: 12px; }
.ask-h { display: flex; align-items: center; margin: -6px -8px -4px 0; }
.ask-h h3 { font-size: 18px; font-weight: 600; line-height: 24px; }
.input.ask-in { height: 40px; }
.input.ask-in.err { border-color: var(--danger); }
.ask-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ask-f { display: flex; align-items: center; gap: 8px; }
.ask-f .hint { display: inline-flex; align-items: center; gap: 5px; }
.modal.ask-sheet .ask-b { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); }

/* ---- My day ---- */
/* Today's report strip */
.mrep { margin-bottom: 14px; }
.mrep-h { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 48px; padding: 6px 12px 6px 16px; border-bottom: 1px solid var(--line); }
.mrep-h h3 { font-size: 16px; font-weight: 600; white-space: nowrap; }
.mrep-n { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.mrep-n b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.mrep-due { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 500; color: #8a5300; white-space: nowrap; }
.mrep.late { border-color: #fed59e; }
.mrep.late .mrep-h { background: var(--warn-bg); }
.mrep.sent .mrep-h { background: #f2fbf6; }
.mrep-r { display: grid; grid-template-columns: minmax(0, 32%) minmax(0, 1fr) 56px; gap: 12px; align-items: center; min-height: 36px; padding: 4px 16px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--text); }
.mrep-r:hover { background: var(--row-hover); text-decoration: none; }
.mr-t, .mr-w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-w { color: var(--text-2); }
.mr-w.mr-none { color: var(--primary-text); }
.mr-h { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mrep .w-more { border-top: 0; border-bottom: 1px solid var(--line); height: 32px; font-size: 13px; }
.mrep-add { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 16px; }
.mrep-add .rep-task { width: 32%; flex: none; margin: 0; min-height: 36px; }
.mrep-add .rep-task .rt-1 { -webkit-line-clamp: 1; }
.mrep-add .rep-add { flex: 1; }
/* a task I touched today, offered as a suggestion (Add puts it in the line below) */
.mrep-sg { display: flex; align-items: center; gap: 6px 10px; min-height: 40px; margin: 8px 12px 0 16px; padding: 4px 4px 4px 10px; border: 1px dashed var(--border-2); border-radius: 6px; background: var(--surface-2); font-size: 14px; color: var(--text-2); }
.mrep-sg .sg-t { max-width: none; flex: 0 1 auto; }
.mrep-sg .sg-q { flex: none; }
.mrep-sg .btn-xs .i { color: var(--primary); }
/* Send for approval popover (employee) */
.ask-pop.appr-pop { z-index: 85; width: 390px; }
.ap-t { font-size: 14px; line-height: 20px; color: var(--text-2); }
.ap-t b { color: var(--text); font-weight: 500; }
.textarea.ap-note { min-height: 64px; resize: none; }
.ap-row { display: flex; align-items: center; gap: 8px; }
.ap-img { height: 36px; cursor: pointer; }
.ap-img .i { color: var(--text-2); }
.ap-img.on { background: var(--primary-hl); border-color: var(--primary); }
.ap-lnk { position: relative; flex: 1; min-width: 0; }
.ap-lnk > .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-2); pointer-events: none; }
.ap-lnk .input { height: 36px; padding-left: 30px; }
.ap-from { margin-top: -6px; font-size: 12px; }
/* Add many: who the tasks are for, next to the short Create button */
.qa-bsum { font-size: 13px; color: var(--text-2); min-width: 0; }
.sl-all { margin-left: 8px; }
.myday .sumline { gap: 4px 8px; min-height: 32px; margin-bottom: 6px; }
.myday .sumline.warn { min-height: 36px; }
.myday .sumline.warn .btn { margin: 2px 0; }
.sumline .sl-dot { color: var(--text-3); }
.sumline .link { font-weight: 400; }
.sumline .sl-j b, .sumline a b { color: inherit; }
.sl-warn { display: inline-flex; align-items: center; gap: 6px; }
.sumline.warn .btn { margin: 4px 0; }
.mgroup.inl { margin-bottom: 16px; }
.mrow.mg-row { min-height: 36px; }
.mrow.mg-row > div { height: 36px; }
.mrow.mg-row > .mitem.mg-h { margin: 0; padding: 0 10px 0 8px; gap: 8px; cursor: pointer; }
.mrow.mg-row > .mitem.mg-h:hover { background: var(--row-hover); }
.mg-row .mg-h h3 { font-size: 16px; font-weight: 600; line-height: 22px; white-space: nowrap; }
.mg-row .mg-h .cnt { white-space: nowrap; }
.mg-row .mg-h .chev { width: 18px; height: 18px; }
.mg-row .mg-h .btn { flex: none; }
.mgroup.inl.closed > .mg-h { height: 36px; margin: 0; padding: 0 10px 0 8px; border: 1px solid var(--line); border-left: 6px solid var(--gc); border-radius: 6px 0 0 6px; background: #fff; }
.mgroup.inl.closed > .mg-h h3 { font-size: 16px; font-weight: 600; }
.madd > .madd-in { gap: 8px; }
.madd-proj { flex: none; height: 28px; display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; color: var(--text-2); }
.madd-proj:hover { border-color: var(--border-2); background: #fff; }
.missing-list { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mchip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px 0 4px; border-radius: 16px; background: var(--danger-bg); color: #a4152b; font-size: 14px; border: 1px solid transparent; transition: border-color .12s, background .12s; }
.mchip.draft { background: var(--warn-bg); color: #8a5300; }
button.mchip:hover { border-color: currentColor; }
.mchip .mc-i { opacity: .75; margin-left: -2px; }
/* a person's group after clicking their pill */
tr.grp.flash-g td { animation: flash 1.4s; }
.date-nav { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--border-2); border-radius: 4px; background: #fff; height: 36px; padding: 0 2px; position: relative; }
.date-nav b { font-size: 14px; font-weight: 500; padding: 0 10px; min-width: 130px; text-align: center; white-space: nowrap; }
.page-h { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

/* ============ Chat ============ */
.chat { display: grid; grid-template-columns: 264px minmax(0, 1fr); width: 100%; height: 100%; background: #fff; }
.chat-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cs-find { padding: 10px 10px 0; }
.cs-find .tb-search { width: 100%; max-width: none; margin: 0; }
.cs-find .tb-search input { padding-right: 10px; }
.chat-side .cs-scroll { overflow-y: auto; padding: 8px 10px; flex: 1; }
.cs-sec { font-size: 12px; line-height: 16px; font-weight: 600; color: var(--text-2); padding: 14px 10px 6px; }
.ch-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border-radius: 4px; font-size: 14px; line-height: 20px; color: var(--text); text-align: left; }
.ch-item[hidden], .cs-sec[hidden] { display: none; }
.ch-item:hover { background: var(--hover); }
.ch-item.on { background: var(--primary-sel); font-weight: 500; }
.ch-item.unread { font-weight: 600; }
.ch-item .ub { margin-left: auto; min-width: 18px; height: 18px; border-radius: 9px; background: #d83a52; color: #fff; font-size: 12px; line-height: 18px; font-weight: 500; display: grid; place-items: center; padding: 0 6px; }
.ch-item .hash { color: var(--text-2); display: inline-flex; }
.ch-item .pdot { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 0 20px; height: 56px; border-bottom: 1px solid var(--line); flex: none; }
.chat-h h3 { font-size: 16px; line-height: 22px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
.ch-mem { display: inline-flex; }
.msgs { flex: 1; overflow-y: auto; padding: 14px 0; background: var(--surface-2); }
.day-sep { display: flex; align-items: center; gap: 12px; padding: 8px 20px; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); }
.day-sep::before, .day-sep::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.msg { display: flex; gap: 12px; padding: 6px 20px; position: relative; }
.msg:hover { background: rgba(0,0,0,.025); }
.msg.cont { padding-top: 1px; }
.msg.cont .av { visibility: hidden; height: 0; }
.msg-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.msg-h { display: flex; align-items: baseline; gap: 8px; font-size: 14px; }
.msg-h b { font-weight: 600; }
.msg-t { font-size: 14px; line-height: 22px; overflow-wrap: anywhere; }
.msg .thumbs { grid-template-columns: repeat(auto-fill, minmax(130px, 170px)); margin: 0; }
.msg .lnk { max-width: 440px; background: #fff; }
.msg-act { position: absolute; right: 20px; top: -14px; display: none; background: #fff; border-radius: 4px; box-shadow: var(--sh); padding: 2px; }
.msg:hover .msg-act, .msg:focus-within .msg-act { display: flex; }
.msg-more { display: none; }
/* touch screens: no hover, so each message gets a 32px "..." button that opens the actions */
@media (hover: none) {
  .msg-act { display: flex; position: static; margin-left: auto; align-self: flex-start; box-shadow: none; background: transparent; padding: 0; }
  .msg-act .msg-ct { display: none; }
  .msg-act .msg-more { display: inline-grid; width: 32px; height: 32px; }
}
.chat .composer { border-top: 1px solid var(--line); }

/* ============ Projects ============ */
.pj-sum { margin-bottom: 16px; }
.pj-sum .card-b { padding: 0 18px 16px; }
.pj-sum .legend { margin-top: 12px; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; border-left: 6px solid var(--pc); color: inherit; text-decoration: none !important; transition: box-shadow .12s, border-color .12s; }
.pcard:hover { box-shadow: var(--sh); border-color: var(--border); border-left-color: var(--pc); }
.pcard .pb { padding: 14px 18px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pc-h { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 28px; }
.pcard h3 { flex: 1; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--text); min-width: 0; }
.pcard:hover h3 { color: var(--primary); }
.pc-h .av-stack { flex: none; }
.pcard .pd { font-size: 14px; line-height: 20px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px; }
.pcard .dates { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); min-height: 24px; }
.pcard .dates > .i { color: var(--text-2); }
.pcard .dates .dt { white-space: nowrap; }
.pc-pl { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; line-height: 16px; color: var(--text-2); margin-bottom: 6px; }
.pc-pl b { font-size: 14px; color: var(--text); font-weight: 600; }
.pcard .pstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); border-top: 1px solid var(--line); }
.pcard .pstats div { padding: 8px 4px; text-align: center; border-right: 1px solid var(--line); min-width: 0; }
.pcard .pstats div:last-child { border-right: 0; }
.pcard .pstats b { display: block; font-size: 18px; line-height: 24px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
.pcard .pstats span { display: block; font-size: 12px; line-height: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .pstats .r b { color: #d83a52; }

/* timeline */
.gantt { background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; }
.g-inner { min-width: 780px; }
.g-row { display: grid; grid-template-columns: 240px minmax(0, 1fr); border-bottom: 1px solid var(--line); min-height: 64px; }
.g-row:last-child { border-bottom: 0; }
/* project names stay in view while the chart scrolls sideways */
.g-lbl { padding: 8px 16px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); gap: 2px; min-width: 0; position: sticky; left: 0; z-index: 4; background: #fff; }
.g-lbl b { font-size: 14px; line-height: 20px; font-weight: 500; color: #323338; display: flex; align-items: center; gap: 8px; min-width: 0; }
.g-lbl .g-short { display: none; }
/* only the date line is small and grey (the name inside <b> stays 14px dark) */
.g-lbl > span { font-size: 12px; line-height: 16px; color: var(--text-2); }
.g-lbl .g-hl { font-size: 12px; font-weight: 600; color: var(--text-2); }
.g-track { position: relative; }
.g-months { display: grid; height: 100%; }
.g-months div { border-right: 1px solid var(--line); font-size: 13px; line-height: 16px; color: var(--text-2); padding: 0 10px; display: flex; align-items: center; white-space: nowrap; overflow: hidden; }
.g-head { min-height: 44px; }
.g-head .g-months div { align-items: flex-start; padding-top: 6px; }
.g-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 24px; border-radius: 4px; background: color-mix(in srgb, var(--pc) 30%, #fff); overflow: hidden; cursor: pointer; }
.g-bar:hover { text-decoration: none; filter: brightness(.95); }
.g-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--pc); }
.g-pct { position: absolute; top: 50%; transform: translateY(-50%); font-size: 13px; line-height: 16px; font-weight: 600; color: var(--text); white-space: nowrap; pointer-events: none; z-index: 3; background: rgba(255,255,255,.85); padding: 0 2px; border-radius: 2px; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--s-stuck); z-index: 2; pointer-events: none; }
.g-today.lbl::before { content: 'Today'; position: absolute; top: auto; bottom: 4px; left: 0; transform: translateX(-50%); font-size: 11px; line-height: 16px; font-weight: 600; color: #fff; background: var(--s-stuck); padding: 0 6px; border-radius: 3px; white-space: nowrap; }
/* deadline marker under the bar; deadlines close together share one marker with a count */
.g-dot { position: absolute; top: calc(50% + 21px); width: 10px; height: 10px; transform: translate(-50%, -50%); z-index: 3; cursor: help; }
.g-dot i { position: absolute; inset: 0; transform: rotate(45deg); background: #fff; border: 2px solid var(--text); }
.g-dot b { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; line-height: 14px; font-weight: 600; color: var(--text); background: #fff; padding: 0 4px; border-radius: 7px; box-shadow: 0 0 0 1px var(--border); }
.g-up { margin-top: 16px; }
.g-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin-top: 10px; font-size: 12px; line-height: 16px; color: var(--text-2); }
.g-legend span { display: inline-flex; align-items: center; gap: 6px; }
.g-legend i { display: inline-block; flex: none; }
.g-legend .lg-done { width: 16px; height: 10px; border-radius: 2px; background: #676879; }
.g-legend .lg-plan { width: 16px; height: 10px; border-radius: 2px; background: #d9dae1; }
.g-legend .lg-dia { width: 8px; height: 8px; margin: 0 3px; border: 2px solid var(--text); background: #fff; transform: rotate(45deg); }
.g-legend .lg-today { width: 2px; height: 14px; margin: 0 4px; background: var(--s-stuck); }

/* ============ Team & settings ============ */
.team-set { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .team-set { grid-template-columns: minmax(0, 1fr); } }
.team-tbl th.num, .team-tbl td.num { text-align: right; }
.team-tbl td { height: 52px; padding: 6px 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-tbl th { padding: 0 12px; }
.team-tbl td.c-act { padding: 0 8px; text-align: center; overflow: visible; text-overflow: clip; }
.team-tbl tr.off .who-cell, .team-tbl tr.off td.c-n, .team-tbl tr.off td.c-rep { opacity: .55; }
.team-tbl .who-cell { display: flex; max-width: 100%; }
.tm-t { display: flex; flex-direction: column; min-width: 0; }
.tm-n { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tm-n b { font-size: 14px; line-height: 20px; font-weight: 600; }
.tm-n .tag { height: 20px; flex: none; }
.tm-n .tm-you { height: 18px; padding: 0 6px; }
.tm-s { font-size: 12px; line-height: 16px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-tbl td.c-stk { text-align: right; }
.stk { font-variant-numeric: tabular-nums; color: var(--text); }
.stk.good { color: var(--ok); font-weight: 600; }
.stk.low { color: #a4152b; }
.set-row { display: flex; align-items: center; gap: 14px; padding: 12px 18px; border-top: 1px solid var(--line); }
.set-row .st-t { flex: 1; min-width: 0; }
.set-row b { font-size: 14px; line-height: 20px; font-weight: 500; display: block; }
.set-row span { font-size: 14px; line-height: 20px; color: var(--text-2); }
.wd-chips { display: flex; gap: 6px; margin-top: 8px; }
.fchip.wd-c { width: 32px; padding: 0; justify-content: center; font-weight: 500; }
.fchip.wd-c.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.fchip.wd-c.on:hover { background: var(--primary-h); }
.cat-list { gap: 6px; }
.cat-list .tag { height: 28px; font-size: 13px; padding: 0 10px; }
.input.cat-in { height: 32px; width: 160px; font-size: 14px; padding: 0 10px; }

/* ============ Login ============ */
.login { min-height: calc(100dvh - var(--pb-h)); display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.login-l { background: var(--app-bg); padding: 48px 56px 32px; display: flex; flex-direction: column; justify-content: center; gap: 40px; }
/* brand + pitch sit in the middle; the footer line stays at the bottom */
.login-brand { margin-top: auto; gap: 10px; }
.login-l h2 { font-size: 36px; line-height: 44px; font-weight: 600; max-width: 480px; }
/* small static preview of a project group (same look as the app) */
.lpv { margin-top: 28px; max-width: 480px; background: #fff; border-radius: var(--r); box-shadow: var(--sh-sm); overflow: hidden; }
.lpv-h { padding: 10px 14px 8px; font-size: 15px; font-weight: 600; color: var(--p1, #2a78d6); }
.lpv-r { display: grid; grid-template-columns: minmax(0, 1fr) 40px 132px; align-items: stretch; min-height: 38px; border-top: 1px solid var(--line); box-shadow: inset 5px 0 0 #2a78d6; font-size: 14px; }
.lpv-t { display: flex; align-items: center; padding: 0 12px 0 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lpv-p { display: grid; place-items: center; border-left: 1px solid var(--line); }
.lpv-s { display: grid; place-items: center; color: #fff; font-weight: 500; font-size: 13px; border-left: 1px solid #fff; }
.lpv-s.progress { background: var(--s-progress); color: #323338; } .lpv-s.review { background: var(--s-review); } .lpv-s.done { background: var(--s-done); color: #323338; } .lpv-s.stuck { background: var(--s-stuck); }
.lp-sub { margin-top: 16px; font-size: 15px; line-height: 22px; color: var(--text-2); max-width: 480px; }
.login-foot { margin-top: auto; font-size: 12px; line-height: 16px; color: #676879; }
.login-mbrand { display: none; gap: 10px; }
.login-r { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.login-card h1 { font-size: 28px; line-height: 36px; font-weight: 600; }
.login-card .input { height: 44px; font-size: 15px; }
.login-card .btn { height: 44px; font-size: 15px; }
.or { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); }
.or::before, .or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pw { position: relative; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }

/* ============ Mobile bottom nav ============ */
.bnav { display: none; }
.tb-msearch { display: none !important; }
.back { display: none !important; }

/* ============ Responsive ============ */
@media (max-width: 1280px) {
  .mtable { --cols: 6px minmax(240px, 1fr) 128px 148px 100px 112px; }
  .mtable.no-person { --cols: 6px minmax(260px, 1fr) 124px 92px 100px; }
  .wrow { grid-template-columns: minmax(0, 1fr) 36px 124px 88px 88px; }
  .wrow.no-pri { grid-template-columns: minmax(0, 1fr) 36px 124px 88px; }
  .mc-appr .ap-ok .i { display: none; }
}
@media (max-width: 1100px) {
  :root { --sb-w: 220px; }
  .dash2 { grid-template-columns: minmax(0, 1fr); }
  .mtable { --cols: 6px minmax(200px, 1fr) 64px 140px 92px 104px; }
  .mtable.no-person { --cols: 6px minmax(200px, 1fr) 116px 88px 96px; }
  .mtable .mc-btn .nm { display: none; }
  .mc-appr button { font-size: 12px; }
  .cal-legend { flex-basis: 100%; margin-left: 0; }
  .gb { margin-left: 4px; padding-left: 8px; }
  .content { padding: 8px 18px 24px; }
  .topbar { padding: 12px 18px 8px; }
  .tb-search { width: 200px; }
  .tabbar { border-bottom: 0; row-gap: 8px; }
  .tabbar .tabs { box-shadow: inset 0 -1px 0 var(--line); flex: 1 1 100%; }
  .tabbar .filterbar { flex-basis: 100%; margin: 0; padding: 0; }
  /* narrower sidebar: keep "Daily report" readable next to its state tag */
  .nav-item { gap: 8px; padding: 0 8px; }
  .nav-tag { padding: 0 5px; font-size: 11.5px; }
}
/* Daily report on a laptop / tablet: each entry is two lines (task on top; what I did | hours | status | link below),
   so "What I did" always gets most of the width */
@media (min-width: 768px) and (max-width: 1180px) {
  .rep-tbl colgroup, .rep-tbl thead { display: none; }
  .rep-tbl, .rep-tbl tbody { display: block; width: 100%; }
  .rep-tbl tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) 76px 140px 120px; border-bottom: 1px solid var(--line); }
  .rep-tbl tbody tr:last-child { border-bottom: 0; }
  .rep-tbl td, .rep-tbl tr:last-child td { display: block; border: 0; height: auto; min-height: 44px; }
  .rep-tbl td.c-task { grid-column: 1 / -1; min-height: 0; padding: 8px 12px 0; }
  .rep-tbl td.c-hrs, .rep-tbl td.c-lnk { display: flex; align-items: center; }
  .rep-tbl td.mc-lbl { margin: 6px 0; min-height: 36px; }
  .rep-tbl tr.ro td.mc-lbl { min-height: 36px; }
  .rep-tbl tr.rep-add-r td.c-addgo { grid-column: span 2; display: flex; align-items: center; }
  .rep-tbl tr.rep-add-r td { display: flex; align-items: center; }
  .rep-tbl tr.rep-add-r td.c-work { display: flex; }
  .rep-tbl tr.rep-sg td { grid-column: 1 / -1; }
  .rep-tbl tr.need td:first-child { box-shadow: none; }
  .rep-tbl tr.need { box-shadow: inset 3px 0 0 var(--danger); }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .app { grid-template-columns: 1fr; padding: 0; }
  .main { border-radius: 0; box-shadow: none; }
  .sb { position: fixed; left: 0; top: 0; bottom: 0; width: 290px; transform: translateX(-100%); transition: transform .2s ease-out; z-index: 75; background: var(--app-bg); }
  .sb.open { transform: none; box-shadow: var(--sh-lg); }
  .sb-scrim { position: fixed; inset: 0; background: rgba(41,47,76,.5); z-index: 74; }
  .nav-item { height: 44px; font-size: 15px; }
  .sb-sec { height: 36px; }
  .topbar { min-height: 60px; padding: 8px 8px 8px 6px; gap: 4px; border-bottom: 1px solid var(--line); }
  .topbar .tb-menu { display: inline-grid; }
  .tb-title h1 { font-size: 19px; line-height: 24px; }
  .tb-title p { font-size: 13px; line-height: 16px; margin-top: 0; }
  .tb-acts { display: none; }
  .topbar.no-search .tb-acts + #bellwrap, .topbar.no-search #bellwrap { margin-left: auto; }
  .bell .dotc { right: 10px; top: 10px; transform: translate(50%, -50%); }
  .tb-search { display: none; }
  .tb-search.m-open { display: block; position: absolute; left: 8px; right: 8px; top: 10px; width: auto; max-width: none; z-index: 5; }
  .tb-search.m-open input { height: 40px; font-size: 16px; }
  .tb-new { display: none !important; }
  .tb-msearch { display: inline-grid !important; margin-left: auto; }
  .content { padding: 14px 14px calc(var(--bn-h) + 18px + env(safe-area-inset-bottom)); }
  .content.flush { padding-bottom: calc(var(--bn-h) + env(safe-area-inset-bottom)); border-top: 0; }
  .btn-icon { width: 42px; height: 42px; }
  .btn { height: 42px; }
  .btn-sm { height: 38px; }
  .input, .select, .textarea, .tb-search input, .madd input, .composer textarea, .qa-desc, .qa-title { font-size: 16px; }
  .input, .select { height: 44px; }
  .m-hide { display: none !important; }
  /* Home: 2x2 tiles, then Needs you, Due today, Team (one column) */
  .stats.s4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .home .stats { margin-bottom: 12px; }
  .stat { min-height: 56px; max-height: 56px; padding: 8px 12px; gap: 10px; }
  .stat-v { font-size: 24px; line-height: 28px; }
  .stat-go { display: none; }
  .dash2, .stack { gap: 12px; }
  .card-h { padding: 0 14px; }
  .card-h .cnt { display: none; }
  .card-h .cnt.keep { display: inline; }
  .card-h.wrap-m { flex-wrap: wrap; row-gap: 0; padding-top: 8px; padding-bottom: 8px; }
  .card-h.wrap-m .cnt.keep { order: 3; flex-basis: 100%; font-size: 13px; }
  .lrow { flex-wrap: wrap; row-gap: 6px; padding: 10px 14px; }
  .lrow > .main-t { flex: 1 1 100%; padding: 0; }
  .lrow .main-t b { white-space: normal; }
  .lrow.wl-row { flex-wrap: nowrap; padding: 6px 14px; }
  .wl-legend { padding: 0 14px 10px; }
  .ny-h { padding: 0 8px 0 14px; }
  .ny-h .btn { height: 30px; }
  .ny-row { flex-wrap: wrap; row-gap: 8px; padding: 10px 14px; }
  .ny-row > .ny-t { flex: 1 1 calc(100% - 40px); }
  .ny-l1 { flex-wrap: wrap; row-gap: 2px; }
  .ny-n { white-space: normal; font-size: 15px; line-height: 21px; }
  .ny-l2 { white-space: normal; }
  .ny-acts { margin-left: 34px; }
  .ny-acts .btn { height: 36px; padding: 0 12px; }
  .ny-chips .ny-acts { margin-left: 0; }
  .ny div.rs-inline { padding: 8px 14px 12px; }
  /* compact task rows: title on top, then status / due date / person */
  .wrow, .wrow.no-pri { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; min-height: 0; }
  .wrow .t { flex: 1 1 100%; padding: 0; flex-wrap: wrap; row-gap: 4px; }
  .wr-n { flex: 1 1 100%; white-space: normal; font-size: 15px; line-height: 21px; }
  .wrow > .wr-l { order: 1; flex: 1 1 0; height: 36px; border: 0; }
  .wrow > .wr-l .lblc { border-radius: 4px; }
  .wrow > .wr-pr { display: none; }
  .wrow > .wr-d { order: 2; flex: none; padding: 0 4px; }
  .wrow > .wr-p { order: 3; flex: none; width: 36px; height: 36px; }
  .wr-acts { margin-left: 0; }
  .tabbar { margin-bottom: 10px; }
  .filterbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 14px; padding: 0 14px; }
  .tabbar .filterbar { flex-wrap: nowrap; margin: 0 -14px; padding: 0 14px; max-width: none; width: calc(100% + 28px); flex-basis: auto; }
  .filterbar::-webkit-scrollbar { display: none; }
  .fbtn { flex: none; height: 38px; border: 1px solid var(--border-2); }
  .result-n { display: none; }

  /* main table -> cards */
  .mgroup { margin-bottom: 24px; }
  .mhead, .mfoot { display: none !important; }
  .mrow.t { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 12px 12px 18px; border: 1px solid var(--line); border-top: 0; position: relative; min-height: 0; }
  .mrow.t:first-of-type { border-top: 1px solid var(--line); }
  .mrow.t > div { border: 0; height: auto; }
  .mrow.t > .mstrip { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
  .mrow.t > .mitem { flex: 1 1 100%; padding: 0 36px 0 0; align-items: flex-start; }
  .m-txt { row-gap: 4px; }
  .m-name { flex: 1 1 100%; font-size: 15px; line-height: 21px; -webkit-line-clamp: 3; }
  .mrow.t .m-open { top: -5px; right: -4px; transform: none; }
  .m-open .ol { display: none !important; }
  /* second line: person | status | priority | due on one row, flexible widths */
  .mrow.t > .mc-lbl { flex: 1 1 0; min-width: 0; }
  .mrow.t > .mc-lbl + .mc-lbl { flex: 0 1 84px; }
  .mrow.t .lblc { height: 32px; padding: 0 8px; border-radius: 4px; min-width: 0; width: 100%; }
  .mrow.t > .mc-person, .mrow.t > .mc-due { flex: 0 0 auto; }
  .mrow.t > .mc-person .nm { display: none; }
  .mrow.t .mc-btn { height: 32px; padding: 0 4px; }
  .mc-btn .nm { display: inline; }
  /* Waiting approval: Approve | Send back get their own full-width row at the bottom of the card */
  .mrow.t.appr > .mc-appr { order: 10; flex: 1 1 100%; height: 40px; gap: 8px; }
  .mrow.t.appr > .mc-appr button { border-radius: 4px; font-size: 14px; border-left: 0; }
  .mrow.t.appr > .mc-appr .ap-ok .i { display: inline-block; }
  .mrow.t.appr > .mc-appr .ap-back { box-shadow: inset 0 0 0 1px var(--review-line); }
  /* group title stays on one line */
  .mg-h { flex-wrap: nowrap; min-width: 0; }
  .mg-h h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .mg-h > .btn, .mg-h .cnt { flex: none; }
  .madd { display: flex; border: 1px solid var(--line); border-top: 0; min-height: 48px; }
  .madd > .mstrip { width: 6px; flex: none; }
  .madd > .madd-in { flex: 1; border: 0; }
  .mrow.mmore { display: flex; border: 1px solid var(--line); border-top: 0; min-height: 44px; }
  .mrow.mmore > .mstrip { width: 6px; flex: none; }
  .mrow.mmore > .mmore-b { flex: 1; border: 0; }
  .mrow.t > .mc-take { padding: 0; }
  .mrow.t > .mc-take .take-b, .mrow.t > .mc-person .take-b { width: 100%; height: 36px; }

  .board { grid-template-columns: repeat(5, 84vw); scroll-snap-type: x mandatory; margin: 0 -14px; padding: 0 14px 8px; gap: 12px; }
  .col { scroll-snap-align: start; max-height: none; }

  .drawer { width: 100vw; border-left: 0; }
  .dr-head { padding: 0 8px 0 16px; gap: 6px; }
  .dr-body { padding: 12px 16px 24px; }
  .dr-sum .lblc, .dr-sum .lblc.dr-pr, .dr-sum > .dr-pill, .dr-sum > .dr-due { flex: 1 1 calc(50% - 4px); width: auto; min-width: 0; }
  .dr-sum .lblc, .dr-sum .lblc.dr-pr { height: 36px; }
  .composer.labelled .composer-tools .btn-ghost { padding: 0 6px; }
  .composer.labelled .composer-tools [data-a="send"] { margin-left: auto; }
  .dr-sum .dr-pill { height: 36px; }
  .dr-sum .dr-due > .dr-pill { flex: 1; }
  .modal.qa .qa-grid .select { height: 44px; }
  .dr-tabs { margin: 0 -16px 14px; padding: 0 8px; }
  .props { grid-template-columns: 96px minmax(0, 1fr); }
  .prop:nth-child(odd) > .pv { border-right: 0; }
  .prop:nth-last-child(2) > span, .prop:nth-last-child(2) > .pv { border-bottom: 1px solid var(--line); }
  .f-row { flex-wrap: wrap; gap: 4px 12px; }
  .modal-wrap { padding: 0; place-items: end stretch; }
  .modal, .modal.sm, .modal.qa-wide { width: 100%; max-height: 92dvh; border-radius: 12px 12px 0 0; }
  .modal-f { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .qa-grid { grid-template-columns: 1fr; }
  .qa-grid.g4, .qa-grid.g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-h.qa-h { padding: 4px 8px 0 8px; }
  .bulk-prev { max-height: 320px; }
  .bulk-prev .br { display: flex; flex-wrap: wrap; gap: 6px 8px; padding: 8px 8px 8px 12px; }
  .bulk-prev .br .n { width: 20px; }
  .bulk-prev .br .bt { flex: 1 1 calc(100% - 28px); white-space: normal; }
  .bulk-prev .br .bp { margin-left: 28px; }
  .bulk-prev .br .pri { width: auto; padding: 0 8px; }
  .bulk-prev .br .ba { margin-left: auto; }
  .modal-f .hint { display: none; }
  /* Add many: who it is for on its own line, then Cancel + a wide Create button */
  .modal-f.qa-bulk-f { flex-wrap: wrap; row-gap: 8px; }
  .qa-bulk-f .qa-bsum { flex: 1 1 100%; }
  .qa-bulk-f .qa-bsum:empty { display: none; }
  .qa-bulk-f > .sp { display: none; }
  .qa-bulk-f .btn-primary { flex: 1; white-space: normal; }
  .modal.appr-sheet .ap-row { flex-wrap: wrap; }
  .modal.appr-sheet .ap-lnk { flex: 1 1 100%; }
  .modal.appr-sheet .ap-lnk .input { height: 44px; }
  .modal.appr-sheet .ap-img { height: 40px; }
  .ap-f-sheet .btn { flex: 1; }
  .ap-f-sheet > .sp { display: none; }

  .chat { grid-template-columns: 1fr; }
  .chat.in-ch .chat-side { display: none; }
  .chat:not(.in-ch) .chat-main { display: none; }
  .chat-h { padding: 0 12px 0 6px; }
  .chat-h .back { display: inline-grid !important; }
  .msg { padding: 6px 14px; }
  .msg .thumbs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chat .cs-find .tb-search { display: block; }
  .chat .tb-search input { font-size: 16px; height: 40px; }
  .g-row { grid-template-columns: 120px minmax(0, 1fr); }
  .g-lbl b { font-size: 14px; }
  .g-lbl .g-full { display: none; }
  .g-lbl .g-short { display: block; }
  .g-legend { gap: 6px 14px; }
  .g-inner { min-width: 680px; }
  .g-lbl { padding: 8px 10px; }

  .login { grid-template-columns: 1fr; }
  .login-l { display: none; }
  .login-mbrand { display: flex; }

  /* Team: one card per person. Row 1: avatar, name, role, "..." top right. Then a 2 x 2 grid of labelled numbers */
  .team-tbl.tbl-cards { table-layout: auto !important; }
  .team-tbl.tbl-cards tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px 12px; align-items: start; padding: 12px 8px 14px 14px; }
  .team-tbl.tbl-cards td { padding: 0; height: auto; overflow: visible; white-space: normal; min-width: 0; }
  .team-tbl.tbl-cards td.c-mem { grid-column: 1 / 3; grid-row: 1; overflow: hidden; }
  .team-tbl.tbl-cards td.c-act { grid-column: 3; grid-row: 1; justify-self: end; align-self: center; }
  .team-tbl.tbl-cards td.c-n, .team-tbl.tbl-cards td.c-rep, .team-tbl.tbl-cards td.c-stk { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 15px; line-height: 20px; }
  .team-tbl.tbl-cards td[data-l]::before { content: attr(data-l); font-size: 12px; line-height: 16px; color: var(--text-2); }
  .team-tbl.tbl-cards td:nth-child(2) { grid-column: 1; grid-row: 2; padding-left: 40px; }
  .team-tbl.tbl-cards td:nth-child(3) { grid-column: 2; grid-row: 2; }
  .team-tbl.tbl-cards td.c-rep { grid-column: 1; grid-row: 3; padding-left: 40px; }
  .team-tbl.tbl-cards td.c-stk { grid-column: 2; grid-row: 3; }
  .team-tbl.tbl-cards td.c-rep .tag { height: 24px; }
  .wd-chips { gap: 4px; }
  .fchip.wd-c { width: 36px; height: 36px; }

  .tbl-cards thead { display: none; }
  .tbl-cards, .tbl-cards tbody, .tbl-cards tr, .tbl-cards td { display: block; width: 100%; }
  .tbl-cards tr { border-bottom: 1px solid var(--line); padding: 10px 14px; position: relative; }
  .tbl-cards td { border: 0 !important; height: auto; padding: 3px 0; }
  .tbl-cards td[data-l]::before { content: attr(data-l) ': '; font-size: 13px; color: var(--text-2); }
  .tbl-cards tr.grp td { background: none; }
  .tbl-cards tr.grp { background: var(--surface-2); }
  .date-nav b { min-width: 110px; }
  .tbl-cards td { width: auto !important; text-align: left !important; }

  /* My day + date groups: title row stays, rows become two lines */
  .mhead.mg-row { display: flex !important; position: relative; min-height: 40px; border: 1px solid var(--line); border-bottom: 0; border-radius: 6px 0 0 0; }
  .mhead.mg-row > div:not(.mstrip):not(.mitem) { display: none; }
  .mhead.mg-row > .mstrip { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; height: auto; }
  .mhead.mg-row > .mitem { flex: 1; border: 0; height: 40px; padding-left: 14px; }
  .mtable.no-person .mrow.t { padding: 10px 12px 10px 18px; gap: 8px; align-items: center; }
  .mtable.no-person .mrow.t > .mitem { row-gap: 4px; column-gap: 8px; }
  .mtable.no-person .mrow.t > :nth-child(3) { flex: 1 1 0; min-width: 0; }
  .mtable.no-person .mrow.t > :nth-child(3) .lblc { width: 100%; min-width: 0; height: 36px; border-radius: 4px; }
  .mtable.no-person .mrow.t > :nth-child(4) .lblc { height: 36px; min-width: 0; padding: 0 10px; border-radius: 4px; }
  .mtable.no-person .mrow.t > .mc-due { flex: none; }
  .mtable.no-person .mrow.t > .mitem { padding-right: 32px; }
  .madd-proj { height: 36px; }
  /* My day: Today's report strip */
  .mrep-h { padding: 8px 12px; }
  .mrep-h .sp { flex-basis: 100%; height: 0; }
  .mrep-h .btn { flex: 1 1 0; }
  .mrep-r { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding: 6px 12px; }
  .mr-t { grid-column: 1; font-size: 13px; color: var(--text-2); }
  .mr-w { grid-column: 1; grid-row: 2; font-size: 15px; color: var(--text); }
  .mr-h { grid-column: 2; grid-row: 1 / span 2; }
  .mrep-add { flex-wrap: wrap; padding: 10px 12px; }
  /* same height, padding and text size as the inputs under it */
  .mrep-add .rep-task { width: 100%; height: 44px; min-height: 44px; padding: 0 36px 0 12px; border: 1px dashed var(--border-2); border-radius: 4px; background-color: #fff; background-position: right 12px center; }
  .mrep-add .rep-task .rt-1 { font-size: 16px; line-height: 22px; }
  .mrep-add .rep-task:not(.unset) { border-style: solid; border-color: var(--border); }
  .mrep-add .rep-add { flex: 1 1 0; height: 44px; font-size: 16px; }
  .mrep-add input.rep-add-h { width: 56px; height: 44px; font-size: 16px; }
  .mrep-add .btn { height: 44px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
  .mrep-sg { flex-wrap: wrap; margin: 8px 12px 0; padding: 8px 8px 8px 10px; }
  .mrep-sg .sg-t { flex: 1 1 calc(100% - 90px); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .mrep-sg .sg-q { flex: 1 1 auto; font-size: 13px; }
  .mrep-sg .btn-xs { height: 36px; padding: 0 12px; }
  .mrep-sg .btn-icon.xs { width: 36px; height: 36px; }
  .sl-all { margin-left: auto; }
  .myday .sumline { font-size: 14px; }

  /* Daily report (employee): one card per entry, Submit bar above the bottom nav */
  .rep-h { gap: 8px 10px; }
  .rep-wk .rw-l { display: none; }
  .rw-lg { flex-basis: 100%; }
  /* each entry is one light card (~110px): task line, what I did, then hours | status | ... */
  .rep-card { overflow: visible; border: 0; background: transparent; border-radius: 0; }
  .rep-card .tbl-wrap { overflow: visible; }
  .rep-tbl { min-width: 0; }
  .rep-tbl.tbl-cards tbody { display: flex; flex-direction: column; gap: 8px; }
  .rep-tbl.tbl-cards tr { display: grid; grid-template-columns: auto auto minmax(0, 1fr); column-gap: 8px; row-gap: 0; padding: 6px 8px 6px 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .rep-tbl.tbl-cards tbody tr:hover td { background: transparent; }
  .rep-tbl.tbl-cards td { padding: 0; height: auto; }
  .rep-tbl.tbl-cards td.c-task, .rep-tbl.tbl-cards td.c-work { grid-column: 1 / -1; }
  .rep-task { flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; margin: 0; min-height: 28px; padding: 0 22px 0 0; border: 0; background-position: right 2px center; }
  .rep-task:hover { border: 0; }
  .rep-task .rt-1 { -webkit-line-clamp: 1; flex: 0 1 auto; min-width: 0; font-size: 14px; }
  .rep-task .rt-2 { flex: none; }
  .rep-task.ro { padding-left: 0; }
  .rep-tbl.tbl-cards td.c-work { box-shadow: inset 0 1px 0 var(--line); margin-top: 4px; padding-top: 1px; }
  .rep-work { width: 100%; margin: 0; min-height: 34px; padding: 5px 0; border: 0; border-radius: 0; background: transparent; font-size: 16px; line-height: 22px; }
  .rep-work:hover { border: 0; }
  .rep-work:focus { background: transparent; box-shadow: inset 0 -2px 0 var(--primary); }
  .rep-txt { padding: 6px 0; font-size: 15px; line-height: 21px; }
  .rep-tbl.tbl-cards td.c-hrs, .rep-tbl.tbl-cards td.c-st, .rep-tbl.tbl-cards td.c-lnk { margin-top: 2px; }
  .hrs-in { height: 32px; padding: 0 10px 0 4px; border: 1px solid var(--border-2); border-radius: 4px; font-size: 14px; }
  .tbl .hrs-in input.num-in { width: 30px; font-size: 16px; }
  .rep-tbl.tbl-cards td.mc-lbl { position: static; height: auto; }
  /* one phone status label everywhere: 32px, 4px corners, 13px */
  .rep-tbl td.mc-lbl .lblc { position: static; display: inline-flex; width: auto; height: 32px; padding: 0 12px; border-radius: 4px; font-size: 13px; }
  .rep-tbl.tbl-cards td.c-lnk { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 0; padding-right: 0; }
  .rep-tbl .rep-lclr { display: none; }
  .rep-tbl .rep-lnk { height: 32px; display: inline-flex; align-items: center; margin-left: 0; padding: 0 8px; }
  .rep-tbl .rep-del { position: static; transform: none; width: 36px; height: 32px; flex: none; }
  .rep-tbl td.c-lnk.editing .rep-lk { flex: 1; }
  .rep-tbl .rep-dom { max-width: 120px; }
  .rep-tbl .rep-more { display: inline-grid; width: 32px; height: 32px; flex: none; }
  /* suggested entry: a dashed card of its own */
  .rep-tbl.tbl-cards tr.rep-sg { display: block; padding: 0; border: 0; background: transparent; }
  .rep-tbl.tbl-cards tr.rep-sg td { display: block; padding: 0; }
  .sg-box { padding: 8px 8px 8px 12px; gap: 6px 10px; }
  .sg-t { flex: 1 1 calc(100% - 96px); max-width: none; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .sg-box > .pchip { display: none; }
  .sg-q { flex: 1 1 auto; font-size: 13px; }
  .sg-acts .btn { height: 38px; }
  .rep-tbl tr.need { border-color: var(--danger); }
  .rep-tbl tr.need td:first-child { box-shadow: none; }
  .rep-tbl.tbl-cards tr.ro { padding: 10px 12px; }
  .rep-card .rep-add-m { margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
  .rep-quick { padding: 8px 0 4px; gap: 8px; }
  .mrep .rep-quick { padding: 0 12px 10px; }
  .rq-l { flex-basis: 100%; }
  .rep-chip { height: 40px; max-width: 100%; font-size: 14px; }
  .mrep.folded .mrep-h { border-bottom: 0; padding-bottom: 10px; }
  .rl-r { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; padding: 6px 12px; }
  .rl-t { font-size: 13px; color: var(--text-2); }
  .rl-w { grid-row: 2; color: var(--text); }
  .rl-hr { grid-column: 2; grid-row: 1 / span 2; }
  .rep-last { margin-top: 12px; }
  .rep-foot { position: fixed; left: 0; right: 0; bottom: calc(var(--bn-h) + env(safe-area-inset-bottom)); height: 60px; min-height: 0; z-index: 34; padding: 0 14px; box-shadow: 0 -4px 8px rgba(0,0,0,.08); }
  .rep-foot .rf-info { flex-direction: column; align-items: flex-start; gap: 2px; flex-wrap: nowrap; }
  .rf-due { display: none; }
  .rf-n { font-size: 13px; }
  .rf-warn { font-size: 12px; line-height: 16px; }
  .rf-go { flex: 1; max-width: 200px; height: 44px; }
  .content.rep-pad { padding-bottom: calc(var(--bn-h) + 80px + env(safe-area-inset-bottom)); }

  /* Daily reports (admin) */
  .ra-h { flex-direction: column; align-items: stretch; }
  .ra-h > .sp { display: none; }
  .ra-date { justify-content: space-between; }
  .ra-f { flex-wrap: nowrap; }
  .ra-f .select { flex: 1 1 0; min-width: 0; max-width: none; height: 42px; }
  .ra-exp { width: 42px; padding: 0; flex: none; }
  .ra-exp span { display: none; }
  .ra-sum { padding: 12px 14px; gap: 10px 16px; }
  .ra-t + .ra-t { padding-left: 16px; }
  .ra-t.ra-miss { padding: 10px 0 0; border-left: 0; border-top: 1px solid var(--line); flex-basis: 100%; }
  .tbl-cards tr.grp td { height: auto; padding: 10px 14px; }
  .rep-adm.tbl-cards tr.grp { padding: 0; }
  .rep-adm.tbl-cards tr.grp td { padding: 10px 14px 10px 8px; }
  .rg { flex-wrap: wrap; row-gap: 6px; }
  .rg .btn { height: 32px; }
  .rg-h { margin-left: auto; }
  .rep-adm.tbl-cards tr.re { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 14px; }
  .rep-adm.tbl-cards tr.re td { padding: 0; height: auto; }
  .rep-adm td.c-work { order: 0; flex: 1 1 100%; font-size: 15px; line-height: 21px; }
  .rep-adm td.c-task { order: 1; display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; flex: 0 1 auto; }
  .rep-adm td.c-task .rt-sub { order: -1; flex: none; }
  .rep-adm td.c-task .rt-code { display: none; }
  .rep-adm td.c-task .rt-a, .rep-adm td.c-task .rt-other { font-size: 13px; color: var(--text-2); min-width: 0; }
  .rep-adm td.c-hrs { order: 2; font-size: 13px; }
  .rep-adm.tbl-cards td.c-st { order: 3; position: static; }
  .rep-adm td.c-st .lblc { position: static; display: inline-flex; height: 32px; padding: 0 12px; border-radius: 4px; font-size: 13px; }
  .rep-adm td.c-lnk { order: 4; }
  .rep-adm td.c-lnk:empty { display: none; }

  /* Requests */
  .rq-tbl.tbl-cards tr.rq { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 12px 14px; }
  .rq-tbl.tbl-cards tr.rq td { padding: 0; height: auto; }
  .rq-tbl td.c-req { flex: 1 1 100%; }
  .rq-tbl.tbl-cards td.mc-lbl { position: static; }
  .rq-tbl td.mc-lbl .lblc { position: static; display: inline-flex; height: 24px; padding: 0 8px; border-radius: 4px; font-size: 12px; }
  .rq-tbl td.c-act, .rq-tbl td.c-st { margin-left: auto; }
  .rq-tbl td.c-act .btn { height: 36px; }
  .rq-tbl.tbl-cards tr.rq-grp td { padding: 4px 8px; }
  .rq-tbl.tbl-cards td.c-at::before, .rq-tbl.tbl-cards td.c-need::before { font-size: 12px; }
  .rq-tbl.tbl-cards tr.dim { background: var(--surface-2); }
  .rq-tbl.tbl-cards tr.dim td { background: transparent; }
  tr.rs-inline, tr.rs-inline td { display: block; }
  .input.rs-in { flex: 1 1 100%; width: 100%; height: 44px; }
  .rs-l { flex-basis: 100%; }
  .rq-add-in { flex-wrap: wrap; }
  .rq-add-in input:not([type=checkbox]) { flex: 1 1 calc(100% - 30px); height: 44px; font-size: 16px; }
  .rq-add-in .ask-proj { height: 40px; }

  .bnav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--bn-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line); z-index: 35; }
  .bnav a, .bnav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--text-2); position: relative; text-decoration: none; }
  .bnav .on { color: var(--primary); font-weight: 500; }
  .bnav .i { width: 22px; height: 22px; }
  .bnav .bn-add span { width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; box-shadow: var(--sh); }
  .bnav .bb { position: absolute; top: 7px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--s-stuck); color: #fff; font-size: 11px; line-height: 17px; display: grid; place-items: center; padding: 0 4px; font-weight: 600; box-shadow: 0 0 0 2px #fff; }
  .bnav .bb.warn { background: #fdab3d; color: #323338; }
  .bnav .bb.gray { background: #e7e9ef; color: #323338; }
  .bnav .bdot { position: absolute; top: 9px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--s-stuck); box-shadow: 0 0 0 2px #fff; }
  .rq-add-x { margin-left: 0; }
  .toasts { bottom: calc(var(--bn-h) + 16px); }
  .proto-bar .pb-hide { display: none; }
}
