/* HQ Platform – one stylesheet. Mobile first (360 px), light only (Vikrant 3 Oct: "the theme should be light, not dark"). */
:root {
  --brand: #0e6e74; --brand-ink: #ffffff; --brand-soft: #e3f1f1;
  --bg: #f6f7f5; --surface: #ffffff; --surface-2: #f0f2ef; --ink: #17201f; --muted: #5b6664; --line: #dfe3df;
  --red: #b42318; --red-soft: #fde7e4; --amber: #9a5b00; --amber-soft: #fdf0d5; --green: #1d7a3e; --green-soft: #e1f4e7;
  --blue: #1f5aa6; --blue-soft: #e4edfa; --neutral-soft: #eceeeb;
  --radius: 14px; --shadow: 0 1px 2px rgba(16, 24, 23, .06), 0 4px 14px rgba(16, 24, 23, .05);
  --f-head: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --tabs-h: 64px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--f-body); overflow-x: hidden; }
h1, h2, h3 { font-family: var(--f-head); line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; margin-top: 1rem; }
p { margin: 0 0 .6rem; }
a { color: var(--brand); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--surface); padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: .5rem; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.lead { font-size: 1.05rem; margin: .25rem 0 1rem; font-weight: 600; }
.stack { display: grid; gap: .75rem; }
.stack > * { min-width: 0; }

/* layout */
.layout { min-height: 100vh; }
.main { min-width: 0; }
.content { padding: 0 16px calc(var(--tabs-h) + 88px); max-width: 1180px; margin: 0 auto; }
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); padding: 10px 16px 8px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-co { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); font-size: .9rem; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title { font-size: 1.25rem; margin: 0 0 0 auto; white-space: nowrap; }
.content > :first-child { margin-top: 14px; }
.side { display: none; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); background: var(--surface); border-top: 1px solid var(--line); }
.tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: .78rem; font-weight: 600; min-height: 48px; }
.tab .ic { width: 22px; height: 22px; box-sizing: content-box; }
.tab.on { color: var(--brand); }
.tab.on .ic { background: var(--brand-soft); border-radius: 999px; padding: 2px 14px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); z-index: 25; min-height: 52px; padding: 0 20px; border: 0; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink); font-weight: 700; font-size: 1rem; box-shadow: 0 6px 18px rgba(14, 110, 116, .35); cursor: pointer; }
.fab span { font-size: 1.35rem; line-height: 1; vertical-align: -2px; }
.no-fab .content { padding-bottom: calc(var(--tabs-h) + 24px); }

@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: 248px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line); }
  .side .brand { margin-bottom: 16px; padding: 0 8px; }
  .side-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
  .side-link:hover { background: var(--surface-2); }
  .side-link.on { background: var(--brand-soft); color: var(--brand); }
  .side-link .ic { width: 22px; text-align: center; }
  .side-sep { height: 1px; background: var(--line); margin: 10px 8px; }
  .tabs { display: none; }
  .fab { display: none; }
  .side-new { margin: 0 4px 12px; }
  .content, .no-fab .content { padding: 0 28px 48px; }
  .top { padding: 14px 28px 10px; }
  .top-co { display: none; }
  .page-title { margin: 0; font-size: 1.5rem; }
}

/* brand */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-head); font-weight: 700; min-width: 0; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { font-family: var(--f-body); font-weight: 500; color: var(--muted); }
.logo { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--brand-ink); font-family: var(--f-head); font-weight: 700; font-size: .9rem; flex: none; }
.logo-small { width: 26px; height: 26px; border-radius: 7px; font-size: .7rem; }

/* cards and blocks */
.card, .block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; box-shadow: var(--shadow); min-width: 0; }
.block.red { border-left: 4px solid var(--red); }
.block.amber { border-left: 4px solid var(--amber); }
.block-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.block-head .block-title { margin: 0; }
.count { font-family: var(--f-mono); font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 1px 9px; }
.empty { text-align: center; }
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.narrow { width: 100%; max-width: 420px; }
.signin h1 { margin-top: 14px; }
.two { display: grid; gap: 14px; }
.two > * { margin-bottom: 0; }
.two { margin-bottom: 14px; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer; background: var(--surface-2); color: var(--ink); text-align: center; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--ink); }
.btn-danger { background: var(--surface); border-color: var(--red); color: var(--red); }
.btn-link { background: none; color: var(--brand); padding: 0 4px; text-decoration: underline; min-height: 44px; font-weight: 600; }
.btn-small { min-height: 44px; padding: 0 14px; font-size: .92rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-big { flex-direction: column; align-items: flex-start; min-height: 64px; padding: 10px 16px; width: 100%; background: var(--surface); border-color: var(--line); }
.big-title { font-family: var(--f-head); font-size: 1.05rem; }
.big-sub { font-weight: 500; color: var(--muted); font-size: .88rem; }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--surface-2); font-size: 1.5rem; cursor: pointer; flex: none; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-btns > * { min-width: 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.toolbar input[type=search] { flex: 1 1 200px; min-width: 0; }

/* forms */
.field { display: grid; gap: 6px; min-width: 0; }
.field label, .label { font-weight: 600; font-size: .95rem; }
input[type=text], input[type=email], input[type=search], input[type=date], input[type=file], select, textarea {
  width: 100%; min-width: 0; max-width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; }
textarea { resize: vertical; min-height: 88px; }
input[type=file] { padding: 10px; }
.hint { font-size: .85rem; color: var(--muted); margin: 0; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 12px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; min-width: 0; }
.check span { overflow-wrap: anywhere; }
input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }

