/* Layout: fixed left sidebar + top bar; content scrolls. Single light theme by brand choice. */
:root {
  /* MM brand: Light = white + #FBAA1B, Dark = black + #FBAA1B. Toggle sets data-theme on <html>. */
  --orange: #FBAA1B;
  --on-orange: #000000;          /* text on orange buttons, both modes */
  --orange-ink: #8A5600;         /* orange-family text that passes contrast on white */
  --orange-soft: #FFF4DE;
  --orange-line: #F7D79A;
  --orange-wash: #FFFAF0;
  --ink: #1F1F1F;
  --ink-2: #555555;
  --ink-3: #8A8A8A;
  --line: #E6E6E6;
  --line-2: #F1F1F1;
  --line-strong: #D4D4D4;
  --bg: #FFFFFF;
  --bg-2: #F8F8F8;
  --surface: #FFFFFF;
  --hover: #FFFBF2;
  --topbar: rgba(255, 255, 255, .96);
  --total-bg: #FFF4DE;
  --other-day: #FAFAFA;
  --other-num: #C2C2C2;
  --done-ring: #CCCCCC;
  --strike: #BBBBBB;
  --ok: #2E9E5B;
  --warn: #C9853A;
  --bad: #D9443A;
  --info: #2F7DE1;
  --violet: #B26BE0;
  --high: #C2410C;
  --bad-soft: #FFF6F5;
  --bad-line: #F2C2BD;
  --bad-ink: #8E1F18;
  --good-soft: #EEF8F1;
  --good-line: #BFE3CB;
  --good-ink: #1E6B3E;
  --muted-soft: #F1F1F1;
  --muted-ink: #666666;
  --bar-muted: #CFCFCF;
  --toast-bg: #1F1F1F;
  --toast-err: #8E1F18;
  --scrim: rgba(0, 0, 0, .38);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .04);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .16);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --side: 236px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --orange-ink: #FBAA1B;
  --orange-soft: rgba(251, 170, 27, .16);
  --orange-line: rgba(251, 170, 27, .42);
  --orange-wash: rgba(251, 170, 27, .07);
  --ink: #F5F5F5;
  --ink-2: #B8B8B8;
  --ink-3: #828282;
  --line: #262626;
  --line-2: #1A1A1A;
  --line-strong: #3A3A3A;
  --bg: #000000;
  --bg-2: #0B0B0B;
  --surface: #101010;
  --hover: #17130B;
  --topbar: rgba(0, 0, 0, .92);
  --total-bg: rgba(251, 170, 27, .14);
  --other-day: #070707;
  --other-num: #4D4D4D;
  --done-ring: #555555;
  --strike: #5A5A5A;
  --high: #FB8C4A;
  --bad: #F0574C;
  --bad-soft: rgba(240, 87, 76, .10);
  --bad-line: rgba(240, 87, 76, .40);
  --bad-ink: #FF9A92;
  --good-soft: rgba(46, 158, 91, .14);
  --good-line: rgba(46, 158, 91, .40);
  --good-ink: #7FDBA4;
  --muted-soft: #1C1C1C;
  --muted-ink: #A0A0A0;
  --bar-muted: #4A4A4A;
  --toast-bg: #262626;
  --scrim: rgba(0, 0, 0, .65);
  --shadow: 0 1px 2px rgba(0, 0, 0, .6);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .7);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 16px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.num, .tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12px; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column; padding: 14px 10px; gap: 2px; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 15px; }
.brand-mark { width: 36px; height: 36px; flex: none; display: block; }
.brand .name { font-weight: 800; letter-spacing: -.01em; }
.brand .name b { color: var(--orange-ink); font-weight: 800; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--ink-3); letter-spacing: .02em; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); padding: 12px 10px 4px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; position: relative; }
.nav a:hover { background: var(--line-2); color: var(--ink); }
.nav a.active { background: var(--orange-soft); color: var(--ink); font-weight: 650; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange); }
.nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav a.active svg { stroke: var(--orange-ink); }
.nav .count { margin-left: auto; font-size: 11px; background: var(--bad); color: #fff; border-radius: 999px; padding: 0 6px; font-weight: 700; }
.side-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--line); font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; background: var(--topbar); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 10px max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px)); }
.icon-btn.menu-btn { display: none; }
.search { position: relative; flex: 1; max-width: 520px; }
.search input[type=search] { width: 100%; padding: 8px 12px 8px 34px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.search input[type=search]:focus { background: var(--surface); border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px var(--orange-soft); }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; stroke: var(--ink-3); fill: none; stroke-width: 2; }
.search-results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); max-height: 70vh; overflow: auto; padding: 6px; z-index: 50; }
.search-results h4 { margin: 8px 8px 4px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.search-results a { display: flex; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 6px; text-decoration: none; }
.search-results a:hover, .search-results a.kb { background: var(--orange-soft); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--bg-2); }
.icon-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; stroke-width: 1.8; }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; }
.user-chip .who { line-height: 1.15; }
.user-chip .who small { display: block; color: var(--ink-3); font-size: 11px; }
.content { padding: 22px max(20px, env(safe-area-inset-right, 0px)) 40px max(20px, env(safe-area-inset-left, 0px)); min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .sub { color: var(--ink-2); margin-top: 3px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(46,158,91,.15); }
.live.off i { background: var(--ink-3); box-shadow: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none; min-height: 36px; }
.btn:hover { background: var(--bg-2); border-color: var(--line-strong); }
.btn.primary { background: var(--orange); border-color: var(--orange); color: var(--on-orange); }
.btn.primary:hover { background: #F49F05; border-color: #F49F05; }
.btn.danger { color: var(--bad); }
.btn.danger.solid { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 4px 10px; min-height: 30px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-group { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.btn-group button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; font-weight: 550; color: var(--ink-2); display: inline-flex; gap: 6px; align-items: center; }
.btn-group button + button { border-left: 1px solid var(--line); }
.btn-group button.on { background: var(--orange-soft); color: var(--ink); font-weight: 650; box-shadow: inset 0 -2px 0 var(--orange); }
.btn-group svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }

input[type=text], input[type=time], input[type=url], input:not([type]), input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local],
input[type=month], input[type=week], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); min-height: 36px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
input[type=range] { accent-color: var(--orange); width: 100%; }
input[type=checkbox] { accent-color: var(--orange); width: 16px; height: 16px; }
.field { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.field .hint { font-weight: 400; color: var(--ink-3); }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.form { display: grid; gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; }
.err { color: var(--bad); font-size: 12.5px; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--bad); }

