/* Team Task Board — dark by default, light when the device prefers light. */
:root {
  color-scheme: dark;
  --bg: #070b14; --side: #0a0f1c; --card: #0f1626; --card2: #141d31; --ink: #eef2f9; --muted: #8b98b0; --line: #1e2a40; --soft: #172135;
  --accent: #4f8cff; --accent-ink: #ffffff; --accent-soft: #13264a; --primary: #2563eb; --go: #15803d;
  --green: #34d399; --green-solid: #16a34a; --green-soft: #0c2e25; --amber: #fbbf24; --amber-soft: #36290a;
  --red: #f87171; --red-solid: #dc2626; --red-soft: #3a1518; --blue: #7fb0ff; --blue-soft: #13264a; --purple: #b79bff; --purple-soft: #261d4d;
  --cat-l: 76%; --cat-a: .16; --shadow: none;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f4f6fa; --side: #ffffff; --card: #ffffff; --card2: #f6f8fc; --ink: #101623; --muted: #5d6b82; --line: #dfe5ee; --soft: #eef2f7;
    --accent: #1d4ed8; --accent-soft: #e4edff;
    --green: #166534; --green-solid: #16a34a; --green-soft: #dcf5e6; --amber: #854d0e; --amber-soft: #fcf0cc;
    --red: #c81e1e; --red-solid: #dc2626; --red-soft: #fde5e5; --blue: #1d5fc4; --blue-soft: #e1ecff; --purple: #6d3fd6; --purple-soft: #ece5ff;
    --cat-l: 26%; --cat-a: .12; --shadow: 0 1px 2px rgba(16, 24, 40, .06);
  }
}
* { box-sizing: border-box; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
html, body { margin: 0; }
html { scrollbar-gutter: stable; } /* no sideways jump between pages with and without a scrollbar */
body { background: var(--bg); color: var(--ink); font: 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; } h1 { font-size: 24px; letter-spacing: -.02em; } h2 { font-size: 16px; } h3 { font-size: 14px; }
a { color: var(--accent); cursor: pointer; text-decoration: none; } a:hover { text-decoration: underline; }
.muted { color: var(--muted); } .small { font-size: 12px; } .center { text-align: center; padding: 70px 16px; }
.num { font-variant-numeric: tabular-nums; } .grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; } .wrap { flex-wrap: wrap; } .gap-s { gap: 6px; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .right { text-align: right; }
.ic { width: 18px; height: 18px; flex: none; } .ic.lg { width: 22px; height: 22px; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* inputs & buttons */
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { width: 100%; padding: 9px 11px; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
input[type=range] { padding: 0; accent-color: var(--accent); }
textarea { min-height: 76px; resize: vertical; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 5px; }
label .hint { font-weight: 400; }
.check { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 0 0; font-size: 13px; color: var(--ink); font-weight: 500; cursor: pointer; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--card2); cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { border-color: var(--muted); } .btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--accent-ink); }
.btn.go { background: var(--go); border-color: var(--go); color: #fff; }
.btn.primary:hover, .btn.go:hover { filter: brightness(1.1); }
.btn.green { background: var(--green-soft); border-color: transparent; color: var(--green); }
.btn.red { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 35%, transparent); color: var(--red); }
.btn.amber { background: var(--amber-soft); border-color: transparent; color: var(--amber); }
.btn.blue { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; } .btn.lg { padding: 13px 16px; font-size: 15px; border-radius: 11px; }
.btn.icon { padding: 4px 7px; font-size: 12px; line-height: 1.2; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--soft); }