.seg { display: flex; gap: 4px; flex-wrap: wrap; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 12px; max-width: 100%; }
.seg-btn { flex: 1 1 auto; min-height: 44px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; cursor: pointer; color: var(--muted); white-space: nowrap; }
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.field .seg, .block-head .seg, .toolbar .seg { margin-bottom: 0; }

.quick { display: grid; gap: 8px; }
.quick-row { display: grid; gap: 8px; }
.quick-row > * { min-width: 0; }
@media (min-width: 640px) { .quick-row { grid-template-columns: minmax(0, 1fr) auto; } }

/* chips: colour always with a word */
.chip { display: inline-flex; align-items: center; min-height: 24px; padding: 1px 9px; border-radius: 999px; font-size: .8rem; font-weight: 700; white-space: nowrap; }
.tone-neutral { background: var(--neutral-soft); color: var(--muted); }
.tone-red { background: var(--red-soft); color: var(--red); }
.tone-amber { background: var(--amber-soft); color: var(--amber); }
.tone-green { background: var(--green-soft); color: var(--green); }
.tone-blue { background: var(--blue-soft); color: var(--blue); }
.tone-text-red { color: var(--red); font-weight: 700; } .tone-text-amber { color: var(--amber); font-weight: 700; }
.tone-text-green { color: var(--green); font-weight: 700; } .tone-text-neutral { color: var(--muted); }
.tone-bg-red { background: var(--red); } .tone-bg-amber { background: var(--amber); } .tone-bg-green { background: var(--green); } .tone-bg-neutral { background: var(--muted); }

/* tasks */
.task-list { display: grid; gap: 10px; }
.task { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface); min-width: 0; }
.task.stuck { border-left: 4px solid var(--red); }
.task-main { display: grid; gap: 6px; text-decoration: none; color: inherit; min-width: 0; }
.task-title { font-weight: 700; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.task-who { color: var(--muted); font-size: .88rem; }
.task-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; margin-top: 10px; }
.task-btns .btn { padding: 0 8px; white-space: nowrap; }
.task-h { font-size: 1.35rem; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 12px 0; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.detail { white-space: pre-wrap; background: var(--surface-2); padding: 10px 12px; border-radius: 10px; overflow-wrap: anywhere; }
.actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 12px; }
.comment { display: grid; gap: 8px; margin-bottom: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 16px 1fr; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.timeline p { margin: 0; overflow-wrap: anywhere; }
.ev-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); margin-top: 7px; }
.ev-completed .ev-dot, .ev-accepted .ev-dot { background: var(--green); }
.ev-reopened .ev-dot, .ev-blocker .ev-dot, .ev-escalated .ev-dot { background: var(--red); }
.ev-comment .ev-dot { background: var(--brand); }
.ev-body { white-space: pre-wrap; }

/* board */
.board { display: none; }
@media (min-width: 900px) {
  .board-phone { display: none; }
  .board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; }
}
.col { background: var(--surface-2); border-radius: 12px; padding: 10px; min-width: 0; }
.col-title { font-size: .95rem; display: flex; justify-content: space-between; align-items: center; }
.card-mini { display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin-top: 8px; text-decoration: none; color: inherit; min-width: 0; }
.card-mini .task-title { font-size: .92rem; }

/* plans */
.plan-items { display: grid; gap: 2px; margin: 8px 0; }
.plan-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 4px 6px; border-radius: 10px; cursor: pointer; }
.plan-item:hover { background: var(--surface-2); }
.plan-item span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.plan-item input:checked + span { text-decoration: line-through; color: var(--muted); }