/* ---------- cards & stats ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px 6px; flex-wrap: wrap; }
.card-head .right { margin-left: auto; }
.card-body { padding: 10px 16px 16px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; cursor: pointer; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px; position: relative; transition: border-color .15s, transform .15s; }
.stat:hover { border-color: var(--orange); transform: translateY(-1px); }
.stat .label { font-size: 12px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .label i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.stat .value { font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .foot { font-size: 11.5px; color: var(--ink-3); }
.stat.alert { border-color: var(--bad-line); background: var(--bad-soft); }
.stat.alert .value { color: var(--bad); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.stack { display: grid; gap: 16px; }

/* ---------- pills & badges ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.pill i { width: 7px; height: 7px; border-radius: 50%; }
.prio { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.prio svg { width: 13px; height: 13px; }
.prio.urgent { color: var(--bad); } .prio.high { color: var(--high); } .prio.medium { color: var(--ink-2); } .prio.low { color: var(--ink-3); }
.tag { display: inline-block; padding: 1px 7px; border-radius: 5px; background: var(--line-2); font-size: 11.5px; color: var(--ink-2); font-weight: 550; }
.code { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.avatar { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 700; color: #1F1F1F; flex: none; border: 2px solid var(--bg); }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -7px; }
.progress { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; min-width: 50px; }
.progress > i { display: block; height: 100%; background: var(--orange); border-radius: 6px; }
.due { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.due.late { color: var(--bad); font-weight: 650; }
.due.today { color: var(--orange-ink); font-weight: 650; }

/* ---------- tasks: filters ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--orange); }
.tabs a .n { font-size: 11px; color: var(--ink-3); margin-left: 4px; font-weight: 600; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; min-width: 180px; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); margin-bottom: 12px; }
.filters .field { font-size: 11.5px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 12.5px; cursor: pointer; font-weight: 550; color: var(--ink-2); }
.chip:hover { border-color: var(--orange); color: var(--ink); }
.chip.on { background: var(--orange-soft); border-color: var(--orange); color: var(--ink); }
.chip .x { border: 0; background: none; padding: 0; margin-left: 2px; cursor: pointer; color: var(--ink-3); font-size: 14px; line-height: 1; }

/* ---------- list view ---------- */
.group { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.group-head { display: flex; align-items: center; gap: 8px; padding: 9px 14px; background: var(--bg-2); border-bottom: 1px solid var(--line); cursor: pointer; font-weight: 650; user-select: none; }
.group-head .n { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.group-head svg { width: 14px; height: 14px; stroke: var(--ink-3); fill: none; stroke-width: 2.4; transition: transform .15s; }
.group.closed .group-head svg { transform: rotate(-90deg); }
.group.closed .rows { display: none; }
.trow { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 14px; border-top: 1px solid var(--line-2); cursor: pointer; }
.trow:first-child { border-top: 0; }
.trow:hover { background: var(--hover); }
.trow .t-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow .t-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); margin-top: 2px; align-items: center; }
.trow .t-right { display: flex; align-items: center; gap: 14px; }
.trow.done .t-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--strike); }
.done-box { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--done-ring); background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; }
.done-box:hover { border-color: var(--ok); }
.done-box.on { background: var(--ok); border-color: var(--ok); }
.done-box svg { width: 12px; height: 12px; stroke: #fff; fill: none; stroke-width: 3; }
.load-more { display: flex; justify-content: center; padding: 12px; }

/* ---------- table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); background: var(--bg-2); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; font-weight: 650; }
table.data th.sortable { cursor: pointer; }
table.data th.sortable:hover { color: var(--ink); }
table.data th .arrow { color: var(--orange-ink); }
table.data td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr.click { cursor: pointer; }
table.data tbody tr.click:hover td { background: var(--hover); }
table.data td.r, table.data th.r { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr.total td { font-weight: 700; background: var(--total-bg); border-top: 2px solid var(--orange-line); }
table.data tr.inactive td { color: var(--ink-3); }
.pager { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 10px 2px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }

/* ---------- board ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 230px); min-height: 200px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 650; border-bottom: 1px solid var(--line); }
.col-head i { width: 9px; height: 9px; border-radius: 50%; }
.col-head .n { color: var(--ink-3); font-size: 12px; margin-left: auto; }
.col-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; flex: 1; }
.col.drop { border-color: var(--orange); background: var(--orange-soft); }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: grab; box-shadow: var(--shadow); display: grid; gap: 7px; }
.kcard:hover { border-color: var(--orange-line); }
.kcard.dragging { opacity: .5; }
.kcard .k-title { font-weight: 600; line-height: 1.3; }
.kcard .k-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.kcard.overdue { border-left: 3px solid var(--bad); }
.kcard select { font-size: 12px; padding: 3px 6px; min-height: 28px; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal .dow { padding: 7px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--bg-2); border-bottom: 1px solid var(--line); font-weight: 650; }
.cal .day { min-height: 112px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 5px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day:nth-child(7n) { border-right: 0; }
.cal .day.other { background: var(--other-day); }
.cal .day.other .dnum { color: var(--other-num); }
.cal .day.today .dnum { background: var(--orange); color: var(--on-orange); border-radius: 50%; }
.cal .dnum { font-size: 12px; font-weight: 650; width: 22px; height: 22px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.cal .day .add { margin-left: auto; opacity: 0; border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 16px; line-height: 1; }
.cal .day:hover .add { opacity: 1; }
.cal .ev { font-size: 11.5px; padding: 2px 6px; border-radius: 4px; background: var(--line-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; border-left: 3px solid var(--ink-3); }
.cal .ev:hover { filter: brightness(.97); }
.cal .more { font-size: 11px; color: var(--ink-2); cursor: pointer; padding-left: 4px; }

/* ---------- drawer & modal ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 80; animation: fade .15s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(760px, 100vw); background: var(--surface); z-index: 90; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .2s ease;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.drawer-head { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.drawer-head .dh-main { flex: 1; min-width: 0; }
.drawer-head .title-input { font-size: 19px; font-weight: 700; border: 1px solid transparent; padding: 4px 6px; margin-left: -7px; border-radius: 6px; width: 100%; }
.drawer-head .title-input:hover { border-color: var(--line); }
.drawer-head .title-input[readonly] { border-color: transparent; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 20px 30px; }
.props { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; align-items: center; margin-bottom: 18px; }
.props > .k { color: var(--ink-2); font-size: 12.5px; font-weight: 600; }
.props select, .props input { min-height: 32px; padding: 5px 8px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 20px 0 10px; font-weight: 650; }
.section-title .n { color: var(--ink-3); font-weight: 600; font-size: 12px; }
.assignee-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.assignee-table td { padding: 6px 4px; border-bottom: 1px solid var(--line-2); }
.subtask { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.subtask.done span.t { color: var(--ink-3); text-decoration: line-through; }
.subtask .t { flex: 1; min-width: 0; }
.feed { display: grid; gap: 12px; }
.post { display: grid; grid-template-columns: 30px 1fr; gap: 10px; }
.post .bubble { background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; min-width: 0; }
.post.work .bubble { background: var(--orange-wash); border-color: var(--orange-line); }
.post .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 3px; }
.post .meta b { color: var(--ink); }
.post .text { white-space: pre-wrap; word-break: break-word; }
.files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.file { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 7px; padding: 4px 9px; font-size: 12.5px; background: var(--surface); text-decoration: none; max-width: 100%; }
.file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 12.5px; }
.activity li { display: grid; grid-template-columns: 10px 1fr; gap: 10px; color: var(--ink-2); }
.activity li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--orange-line); margin-top: 6px; }
.activity time { color: var(--ink-3); font-size: 11.5px; display: block; }
.composer { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: grid; gap: 8px; background: var(--surface); }
.composer textarea { border: 0; padding: 4px; min-height: 64px; box-shadow: none; }
.composer .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.modal { position: fixed; z-index: 100; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg); animation: pop .16s ease; }
.modal.sm { width: min(440px, calc(100vw - 24px)); }
.modal-head { padding: 16px 20px 10px; display: flex; align-items: center; gap: 10px; }
.modal-head .x { margin-left: auto; }
.modal-body { padding: 6px 20px 16px; overflow-y: auto; }
.modal-foot { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
@keyframes pop { from { transform: translate(-50%, -48%); opacity: 0; } }

/* multi-select */
.ms { position: relative; }
.ms-box { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 36px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: text; }
.ms-box:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.ms-box input { border: 0; padding: 3px; min-height: 26px; flex: 1; min-width: 90px; box-shadow: none !important; width: auto; }
.ms-tag { display: inline-flex; align-items: center; gap: 4px; background: var(--orange-soft); border: 1px solid var(--orange-line); border-radius: 6px; padding: 1px 6px; font-size: 12.5px; font-weight: 550; }
.ms-tag button { border: 0; background: none; cursor: pointer; padding: 0; color: var(--ink-2); font-size: 14px; line-height: 1; }
.ms-list { position: absolute; z-index: 120; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-lg); max-height: 260px; overflow: auto; padding: 4px; }
.ms-list .opt { padding: 6px 8px; border-radius: 6px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.ms-list .opt:hover, .ms-list .opt.kb { background: var(--orange-soft); }
.ms-list .opt small { color: var(--ink-3); margin-left: auto; }
.ms-list .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); padding: 8px 8px 3px; font-weight: 650; }