/* shell */
.shell { display: flex; min-height: 100vh; }
.side { width: 232px; flex: none; background: var(--side); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 16px 12px; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 2px 6px; }
.logo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, #4f8cff, #7c5cff); color: #fff; display: grid; place-items: center; flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.navitem { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-weight: 600; color: var(--muted); text-align: left; white-space: nowrap; }
.navitem:hover { background: var(--soft); color: var(--ink); } .navitem.on { background: var(--accent-soft); color: var(--accent); }
.navsep { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 11px 4px; }
.badge { min-width: 19px; padding: 0 6px; border-radius: 10px; background: var(--red-solid); color: #fff; font-size: 11px; font-weight: 700; text-align: center; margin-left: auto; line-height: 19px; }
.usercard { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--card); }
.main { flex: 1; min-width: 0; }
.pagehead { display: flex; align-items: center; gap: 12px; padding: 20px 28px 0; flex-wrap: wrap; max-width: 1500px; margin: 0 auto; }
.pagehead h1 { overflow-wrap: anywhere; }
.pagehead .sub { color: var(--muted); margin-top: 3px; }
.iconbtn { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; }
.iconbtn:hover { border-color: var(--muted); }
.iconbtn .dotbadge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--red-solid); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.popwrap { position: relative; }
.pop { position: absolute; right: 0; top: 46px; z-index: 15; width: 360px; max-width: calc(100vw - 24px); background: var(--card); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 18px 50px rgba(0, 0, 0, .45); padding: 12px; }
.pop .nlist { max-height: 380px; overflow-y: auto; margin: 8px -4px; }
.nitem { display: flex; gap: 10px; padding: 9px 8px; border-radius: 9px; cursor: pointer; } .nitem:hover { background: var(--soft); }
.nitem.unread { background: var(--accent-soft); }
main { padding: 18px 28px 70px; max-width: 1500px; margin: 0 auto; }
.show-m { display: none; }
@media (max-width: 1100px) { .hide-t { display: none !important; } }
@media (max-width: 1000px) { td.hide-m, th.hide-m { display: none !important; } .show-m { display: inline-flex; } }
@media (max-width: 360px) { td .avatar.sm { display: none; } }
.barcol { width: 30%; }
@media (max-width: 420px) { .hide-xs { display: none !important; } }
@media (max-width: 360px) { td .chip { white-space: normal; } th, td { padding: 8px 5px !important; } .focus-actions .btn .ic { display: none; } .focus-actions .btn { font-size: 13.5px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; }
.section-head { display: flex; align-items: center; gap: 10px; margin: 26px 0 10px; flex-wrap: wrap; }
.section-head h2 { flex: 1; } .section-head .sub { font-weight: 400; color: var(--muted); font-size: 13px; }
.notice { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); border: 1px solid color-mix(in srgb, var(--blue) 25%, transparent); }
.envtag { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: var(--amber-soft); color: var(--amber); }

/* avatar & presence */
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 15px; flex: none; }
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; } .avatar.md { width: 34px; height: 34px; font-size: 12.5px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted); }
.dot.green { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); } .dot.amber { background: #f59e0b; } .dot.red { background: #ef4444; }

/* chips, category pills, urgency */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; border: 1px solid transparent; }
.chip.green { background: var(--green-soft); color: var(--green); } .chip.red { background: var(--red-soft); color: var(--red); }
.chip.amber { background: var(--amber-soft); color: var(--amber); } .chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.outline { background: transparent; border-color: currentColor; }
.cat { --h: 220; display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: hsl(var(--h) 70% 55% / var(--cat-a)); color: hsl(var(--h) 85% var(--cat-l)); border: 1px solid hsl(var(--h) 70% 55% / .3); }
.kcard .cat { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: inline-block; }
.kcard .cat::before { display: inline-block; margin-right: 6px; vertical-align: middle; }
.cat::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.cat.gray { background: var(--soft); color: var(--muted); border-color: var(--line); }
.urg { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px; white-space: nowrap; }
.urg.urgent { background: var(--red-solid); color: #fff; } .urg.high { background: var(--amber-soft); color: var(--amber); }
.urg.normal { background: var(--soft); color: var(--muted); } .urg.low { background: transparent; color: var(--muted); border: 1px solid var(--line); }

/* stat cards */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat { display: flex; align-items: center; gap: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); text-align: left; }
button.stat { cursor: pointer; } button.stat:hover { border-color: var(--muted); }
.stat-ic { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--soft); color: var(--muted); }
.stat-ic.green { background: var(--green-soft); color: var(--green); } .stat-ic.red { background: var(--red-soft); color: var(--red); }
.stat-ic.amber { background: var(--amber-soft); color: var(--amber); } .stat-ic.blue { background: var(--blue-soft); color: var(--blue); }
.stat .l { display: block; color: var(--muted); font-size: 12.5px; } .stat .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }

/* focus card (now working on) */
.focus { border-radius: 16px; padding: 22px; }
.focus-grid { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--green); }
.focus.idle .eyebrow { color: var(--amber); }
.focus-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; margin: 6px 0 10px; cursor: pointer; overflow-wrap: anywhere; }
.bigclock { font-size: 56px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1; }
.bigclock.over { color: var(--red); }
.focus-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 20px; }
@media (max-width: 900px) { .focus-actions { grid-template-columns: 1fr 1fr; } .bigclock { font-size: 46px; } .focus-title { font-size: 21px; } }