/* numbers and kpis */
.kpis, .nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } .nums { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.kpi, .num { display: grid; gap: 4px; align-content: start; background: var(--surface-2); border-radius: 12px; padding: 12px; min-width: 0; position: relative; z-index: 1; }
.kpi-label { font-size: .85rem; color: var(--muted); font-weight: 600; }
.kpi-val { font-family: var(--f-mono); font-size: 1.3rem; font-weight: 600; overflow-wrap: anywhere; }
.kpi-sub { font-size: .8rem; color: var(--muted); }
.kpi .chip { justify-self: start; white-space: normal; }
.meter-wrap { display: grid; gap: 3px; }
.meter { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 999px; }
.meter-word { font-size: .8rem; }
.bars { display: grid; gap: 8px; position: relative; z-index: 1; }
.bar-row { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.bar-label { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar { height: 14px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.bar-val { font-family: var(--f-mono); font-size: .82rem; }
.spark { width: 84px; height: 24px; display: block; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 2; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; position: relative; z-index: 1; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { font-size: .8rem; color: var(--muted); font-weight: 700; }
.table .r { text-align: right; font-family: var(--f-mono); }
.table .c { text-align: center; }
.table tr.behind td:first-child { border-left: 4px solid var(--red); }
.behind-word { color: var(--red); font-weight: 700; font-size: .8rem; }
.cell { display: inline-block; min-width: 40px; padding: 2px 6px; border-radius: 6px; font-size: .78rem; font-weight: 700; }
details summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }

/* lists */
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain > li { padding: 10px 0; border-top: 1px solid var(--line); }
.risks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; position: relative; z-index: 1; }
.risk { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; padding: 10px; border-radius: 10px; background: var(--surface-2); }
.risk .btn { grid-column: 1 / -1; justify-self: start; }
.risk-text { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 640px) { .risk { grid-template-columns: auto 1fr auto; } .risk .btn { grid-column: auto; } }
.feeds li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.feeds li > span:first-child { flex: 1; min-width: 0; }
.upload, .device, .person { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.upload > div:first-child, .device > div:first-child, .person-main { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.person.inactive { opacity: .6; }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .85rem; flex: none; }

/* confidential watermark (viewer's name + email, diagonal) */
.confidential { position: relative; overflow: hidden; }
.watermark { position: absolute; inset: -40%; display: flex; flex-wrap: wrap; gap: 40px 60px; align-content: flex-start; transform: rotate(-24deg); pointer-events: none; user-select: none; z-index: 0; }
.watermark span { font-size: .8rem; font-weight: 700; color: var(--ink); opacity: .07; white-space: nowrap; }
.confidential > :not(.watermark) { position: relative; z-index: 1; }

/* pickers */
.picker { display: grid; gap: 8px; min-width: 0; }
.pick-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.pick-team { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 8px 2px; }
.pick-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 4px 8px; border: 0; background: none; border-radius: 10px; text-align: left; cursor: pointer; }
.pick-item:hover { background: var(--surface-2); }
.pick-item.on { background: var(--brand-soft); outline: 2px solid var(--brand); }
.pick-text { display: grid; min-width: 0; }
.pick-name { font-weight: 600; }
.pick-sub { font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* sheet */
.sheet-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(8, 14, 13, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--surface); width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; }
.sheet-body > * + * { margin-top: 12px; }
@media (min-width: 700px) { .sheet-wrap { align-items: center; } .sheet { max-width: 560px; border-radius: 18px; } }

/* status, errors, toasts */
.working { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 14px 4px; font-weight: 600; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.error { background: var(--red-soft); color: var(--ink); border: 1px solid var(--red); border-radius: 12px; padding: 12px; margin-bottom: 14px; }
.error strong { color: var(--red); }
#toasts { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabs-h) + 80px); z-index: 80; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
@media (min-width: 900px) { #toasts { bottom: 24px; left: auto; right: 24px; max-width: 420px; } }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: var(--ink); color: var(--bg); padding: 10px 12px 10px 16px; border-radius: 12px; box-shadow: var(--shadow); max-width: 100%; font-weight: 600; }
.toast-error { background: var(--red); color: #fff; }
.toast .btn { background: rgba(255, 255, 255, .15); color: inherit; }
.toast-x { background: none; border: 0; color: inherit; font-size: 1.3rem; min-width: 44px; min-height: 44px; cursor: pointer; }
.preview { min-height: 1.5rem; }
.sticky-actions { position: sticky; bottom: calc(var(--tabs-h) + 8px); z-index: 5; }
@media (min-width: 900px) { .sticky-actions { bottom: 8px; } }
.dayend { border-left: 4px solid var(--brand); }

/* ---------- Data Desk (data/index.html + datadesk.js) ---------- */
.dd { min-height: 100vh; }
.dd-bar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.dd-in { max-width: 1080px; margin: 0 auto; padding: 8px 16px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.dd-brandrow { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; min-width: 0; }
.dd-logo { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; white-space: nowrap; }
.dd-logo span { color: var(--brand); }
.dd-url { font-family: var(--f-mono); font-size: .75rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; overflow-wrap: anywhere; min-width: 0; }
.dd-url b { color: var(--brand); font-weight: 500; }
.dd-who { margin-left: auto; font-size: .875rem; min-height: 44px; padding: 0 4px; }
.dd-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.dd-tabs::-webkit-scrollbar { display: none; }
.dd-tabs a { flex: none; display: flex; align-items: center; gap: 6px; padding: 0 12px; min-height: 44px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.dd-tabs a[aria-current="page"] { color: var(--brand); border-bottom-color: var(--brand); }
.dd-n { font-family: var(--f-mono); font-size: .7rem; background: var(--red-soft); color: var(--red); border-radius: 999px; padding: 0 6px; }
.dd-n.zero { background: var(--green-soft); color: var(--green); }
.dd-wrap { max-width: 1080px; margin: 0 auto; padding: 16px 16px 48px; min-width: 0; }
.dd-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dd-stack > * { min-width: 0; margin: 0; }
.dd-stack h2 small { font-family: var(--f-body); font-weight: 500; font-size: .8rem; }
.dd-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dd-sum .kpi { min-width: 0; }
.dd-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 700px) { .dd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .dd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dd-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.dd-box.late { border-left: 4px solid var(--red); } .dd-box.due { border-left: 4px solid var(--amber); } .dd-box.ok { border-left: 4px solid var(--green); }
.dd-box-head { display: flex; gap: 8px; align-items: flex-start; }
.dd-box-head h3 { margin: 0 auto 0 0; font-size: 1rem; min-width: 0; overflow-wrap: anywhere; }
.dd-m { font-size: .84rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: center; min-width: 0; }
.dd-m > * { min-width: 0; overflow-wrap: anywhere; }
.dd-row { display: flex; justify-content: flex-end; margin-top: auto; padding-top: 4px; }
.dd-agent { font-size: .75rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; }
.dd-agent.none { color: var(--muted); background: var(--neutral-soft); }
.dd-hist td.dd-file { overflow-wrap: anywhere; min-width: 140px; }
.dd-drop { border: 2px dashed var(--line); border-radius: 12px; padding: 20px 14px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; cursor: pointer; }
.dd-drop.on, .dd-drop:hover { border-color: var(--brand); background: var(--brand-soft); }
.dd-file-in { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dd-files { display: flex; flex-direction: column; gap: 10px; }
.dd-fitem { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.dd-fitem.blocked, .dd-fitem.failed { border-color: var(--red); }
.dd-fitem.done { border-color: var(--green); }
.dd-fhead { overflow-wrap: anywhere; }
.dd-checks { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; margin-top: 6px; }
.dd-checks > span::before { content: "✓ "; color: var(--green); font-weight: 700; }
.dd-checks > span.w::before { content: "! "; color: var(--amber); }
.dd-checks > span.i::before { content: "– "; color: var(--muted); }
.dd-checks > span.x { color: var(--red); font-weight: 600; }
.dd-checks > span.x::before { content: "✗ "; }
.dd-checks > span.ok { color: var(--green); font-weight: 600; }
.dd-checks .working { padding: 0; }
.dd-people > li { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.dd-devs { margin-top: 6px; }
.dd-devs .device { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 0; }
.dd-devbtns { display: flex; gap: 8px; margin-left: auto; }
.dd-add { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.dd-2 { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .dd-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dd-co { border-top: 1px solid var(--line); padding: 4px 0; }
.dd-co summary { min-height: 44px; display: flex; align-items: center; gap: 4px; cursor: pointer; flex-wrap: wrap; }
.dd-slotrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); }
.dd-slotrow > div { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 420px) { .dd-sum .kpi-val { font-size: 1.3rem; } .dd-who { margin-left: 0; } }
.dd-co summary { list-style: none; }
.dd-co summary::-webkit-details-marker { display: none; }
.dd-co summary::before { content: "▸"; color: var(--brand); width: 1.1em; transition: transform .15s; display: inline-block; }
.dd-co[open] summary::before { transform: rotate(90deg); }
.dd-add .btn { margin-top: 10px; }

/* ---------- role desks (v2): CRM activity, Top 10, labs, telecalling, editorial, targets ---------- */
.crm-list > li.crm-ev { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.crm-ev > .chip { flex: none; margin-top: 2px; }
.crm-main { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.crm-main p { margin: 2px 0 0; }
.stage-dots { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.stage-dots span { width: 14px; height: 8px; border-radius: 2px; background: var(--line); }
.stage-dots span.on { background: var(--brand); }
.stage-dots span.now { background: var(--amber); }
.stage-dots small { width: 100%; color: var(--muted); white-space: nowrap; }
.tele-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.tele-row > * { min-width: 0; }
input[type=number] { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 16px; }
.table input.tgt { width: 7.5rem; min-height: 44px; text-align: right; font-family: var(--f-mono); }
.table .meter-wrap { min-width: 90px; }