/* toast */
.toasts { position: fixed; z-index: 200; bottom: max(16px, env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); }
.toast { background: var(--toast-bg); color: #fff; border: 1px solid var(--line-strong); padding: 10px 14px; border-radius: 10px; box-shadow: var(--shadow-lg); font-weight: 550; display: flex; gap: 10px; align-items: center; animation: fade .2s ease; }
.toast.error { background: var(--toast-err); }
.toast.ok::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }

/* charts */
.chart { width: 100%; display: block; }
.chart text { font-family: var(--font); fill: var(--ink-2); font-size: 11px; }
.chart .clickable { cursor: pointer; }
.chart .clickable:hover { opacity: .82; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.legend .lg[role=button] { cursor: pointer; }
.legend .lg-key { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.donut-wrap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 20px; align-items: center; }
.donut-wrap .legend { flex-direction: column; gap: 2px; flex-wrap: nowrap; font-size: 13px; }
.donut-wrap .legend .lg { justify-content: space-between; width: 100%; padding: 5px 8px; border-radius: 6px; }
.donut-wrap .legend .lg:hover { background: var(--bg-2); }
.donut-wrap .legend b { color: var(--ink); font-variant-numeric: tabular-nums; }
.hbar { display: grid; gap: 7px; }
.hbar .r { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 44px; gap: 10px; align-items: center; font-size: 12.5px; cursor: pointer; padding: 2px 4px; border-radius: 6px; }
.hbar .r:hover { background: var(--bg-2); }
.hbar .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { height: 14px; background: var(--line-2); border-radius: 4px; overflow: hidden; display: flex; }
.hbar .track i { height: 100%; display: block; }
.hbar .v { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.scroll-y { max-height: 330px; overflow-y: auto; }

/* reports */
.report-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
.report-panel { position: sticky; top: 74px; display: grid; gap: 12px; padding: 16px; max-height: calc(100vh - 90px); overflow-y: auto; }
.report-panel .seg { display: flex; flex-wrap: wrap; gap: 4px; }
.report-panel .seg button { flex: 1; min-width: 60px; padding: 6px 4px; border: 1px solid var(--line); background: var(--surface); border-radius: 7px; cursor: pointer; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.report-panel .seg button.on { background: var(--orange-soft); border-color: var(--orange); color: var(--ink); }
.download-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border: 1px solid var(--orange-line); background: var(--orange-wash); border-radius: var(--radius); margin-bottom: 14px; }
.download-bar .btn svg { stroke: currentColor; }
.download-bar .what { font-size: 12.5px; color: var(--ink-2); flex: 1 1 100%; min-width: 0; }
table.data td.nw { white-space: nowrap; }
.download-bar .what b { color: var(--ink); }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 18px; font-size: 12.5px; padding: 12px 16px; }
.meta-grid div span { color: var(--ink-3); display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 12px 0 16px; }
.sum-grid div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.sum-grid b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.sum-grid span { font-size: 12px; color: var(--ink-2); }
.notes { font-size: 12.5px; color: var(--ink-2); padding-left: 18px; margin: 10px 0 0; }
.empty { text-align: center; padding: 40px 20px; color: var(--ink-2); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.notice { padding: 10px 14px; border-radius: 8px; background: var(--orange-soft); border: 1px solid var(--orange-line); font-size: 13px; }
.notice.bad { background: var(--bad-soft); border-color: var(--bad-line); color: var(--bad-ink); }
.notice.good { background: var(--good-soft); border-color: var(--good-line); color: var(--good-ink); }

/* people */
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.team-card { padding: 16px; display: grid; gap: 10px; }
.team-card .nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.team-card .nums b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.team-card .nums span { font-size: 11px; color: var(--ink-3); }
.profile-head { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.profile-head .avatar { width: 56px; height: 56px; font-size: 18px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; font-size: 13px; }
.kv dt { color: var(--ink-2); font-weight: 600; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(circle at 15% 10%, var(--orange-soft), transparent 40%), var(--bg-2); }
.auth-card { width: min(400px, 100%); padding: 28px; display: grid; gap: 16px; }
.auth-card .brand { padding: 0; }

.notif { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.notif:hover { background: var(--hover); }
.notif .u { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-top: 6px; }
.notif.read .u { background: transparent; }
.notif.read .ttl { font-weight: 500; color: var(--ink-2); }
.notif .ttl { font-weight: 650; }
.notif .body { font-size: 12.5px; color: var(--ink-2); white-space: pre-line; }
.notif .side { text-align: right; font-size: 11.5px; color: var(--ink-3); display: grid; gap: 4px; justify-items: end; }

.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--orange); border-radius: 50%; animation: spin .8s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .report-layout { grid-template-columns: 1fr; }
  .report-panel { position: static; max-height: none; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-102%); transition: transform .2s ease; box-shadow: var(--shadow-lg);
    padding-top: max(14px, env(safe-area-inset-top, 0px)); padding-left: max(10px, env(safe-area-inset-left, 0px)); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: var(--scrim); z-index: 35; }
  .icon-btn.menu-btn { display: grid; }
  .grid-2 { grid-template-columns: 1fr; }
  .user-chip .who { display: none; }
  .user-chip { padding: 4px; }
  .topbar { top: env(safe-area-inset-top, 0px); }
}
@media (max-width: 640px) {
  .content { padding-top: 16px; }
  h1 { font-size: 19px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat .value { font-size: 22px; }
  .trow { grid-template-columns: 26px minmax(0, 1fr); }
  .trow .t-right { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
  .props { grid-template-columns: 1fr; gap: 4px; }
  .drawer-head { flex-wrap: wrap; padding: 12px 16px; }
  .drawer-head .dh-main { order: 3; flex-basis: 100%; }
  .drawer-head > div:nth-child(2) { margin-right: auto; }
  .drawer-body { padding: 14px 16px 30px; }
  .props > .k { margin-top: 6px; }
  .donut-wrap { grid-template-columns: 1fr; justify-items: center; }
  .cal .day { min-height: 70px; }
  .cal .ev { font-size: 0; padding: 0; height: 6px; border-left-width: 0; }
  .search { max-width: none; }
  .top-actions .btn .lbl { display: none; }
  .kv { grid-template-columns: 1fr; }
  .modal { top: auto; bottom: 0; transform: translateX(-50%); width: 100vw; border-radius: 14px 14px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom, 0px); }
  @keyframes pop { from { transform: translate(-50%, 20px); opacity: 0; } }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---- semantic pills (both themes) ---- */
.pill.good { background: var(--good-soft); color: var(--good-ink); }
.pill.muted { background: var(--muted-soft); color: var(--muted-ink); }
.pill.accent { background: var(--orange-soft); color: var(--orange-ink); }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.pill.status { background: color-mix(in srgb, var(--c) 13%, transparent); color: color-mix(in srgb, var(--c) 62%, black); }
:root[data-theme="dark"] .pill.status { background: color-mix(in srgb, var(--c) 20%, transparent); color: color-mix(in srgb, var(--c) 72%, white); }

/* ---- theme switch ---- */
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); gap: 2px; }
.theme-switch button { border: 0; background: transparent; color: var(--ink-2); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.theme-switch button svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.theme-switch button.on { background: var(--orange); color: var(--on-orange); }
.auth-top { display: flex; justify-content: flex-end; margin-bottom: -6px; }
.tagline { color: var(--ink-3); font-size: 12px; letter-spacing: .02em; }
@media (max-width: 640px) { .theme-switch .lbl { display: none; } .theme-switch button { padding: 5px 7px; } }

/* ---- brand + theme fixes ---- */
.brand .name b { color: var(--orange); }
.brand small { font-size: 10.5px; letter-spacing: 0; white-space: nowrap; }
.sidebar .brand { padding-right: 0; }
.drawer-head .title-input { background: transparent; color: var(--ink); }
.menu-theme { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 4px; }
@media (max-width: 640px) { .top-actions .theme-switch { display: none; } }

/* ---- tags ---- */
.tagchips { display: inline-flex; flex-wrap: wrap; gap: 4px; vertical-align: middle; }
.tagchip {
  --c: #FBAA1B;
  display: inline-flex; align-items: center; gap: 5px; max-width: 160px;
  padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px;
  color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
}
.tagchip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.tagchip.more { --c: #8A8F98; }
.tagchip.more::before { display: none; }
.kcard .tagchips { margin: 2px 0; }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tagchip.pick { cursor: pointer; font-size: 12px; line-height: 22px; padding: 1px 10px; opacity: .55; user-select: none; }
.tagchip.pick:hover { opacity: .85; }
.tagchip.pick.on { opacity: 1; background: color-mix(in srgb, var(--c) 28%, transparent); border-color: var(--c); }
.tagchip.pick:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.tagpick .tag-new { width: 120px; min-height: 26px; padding: 2px 10px; border-radius: 999px; font-size: 12px; }
.add-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.add-row input[type="text"] { flex: 1 1 200px; max-width: 280px; }

/* ---- client backlog ---- */
.stat.static { cursor: default; }
.stat.static:hover { border-color: var(--line); transform: none; }
.stat.static.alert:hover { border-color: var(--bad-line); }
.bl-grid, .bl-page > section.card { margin-bottom: 16px; }
.table-wrap.flush { border: 0; border-radius: 0 0 var(--radius) var(--radius); border-top: 1px solid var(--line); }
.bl-prog { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.trend { font-size: 12px; font-weight: 700; white-space: nowrap; }
.trend.up { color: var(--bad); }
.trend.down { color: var(--good-ink); }
.trend.flat { color: var(--ink-3, var(--ink-2)); }
tr.bl-up td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.commit-rows { display: grid; gap: 8px; }
.commit-row { display: grid; grid-template-columns: minmax(140px, 1.4fr) 90px 130px 130px 34px; gap: 8px; align-items: center; }
.commit-head { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
@media (max-width: 640px) { .commit-row { grid-template-columns: 1fr 80px; } .commit-head { display: none; } }
.pfiles { display: grid; gap: 6px; margin-top: 6px; }
.pfile { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.pfile .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-section { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.form-section > h3 { margin: 0 0 8px; font-size: 14px; }
.modal.lg { width: min(860px, calc(100vw - 24px)); }
.import-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .import-steps { grid-template-columns: 1fr; } }
.mode-pill { font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; margin-left: 6px; vertical-align: 1px; }
.mode-pill.manual { background: var(--orange-soft); color: var(--ink); border: 1px solid var(--orange-line); }
.switch-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-2); }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.3); transition: transform .15s; }
.switch input:checked + span { background: var(--orange); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
input.cell-num { width: 64px; min-height: 30px; padding: 3px 6px; text-align: right; }
.cell-of { color: var(--ink-2); font-size: 12px; margin-left: 4px; }
.bl-dash { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 20px; align-items: start; }
.bl-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; }
.bl-kpi { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.bl-kpi b { font-size: 22px; line-height: 1.1; }
@media (max-width: 760px) { .bl-dash { grid-template-columns: 1fr; } }

/* ---- @mentions ---- */
.mention-wrap { position: relative; }
.mention-list { position: absolute; left: 0; bottom: calc(100% + 4px); z-index: 30; width: min(320px, 100%); max-height: 240px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.18); padding: 4px; }
.mention-list button { display: flex; width: 100%; gap: 8px; align-items: center; text-align: left; padding: 6px 8px; border: 0; background: none;
  border-radius: 6px; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.mention-list button.on, .mention-list button:hover { background: var(--orange-soft); }
.mention-list .sub { color: var(--ink-2); font-size: 11.5px; margin-left: auto; }
.mention { color: var(--orange-ink, #B26F00); background: var(--orange-soft); border-radius: 4px; padding: 0 3px; font-weight: 600; }
:root[data-theme="dark"] .mention { color: var(--orange); }

/* ---- column ordering ---- */
.col-list { display: grid; gap: 6px; }
.col-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.col-row input[type="text"] { max-width: 240px; }
.col-row .grow, .team-cols-head .grow { flex: 1; }
.col-row.dragging, .col-chip.dragging { opacity: .45; }
.grip { cursor: grab; color: var(--ink-2); letter-spacing: -2px; user-select: none; padding: 0 2px; }
input.swatch { width: 48px; padding: 2px; min-height: 34px; }
.mv { display: inline-flex; gap: 2px; }
.mv .btn { min-height: 26px; padding: 0 7px; }
.od-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.od-row > div { flex: 1 1 220px; }
.od-row input[type="text"] { max-width: 200px; }
.team-cols { padding: 12px 0; border-bottom: 1px solid var(--line); }
.team-cols:last-of-type { border-bottom: 0; }
.team-cols-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.chip-list { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px; }
.col-chip { --c: #8A8F98; display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 8px; border-radius: 999px; font-size: 13px; font-weight: 600;
  background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); cursor: grab; }
.col-chip > i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.col-chip button { border: 0; background: none; color: var(--ink-2); cursor: pointer; font: inherit; font-size: 14px; line-height: 1; padding: 0 3px; border-radius: 4px; }
.col-chip button:hover { color: var(--ink); background: var(--bg-2); }
.chip-add { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }

/* ---- AI Assistant ---- */
.ai-card { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 420px; overflow: hidden; }
.ai-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg { display: flex; gap: 10px; align-items: flex-start; max-width: 860px; }
.ai-msg.user { align-self: flex-end; }
.ai-msg.user .ai-bubble { background: var(--orange); color: #111; border-color: transparent; }
.ai-bubble { padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg-2); line-height: 1.5; font-size: 14px; overflow-wrap: anywhere; }
.ai-avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--orange); color: #111; font-weight: 800; }
.ai-steps { display: grid; gap: 3px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.ai-step { display: flex; align-items: baseline; gap: 6px; color: var(--ink-2); }
.ai-step .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good-ink); flex: none; transform: translateY(-1px); }
.ai-step.write .dot { background: var(--orange); }
.ai-step.bad .dot { background: var(--bad); }
.ai-step .err { color: var(--bad); }
.ai-compose { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); align-items: flex-end; }
.ai-input { flex: 1; min-height: 46px; max-height: 160px; resize: vertical; }
.ai-empty { margin: auto; text-align: center; max-width: 620px; }
.ai-empty b { font-size: 18px; }
.ai-spark { font-size: 34px; color: var(--orange); }
.ai-examples { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.ai-examples .btn { white-space: normal; text-align: left; height: auto; padding: 6px 10px; }
.ai-typing { display: inline-flex; gap: 3px; vertical-align: middle; }
.ai-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-2); animation: aiblink 1s infinite; }
.ai-typing i:nth-child(2) { animation-delay: .15s; } .ai-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes aiblink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ai-typing i { animation: none; } }
.steps-list { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.keybox { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2); }
.keybox code { flex: 1; overflow-wrap: anywhere; font-size: 12.5px; }
.codebox { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; overflow: auto; max-height: 240px; }
@media (max-width: 640px) { .ai-card { height: calc(100vh - 200px); } .ai-msg { max-width: 100%; } }

