/* Corewave Pulse — design system */
@font-face { font-family: 'Manrope'; src: url('/fonts/manrope.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* brand */
  --poppy: #FF5527; --poppy-600: #E8441A; --poppy-50: #FFF1EC;
  --ink: #131313;
  /* surfaces */
  --bg: #F4F3F0; --surface: #FFFFFF; --surface-2: #FAF9F7; --sunken: #EFEDE9;
  --line: #E6E3DE; --line-strong: #D6D2CB;
  --text: #131313; --text-2: #4A4743; --muted: #7A766F; --faint: #A8A39B;
  /* status */
  --ok: #1E9E6A; --ok-bg: #E5F5EE; --warn: #B87500; --warn-bg: #FDF3DD; --bad: #D23F3F; --bad-bg: #FCE9E9; --info: #3559D6; --info-bg: #EAF0FF;
  /* data viz */
  --v-hours: #1E9E6A; --v-commits: #3559D6; --v-add: #1E9E6A; --v-del: #D23F3F;
  --heat-0: #EEECE8; --heat-1: #CDEBDD; --heat-2: #8FD3B2; --heat-3: #3FB27F; --heat-4: #1A7F55;
  /* sidebar */
  --side-bg: #131313; --side-text: #A9A6A1; --side-hover: #222120; --side-active: #2A2827;
  /* shape */
  --r-lg: 14px; --r-md: 10px; --r-sm: 7px;
  --shadow-pop: 0 12px 32px -8px rgba(19,19,19,.18), 0 2px 6px rgba(19,19,19,.06);
  --font: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #121212; --surface: #1B1B1A; --surface-2: #201F1E; --sunken: #161615;
  --line: #2C2B29; --line-strong: #3A3836;
  --text: #F2F0EC; --text-2: #CFCBC4; --muted: #8F8A83; --faint: #67635D;
  --ok: #3CC48A; --ok-bg: #16302A; --warn: #E3A33A; --warn-bg: #352A14; --bad: #F06363; --bad-bg: #3A1D1D; --info: #7C98FF; --info-bg: #1D2540;
  --v-hours: #3CC48A; --v-commits: #7C98FF; --v-add: #3CC48A; --v-del: #F06363;
  --heat-0: #252423; --heat-1: #1D3B2F; --heat-2: #22694B; --heat-3: #2E9E6D; --heat-4: #4FD69A;
  --poppy-50: #3A1F16;
  --side-bg: #0C0C0C; --side-hover: #1A1A19; --side-active: #222120;
  --shadow-pop: 0 12px 32px -8px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; font-feature-settings: 'tnum' 1; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--poppy); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--poppy); color: #fff; }
