/* LeverAid Workspace: styles. Arial throughout; flat panels, tables and clear status labels. */
:root {
  color-scheme: light;
  --navy: #0F2B54; --navy-2: #173B6E; --navy-3: #0A1F3E;
  --teal: #1E96A8; --teal-ink: #0E7285; --teal-soft: #E3F3F5;
  --bg: #F3F5F8; --panel: #FFFFFF; --sunk: #F7F9FB; --line: #DCE2E9; --line-2: #C6CFDA;
  --ink: #16202C; --muted: #566374; --faint: #8792A1;
  --neutral: #4A5563; --neutral-bg: #EDF0F3;
  --info: #0B5E8A; --info-bg: #E2F0F8;
  --warn: #8A5700; --warn-bg: #FCF0DA;
  --bad: #A33222; --bad-bg: #FBE4E0;
  --ok: #1D6B43; --ok-bg: #E1F2E8;
  --side-w: 236px;
  --bottom-h: 60px;
  --font: Arial, "Helvetica Neue", Helvetica, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.45 var(--font); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal-ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: 0; }
h1 { font-size: 20px; } h2 { font-size: 15px; } h3 { font-size: 14px; }
p { margin: 0 0 10px; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.muted { color: var(--muted); } .faint { color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- boot & sign-in ---------- */
#boot { min-height: 100vh; display: grid; place-items: center; }
#boot img { width: 72px; opacity: .9; }
#gate { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: var(--bg); }
.gate-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 4px; padding: 32px 28px 28px; text-align: center; }
.gate-logo { width: 260px; max-width: 100%; height: auto; margin: 0 auto 22px; display: block; }
.gate-card h1 { font-size: 20px; margin-bottom: 8px; }
.gate-card p { color: var(--muted); }
.gate-note { font-size: 12.5px; margin: 16px 0 0; }
.gate-foot { color: var(--faint); font-size: 12px; margin-top: 16px; }
.gbtn { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; background: #fff; color: var(--ink); border: 1px solid var(--line-2); padding: 10px 18px; font-weight: 700; }
.gbtn:hover { background: var(--sunk); }
.demo-list { text-align: left; margin-top: 14px; border: 1px solid var(--line); border-radius: 4px; }
.demo-list button { display: flex; width: 100%; gap: 12px; align-items: center; text-align: left; background: #fff; border: 0; border-top: 1px solid var(--line); padding: 11px 14px; cursor: pointer; }
.demo-list button:first-child { border-top: 0; }
.demo-list button:hover { background: var(--sunk); }
.demo-list small { display: block; color: var(--muted); }

/* ---------- shell ---------- */
#side { display: none; }
#mtop { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; height: calc(52px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 14px; background: var(--navy); color: #fff; }
#mtop h1 { font-size: 16px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mtop img { display: block; height: 22px; width: auto; }
.mtop-me { text-decoration: none; }
#shell { overflow-x: clip; }
#main { min-width: 0; padding: 16px 16px calc(var(--bottom-h) + 28px + env(safe-area-inset-bottom)); max-width: 1240px; margin: 0 auto; }
#bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
#bottom a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--bottom-h); color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 700; position: relative; }
#bottom a.on { color: var(--navy); box-shadow: inset 0 3px 0 var(--teal); }
#bottom .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
.badge { display: inline-block; min-width: 18px; padding: 1px 5px; border-radius: 9px; background: #C8372A; color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; font-style: normal; }
.demo-bar { background: #FFF4D6; color: #6B4A00; border-bottom: 1px solid #EAD29A; font-size: 13px; padding: 8px 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.demo-bar b { font-weight: 700; }
.demo-bar button { background: none; border: 0; padding: 0; color: #6B4A00; text-decoration: underline; cursor: pointer; font-weight: 700; }

@media (min-width: 900px) {
  #shell { padding-left: var(--side-w); }
  #mtop, #bottom { display: none; }
  #side { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: var(--side-w); background: var(--navy); color: #fff; z-index: 20; }
  .side-brand { padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .side-brand img { display: block; width: 148px; height: auto; }
  .side-brand span { display: block; margin-top: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: #9FC9D2; font-weight: 700; }
  .side-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
  .side-nav a, .side-link { display: flex; align-items: center; gap: 12px; padding: 9px 20px; color: #D5DEEA; text-decoration: none; font-weight: 700; font-size: 14px; border-left: 3px solid transparent; background: none; border-top: 0; border-right: 0; border-bottom: 0; width: 100%; cursor: pointer; text-align: left; }
  .side-nav a:hover, .side-link:hover { background: var(--navy-2); color: #fff; }
  .side-nav a.on { background: var(--navy-3); color: #fff; border-left-color: var(--teal); }
  .side-nav a span { flex: 1; }
  .side-foot { border-top: 1px solid rgba(255,255,255,.12); padding: 10px 0 12px; }
  .side-me { display: flex; gap: 10px; align-items: center; padding: 8px 20px 10px; }
  .side-me b { display: block; font-size: 13px; }
  .side-me small { color: #9FB3CC; font-size: 12px; }
  .side-link { font-size: 13px; padding: 7px 20px; }
  #main { padding: 24px 32px 48px; }
}

/* ---------- page furniture ---------- */
.page-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-h .sub { color: var(--muted); margin-top: 3px; font-size: 13px; }
.page-h .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
@media (max-width: 899px) { .page-h h1 { font-size: 18px; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; }
.panel + .panel, .stack > * + * { margin-top: 16px; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 11px 16px; border-bottom: 1px solid var(--line); min-height: 46px; }
.panel-h .hint { font-size: 12.5px; color: var(--muted); }
.panel-b { padding: 16px; }
.panel-b.tight { padding: 0; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.cols > * { min-width: 0; }
.cols > .panel + .panel { margin-top: 0; }
@media (min-width: 1000px) {
  .cols.c2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cols.c-side { grid-template-columns: minmax(0, 360px) minmax(0, 1fr); }
  .cols.c-main { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
}
.notice { border: 1px solid var(--line); border-left: 4px solid var(--teal); background: var(--panel); padding: 10px 14px; font-size: 13px; color: var(--muted); border-radius: 3px; }
.notice b { color: var(--ink); }
.notice.warn { border-left-color: #D79A1E; }
.notice.bad { border-left-color: var(--bad); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; font-size: 14px; }

/* ---------- tabs & segmented controls ---------- */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 9px 14px; color: var(--muted); text-decoration: none; font-weight: 700; border: 0; background: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.tabs .on { color: var(--navy); border-bottom-color: var(--teal); }
.f .seg { align-self: flex-start; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; background: #fff; }
.seg button, .seg label { border: 0; background: #fff; padding: 6px 11px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; border-left: 1px solid var(--line-2); }
.seg > :first-child { border-left: 0; }
.seg .on, .seg label:has(input:checked) { background: var(--navy); color: #fff; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--navy); background: var(--navy); color: #fff; border-radius: 3px; padding: 8px 14px; font-weight: 700; cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap; }
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { background: var(--sunk); }
.btn.ok { background: var(--ok); border-color: var(--ok); }
.btn.ok:hover { background: #185c39; }
.btn.bad { background: #fff; color: var(--bad); border-color: #E2A89F; }
.btn.bad:hover { background: var(--bad-bg); }
.btn.teal { background: var(--teal-ink); border-color: var(--teal-ink); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 14px 22px; font-size: 17px; }
.btn.block { width: 100%; }
.btn svg { width: 17px; height: 17px; flex: none; }
.icon-btn { background: none; border: 0; padding: 6px; color: var(--muted); cursor: pointer; border-radius: 3px; display: inline-flex; }
.icon-btn:hover { background: var(--neutral-bg); color: var(--ink); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--teal-ink); font-weight: 700; cursor: pointer; font-size: 13px; }
.linkbtn.bad { color: var(--bad); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---------- forms ---------- */
.f { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.f-l { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.f-l em { font-style: normal; font-weight: 400; color: var(--faint); }
.f input, .f select, .f textarea, .inp { width: 100%; background: #fff; border: 1px solid var(--line-2); border-radius: 3px; padding: 8px 10px; font-size: 14px; color: var(--ink); min-height: 38px; }
.f textarea { resize: vertical; min-height: 80px; }
.f input:focus, .f select:focus, .f textarea:focus, .inp:focus { outline: 2px solid var(--teal); outline-offset: -1px; border-color: var(--teal); }
.inp.sm { min-height: 32px; padding: 5px 8px; font-size: 13px; width: auto; }
.row { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr; }
.row3 { display: grid; gap: 0 12px; grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 560px) { .row3 { grid-template-columns: 1fr 1fr; } }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin-bottom: 12px; cursor: pointer; }
.check input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--navy); }
.check small { display: block; color: var(--muted); font-size: 12.5px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search { position: relative; }
.search svg { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--faint); }
.search .inp { padding-left: 30px; }
.tally { display: flex; justify-content: space-between; align-items: center; background: var(--sunk); border: 1px solid var(--line); border-radius: 3px; padding: 9px 12px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.tally b { font-size: 18px; color: var(--navy); }
.warn-txt { color: var(--bad); font-size: 13px; margin-bottom: 10px; }

/* ---------- tags, avatars, labels ---------- */
.tag { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 3px; white-space: nowrap; line-height: 1.35; vertical-align: 1px; }
.tag.neutral { background: var(--neutral-bg); color: var(--neutral); }
.tag.info { background: var(--info-bg); color: var(--info); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.bad { background: var(--bad-bg); color: var(--bad); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.navy { background: var(--navy); color: #fff; }
.tag.outline { background: #fff; border: 1px solid var(--line-2); color: var(--muted); padding: 1px 6px; }
.prio { font-size: 12px; font-weight: 700; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.prio::before { content: ""; width: 8px; height: 8px; border-radius: 1px; background: currentColor; }
.prio.p-urgent { color: #B42318; } .prio.p-high { color: #B26A00; } .prio.p-low { color: var(--faint); }
.due { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.due.over { color: var(--bad); font-weight: 700; }
.due.today { color: var(--warn); font-weight: 700; }
.av { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #DDE7F1; color: var(--navy); font-size: 11px; font-weight: 700; flex: none; letter-spacing: .02em; }
img.av { object-fit: cover; display: inline-block; background: #fff; }
.av.xl { width: 72px; height: 72px; font-size: 24px; }
.av.inv { background: rgba(255,255,255,.16); color: #fff; }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.av.lg { width: 36px; height: 36px; font-size: 13px; }
.who { display: inline-flex; gap: 8px; align-items: center; min-width: 0; }
.who span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tables ---------- */
.tbl { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--sunk); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #F8FAFC; }
tr.group td { background: var(--sunk); font-weight: 700; font-size: 12.5px; color: var(--navy); padding: 7px 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line); border-radius: 4px; background: var(--panel); }
.kpis > div, .kpis > a { padding: 12px 16px; border-left: 1px solid var(--line); }
.kpis > :first-child { border-left: 0; }
.kpis .l { font-size: 12px; color: var(--muted); font-weight: 700; }
.kpis .v { font-size: 24px; font-weight: 700; margin-top: 2px; color: var(--navy); font-variant-numeric: tabular-nums; }
.kpis .v small { font-size: 13px; color: var(--faint); font-weight: 400; }
.kpis a { text-decoration: none; color: inherit; display: block; }
@media (max-width: 560px) {
  .kpis:not(.k3) { grid-template-columns: 1fr 1fr; }
  .kpis:not(.k3) > :nth-child(odd) { border-left: 0; }
  .kpis:not(.k3) > :nth-child(n+3) { border-top: 1px solid var(--line); }
  .kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .kpis.k3 > * { padding: 10px 12px; }
  .kpis.k3 .v { font-size: 20px; }
}

/* ---------- lists ---------- */
.list > .item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-top: 1px solid var(--line); }
.list > .item:first-child { border-top: 0; }
.item .grow { flex: 1; min-width: 0; }
.item .t { font-weight: 700; }
.item .d { color: var(--muted); font-size: 13px; margin-top: 2px; }
.item .meta { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; margin-top: 5px; font-size: 12.5px; color: var(--muted); }
.item q { quotes: none; color: var(--ink); }
.item .acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
a.item { text-decoration: none; color: inherit; }
a.item:hover { background: #F8FAFC; }

/* ---------- tasks ---------- */
.tasks-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tasks-layout > * { min-width: 0; }
@media (min-width: 1100px) { .tasks-layout { grid-template-columns: 210px minmax(0, 1fr); } }
.proj-nav { align-self: start; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.proj-nav a span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.proj-nav a { white-space: nowrap; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 3px; background: #fff; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 700; display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.proj-nav a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.proj-nav a small { color: inherit; opacity: .7; font-weight: 400; }
.proj-nav .lbl { display: none; }
@media (min-width: 1100px) {
  .proj-nav { flex-direction: column; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 6px 0; }
  .proj-nav a { border: 0; border-radius: 0; border-left: 3px solid transparent; padding: 8px 14px; }
  .proj-nav a.on { background: var(--teal-soft); color: var(--navy); border-left-color: var(--teal); }
  .proj-nav .lbl { display: block; padding: 10px 14px 4px; font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
}
.task-tbl td.title { font-weight: 700; min-width: 220px; }
.task-tbl td.title .sub { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.task-tbl .ic { display: inline-flex; color: var(--faint); vertical-align: -4px; margin-left: 4px; }
.task-tbl .ic svg { width: 15px; height: 15px; }
.task-cards { display: none; }
@media (max-width: 720px) {
  .task-tbl { display: none; }
  .task-cards { display: block; }
}
.tcard { display: block; padding: 12px 14px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.tcard:first-child { border-top: 0; }
.tcard .t { font-weight: 700; }
.tcard .m { display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.tcard.grp { background: var(--sunk); font-weight: 700; color: var(--navy); font-size: 12.5px; padding: 7px 14px; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; min-height: 300px; }
.bcol { flex: 0 0 272px; background: #E9EEF3; border: 1px solid var(--line); border-radius: 4px; display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.bcol-h { padding: 10px 12px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--navy); border-bottom: 1px solid var(--line); }
.bcol-h small { color: var(--muted); font-weight: 400; }
.bcol-b { padding: 8px; overflow-y: auto; flex: 1; min-height: 60px; }
.bcol.drop { outline: 2px dashed var(--teal); outline-offset: -3px; }
.bcard { display: block; background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 10px 11px; margin-bottom: 8px; text-decoration: none; color: inherit; cursor: grab; }
.bcard:hover { border-color: var(--line-2); }
.bcard.dragging { opacity: .5; }
.bcard .t { font-weight: 700; font-size: 13.5px; }
.bcard .m { display: flex; gap: 6px 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; font-size: 12px; color: var(--muted); }
.bcard .m .av { margin-left: auto; }

/* ---------- task overview ---------- */
.kpis.ov-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); overflow: hidden; }
.kpis.ov-kpis > div { background: #fff; border: 0; }
@media (min-width: 1250px) { .kpis.ov-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 560px) { .kpis.ov-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.ov-kpis > div { border: 0 !important; } }
.sbar { display: flex; gap: 2px; height: 14px; margin: 4px 0 14px; }
.sbar i { display: block; height: 100%; min-width: 4px; }
.sbar i:first-child { border-radius: 3px 0 0 3px; } .sbar i:last-child { border-radius: 0 3px 3px 0; } .sbar i:only-child { border-radius: 3px; }
.sbar.empty { background: var(--neutral-bg); border-radius: 3px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.legend b { color: var(--ink); }
.cols14 { display: grid; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; height: 150px; align-items: end; border-bottom: 1px solid var(--line); padding-top: 18px; position: relative; }
.cols14 .c { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; outline: none; }
.cols14 .c i { display: block; width: min(100%, 22px); background: var(--navy); border-radius: 3px 3px 0 0; }
.cols14 .c em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.cols14 .c small { position: absolute; bottom: -20px; font-size: 11px; color: var(--faint); }
.cols14 .c.off small { color: #C5CCD5; }
.cols14 .c:hover i, .cols14 .c:focus i { background: var(--teal-ink); }
.cols14 .tip { display: none; position: absolute; bottom: calc(100% - 8px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12px; padding: 5px 8px; border-radius: 3px; white-space: nowrap; z-index: 3; pointer-events: none; }
.cols14 .tip b { display: block; }
.cols14 .c:hover .tip, .cols14 .c:focus .tip { display: block; }
.cols14 + * { margin-top: 26px; }
.panel-b > .cols14 { margin-bottom: 22px; }
.hbar { display: inline-block; width: 56px; height: 8px; background: var(--neutral-bg); border-radius: 2px; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--navy); }
.hbar.ok i { background: var(--ok); }
.ov-tbl td { white-space: nowrap; }
.ov-tbl th { white-space: normal; line-height: 1.25; vertical-align: bottom; }

/* ---------- drawer (task detail) ---------- */
#drawer { position: fixed; inset: 0; z-index: 40; }
.dr-back { position: absolute; inset: 0; background: rgba(12, 22, 36, .38); }
.dr { position: absolute; top: 0; right: 0; bottom: 0; width: min(620px, 100%); background: #fff; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.dr-h { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; border-bottom: 1px solid var(--line); }
.dr-h .grow { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-b { flex: 1; overflow-y: auto; padding: 18px 20px 28px; }
.dr-b h2.tt { font-size: 19px; margin-bottom: 10px; line-height: 1.3; }
.dr-comp { padding: 10px 16px; border-top: 1px solid var(--line); background: #fff; }
.dr-comp .composer { margin-top: 0; }
.dr-acts { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--sunk); }
.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px 12px; font-size: 13.5px; margin: 14px 0 18px; align-items: center; }
.kv dt { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.kv dd { margin: 0; }
.notes { white-space: pre-wrap; background: var(--sunk); border: 1px solid var(--line); border-radius: 3px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 18px; }
.sect-t { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }
.callout { border: 1px solid var(--line); border-left: 4px solid #D79A1E; background: #FFFBF2; padding: 10px 12px; border-radius: 3px; margin-bottom: 14px; font-size: 13.5px; }
.callout.bad { border-left-color: var(--bad); background: #FFF7F6; }
.callout.info { border-left-color: var(--teal); background: #F5FBFC; }
.callout .btn-row { margin-top: 10px; }
.files { display: flex; flex-direction: column; gap: 6px; }
.file { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 3px; padding: 7px 10px; font-size: 13px; background: #fff; text-align: left; cursor: pointer; width: 100%; }
.file:hover { border-color: var(--line-2); background: var(--sunk); }
.file svg { width: 16px; color: var(--muted); flex: none; }
.file span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file small { color: var(--faint); }
.thread { display: flex; flex-direction: column; gap: 12px; }
.cmt { display: flex; gap: 10px; }
.cmt .body { flex: 1; min-width: 0; }
.cmt .hd { font-size: 12.5px; color: var(--muted); }
.cmt .hd b { color: var(--ink); }
.cmt .tx { margin-top: 3px; font-size: 13.5px; word-wrap: break-word; }
.cmt.event { font-size: 12.5px; color: var(--muted); padding-left: 38px; }
.cmt.event b { color: var(--ink); }
.composer { display: flex; gap: 8px; align-items: flex-end; margin-top: 14px; }
.composer textarea { flex: 1; resize: none; min-height: 40px; max-height: 160px; border: 1px solid var(--line-2); border-radius: 3px; padding: 9px 10px; font-size: 14px; }
.composer .pending { font-size: 12.5px; color: var(--muted); }
.progress { height: 3px; background: var(--line); margin-top: 6px; }
.progress i { display: block; height: 100%; background: var(--teal); width: 0; }

/* ---------- attendance ---------- */
.clock { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 20px; }
@media (max-width: 640px) { .clock { grid-template-columns: 1fr; } }
.clock .now { font-size: clamp(40px, 9vw, 56px); font-weight: 700; color: var(--navy); line-height: 1; font-variant-numeric: tabular-nums; }
.clock .date { color: var(--muted); margin-top: 6px; }
.clock .sched { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.clockbtn { border: 0; border-radius: 4px; min-width: 230px; padding: 18px 24px; font-size: 20px; font-weight: 700; cursor: pointer; background: var(--ok); color: #fff; text-align: center; }
.clockbtn.off { background: #B42318; }
.clockbtn.lunch { background: #9A6200; }
.clockbtn:disabled { background: var(--neutral-bg); color: var(--muted); cursor: default; }
.clockbtn small { display: block; font-size: 13px; font-weight: 400; margin-top: 4px; opacity: .92; }
.clock-acts { display: flex; flex-direction: column; gap: 8px; }
.clock-status { grid-column: 1 / -1; display: flex; gap: 8px 22px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 14px; font-size: 13.5px; color: var(--muted); }
.clock-status b { color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); margin-right: 6px; vertical-align: 1px; }
.dot.lunch { background: #D79A1E; } .dot.off { background: var(--faint); }

/* ---------- leave calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal > div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 92px; padding: 5px 6px; font-size: 12px; background: #fff; min-width: 0; }
.cal .dow { min-height: 0; background: var(--sunk); font-weight: 700; color: var(--muted); text-align: center; padding: 6px; }
.cal .out { background: #FAFBFC; color: var(--faint); }
.cal .we { background: #F7F9FB; }
.cal .hol { background: #FFF8EC; }
.cal .today .dn { background: var(--navy); color: #fff; border-radius: 2px; padding: 0 4px; }
.cal .dn { font-weight: 700; }
.cal .hn { display: block; color: var(--warn); font-size: 11px; margin-top: 2px; }
.cal .ev { display: block; margin-top: 3px; padding: 1px 5px; border-radius: 2px; background: var(--teal-soft); color: var(--navy); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.cal .ev.p { background: var(--warn-bg); color: var(--warn); }
@media (max-width: 640px) { .cal > div { min-height: 64px; padding: 3px; } .cal .ev { font-size: 10.5px; padding: 0 3px; } .cal .hn { display: none; } }

/* ---------- announcements ---------- */
.ann { padding: 14px 16px; border-top: 1px solid var(--line); }
.ann:first-child { border-top: 0; }
.ann.unread { border-left: 4px solid var(--teal); padding-left: 12px; background: #FAFDFD; }
.ann .t { font-weight: 700; font-size: 14.5px; }
.ann .by { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ann .tx { margin-top: 8px; white-space: pre-wrap; word-wrap: break-word; }
.ann .foot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: minmax(0, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 4px; height: calc(100vh - 210px - env(safe-area-inset-bottom)); min-height: 420px; overflow: hidden; }
@media (min-width: 900px) {
  .chat { grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 230px); }
  /* The chat screen fills the window exactly, so the message box is always in view. */
  body.route-chat #shell { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
  body.route-chat #main { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; padding-bottom: 20px; }
  body.route-chat #main > .chat { flex: 1; height: auto; min-height: 0; }
  body.route-chat #main > .panel { flex: 1; min-height: 0; overflow-y: auto; }
}
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list-h { padding: 10px 12px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; }
.chat-list-b { overflow-y: auto; flex: 1; }
.chat-list .lbl { padding: 10px 14px 4px; font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; }
.conv { display: flex; gap: 10px; align-items: center; padding: 10px 14px; text-decoration: none; color: inherit; border-left: 3px solid transparent; }
.conv:hover { background: var(--sunk); }
.conv.on { background: var(--teal-soft); border-left-color: var(--teal); }
.conv .grow { flex: 1; min-width: 0; }
.conv .n { font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; gap: 6px; }
.conv .n small { font-weight: 400; color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.conv .p { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .p { color: var(--ink); font-weight: 700; }
.conv .av.team { background: var(--navy); color: #fff; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-pane-h { padding: 10px 14px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.chat-pane-h .grow { flex: 1; min-width: 0; }
.chat-pane-h b { display: block; }
.chat-pane-h small { color: var(--muted); font-size: 12px; }
.records { display: none; background: #F3F7FB; border-bottom: 1px solid var(--line); color: var(--navy); font-size: 12.5px; padding: 7px 14px; gap: 8px; align-items: center; }
.records svg { width: 15px; height: 15px; flex: none; }
.msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 2px; background: #FBFCFD; }
.msg { display: flex; gap: 10px; padding: 4px 0; }
.msg .body { min-width: 0; max-width: 680px; }
.msg .hd { font-size: 12.5px; color: var(--muted); }
.msg .hd b { color: var(--ink); margin-right: 6px; }
.msg .tx { font-size: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.cont { padding-top: 0; }
.msg.cont .av { visibility: hidden; height: 0; }
.msg .files { margin-top: 5px; max-width: 360px; }
.msg img.thumb { max-width: 260px; max-height: 200px; border: 1px solid var(--line); border-radius: 3px; display: block; margin-top: 5px; cursor: pointer; }
.day-sep { text-align: center; font-size: 12px; color: var(--faint); margin: 12px 0 6px; display: flex; gap: 10px; align-items: center; }
.day-sep::before, .day-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.new-sep { color: #B42318; } .new-sep::before, .new-sep::after { border-color: #E9B7B0; }
.chat-comp { border-top: 1px solid var(--line); padding: 10px 12px; display: flex; gap: 8px; align-items: flex-end; background: #fff; }
.chat-comp textarea { flex: 1; resize: none; min-height: 40px; max-height: 140px; border: 1px solid var(--line-2); border-radius: 3px; padding: 9px 10px; font-size: 14px; }
.chat-comp .att { font-size: 12px; color: var(--muted); }
.readonly { padding: 12px 14px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--sunk); }
@media (max-width: 899px) {
  .chat.has-conv .chat-list { display: none; }
  .chat:not(.has-conv) .chat-pane { display: none; }
  .chat-list { border-right: 0; }
}
.back-btn { display: none; }
@media (max-width: 899px) {
  .back-btn { display: inline-flex; margin-left: -6px; }
  body.in-chat .chat-head, body.in-chat .tabs, body.in-chat .records-top { display: none; }
  body.in-chat .chat { position: fixed; left: 0; right: 0; z-index: 5; height: auto; min-height: 0; border: 0; border-radius: 0;
    top: calc(52px + env(safe-area-inset-top) + var(--demo-h, 0px)); bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
  .chat:not(.has-conv) { height: auto; min-height: 0; }
  .chat:not(.has-conv) .chat-list-b { overflow: visible; }
  .records { display: flex; }
  body.is-demo { --demo-h: 34px; }
  .demo-bar { padding: 7px 14px; height: 34px; flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
  .demo-bar span { display: none; }
}
@media (min-width: 900px) { .mobile-links { display: none; } }
/* ---------- library ---------- */
.doc-ic { color: var(--teal-ink); display: inline-flex; margin-top: 1px; }
a.item > svg:last-child { color: var(--faint); align-self: center; flex: none; }
.doc-body { font-size: 14.5px; line-height: 1.6; max-width: 760px; overflow-wrap: anywhere; }
.doc-body h2 { font-size: 17px; margin: 20px 0 8px; color: var(--navy); }
.doc-body h3 { font-size: 15px; margin: 16px 0 6px; color: var(--navy); }
.doc-body > :first-child { margin-top: 0; }
.doc-body p { margin: 0 0 10px; }
.doc-body ul, .doc-body ol { margin: 0 0 12px; padding-left: 22px; }
.doc-body li { margin-bottom: 4px; }
.doc-note { border-left: 4px solid #D79A1E; background: #FFFBF2; padding: 8px 12px; margin: 0 0 12px; border-radius: 3px; }
.doc-preview { border: 1px solid var(--line-2); border-radius: 3px; padding: 12px; min-height: 200px; max-height: 360px; overflow-y: auto; background: #fff; }
.people-pick { margin-top: 8px; border: 1px solid var(--line); border-radius: 3px; padding: 8px 10px 0; max-height: 200px; overflow-y: auto; }
.people-pick .check { margin-bottom: 8px; }
.meet-card { display: flex; align-items: center; gap: 10px; margin-top: 6px; max-width: 360px; border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 3px; background: #fff; padding: 8px 10px; }
.meet-card svg { color: var(--teal-ink); flex: none; }
.meet-card .grow { flex: 1; min-width: 0; }
.meet-card b { display: block; font-size: 13.5px; }
.meet-card small { color: var(--muted); font-size: 12px; }
@media (max-width: 560px) { .hide-sm { display: none; } }
mark { background: #FFE9A8; color: inherit; padding: 0 1px; }

/* ---------- dialogs & toasts ---------- */
.dlg-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(12, 22, 36, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.dlg { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); background: #fff; border-radius: 4px; display: flex; flex-direction: column; border-top: 4px solid var(--navy); box-shadow: 0 12px 40px rgba(10, 20, 35, .25); }
.dlg.wide { max-width: 760px; }
.dlg-f { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.dlg-h { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px 20px; }
.dlg-h h2 { font-size: 17px; }
.dlg-b { padding: 4px 20px 8px; overflow-y: auto; }
.dlg-a { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@media (max-width: 560px) {
  .dlg-wrap { align-items: flex-end; padding: 0; }
  .dlg { max-width: none; max-height: 92vh; border-radius: 6px 6px 0 0; }
  .dlg-a { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .dlg-a .btn { flex: 1; }
}
#toasts { position: fixed; left: 50%; transform: translateX(-50%); top: calc(62px + env(safe-area-inset-top)); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; width: max-content; max-width: calc(100% - 32px); pointer-events: none; }
@media (min-width: 900px) { #toasts { top: 18px; left: calc(50% + var(--side-w) / 2); } }
.toast { background: #16202C; color: #fff; padding: 10px 16px; border-radius: 3px; font-weight: 700; font-size: 13.5px; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.toast.bad { background: #8F2A1D; }
.toast.ok { background: #1D6B43; }

/* ---------- print (exported conversations) ---------- */
@media print {
  #side, #mtop, #bottom, .demo-bar, .chat-list, .chat-comp { display: none !important; }
  #shell { padding: 0 !important; }
}

/* ---------- hover animations (desktop; off for people who prefer reduced motion) ---------- */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn, .icon-btn, .linkbtn, .seg button, .seg label, .tabs a, .tabs button, .filters button { transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease; }
  .btn:active { transform: translateY(1px); }
  .side-nav a, .side-link { transition: background-color .15s ease, color .15s ease, border-color .15s ease, padding-left .18s ease; }
  .side-nav a:hover { padding-left: 24px; }
  .proj-nav a { transition: background-color .15s ease, color .15s ease, border-color .2s ease, padding-left .18s ease; }
  .proj-nav a:not(.on):hover { background: var(--teal-soft); color: var(--navy); }
  @media (min-width: 1100px) { .proj-nav a:not(.on):hover { border-left-color: var(--teal); padding-left: 18px; } }
  tr.click td { transition: background-color .15s ease; }
  tr.click:hover td { background: #F1F7F8; }
  .tcard, a.item, .conv, .file, .demo-list button { transition: background-color .15s ease, border-color .15s ease; }
  .tcard:hover, a.item:hover { background: #F4F9FA; }
  .bcard { transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
  .bcard:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(15, 43, 84, .10); border-color: var(--line-2); }
  .kpis a { transition: background-color .15s ease; }
  .kpis a:hover { background: #F4F9FA; }
  .cols14 .c i { transition: background-color .15s ease; }
  .hbar i { transition: width .4s ease; }
}

/* ---------- phones: less crowding ---------- */
.filt-btn { display: none; }
.filt-more { display: contents; }
.cal .nm-s { display: none; }
.ann .tx.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.ann .tx + .linkbtn { margin-top: 4px; }
@media (max-width: 899px) {
  /* page headings: the top bar already names the screen */
  .page-h { margin-bottom: 12px; }
  .page-h .sub { display: none; }
  .page-h h1 { font-size: 17px; }
  .panel + .panel, .stack > * + * { margin-top: 12px; }
  .cols { gap: 12px; }
  .panel-h { padding: 10px 14px; min-height: 42px; }
  .panel-b { padding: 14px; }
  .list > .item { padding: 11px 14px; }
  .tabs { margin-bottom: 12px; }
  .tabs a, .tabs button { padding: 8px 11px; }
  /* main "create" button becomes a floating button above the bottom menu */
  .fab-m { position: fixed; right: 16px; bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom)); z-index: 15; width: 52px; height: 52px; padding: 0; border-radius: 6px; box-shadow: 0 4px 14px rgba(15, 43, 84, .30); }
  .fab-m svg { width: 24px; height: 24px; }
  .fab-m span { display: none; }
  body.in-chat .fab-m { display: none; }
  #main { padding-bottom: calc(var(--bottom-h) + 84px + env(safe-area-inset-bottom)); }
  /* stat tiles: tighter, labels only */
  .kpis { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); overflow: hidden; }
  .kpis > div, .kpis > a { flex: 1 1 100px; background: #fff; border: 0 !important; padding: 9px 12px !important; }
  .kpis .l { font-size: 11.5px; line-height: 1.25; }
  .kpis .v { font-size: 20px; }
  .kpis .faint { display: none; }
  /* task filters fold away behind one button */
  .filt-btn { display: inline-flex; }
  .filt-btn .badge { margin-left: 2px; }
  .filt-more { display: none; }
  .filters.open .filt-more { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
  .filters.open .filt-more .inp { flex: 1; min-width: 140px; }
  .filters .search { flex: 1; }
  .filters .search .inp { width: 100% !important; }
  .cal .nm-f { display: none; }
  .cal .nm-s { display: inline; }
  .cal .ev { text-align: center; padding: 1px 0; }
}
@media (max-width: 640px) {
  /* tables become stacked cards */
  table.rt, table.rt tbody, table.rt tr, table.rt td { display: block; width: 100%; }
  table.rt thead { display: none; }
  table.rt tr { padding: 10px 14px; border-bottom: 1px solid var(--line); }
  table.rt tbody tr:last-child { border-bottom: 0; }
  table.rt tr { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; }
  table.rt td { display: inline-flex; width: auto; align-items: center; gap: 5px; border: 0; padding: 1px 0; text-align: left; white-space: normal; min-height: 0; font-size: 13px; }
  table.rt td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 700; flex: none; }
  table.rt td.nil { display: none; }
  table.rt td:first-child { display: block; width: 100%; font-weight: 700; padding-bottom: 3px; font-size: 14px; }
  table.rt td:first-child::before { content: none; }
  table.rt td:not([data-label]), table.rt td[data-label=""] { display: block; width: 100%; padding-top: 4px; }
  table.rt td:not([data-label])::before, table.rt td[data-label=""]::before { content: none; }
  table.rt td:empty { display: none; }
  table.rt tr.click:hover td { background: none; }
  .ov-tbl td { white-space: normal; }
  .ov-tbl .hbar { width: 60px; margin-right: 4px; }
}