/* ---------- production tracker ---------- */
.prod-board { grid-auto-columns: minmax(230px, 1fr); }
.kcard.prod .pill { font-size: 11px; padding: 1px 7px; }
.kcard.prod .pill svg { width: 12px; height: 12px; }
.prod-shoot { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); }
.prod-shoot svg, .pill svg { width: 13px; height: 13px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.prod-gear { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); }
.prod-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.prod-end { display: grid; text-align: right; font-size: 13px; }
.prod-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; background: var(--bg-2); display: grid; gap: 4px; }
.prod-box h3 { margin: 0 0 2px; font-size: 13px; color: var(--ink-2); }
.prod-desc { white-space: pre-wrap; margin: 4px 0 0; }
.prod-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prod-table td { vertical-align: middle; }
.prod-table tr.cur td { background: var(--orange-soft); }
.prod-table .prod-people { min-width: 200px; }
.prod-table .ms { min-width: 190px; }
.prod-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }
.prod-time { display: inline-flex; gap: 4px; }
.prod-time input, .prod-time select { min-height: 30px; padding: 3px 6px; font-size: 12.5px; }
.prod-time input { width: 58px !important; }
.prod-time select { width: 80px; }
.prod-table td:nth-child(3) { min-width: 150px; }
.prod-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px 16px; }
.prod-trow { display: grid; grid-template-columns: 1fr 70px 82px; gap: 6px; align-items: center; font-size: 13px; font-weight: 550; }
.prod-trow input, .prod-trow select { min-height: 32px; padding: 4px 6px; }
.prod-people-grid { display: grid; gap: 6px; }
.prod-pg-row { display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: center; font-size: 13px; font-weight: 550; }
.prod-gearlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; }
.prod-gearlist .chip-x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 15px; margin-left: auto; }
@media (max-width: 640px) { .prod-pg-row { grid-template-columns: 1fr; } .prod-end { text-align: left; } }
.toolbar .prod-client-sel { width: auto; max-width: 280px; }
.toolbar input[type=search].grow { width: auto; }
.prod-top { display: flex; gap: 6px; align-items: baseline; min-width: 0; }
.prod-top .code { white-space: nowrap; }
.prod-client { font-size: 11.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kcard.prod { min-width: 0; }
.kcard.prod .pill { white-space: normal; }
.prod-table td:nth-child(4) { min-width: 190px; }
.prod-geartable td { padding-top: 6px; padding-bottom: 6px; }
.prod-geartable .check { font-size: 12.5px; }
.prod-gearedit { display: grid; gap: 4px; max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.prod-gearrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 2px 8px; border-radius: 6px; }
.prod-gearrow:hover { background: var(--bg-2); }

/* ---------- attendance ---------- */
.note-bar { background: var(--orange-soft); border: 1px solid var(--orange-line); border-radius: var(--radius); padding: 9px 12px; margin-top: 12px; font-size: 13px; }
.att-today { padding: 16px 18px; }
.att-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.att-state { display: flex; gap: 6px; align-items: center; margin-top: 6px; flex-wrap: wrap; }
.att-state .pill { font-size: 13px; padding: 3px 11px; }
.att-timer-box { display: grid; text-align: right; }
.att-timer { font-size: 34px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.att-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 6px; min-height: 40px; align-items: center; }
.att-btn { min-height: 42px; padding: 8px 18px; font-size: 14.5px; }
.att-tl { margin-top: 12px; }
.att-line { position: relative; height: 22px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.att-shift { position: absolute; top: 0; bottom: 0; background: var(--orange-soft); }
.att-seg { position: absolute; top: 4px; bottom: 4px; border-radius: 3px; }
.att-seg.work { background: var(--good-ink); }
.att-seg.short { background: #f59e0b; }
.att-seg.lunch { background: #6366f1; }
.att-seg.open { opacity: .65; }
.att-ticks { position: relative; height: 16px; font-size: 10.5px; color: var(--ink-3); }
.att-ticks span { position: absolute; transform: translateX(-50%); top: 2px; white-space: nowrap; }
.att-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); margin-top: 4px; }
.att-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.att-legend i.work { background: var(--good-ink); } .att-legend i.short { background: #f59e0b; } .att-legend i.lunch { background: #6366f1; } .att-legend i.shift { background: var(--orange-soft); border: 1px solid var(--orange-line); }
.att-mini { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.att-mini div { display: grid; background: var(--bg-2); border-radius: 8px; padding: 8px 10px; }
.att-mini b { font-size: 18px; } .att-mini span { font-size: 11.5px; color: var(--ink-3); }
.att-cgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.att-corr { display: grid; gap: 10px; }
.att-reg th.c, .att-reg td.c { text-align: center; padding: 6px 4px; min-width: 26px; font-size: 12px; }
.att-reg td.c { cursor: pointer; font-weight: 650; }
.att-reg .off { background: var(--bg-2); }
.att-reg td.code-A, .att-reg td.code-PC { color: var(--bad); }
.att-reg td.code-HD { color: var(--orange-ink); }
.att-reg td.code-P { color: var(--good-ink); }
.att-reg td.code-L, .att-reg td.code-H, .att-reg td.code-WO { color: var(--ink-3); }
.att-hol { display: grid; gap: 4px; max-height: 240px; overflow-y: auto; }
@media (max-width: 640px) { .att-timer-box { text-align: left; } .att-cgrid { grid-template-columns: 1fr; } }
.toolbar input[type=date], .toolbar input[type=month], .toolbar select { width: auto; }
.att-holadd { display: grid; grid-template-columns: 180px minmax(0, 1fr) auto; gap: 8px; margin-top: 8px; align-items: center; } @media (max-width: 640px) { .att-holadd { grid-template-columns: 1fr; } }

/* ---------- leave ---------- */
.lv-chip { display: inline-block; font-size: 11px; font-weight: 750; padding: 1px 6px; border-radius: 5px; color: #fff; background: var(--c); letter-spacing: .02em; }
.lv-bal .label { display: flex; align-items: center; gap: 4px; }
.lv-preview { background: var(--bg-2); border-radius: var(--radius); padding: 9px 12px; font-size: 13px; }
.lv-ok { color: var(--good-ink); font-size: 12.5px; margin-top: 2px; } .lv-bad { color: var(--bad); font-size: 12.5px; margin-top: 2px; } .lv-warn { color: var(--orange-ink); font-size: 12.5px; margin-top: 2px; }
.lv-thread { display: grid; gap: 4px; background: var(--bg-2); border-radius: var(--radius); padding: 8px 10px; font-size: 13px; }
.lv-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.lv-dow { font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-align: center; }
.lv-day { min-height: 92px; border: 1px solid var(--line); border-radius: 8px; padding: 6px; background: var(--card); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lv-day.off { background: var(--bg-2); } .lv-day.empty { border: 0; background: none; }
.lv-num { font-size: 12px; font-weight: 700; display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.lv-hol { font-size: 10.5px; font-weight: 600; color: var(--orange-ink); }
.lv-ent { font-size: 11px; padding: 2px 5px; border-radius: 4px; background: color-mix(in srgb, var(--c) 18%, transparent); border-left: 3px solid var(--c); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lv-ent.wait { background: none; border: 1px dashed var(--c); border-left-width: 3px; }
@media (max-width: 640px) { .lv-day { min-height: 64px; } .lv-ent { font-size: 10px; } }

/* ---------- attendance reports ---------- */
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.rp-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 14px; }
.rp-controls select { width: auto; max-width: 200px; }
.rp-dates { display: inline-flex; gap: 6px; align-items: center; }
.rp-dates input { width: auto; }
.rp-head { background: linear-gradient(135deg, #111 0%, #2a2112 100%); color: #fff; border-radius: 16px; padding: 18px 20px; display: grid; gap: 14px; margin-bottom: 14px; }
.rp-head .faint { color: rgba(255,255,255,.65); font-size: 12.5px; }
.rp-head h2 { margin: 2px 0 4px; font-size: 22px; color: #fff; }
.rp-kicker { font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: #FBAA1B; font-weight: 750; }
.rp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.rp-tile { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; }
.rp-tile .l { font-size: 11.5px; color: rgba(255,255,255,.7); } .rp-tile b { font-size: 21px; font-weight: 750; letter-spacing: -.01em; } .rp-tile .f { font-size: 11px; color: rgba(255,255,255,.55); }
.rp-tile.accent { background: #FBAA1B; color: #111; border-color: #FBAA1B; } .rp-tile.accent .l, .rp-tile.accent .f { color: rgba(0,0,0,.65); }
.rp-tile.bad b { color: #ff8a8a; }
.rp-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 12px; margin-bottom: 14px; }
@media (max-width: 1000px) { .rp-grid { grid-template-columns: 1fr; } }
.rp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.rp-h { font-size: 13px; font-weight: 750; margin-bottom: 10px; }
.rp-stack { display: flex; height: 34px; border-radius: 8px; overflow: hidden; gap: 2px; background: var(--bg-2); }
.rp-bar { display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; min-width: 22px; }
.rp-bar.ok, .rp-legend i.ok, .rp-colbar i.ok { background: #16a34a; } .rp-bar.late, .rp-legend i.late, .rp-colbar i.late { background: #f59e0b; }
.rp-bar.half, .rp-legend i.half { background: #8b5cf6; } .rp-bar.leave, .rp-legend i.leave, .rp-colbar i.leave { background: #0ea5e9; }
.rp-bar.abs, .rp-legend i.abs, .rp-colbar i.abs { background: #ef4444; }
.rp-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); margin-top: 8px; }
.rp-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.rp-cols { display: flex; align-items: flex-end; gap: 4px; height: 150px; overflow-x: auto; padding-bottom: 2px; }
.rp-col { flex: 1 0 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; min-width: 18px; }
.rp-col span { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.rp-colbar { flex: 1; width: 100%; max-width: 34px; display: flex; flex-direction: column-reverse; border-radius: 5px; overflow: hidden; background: var(--bg-2); }
.rp-colbar i { display: block; width: 100%; }
.rp-list { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; }
.rp-list li span { display: inline-grid; } .rp-list li small { color: var(--ink-3); font-size: 11px; }
.rp-list li { padding-left: 2px; } .rp-list li b { float: right; font-size: 12.5px; }
.rp-tablecard { padding: 0; overflow: hidden; }
.rp-tabs { display: flex; gap: 4px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rp-tabs button { border: 0; background: none; padding: 7px 12px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 650; color: var(--ink-2); cursor: pointer; }
.rp-tabs button.on { background: var(--orange-soft); color: var(--ink); }
.rp-tabs .n { margin-left: 6px; font-size: 11px; background: var(--bg-2); border-radius: 10px; padding: 1px 7px; color: var(--ink-3); }
.rp-search { width: 200px !important; }
.rp-table td.c, .rp-table th { white-space: nowrap; } .rp-table td.c { text-align: center; }
.rp-table td.bad { color: var(--bad); font-weight: 650; }
.rp-meter { display: inline-grid; grid-template-columns: 60px auto; gap: 6px; align-items: center; }
.rp-meter i { display: block; height: 6px; border-radius: 4px; }
.rp-meter { background: none; } .rp-meter::before { content: none; }
.rp-table td { white-space: nowrap; }
.rp-table td:first-child { white-space: normal; min-width: 150px; }
.rp-table td:last-child.faint { white-space: normal; min-width: 180px; }
.rp-controls .btn { min-height: 36px; }

/* ---------- Production Tracker · Bird View (v4.3) ---------- */
.bv-legend { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12px; color: var(--ink-2); margin: 4px 0 10px; }
.bv-legend span { display: inline-flex; align-items: center; gap: 6px; }
.bv-legend i.bv-v { width: 14px; min-width: 14px; height: 14px; padding: 0; }
.bv-wrap { padding: 0; overflow: auto; max-height: calc(100vh - 290px); }
.bv-table { border-collapse: separate; border-spacing: 0; font-size: 12.5px; min-width: 100%; }
.bv-table th, .bv-table td { border-bottom: 1px solid var(--line); padding: 6px 5px; text-align: center; white-space: nowrap; background: var(--surface); }
.bv-table thead th { position: sticky; top: 0; z-index: 3; background: var(--bg-2); font-size: 10.5px; font-weight: 700; color: var(--ink-2); }
.bv-table thead tr:nth-child(2) th { top: 31px; }
.bv-table th.bv-st { white-space: normal; width: 74px; min-width: 74px; max-width: 74px; line-height: 1.2; vertical-align: bottom; }
.bv-grp th { color: #fff !important; font-size: 11px !important; letter-spacing: .06em; text-transform: uppercase; height: 19px; }
.bv-grp .g-cl { background: #2B2B2B !important; } .bv-grp .g-ev { background: #3B5BDB !important; } .bv-grp .g-tk { background: #7048E8 !important; }
.bv-table th.event { box-shadow: inset 0 -3px 0 #3B5BDB; } .bv-table th.task { box-shadow: inset 0 -3px 0 #7048E8; }
.bv-split { border-left: 2px solid var(--line-strong) !important; }
.bv-sticky { position: sticky; z-index: 2; }
.bv-table thead .bv-sticky { z-index: 4; }
.bv-c0 { left: 0; min-width: 150px; max-width: 170px; text-align: left !important; }
.bv-c1 { left: 150px; min-width: 50px; }
.bv-c2 { left: 200px; min-width: 96px; text-align: left !important; border-right: 2px solid var(--line-strong) !important; }
.bv-name .linkish, .bv-name b { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; text-align: left; white-space: normal; }
.bv-name .linkish:hover { color: var(--orange-ink); text-decoration: underline; }
.bv-prog { height: 3px; background: var(--line); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.bv-prog i { display: block; height: 100%; background: var(--ok, #2E9E5B); }
.bv-upd { font-size: 11.5px; color: var(--ink-2); line-height: 1.2; }
.bv-upd small { display: block; color: var(--ink-3); font-size: 10.5px; }
.bv-upd.stale { color: var(--bad); font-weight: 700; }
.bv-bucket td { background: var(--orange-wash, var(--orange-soft)) !important; text-align: left !important; padding: 7px 10px; }
.bv-bin { position: sticky; left: 10px; display: inline-flex; align-items: center; gap: 4px; }
.bv-bname { font-weight: 800; color: var(--orange-ink); letter-spacing: .04em; text-transform: uppercase; }
.bv-bact { margin-left: 12px; display: inline-flex; gap: 4px; }
.bv-v { display: inline-block; min-width: 44px; padding: 4px 5px; border-radius: 6px; border: 1px solid transparent; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; line-height: 1.1; }
.bv-v.empty { background: none; color: var(--ink-3); font-weight: 400; }
.bv-v.empty:hover { background: var(--hover); }
.bv-v.done { background: var(--good-soft); color: var(--good-ink); border-color: var(--good-line); }
.bv-v.prog { background: var(--orange-soft); color: var(--orange-ink); border-color: var(--orange-line); }
.bv-v.stuck { background: var(--bad-soft); color: var(--bad-ink); border-color: var(--bad-line); }
.bv-v.todo { background: var(--muted-soft); color: var(--muted-ink); }
.bv-v.nil { background: var(--bg-2); color: var(--ink-3); font-weight: 500; }
.bv-now .bv-v { outline: 2px solid var(--orange); outline-offset: 1px; }
.bv-now-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; outline: 2px solid var(--orange); outline-offset: 1px; }
.bv-done td { opacity: .8; }
.bv-pop { position: absolute; z-index: 60; width: 300px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px 14px; font-size: 12.5px; }
.bv-pop-head b { font-size: 13.5px; }
.bv-opts { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0; max-height: 150px; overflow: auto; }
.bv-opt { border: 1px solid var(--line); background: var(--bg-2); border-radius: 6px; padding: 4px 8px; font: inherit; font-size: 12px; cursor: pointer; color: var(--ink); }
.bv-opt:hover { border-color: var(--orange); }
.bv-opt.on { background: var(--orange); color: var(--on-orange); border-color: var(--orange); font-weight: 700; }
.bv-opt.clear { color: var(--bad); }
.bv-info div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.bv-info b.good { color: var(--good-ink); } .bv-info b.warn { color: var(--warn); }
.bv-hist { margin-top: 8px; font-size: 11.5px; line-height: 1.5; max-height: 130px; overflow: auto; }
.bv-hist-t { font-weight: 700; color: var(--ink-2); }

/* ---------- Bird View dashboard (v4.4) ---------- */
.bv-dash { margin-bottom: 4px; }
.bv-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.bv-hide { background: rgba(255,255,255,.1) !important; color: #fff !important; border-color: rgba(255,255,255,.2) !important; }
.bv-hero-row { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; align-items: center; }
.bv-ring { width: 112px; height: 112px; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, #1b1710 79%, transparent 80% 100%), conic-gradient(#FBAA1B calc(var(--p) * 1%), rgba(255,255,255,.12) 0); }
.bv-ring b { font-size: 26px; font-weight: 800; color: #fff; line-height: 1; } .bv-ring span { font-size: 11px; color: rgba(255,255,255,.6); }
.bv-grid { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr); }
.bv-sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.bv-sh { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.bv-sh.ev { color: #3B5BDB; } .bv-sh.tk { color: #7048E8; }
.bv-srow { display: grid; grid-template-columns: minmax(0, 1fr) 70px 46px; gap: 6px; align-items: center; font-size: 11.5px; padding: 2px 0; }
.bv-srow .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.bv-srow .b { height: 7px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.bv-srow .b i { display: block; height: 100%; border-radius: 4px; }
.bv-srow.event .b i { background: #3B5BDB; } .bv-srow.task .b i { background: #7048E8; }
.bv-srow .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-3); }
.bv-bk { display: block; width: 100%; text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; margin-bottom: 7px; cursor: pointer; font: inherit; color: var(--ink); }
.bv-bk:hover, .bv-bk.on { border-color: var(--orange); }
.bv-bk-t { display: flex; justify-content: space-between; font-size: 12.5px; } .bv-bk-t span { font-weight: 800; color: var(--orange-ink); }
.bv-bk-f { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 11px; color: var(--ink-3); margin-top: 5px; }
.bv-bk-f .pill { font-size: 10.5px; padding: 1px 7px; }
.bv-prog.big { height: 6px; margin-top: 6px; } .bv-prog.big i { background: var(--orange); }
.bv-mix { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.bv-mix div { background: var(--bg-2); border-radius: 10px; padding: 8px 10px; display: grid; }
.bv-mix b { font-size: 20px; } .bv-mix span { font-size: 12px; font-weight: 600; } .bv-mix small { font-size: 10.5px; color: var(--ink-3); }
.bv-recent { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 12px; max-height: 170px; overflow: auto; }
.bv-recent small { display: block; color: var(--ink-3); font-size: 10.5px; }
.bv-tasks { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.bv-task { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 5px; background: #EEF1FF; color: #3B5BDB; border: 1px solid #D5DCFF; text-decoration: none; white-space: nowrap; font-family: inherit; cursor: pointer; }
.bv-task.done { background: var(--good-soft); color: var(--good-ink); border-color: var(--good-line); }
.bv-task.make { background: none; color: var(--ink-3); border: 1px dashed var(--line-strong); }
.bv-task.make.ready { background: var(--orange); color: var(--on-orange); border: 1px solid var(--orange); }
.bv-type { display: block; font-size: 10px; color: var(--ink-3); }
.bv-count { display: grid; grid-template-columns: 1fr auto 1fr 1.3fr; gap: 10px; align-items: end; }
.bv-plus { font-size: 20px; font-weight: 700; padding-bottom: 10px; color: var(--ink-3); }
.bv-set { padding: 12px 14px; margin-top: 12px; }
.bv-people { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 120px; overflow: auto; }
.bv-auto { display: flex; gap: 10px; align-items: flex-start; }
.bv-c0 .bv-tasks a, .bv-c0 .bv-tasks button { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .bv-grid { grid-template-columns: 1fr; } .bv-hero-row { grid-template-columns: 1fr; } }
.chk { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; cursor: pointer; } .chk input { width: auto; }
.bv-hero .rp-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 900px) { .bv-hero .rp-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- HR & People (v4.5) ---------- */
.hr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .hr-grid { grid-template-columns: 1fr; } }
.hr-h { display: flex; justify-content: space-between; align-items: center; }
.hr-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 330px; overflow: auto; }
.hr-list li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 7px 9px; border-radius: 10px; background: var(--bg-2); }
.hr-list li > span:first-child:not(.hr-emoji) { grid-column: 1 / 3; }
.hr-list li.today { background: var(--orange-soft); border: 1px solid var(--orange-line); }
.hr-list small, .hr-who small, .hr-docs small, .hr-tl small, .hr-check small { display: block; color: var(--ink-3); font-size: 11.5px; }
.hr-emoji { font-size: 20px; }
.hr-when { text-align: right; font-size: 12.5px; white-space: nowrap; } .hr-when.inline { text-align: left; }
.hr-when.soon b, .hr-when.soon { color: var(--orange-ink); } .hr-when.late b, .hr-when.late { color: var(--bad); }
.hr-act { display: inline-flex; gap: 4px; }
.hr-bar { display: block; height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 5px; min-width: 60px; }
.hr-bar i { display: block; height: 100%; background: #16a34a; border-radius: 4px; }
.hr-bar.bad i { background: var(--bad); } .hr-bar.big { height: 9px; margin: 0; }
.hr-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; } .hr-mini .hr-bar { width: 70px; margin: 0; }
.hr-teams { display: grid; gap: 7px; } .hr-teams div { display: grid; grid-template-columns: 130px 1fr 30px; gap: 8px; align-items: center; font-size: 12.5px; }
.hr-teams .hr-bar i { background: var(--orange); }
.hr-face { border-radius: 50%; object-fit: cover; flex: none; background: var(--bg-2); }
.hr-face.ph { display: inline-grid; place-items: center; background: linear-gradient(135deg, #FBAA1B, #f97316); color: #111; font-weight: 800; }
.hr-who { display: flex; gap: 10px; align-items: center; }
.hr-row { cursor: pointer; } .hr-row:hover td { background: var(--hover); } .hr-row.off { opacity: .55; }
.hr-st.warn, .pill.warn { background: var(--orange-soft); color: var(--orange-ink); }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.hr-phead { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 4px 0 14px; }
.hr-ph-face { position: relative; }
.hr-ph-btn { position: absolute; right: -2px; bottom: -2px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--surface); background: var(--orange); color: #111; display: grid; place-items: center; cursor: pointer; padding: 0; }
.hr-ph-btn svg { width: 13px; height: 13px; }
.hr-ph-txt h2 { margin: 0; font-size: 20px; }
.hr-ph-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.hr-ph-act { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 320px; }
@media (max-width: 760px) { .hr-phead { grid-template-columns: auto 1fr; } .hr-ph-act { grid-column: 1 / -1; justify-content: flex-start; max-width: none; } }
.hr-kvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 14px; }
.hr-kv { background: var(--bg-2); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.hr-kv span { font-size: 11.5px; color: var(--ink-3); } .hr-kv b { font-size: 13px; overflow-wrap: anywhere; }
.hr-prog { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.hr-prog .hr-bar { height: 9px; margin: 0; }
.hr-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.hr-check li { padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line); }
.hr-check li.done { background: var(--good-soft); border-color: var(--good-line); }
.hr-check label { display: flex; gap: 10px; align-items: center; cursor: pointer; font-size: 13.5px; }
.hr-check input { width: 17px; height: 17px; flex: none; }
.hr-check li.done span { text-decoration: line-through; text-decoration-color: var(--ink-3); }
.hr-check small { margin-left: 27px; }
.hr-add, .hr-upload { display: flex; gap: 6px; margin-top: 10px; align-items: center; flex-wrap: wrap; }
.hr-add input { flex: 1; } .hr-upload select, .hr-upload input[type=text], .hr-upload input:not([type]) { width: auto; flex: 1; min-width: 140px; }
.hr-docs { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; }
.hr-docs li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.hr-doc-ic svg { width: 20px; height: 20px; color: var(--orange-ink); }
.hr-tl { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.hr-tl li { position: relative; font-size: 13px; }
.hr-tl li::before { content: ''; position: absolute; left: -22px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); border: 2px solid var(--surface); }
.hr-tl li.joined::before, .hr-tl li.confirmed::before, .hr-tl li.approved::before { background: #16a34a; }
.hr-tl li.promotion::before { background: #7048E8; } .hr-tl li.exit::before, .hr-tl li.exited::before, .hr-tl li.rejected::before { background: var(--bad); }
.hr-tl li.probation::before, .hr-tl li.pending::before { background: var(--orange); } .hr-tl li.onboarding::before { background: #0ea5e9; }
.hr-exit-act { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.hr-profile .tabs { margin-top: 0; }
.linkish { font: inherit; font-weight: 700; background: none; border: 0; padding: 0; color: var(--ink); cursor: pointer; text-align: left; } .linkish:hover { color: var(--orange-ink); text-decoration: underline; }
/* Bird View · Columns dialog */
.bv-cols { display: grid; gap: 14px; }
.bv-cgrp { border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: grid; gap: 5px; }
.bv-cgrp.event { border-left: 4px solid #3B5BDB; } .bv-cgrp.task { border-left: 4px solid #7048E8; }
.bv-cgh { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; }
.bv-cgrp.event .bv-cgh { color: #3B5BDB; } .bv-cgrp.task .bv-cgh { color: #7048E8; }
.bv-crow { display: grid; grid-template-columns: 24px auto minmax(0, 1fr) 190px 80px auto auto auto; gap: 6px; align-items: center; padding: 3px 4px; border-radius: 8px; }
.bv-crow:hover { background: var(--bg-2); } .bv-crow.off { opacity: .5; }
.bv-crow select, .bv-crow input { padding: 5px 8px; font-size: 12.5px; }
.bv-cnum { font-size: 11px; color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.bv-cmv { display: inline-flex; } .bv-cmv .btn { padding: 2px 6px; min-height: 0; font-size: 10px; }
.bv-cname { display: grid; gap: 4px; }
@media (max-width: 800px) { .bv-crow { grid-template-columns: 24px auto 1fr; } .bv-crow > select, .bv-crow > label { grid-column: 3; } }