/* bars */
.bar { height: 7px; border-radius: 5px; background: var(--soft); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; background: #22c55e; border-radius: 5px; }
.bar.warn > i { background: #f59e0b; } .bar.over > i { background: #ef4444; } .bar.prog > i { background: var(--accent); } .bar.idle > i { background: var(--muted); }
.bar.thick { height: 9px; }

/* queue rows */
.tasklist { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.task { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--card); }
.task:last-child { border-bottom: 0; }
.task.active { background: color-mix(in srgb, var(--green-soft) 55%, var(--card)); box-shadow: inset 3px 0 0 #22c55e; }
.task.blocked { box-shadow: inset 3px 0 0 #ef4444; } .task.dragging { opacity: .35; }
.task .rank { width: 32px; height: 32px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; font-variant-numeric: tabular-nums; }
.task.top .rank { background: var(--primary); color: #fff; }
.task .title { font-weight: 600; font-size: 14.5px; cursor: pointer; overflow-wrap: anywhere; } .task .title:hover { color: var(--accent); }
.task .meta { display: flex; gap: 5px 10px; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: 12px; margin-top: 4px; }
.task .time { width: 150px; flex: none; font-size: 12.5px; } .task .acts { display: flex; gap: 6px; flex: none; align-items: center; }
.handle { cursor: grab; color: var(--muted); user-select: none; font-size: 16px; }
.blocknote { margin-top: 6px; padding: 6px 10px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 12.5px; }
.blocknote.need { background: var(--amber-soft); color: var(--amber); }
@media (max-width: 860px) { .task { flex-wrap: wrap; } .task .time { width: auto; flex: 1; order: 3; } .task .acts { order: 4; } .task .grow { flex-basis: calc(100% - 60px); } }

/* person cards */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr)); gap: 14px; }
.people.aigrid { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); }
.people > *, .stats > *, .two > * { min-width: 0; }
.focus-main { min-width: min(260px, 100%); } .focus-time { min-width: min(280px, 100%); }
.cell-actions { text-align: right; white-space: nowrap; }
.catrow { display: flex; align-items: center; gap: 10px 14px; padding: 8px 4px; flex-wrap: wrap; } .catname { width: 190px; flex: none; } .catrow .hbar { min-width: 180px; }
.pcard { position: relative; cursor: pointer; display: flex; flex-direction: column; gap: 12px; padding: 18px; overflow: hidden; }
.pcard:hover { border-color: var(--muted); } .pcard.off { border-color: var(--red); }
.ribbon { position: absolute; top: 0; right: 0; background: var(--red-solid); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 12px 4px 14px; border-bottom-left-radius: 11px; }
.ptimer { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.02em; line-height: 1.1; color: var(--green); text-align: right; }
.ptimer.over { color: var(--red); } .ptimer.idle { color: var(--muted); font-size: 18px; font-weight: 600; }
.pcard .lbl { font-size: 12px; color: var(--muted); } .pcard .cur { font-weight: 600; font-size: 15px; min-height: 22px; overflow-wrap: anywhere; }

/* attention groups */
.group { margin-bottom: 14px; padding: 0; overflow: hidden; }
.group-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.arow { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-top: 1px solid var(--line); cursor: pointer; flex-wrap: wrap; }
.arow:hover { background: var(--card2); } .arow .ctx { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }

/* alerts, sounds' visual partners, animations */
#alerts { position: fixed; top: 14px; right: 14px; z-index: 40; display: flex; flex-direction: column; gap: 10px; width: 380px; max-width: calc(100vw - 28px); pointer-events: none; }
.alert { pointer-events: auto; display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 13px; padding: 13px 14px; box-shadow: 0 16px 44px rgba(0, 0, 0, .5); }
.alert.new { animation: alert-in .35s cubic-bezier(.2, .9, .3, 1.2); }
.alert-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--blue-soft); color: var(--blue); }
.alert-t { font-weight: 700; font-size: 14.5px; } .alert-x { color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.alert.attention { border-left-color: #f59e0b; } .alert.attention .alert-ic { background: var(--amber-soft); color: var(--amber); }
.alert.success { border-left-color: #22c55e; } .alert.success .alert-ic { background: var(--green-soft); color: var(--green); }
.alert.urgent { border-color: var(--red); border-left-color: #ef4444; animation: alert-in .35s cubic-bezier(.2, .9, .3, 1.2), urgent-glow 1.6s ease-in-out infinite; }
.alert.urgent .alert-ic { background: var(--red-solid); color: #fff; animation: ring 1.2s ease-in-out infinite; }
.alert.urgent .alert-t { font-size: 15.5px; } .alert.urgent .alert-x { color: var(--ink); }
.alert.more { justify-content: center; color: var(--muted); font-size: 12.5px; padding: 8px; border-left-width: 1px; }
#flash { position: fixed; inset: 0; z-index: 35; pointer-events: none; animation: flash 1.4s ease-out; }
#flash[hidden] { display: none; }
#flash.red { box-shadow: inset 0 0 0 5px #ef4444, inset 0 0 120px rgba(239, 68, 68, .55); } #flash.green { box-shadow: inset 0 0 0 4px #22c55e, inset 0 0 110px rgba(34, 197, 94, .4); }
.iconbtn.shake { animation: ring .5s ease-in-out 3; border-color: var(--amber); }
.hl { animation: highlight 3s ease-out; }
.dot.green { animation: pulse-green 2s ease-out infinite; }
.bigclock.over, .ptimer.over { animation: breathe 1.8s ease-in-out infinite; }
.ribbon { animation: breathe 1.8s ease-in-out infinite; }
.focus.idle .dot.amber { animation: pulse-amber 2s ease-out infinite; }
@keyframes alert-in { from { opacity: 0; transform: translateX(40px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes urgent-glow { 0%, 100% { box-shadow: 0 16px 44px rgba(0, 0, 0, .5), 0 0 0 0 rgba(239, 68, 68, .55); } 50% { box-shadow: 0 16px 44px rgba(0, 0, 0, .5), 0 0 0 7px rgba(239, 68, 68, 0); } }
@keyframes ring { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-13deg); } 40% { transform: rotate(11deg); } 60% { transform: rotate(-7deg); } 80% { transform: rotate(4deg); } }
@keyframes flash { 0% { opacity: 0; } 12% { opacity: 1; } 45% { opacity: .35; } 60% { opacity: .9; } 100% { opacity: 0; } }
@keyframes pop { 0% { transform: scale(.4); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes highlight { 0%, 30% { box-shadow: 0 0 0 2px var(--accent), 0 0 26px color-mix(in srgb, var(--accent) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 100% { box-shadow: 0 0 0 9px rgba(34, 197, 94, 0); } }
@keyframes pulse-amber { 0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .6); } 100% { box-shadow: 0 0 0 9px rgba(245, 158, 11, 0); } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
@media (max-width: 860px) { #alerts { top: 8px; right: 8px; left: 8px; width: auto; max-width: none; } }
/* people who ask their device for less motion get the alerts and colours without the movement */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* assistant */
.aitem { display: flex; flex-direction: column; gap: 10px; } .aitem h3 { font-size: 15px; }
.aibody { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); line-height: 1.55; }
.chatq { font-weight: 600; margin: 4px 0; } .chata { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card2); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; }

/* kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(172px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.kcol { background: var(--side); border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-height: 220px; }
.kcol.over { border-color: var(--accent); background: var(--accent-soft); }
.kcol-head { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 4px 4px 10px; }
.kcount { font-size: 11.5px; font-weight: 700; background: var(--soft); color: var(--muted); border-radius: 10px; padding: 1px 8px; }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 11px; padding: 11px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; box-shadow: var(--shadow); }
.kcard[draggable=true] { cursor: grab; } .kcard:hover { border-color: var(--muted); } .kcard.dragging { opacity: .35; }
.kcard .kt { font-weight: 600; overflow-wrap: anywhere; }
.krank { font-size: 11.5px; font-weight: 700; background: var(--soft); border-radius: 6px; padding: 1px 7px; font-variant-numeric: tabular-nums; }

/* tables */
.tablewrap { overflow-x: auto; padding: 4px 6px; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 600; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; } tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--card2); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters > input, .filters > select { width: auto; min-width: 160px; background: var(--card); }
.hbar { display: flex; align-items: center; gap: 10px; } .hbar .bar { flex: 1; height: 9px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; } @media (max-width: 1000px) { .two { grid-template-columns: 1fr; } }

/* feed */
.feed .item { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); } .feed .item:last-child { border-bottom: 0; }
.ico { width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-size: 12px; flex: none; }
.ico.green { background: var(--green-soft); } .ico.red { background: var(--red-soft); } .ico.amber { background: var(--amber-soft); } .ico.blue { background: var(--blue-soft); }
.feed .t { overflow-wrap: anywhere; }

/* modal */
#modal { position: fixed; inset: 0; z-index: 20; background: rgba(4, 7, 14, .7); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 12px; overflow-y: auto; }
#modal[hidden] { display: none; }
.dialog { background: var(--card); border: 1px solid var(--line); border-radius: 16px; width: 100%; max-width: 540px; padding: 22px; box-shadow: 0 24px 70px rgba(0, 0, 0, .5); }
.dialog.wide { max-width: 860px; }
.dialog-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; } .dialog-head h2 { flex: 1; font-size: 19px; overflow-wrap: anywhere; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } .grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 14px 0; }
.facts div { background: var(--card2); border-radius: 10px; padding: 9px 11px; }
.facts span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; } .facts b { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--card2); border-radius: 10px; padding: 10px 12px; }
.mgrbox { border: 1px dashed var(--line); border-radius: 12px; padding: 4px 14px 14px; margin-top: 16px; }
.choice { display: flex; gap: 8px; } .choice label { flex: 1; margin: 0; border: 1px solid var(--line); border-radius: 10px; padding: 10px 11px; cursor: pointer; color: var(--ink); font-size: 13px; }
.choice input { margin-right: 6px; } .choice label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
@media (max-width: 600px) { .grid2, .grid3 { grid-template-columns: 1fr; } .choice { flex-direction: column; } }

/* auth */
.auth { max-width: 400px; margin: 8vh auto; padding: 0 14px; } .auth .brand { justify-content: center; font-size: 19px; margin-bottom: 18px; }
.demolist { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; } .demolist .btn { justify-content: flex-start; }

#toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 30; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 11px; max-width: 92vw; font-weight: 600; display: flex; align-items: center; gap: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
#toast[hidden] { display: none; } #toast button { background: transparent; border: 1px solid currentColor; color: inherit; border-radius: 7px; padding: 3px 9px; font-weight: 700; cursor: pointer; }
.empty { padding: 28px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.kcol .empty { padding: 18px 8px; border: 0; font-size: 12.5px; }

/* phones: sidebar becomes a bottom bar */
@media (max-width: 860px) {
  .shell { flex-direction: column; }
  .side { position: fixed; bottom: 0; top: auto; left: 0; right: 0; width: auto; height: auto; flex-direction: row; padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 10; }
  .side .brand, .side .usercard, .navsep { display: none; }
  .nav { flex-direction: row; overflow-x: auto; gap: 0; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; }
  .navitem { flex-direction: column; gap: 3px; font-size: 10.5px; padding: 7px 10px; min-width: 66px; align-items: center; position: relative; }
  .navitem .badge { position: absolute; top: 2px; right: 8px; margin: 0; }
  .pagehead { padding: 14px 14px 0; } main { padding: 14px 14px 110px; } h1 { font-size: 20px; }
  #toast { bottom: 84px; } .people { grid-template-columns: 1fr; } .stats { grid-template-columns: 1fr 1fr; }
  .focus { padding: 16px; } .focus-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .btn.lg { padding: 13px 8px; font-size: 14px; gap: 6px; }
  .stat { padding: 11px 12px; gap: 10px; } .stat-ic { width: 36px; height: 36px; } .stat .v { font-size: 20px; white-space: nowrap; }
  .navitem { flex: 1; }
  .btn.sm { min-height: 36px; padding: 6px 12px; } .btn.icon { min-width: 36px; min-height: 36px; } .btn { min-height: 38px; }
  .cell-actions { white-space: normal; } .cell-actions .btn { margin: 2px 0; }
  .show-m { display: inline-flex; } .catname { width: auto; }
  th { white-space: normal; } th, td { padding: 9px 7px; } .tablewrap { padding: 2px; } .barcol { width: auto !important; }
  .hide-m { display: none !important; } .pop { position: fixed; right: 12px; top: 64px; }
  .kanban { grid-template-columns: repeat(5, 82vw); }
}