.mono { font-family: var(--mono); font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.add { color: var(--v-add); } .del { color: var(--v-del); }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ============ Shell ============ */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side-bg) 248px, var(--bg) 248px); }
.side { background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 18px 12px; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; color: #fff; text-decoration: none; }
.logo-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--poppy); display: grid; place-items: center; flex: none; }
.logo-name { font-weight: 700; font-size: 15px; letter-spacing: -.01em; line-height: 1.15; }
.logo-name small { display: block; font-weight: 500; font-size: 12px; color: var(--side-text); letter-spacing: 0; }
.nav-group { margin-bottom: 18px; }
.nav-title { font-size: 12px; color: #6E6A64; padding: 0 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--side-text); font-weight: 550; font-size: 14px; position: relative; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav a:hover { background: var(--side-hover); color: #fff; }
.nav a.active { background: var(--side-active); color: #fff; }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--poppy); }
.nav a.active svg { opacity: 1; color: var(--poppy); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: rgba(210,63,63,.22); color: #FF8A8A; }
.side-foot { margin-top: auto; border-top: 1px solid #262524; padding-top: 12px; }
.sync-mini { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 12px; }
.sync-mini .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.sync-mini .dot.run { background: var(--poppy); animation: pulse 1.2s infinite; }
.sync-mini .dot.err { background: var(--bad); }
.sync-mini .dot.idle { background: #6E6A64; }
@keyframes pulse { 50% { opacity: .35; } }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; background: none; border: 0; width: 100%; text-align: left; color: var(--side-text); }
.me:hover { background: var(--side-hover); }
.me b { color: #fff; font-weight: 600; display: block; font-size: 13px; }
.me span { font-size: 12px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 32px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; }
.crumbs h1 { font-size: 18px; font-weight: 700; letter-spacing: -.015em; margin: 0; white-space: nowrap; }
.crumbs .sep { color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.crumbs a:hover { color: var(--text); }
.topbar .spacer { flex: 1; }
.btn.menu-btn { display: none; }
.content { padding: 26px 32px 60px; max-width: 1480px; width: 100%; margin: 0 auto; }

/* ============ Controls ============ */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none; white-space: nowrap; color: var(--text); }
.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--text-2); }
.btn.primary { background: var(--poppy); border-color: var(--poppy); color: #fff; }
.btn.primary:hover { background: var(--poppy-600); border-color: var(--poppy-600); }
.btn.quiet { border-color: transparent; background: transparent; }
.btn.quiet:hover { background: var(--sunken); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 36px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .55; cursor: default; }
.btn .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.input, select.input, textarea.input { height: 36px; padding: 0 11px; border-radius: var(--r-sm); border: 1px solid var(--line-strong); background: var(--surface); outline: none; min-width: 0; }
textarea.input { height: auto; padding: 9px 11px; resize: vertical; }
.input:focus { border-color: var(--poppy); box-shadow: 0 0 0 3px color-mix(in srgb, var(--poppy) 18%, transparent); }
.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.search .input { padding-left: 34px; width: 240px; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--sunken); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(19,19,19,.08); }
.seg button .n { font-size: 11px; color: var(--faint); }
.seg button.on .n { color: var(--muted); }

/* range picker */
.range { position: relative; }
.range-btn { gap: 8px; }
.range-btn .lbl { color: var(--muted); font-weight: 500; }
.pop { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-pop); padding: 8px; z-index: 50; min-width: 300px; }
.pop .presets { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.pop .presets button { text-align: left; padding: 7px 10px; border-radius: 6px; border: 0; background: none; cursor: pointer; font-weight: 550; }
.pop .presets button:hover, .pop .presets button.on { background: var(--sunken); }
.pop .presets button.on { color: var(--poppy-600); }
.pop .custom { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; display: flex; gap: 8px; align-items: end; }
.pop .custom label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.pop .custom .input { width: 130px; height: 32px; }

/* ============ Layout primitives ============ */
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h2 { font-size: 26px; line-height: 1.15; letter-spacing: -.025em; margin: 0; font-weight: 750; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 14.5px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; align-items: start; }
.g-2 { grid-template-columns: 1fr 1fr; }
.g-3-1 { grid-template-columns: minmax(0, 2.1fr) minmax(300px, 1fr); }
.g-1-2 { grid-template-columns: minmax(280px, 1fr) minmax(0, 2.4fr); }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.tight { gap: 6px; }
.spacer { flex: 1; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); min-width: 0; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 0; }
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.panel-head .sub { color: var(--muted); font-size: 13px; }
.panel-head .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.panel-body { padding: 16px 20px 20px; }
.panel-body.flush { padding: 12px 0 4px; }
.chart-box { position: relative; height: 270px; }

/* ============ KPI band ============ */
.kpi-band { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 18px; overflow: hidden; }
.kpi { padding: 18px 20px 14px; border-left: 1px solid var(--line); position: relative; min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .k-label { font-size: 13px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-size: 28px; font-weight: 750; letter-spacing: -.03em; margin-top: 6px; line-height: 1.1; white-space: nowrap; }
.kpi .k-value small { font-size: 15px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 3px; }
.kpi .k-foot > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kpi .k-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.delta { font-weight: 700; font-size: 12px; padding: 1px 7px; border-radius: 999px; white-space: nowrap; }
.delta.up { color: var(--ok); background: var(--ok-bg); }
.delta.down { color: var(--bad); background: var(--bad-bg); }
.delta.flat { color: var(--muted); background: var(--sunken); }
.spark { width: 84px; height: 26px; flex: none; }

/* ============ Today strip ============ */
.today { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 22px; margin-bottom: 18px; }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .rv { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 750; font-size: 15px; }
.today h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.today p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.who { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 3px; border-radius: 999px; background: var(--sunken); font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--text-2); border: 1px solid transparent; cursor: pointer; }
.chip:hover { border-color: var(--line-strong); }
.chip.missing { background: var(--bad-bg); color: var(--bad); }

/* ============ Avatars ============ */
.av { --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; font-size: calc(var(--s) * .38); font-weight: 700; color: #fff; flex: none; letter-spacing: .01em; }
.av.sm { --s: 22px; } .av.lg { --s: 44px; } .av.xl { --s: 72px; font-size: 26px; }
.av-stack { display: inline-flex; }
.av-stack .av { border: 2px solid var(--surface); margin-left: -7px; }
.av-stack .av:first-child { margin-left: 0; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; color: inherit; }
.person > span > b { font-weight: 650; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person > span > span { color: var(--muted); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ Team pulse (signature) ============ */
.pulse { overflow-x: auto; padding: 4px 20px 18px; }
.pulse table { border-collapse: separate; border-spacing: 4px 5px; width: 100%; table-layout: fixed; min-width: 760px; }
.pulse th:first-child { width: 210px; } .pulse th:last-child { width: 64px; }
.pulse th { font-size: 11.5px; font-weight: 600; color: var(--faint); text-align: center; padding: 0 0 2px; white-space: nowrap; }
.pulse th.wk { color: var(--muted); }
.pulse th.today-col { color: var(--poppy-600); }
.pulse td.who-cell { padding-right: 14px; min-width: 190px; white-space: nowrap; }
.pulse td.c { padding: 0; }
.cell { display: block; height: 30px; min-width: 22px; border-radius: 6px; background: var(--heat-0); position: relative; cursor: pointer; border: 0; width: 100%; }
.cell.h1 { background: var(--heat-1); } .cell.h2 { background: var(--heat-2); } .cell.h3 { background: var(--heat-3); } .cell.h4 { background: var(--heat-4); }
.cell.miss { background: repeating-linear-gradient(135deg, var(--bad-bg) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 55%, transparent); }
.cell.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.cell.future { background: transparent; cursor: default; }
.cell .cdot { position: absolute; right: 4px; bottom: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--v-commits); box-shadow: 0 0 0 1.5px var(--surface); }
.cell:hover:not(.off):not(.future) { outline: 2px solid var(--text); outline-offset: 1px; }
.pulse td.tot { padding-left: 12px; text-align: right; white-space: nowrap; font-size: 12.5px; color: var(--muted); }
.pulse td.tot b { color: var(--text); font-size: 13.5px; }
.legend { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }
.legend .scale i { margin-right: 2px; }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); color: #fff; padding: 9px 11px; border-radius: 8px; font-size: 12.5px; line-height: 1.45; box-shadow: var(--shadow-pop); max-width: 260px; }
.tip b { font-weight: 700; }
.tip .t-muted { color: #A9A6A1; }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface); position: sticky; top: 0; }
.t th.sortable { cursor: pointer; user-select: none; }
.t th.sortable:hover { color: var(--text); }
.t th .arrow { color: var(--poppy); }
.t td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t th:first-child, .t td:first-child { padding-left: 20px; }
.t th:last-child, .t td:last-child { padding-right: 20px; }
.t .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: var(--surface-2); }
.t.compact td { padding-top: 8px; padding-bottom: 8px; }
.heat-t td.hc { text-align: right; font-variant-numeric: tabular-nums; min-width: 62px; font-weight: 600; }
.heat-t td.hc.zero { color: var(--faint); font-weight: 500; }
.rank { width: 22px; color: var(--faint); font-weight: 700; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.ok { color: var(--ok); background: var(--ok-bg); }
.badge.bad { color: var(--bad); background: var(--bad-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.info { color: var(--info); background: var(--info-bg); }
.badge.neutral { color: var(--text-2); background: var(--sunken); }
.bar { height: 6px; border-radius: 4px; background: var(--sunken); overflow: hidden; min-width: 60px; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--ok); }
.bar.warn > i { background: var(--warn); } .bar.bad > i { background: var(--bad); }
.meter { display: flex; align-items: center; gap: 10px; }
.meter .bar { flex: 1; }
.meter b { width: 38px; text-align: right; font-size: 13px; }

/* ============ Lists / feed ============ */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; padding: 11px 20px; border-top: 1px solid var(--line); align-items: start; }
.feed li:first-child { border-top: 0; }
.feed .ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.feed .ic svg { width: 16px; height: 16px; }
.ic-log { background: var(--ok-bg); color: var(--ok); } .ic-commit { background: var(--info-bg); color: var(--info); }
.ic-pr { background: var(--poppy-50); color: var(--poppy-600); } .ic-review { background: var(--warn-bg); color: var(--warn); }
.feed .f-main { min-width: 0; }
.feed .f-title { font-weight: 600; overflow-wrap: anywhere; }
.feed .f-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.feed .f-side { text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.day-head { position: sticky; top: 64px; z-index: 2; background: var(--surface-2); padding: 8px 20px; font-size: 13px; font-weight: 700; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.day-head span { font-weight: 500; color: var(--muted); }

.insights { list-style: none; margin: 0; padding: 0; }
.insights li { display: flex; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); }
.insights li:first-child { border-top: 0; }
.insights .ii { width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; flex: none; }
.insights .ii.bad { background: var(--bad); } .insights .ii.warn { background: var(--warn); } .insights .ii.ok { background: var(--ok); } .insights .ii.info { background: var(--info); }
.insights p { margin: 0; line-height: 1.45; }
.insights a { font-weight: 650; text-decoration: none; }
.insights a:hover { text-decoration: underline; }

/* ============ Standup ============ */
.week { display: grid; grid-template-columns: auto repeat(7, minmax(0, 1fr)) auto; gap: 8px; align-items: stretch; margin-bottom: 18px; }
.wday { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-md); padding: 10px 12px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wday:hover { border-color: var(--line-strong); }
.wday.on { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
[data-theme="dark"] .wday.on { border-color: var(--text); box-shadow: 0 0 0 1px var(--text); }
.wday.off { background: transparent; }
.wday .wd { font-size: 12px; color: var(--muted); font-weight: 600; }
.wday .dn { font-size: 18px; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.wday.today .dn { color: var(--poppy-600); }
.wday .wr { font-size: 11.5px; color: var(--muted); }
.week .nav-arrow { align-self: center; }
.split { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 18px; align-items: start; }
.plist { max-height: calc(100vh - 290px); overflow-y: auto; padding: 6px; }
.pitem { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; }
.pitem:hover { background: var(--surface-2); }
.pitem.on { background: var(--sunken); border-color: var(--line); }
.pitem .pm { text-align: right; font-size: 12px; color: var(--muted); line-height: 1.35; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.status-dot.ok { background: var(--ok); } .status-dot.bad { background: var(--bad); } .status-dot.warn { background: var(--warn); } .status-dot.off { background: var(--faint); }
.detail-head { display: flex; gap: 16px; align-items: center; padding: 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.detail-head h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.detail-head .stats { margin-left: auto; display: flex; gap: 22px; }
.stat b { display: block; font-size: 20px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.section { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.section:last-child { border-bottom: 0; }
.section h4 { margin: 0 0 10px; font-size: 13.5px; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.section h4 .c { color: var(--muted); font-weight: 600; }
.task { display: grid; grid-template-columns: 1fr auto; gap: 14px; padding: 10px 0; border-top: 1px dashed var(--line); }
.task:first-of-type { border-top: 0; padding-top: 2px; }
.task .tp { font-size: 12px; font-weight: 700; color: var(--muted); }
.task .tt { font-weight: 550; margin-top: 1px; }
.task .tn { color: var(--muted); font-size: 13px; margin-top: 3px; }
.task .th { text-align: right; white-space: nowrap; }
.task .th b { font-size: 15px; }
.commit { display: grid; grid-template-columns: 74px 1fr auto; gap: 12px; padding: 7px 0; align-items: baseline; }
.commit a.sha { color: var(--info); text-decoration: none; }
.commit a.sha:hover { text-decoration: underline; }
.commit .cm { min-width: 0; overflow-wrap: anywhere; }
.commit .cmeta { color: var(--muted); font-size: 12.5px; }
.commit .cl { font-size: 12.5px; white-space: nowrap; }
.repo-group + .repo-group { margin-top: 12px; }
.repo-name { font-size: 12.5px; font-weight: 700; color: var(--text-2); display: flex; align-items: center; gap: 6px; margin-bottom: 2px; }
.repo-name svg { width: 14px; height: 14px; color: var(--muted); }
.flagbar { display: flex; gap: 6px; flex-wrap: wrap; }
.empty { padding: 38px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }

/* ============ People ============ */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ptile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; cursor: pointer; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 14px; }
.ptile:hover { border-color: var(--line-strong); }
.ptile .top { display: flex; gap: 12px; align-items: center; }
.ptile .top .ring { width: 48px; height: 48px; margin-left: auto; }
.ptile .top .ring .rv { font-size: 12px; }
.ptile .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ptile .nums div b { display: block; font-size: 17px; font-weight: 750; letter-spacing: -.02em; }
.ptile .nums div span { font-size: 12px; color: var(--muted); font-weight: 600; }
.mini-pulse { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
.mini-pulse i { height: 16px; border-radius: 3px; background: var(--heat-0); }
.mini-pulse i.h1 { background: var(--heat-1); } .mini-pulse i.h2 { background: var(--heat-2); } .mini-pulse i.h3 { background: var(--heat-3); } .mini-pulse i.h4 { background: var(--heat-4); }
.mini-pulse i.miss { background: var(--bad-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 50%, transparent); }
.mini-pulse i.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.ptile .foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }

/* ============ Profile ============ */
.profile-head { display: flex; gap: 20px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; margin-bottom: 18px; flex-wrap: wrap; }
.profile-head h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
.profile-head .meta { display: flex; gap: 16px; color: var(--muted); font-size: 13px; margin-top: 4px; flex-wrap: wrap; }
.profile-head .meta a { text-decoration: none; display: inline-flex; gap: 5px; align-items: center; }
.profile-head .meta a:hover { color: var(--text); }
.profile-head .meta svg { width: 14px; height: 14px; }
.profile-head .actions { margin-left: auto; display: flex; gap: 8px; }
.cal { overflow-x: auto; padding: 4px 20px 16px; }
.cal-grid { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, 13px); gap: 3px; width: max-content; }
.cal-grid i { width: 13px; height: 13px; border-radius: 3px; background: var(--heat-0); }
.cal-grid i.h1 { background: var(--heat-1); } .cal-grid i.h2 { background: var(--heat-2); } .cal-grid i.h3 { background: var(--heat-3); } .cal-grid i.h4 { background: var(--heat-4); }
.cal-grid i.miss { background: var(--bad-bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 55%, transparent); }
.cal-grid i.off { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
.cal-grid i.blank { visibility: hidden; }
.cal-months { display: grid; grid-auto-flow: column; gap: 3px; font-size: 11.5px; color: var(--muted); margin-bottom: 4px; width: max-content; }
.cal-months span { width: 13px; white-space: nowrap; overflow: visible; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding: 0 14px; }
.tabs button { border: 0; background: none; padding: 12px 10px; font-weight: 650; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 6px; }
.tabs button.on { color: var(--text); border-bottom-color: var(--poppy); }
.tabs button .n { color: var(--faint); font-weight: 600; }
.hlist { list-style: none; margin: 0; padding: 0; }
.hlist li { padding: 10px 20px; border-top: 1px solid var(--line); }
.hlist li:first-child { border-top: 0; }
.hlist .hl-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; margin-bottom: 6px; }

/* ============ Integrations ============ */
.int-card { display: flex; flex-direction: column; }
.int-card .ih { display: flex; gap: 14px; align-items: center; padding: 20px; }
.int-logo { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--sunken); flex: none; }
.int-logo svg { width: 26px; height: 26px; }
.int-card h3 { margin: 0; font-size: 16px; }
.int-card .ih p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.int-card .ih .badge { margin-left: auto; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 16px; padding: 0 20px 18px; font-size: 13.5px; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; overflow-wrap: anywhere; }
.int-card .if { margin-top: auto; padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.steps { margin: 0; padding: 0 20px 18px 40px; font-size: 13.5px; color: var(--text-2); }
.steps li { margin: 4px 0; }

/* ============ Drawer / modal / toast ============ */
.scrim { position: fixed; inset: 0; background: rgba(19,19,19,.35); z-index: 60; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100vw); background: var(--surface); z-index: 61; display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: slidein .2s ease; }
@keyframes slidein { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { margin: 0; font-size: 17px; }
.drawer-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > span { font-size: 13px; font-weight: 650; }
.field small { color: var(--muted); font-size: 12.5px; }
.field .input { width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-group { font-size: 13px; font-weight: 700; color: var(--muted); margin: 22px 0 12px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.field-group svg { width: 16px; height: 16px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(16px); }
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-pop); font-weight: 550; display: flex; gap: 10px; align-items: center; animation: slidein .2s ease; max-width: 420px; }
.toast.err { background: var(--bad); }
.toast svg { width: 16px; height: 16px; flex: none; }
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-bg); color: var(--text-2); font-size: 13.5px; margin-bottom: 18px; align-items: flex-start; }
.callout svg { width: 18px; height: 18px; flex: none; color: var(--warn); margin-top: 1px; }
.callout.info { background: var(--info-bg); } .callout.info svg { color: var(--info); }
.callout b { color: var(--text); }
.skeleton { background: linear-gradient(90deg, var(--sunken), var(--surface-2), var(--sunken)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ============ Login ============ */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.login-art { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.login-art h1 { font-size: 40px; line-height: 1.08; letter-spacing: -.035em; font-weight: 750; margin: auto 0 16px; max-width: 460px; }
.login-art p { color: #A9A6A1; font-size: 16px; max-width: 420px; margin: 0 0 36px; }
.login-pulse { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; max-width: 460px; }
.login-pulse i { height: 22px; border-radius: 5px; background: #222120; }
.login-pulse i.a { background: #1A7F55; } .login-pulse i.b { background: #3FB27F; } .login-pulse i.c { background: #2B5C46; } .login-pulse i.p { background: var(--poppy); }
.login-form { display: grid; place-items: center; padding: 40px; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 24px; letter-spacing: -.02em; margin: 0 0 6px; }
.login-form p { color: var(--muted); margin: 0 0 26px; }
.login-form .btn { width: 100%; justify-content: center; height: 42px; font-size: 14px; }
.login-form .input { height: 42px; }
.form-err { color: var(--bad); font-size: 13.5px; min-height: 20px; margin-bottom: 8px; }

/* ============ Responsive ============ */
@media (max-width: 1280px) { .kpi-band { grid-template-columns: repeat(3, 1fr); } .kpi:nth-child(4) { border-left: 0; } .kpi:nth-child(n+4) { border-top: 1px solid var(--line); } }
@media (max-width: 1100px) { .g-3-1, .g-1-2, .g-2, .split { grid-template-columns: 1fr; } .plist { max-height: 320px; } .today { grid-template-columns: auto 1fr; } .today > :last-child { grid-column: 1 / -1; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; z-index: 70; width: 260px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .btn.menu-btn { display: inline-flex; }
  .shell { background: var(--bg); }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .kpi-band { grid-template-columns: 1fr 1fr; } .kpi:nth-child(odd) { border-left: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--line); }
  .week { grid-template-columns: repeat(7, minmax(0, 1fr)); } .week .nav-arrow { display: none; }
  .search .input { width: 100%; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .topbar .range-btn .lbl { display: none; }
  .detail-head .stats { margin-left: 0; }
  #syncBtn span, #topTools { display: none; }
  #syncBtn { width: 36px; padding: 0; justify-content: center; }
  .crumbs { overflow: hidden; } .crumbs h1 { overflow: hidden; text-overflow: ellipsis; }
  .kpi .spark { display: none; }
}
