:root {
  --bg: #f6f6f9;
  --bg-2: #eeeef4;
  --surface: #ffffff;
  --surface-2: #fafafc;
  --border: rgba(16, 18, 40, 0.08);
  --border-strong: rgba(16, 18, 40, 0.14);
  --text: #12131c;
  --text-2: #4a4d5e;
  --muted: #868899;
  --accent: #5b6cff;
  --accent-2: #a95cff;
  --accent-soft: rgba(91, 108, 255, 0.1);
  --grad: linear-gradient(135deg, #5b6cff 0%, #a95cff 100%);
  --good: #12a150;
  --good-soft: rgba(18, 161, 80, 0.1);
  --warn: #c27a00;
  --warn-soft: rgba(194, 122, 0, 0.12);
  --bad: #d93a3a;
  --bad-soft: rgba(217, 58, 58, 0.1);
  --shadow: 0 1px 2px rgba(16, 18, 40, 0.04), 0 6px 24px -8px rgba(16, 18, 40, 0.1);
  --shadow-lg: 0 24px 64px -16px rgba(16, 18, 40, 0.25);
  --radius: 16px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
  color-scheme: light;
}
:root[data-theme='dark'] {
  --bg: #09090d; --bg-2: #0f0f15; --surface: #131319; --surface-2: #17171f;
  --border: rgba(255, 255, 255, 0.07); --border-strong: rgba(255, 255, 255, 0.13);
  --text: #f3f3f7; --text-2: #b8b9c7; --muted: #7c7e8f;
  --accent: #7c8aff; --accent-2: #c07cff; --accent-soft: rgba(124, 138, 255, 0.14);
  --good: #3ccf7f; --good-soft: rgba(60, 207, 127, 0.12);
  --warn: #f0b23c; --warn-soft: rgba(240, 178, 60, 0.13);
  --bad: #ff6b6b; --bad-soft: rgba(255, 107, 107, 0.12);
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 8px 28px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); background: var(--bg); color: var(--text);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: var(--mono); font-size: 0.92em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.brand-lg { font-size: 20px; }
.brand-logo { display: block; line-height: 0; }
.brand-logo img { height: 24px; width: auto; }
.brand-lg .brand-logo img { height: 38px; }
.logo-dark { display: none; }
:root[data-theme='dark'] .logo-light { display: none; }
:root[data-theme='dark'] .logo-dark { display: block; }
.brand-tag { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.login-hero .brand-tag { background: rgba(255, 255, 255, .14); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--border-strong);
  background: var(--surface); font-weight: 600; font-size: 13.5px; transition: .15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 8px 24px -10px var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }
.icon-btn {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: .15s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--border-strong); }
.icon-btn svg, .nav svg, .search-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.spinning svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero { position: relative; overflow: hidden; background: #07070c; color: #fff; display: flex; align-items: center; padding: 64px; }
.mesh span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: float 18s ease-in-out infinite; }
.mesh span:nth-child(1) { width: 520px; height: 520px; background: #4d5cff; top: -140px; left: -120px; }
.mesh span:nth-child(2) { width: 460px; height: 460px; background: #a64dff; bottom: -160px; right: -80px; animation-delay: -6s; }
.mesh span:nth-child(3) { width: 300px; height: 300px; background: #ff5fa2; top: 40%; left: 45%; opacity: .3; animation-delay: -12s; }
@keyframes float { 50% { transform: translate(40px, -30px) scale(1.08); } }
.hero-inner { position: relative; max-width: 520px; }
.hero-inner h1 { font-size: clamp(40px, 5vw, 62px); line-height: 1.02; letter-spacing: -0.045em; margin: 40px 0 20px; font-weight: 800; }
.hero-inner .grad { background: linear-gradient(90deg, #9aa5ff, #e09bff); -webkit-background-clip: text; background-clip: text; }
.lede { color: rgba(255,255,255,.72); font-size: 16.5px; max-width: 440px; }
.feature-list { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 12px; color: rgba(255,255,255,.85); }
.feature-list i { font-style: normal; color: #a9b2ff; margin-right: 10px; font-size: 10px; vertical-align: 2px; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 420px; display: grid; gap: 14px; }
.login-card h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.login-card > p { margin: -6px 0 6px; }
.field { display: grid; gap: 6px; }
.field > span { font-weight: 600; font-size: 12.5px; color: var(--text-2); }
.field em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.field input, .field textarea, .composer textarea, .input {
  width: 100%; border: 1px solid var(--border-strong); background: var(--surface); border-radius: 11px;
  padding: 10px 12px; outline: none; transition: .15s;
}
.field input:focus, .field textarea:focus, .composer textarea:focus, .input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field textarea { font-family: var(--mono); font-size: 11.5px; resize: vertical; }
.dropzone {
  display: grid; place-items: center; min-height: 92px; border: 1.5px dashed var(--border-strong); border-radius: 12px;
  background: var(--surface-2); cursor: pointer; text-align: center; padding: 12px; transition: .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dz-empty { display: grid; justify-items: center; gap: 2px; color: var(--muted); font-size: 12.5px; }
.dz-empty strong { color: var(--text); font-size: 13.5px; }
.dz-empty svg { color: var(--accent); margin-bottom: 4px; }
.dz-full { display: flex; align-items: center; gap: 10px; }
.dz-check { width: 24px; height: 24px; border-radius: 50%; background: var(--good-soft); color: var(--good); display: grid; place-items: center; font-weight: 700; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.form-error { background: var(--bad-soft); color: var(--bad); padding: 10px 12px; border-radius: 10px; font-size: 13px; }
.help { border-top: 1px solid var(--border); padding-top: 14px; font-size: 13px; color: var(--text-2); }
.help summary { cursor: pointer; font-weight: 600; color: var(--text); }
.help ol { padding-left: 18px; margin: 8px 0 0; display: grid; gap: 4px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 20px;
  padding: 20px 14px; border-right: 1px solid var(--border); background: var(--bg-2);
}
.sidebar > .brand { padding: 4px 8px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; transition: .12s;
}
.nav a:hover { background: var(--surface); color: var(--text); }
.nav a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.nav a.active svg { color: var(--accent); }
.nav-count { margin-left: auto; font-size: 11px; background: var(--accent-soft); color: var(--accent); padding: 1px 7px; border-radius: 99px; }
.nav-count:empty { display: none; }
.side-apps { flex: 1; overflow: auto; min-height: 0; margin: 0 -6px; padding: 0 6px; }
.side-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 0 10px 6px; }
.side-app { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; color: var(--text-2); font-size: 13px; }
.side-app:hover { background: var(--surface); color: var(--text); }
.side-app.active { background: var(--surface); color: var(--text); font-weight: 600; }
.side-app .side-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.side-app b { font-size: 10.5px; color: var(--accent); font-weight: 600; }
.side-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.acct { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct div { display: grid; min-width: 0; }
.acct b { font-size: 13px; }
.acct small { color: var(--muted); font-size: 11px; font-family: var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); flex-shrink: 0; }

.main { min-width: 0; }
.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) 80%, transparent); backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.search-trigger {
  display: flex; align-items: center; gap: 10px; flex: 1; max-width: 440px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--muted); text-align: left;
}
.search-trigger span { flex: 1; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid var(--border-strong); border-radius: 6px; padding: 1px 6px; color: var(--muted); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sync { color: var(--muted); font-size: 12px; margin-right: 4px; }
.only-mobile { display: none; }
.demo-banner { margin: 16px 32px 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--text-2); font-size: 13px; }
.view { padding: 28px 32px 64px; max-width: 1440px; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- headings ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 28px; letter-spacing: -0.035em; font-weight: 750; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 36px 0 14px; flex-wrap: wrap; }
.section-title h2 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { padding: 18px 20px; position: relative; overflow: hidden; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 32px; font-weight: 750; letter-spacing: -0.04em; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 12px; color: var(--muted); margin-top: 4px; }
.delta-up { color: var(--good); font-weight: 600; }
.delta-down { color: var(--bad); font-weight: 600; }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%; background: var(--grad); opacity: .07; }

.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 14px; }

/* chart */
.chart-wrap { padding: 16px 20px 12px; position: relative; }
.chart svg { width: 100%; height: 190px; display: block; overflow: visible; }
.chart .gridline { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 10.5px; font-family: var(--font); }
.chart .bar { fill: var(--accent); transition: opacity .12s; }
.chart .bar-hit { fill: transparent; cursor: default; }
.chart:hover .bar { opacity: .45; }
.chart .bar.hot { opacity: 1; }
.tooltip {
  position: absolute; pointer-events: none; z-index: 5; background: var(--text); color: var(--bg);
  padding: 7px 10px; border-radius: 9px; font-size: 12px; white-space: nowrap; transform: translate(-50%, -100%); margin-top: -8px;
  box-shadow: var(--shadow-lg);
}
.tooltip b { font-variant-numeric: tabular-nums; }

/* feed */
.feed { list-style: none; margin: 0; padding: 6px 8px 8px; }
.feed li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; cursor: pointer; }
.feed li:hover { background: var(--surface-2); }
.feed-main { flex: 1; min-width: 0; }
.feed-top { display: flex; gap: 8px; align-items: baseline; }
.feed-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-top time { margin-left: auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.feed-sub { color: var(--text-2); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 28px 20px; text-align: center; color: var(--muted); font-size: 13px; }

/* app icon */
.app-icon {
  --s: 44px; width: var(--s); height: var(--s); border-radius: calc(var(--s) * 0.2237); flex-shrink: 0; overflow: hidden;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: calc(var(--s) * 0.38); letter-spacing: -0.02em;
  box-shadow: 0 0 0 1px var(--border), 0 4px 12px -4px rgba(0,0,0,.25);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-icon.xs { --s: 22px; box-shadow: 0 0 0 1px var(--border); }
.app-icon.sm { --s: 34px; }
.app-icon.lg { --s: 88px; box-shadow: 0 0 0 1px var(--border), 0 16px 40px -12px rgba(0,0,0,.35); }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px;
  font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap;
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: none; }
.chip.dot::before { display: block; }
.chip.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.chip.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* toolbar */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); }
.seg button { border: 0; background: none; height: 28px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.select { height: 34px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 0 10px; font-size: 12.5px; font-weight: 500; }
.filter-input { height: 34px; width: 200px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); padding: 0 12px; font-size: 12.5px; outline: none; }
.filter-input:focus { border-color: var(--accent); }

/* app grid */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 14px; }
.app-card { display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s, border-color .18s; }
.app-card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.app-card-top { display: flex; gap: 14px; padding: 18px 18px 0; cursor: pointer; }
.app-card-id { min-width: 0; flex: 1; }
.app-card-id h3 { margin: 2px 0 2px; font-size: 15.5px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-card-id .mono { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.app-card-chips { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.app-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 18px 4px; cursor: pointer; }
.metric small { display: block; color: var(--muted); font-size: 11px; font-weight: 500; }
.metric b { font-size: 14px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.spark { padding: 6px 18px 0; cursor: pointer; }
.spark svg { width: 100%; height: 34px; display: block; }
.spark rect { fill: var(--accent); }
.spark rect.zero { fill: var(--border-strong); }
.app-next { margin: 12px 18px 0; padding: 10px 12px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; }
.app-next b { color: var(--accent); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; padding-top: 1px; }
.app-next span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.quick-add { display: flex; gap: 8px; padding: 12px 18px 18px; margin-top: auto; }
.quick-add input { flex: 1; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); padding: 0 12px; font-size: 13px; outline: none; transition: .15s; min-width: 0; }
.quick-add input:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent-soft); }
.quick-add button { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--grad); color: #fff; font-size: 18px; display: grid; place-items: center; }

/* app table (list) */
.app-table { width: 100%; border-collapse: collapse; }
.app-table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.app-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.app-table tr:last-child td { border-bottom: 0; }
.app-table tbody tr:hover { background: var(--surface-2); }
.app-table .name-cell { display: flex; align-items: center; gap: 12px; cursor: pointer; min-width: 220px; }
.app-table .name-cell b { display: block; }
.app-table .name-cell small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.app-table .num { font-variant-numeric: tabular-nums; }
.app-table .quick-add { padding: 0; min-width: 260px; }
.table-scroll { overflow-x: auto; }

/* ---------- app detail ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; margin-bottom: 18px; font-size: 13px; }
.back:hover { color: var(--accent); }
.detail-hero { display: flex; gap: 22px; align-items: center; padding: 26px; position: relative; overflow: hidden; }
.detail-hero::before { content: ''; position: absolute; inset: 0; background: var(--hero-tint, var(--grad)); opacity: .08; pointer-events: none; }
.detail-hero > * { position: relative; }
.detail-hero h1 { margin: 0; font-size: 30px; letter-spacing: -0.04em; }
.detail-hero .meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.detail-hero .mono { color: var(--text-2); }
.hero-actions { margin-left: auto; display: flex; gap: 8px; align-self: flex-start; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 14px; }
.kpi { padding: 16px 20px; border-right: 1px solid var(--border); }
.kpi:last-child { border-right: 0; }
.kpi small { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.kpi b { display: block; font-size: 20px; letter-spacing: -0.03em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 11.5px; color: var(--muted); }
.versions-row { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--border); align-items: center; }
.versions-row > small { color: var(--muted); font-weight: 600; margin-right: 4px; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 20px; margin-top: 20px; align-items: start; }
.timeline-card .card-head .toolbar { gap: 6px; }

.vgroup { border-bottom: 1px solid var(--border); }
.vgroup:last-child { border-bottom: 0; }
.vgroup-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 14px 20px; background: none; border: 0; text-align: left; }
.vgroup-head:hover { background: var(--surface-2); }
.vgroup-head h4 { margin: 0; font-size: 15px; letter-spacing: -0.02em; }
.vgroup-head .muted { font-size: 12px; }
.vgroup-head .caret { margin-left: auto; transition: transform .2s; color: var(--muted); }
.vgroup.closed .caret { transform: rotate(-90deg); }
.vgroup.closed .builds { display: none; }
.builds { list-style: none; margin: 0; padding: 0 20px 16px 20px; position: relative; }
.build { position: relative; padding: 0 0 18px 30px; }
.build::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--border); }
.build:last-child { padding-bottom: 4px; }
.build:last-child::before { display: none; }
.build-dot { position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.build.latest .build-dot { background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.build.expired .build-dot { border-color: var(--border-strong); }
.build-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.build-no { font-family: var(--mono); font-weight: 600; font-size: 13px; }
.build-top time { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.whatsnew { margin-top: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.whatsnew.none { color: var(--muted); font-style: italic; background: none; border-style: dashed; padding: 8px 12px; }
.whatsnew .loc { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 4px; font-style: normal; }

/* roadmap panel */
.roadmap { position: sticky; top: 86px; }
.composer { padding: 16px 20px; border-bottom: 1px solid var(--border); display: grid; gap: 10px; }
.composer textarea { resize: none; min-height: 76px; font-size: 13.5px; line-height: 1.5; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notes { list-style: none; margin: 0; padding: 6px 8px 10px; max-height: calc(100vh - 360px); overflow: auto; }
.note { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; align-items: flex-start; }
.note:hover { background: var(--surface-2); }
.note input[type=checkbox] { appearance: none; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--border-strong); margin: 1px 0 0; flex-shrink: 0; cursor: pointer; display: grid; place-items: center; transition: .15s; }
.note input[type=checkbox]:checked { background: var(--good); border-color: var(--good); }
.note input[type=checkbox]:checked::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 700; }
.note-body { flex: 1; min-width: 0; }
.note-text { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; outline: none; border-radius: 6px; }
.note-text[contenteditable=true] { background: var(--surface); box-shadow: 0 0 0 2px var(--accent); padding: 2px 4px; }
.note.done .note-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.note-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.note-actions { display: flex; gap: 2px; opacity: 0; transition: .12s; }
.note:hover .note-actions, .note:focus-within .note-actions { opacity: 1; }
.note-actions button { width: 26px; height: 26px; border: 0; background: none; border-radius: 7px; color: var(--muted); display: grid; place-items: center; }
.note-actions button:hover { background: var(--bg-2); color: var(--text); }
.note-actions svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.notes-divider { display: flex; align-items: center; gap: 8px; padding: 12px 12px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; background: none; border: 0; width: 100%; }

/* roadmap page */
.road-list { display: grid; gap: 14px; }
.road-row { display: grid; grid-template-columns: 260px 1fr; gap: 0; overflow: hidden; }
.road-app { padding: 18px 20px; border-right: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; cursor: pointer; background: var(--surface-2); }
.road-app b { display: block; letter-spacing: -0.01em; }
.road-app small { color: var(--muted); font-size: 12px; }
.road-body { min-width: 0; }
.road-body .quick-add { padding: 14px 16px 6px; }
.road-body .notes { max-height: none; padding-top: 0; }

/* activity page */
.activity-day { margin-bottom: 18px; }
.activity-day h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px 4px; }

/* palette */
.palette { position: fixed; inset: 0; z-index: 100; background: rgba(5, 5, 10, .45); backdrop-filter: blur(6px); display: grid; justify-items: center; align-items: start; padding-top: 14vh; }
.palette-box { width: min(560px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: pop .16s ease; }
@keyframes pop { from { transform: scale(.97); opacity: 0; } }
.palette-box input { width: 100%; border: 0; border-bottom: 1px solid var(--border); background: none; padding: 18px 20px; font-size: 16px; outline: none; }
.palette-list { max-height: 50vh; overflow: auto; padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; }
.palette-item small { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-left: auto; }
.palette-item.sel { background: var(--accent-soft); }

/* boot + toasts */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 200; }
.boot-logo { width: 44px; height: 44px; border-radius: 12px; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.9); opacity: .7; } }
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 300; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: 12px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); animation: pop .2s ease; max-width: 360px; }
.toast.err { background: var(--bad); color: #fff; }

.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--bg-2), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- responsive ---------- */
/* sign in */
.btn-apple { background: #000; color: #fff; border-color: #000; gap: 8px; height: 46px; font-size: 15px; text-decoration: none; }
.btn-apple:hover { background: #1d1d1f; color: #fff; }
:root[data-theme='dark'] .btn-apple { background: #fff; color: #000; border-color: #fff; }
.dev-login { display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--border-strong); border-radius: 14px; }
.dev-login .side-label { padding: 0; }
.dev-login .toolbar { flex-wrap: wrap; }

/* websites */
.side-label-gap { margin-top: 16px; }
.grid-2.grid-even { grid-template-columns: 1fr 1fr; }
.notice { padding: 12px 16px; margin-bottom: 14px; font-size: 13px; color: var(--text-2); }
.notice.bad { color: var(--bad); background: var(--bad-soft); border-color: transparent; }
.notice-inline { padding: 12px 20px; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--border); }
a.chip { text-decoration: none; }
.hero-actions .btn { white-space: nowrap; }
a.chip:hover { border-color: var(--border-strong); color: var(--text); }
.lang { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.lang i { width: 9px; height: 9px; border-radius: 50%; }
.build.commit { padding-bottom: 10px; }
.build.commit .build-dot { width: 10px; height: 10px; left: 3px; top: 6px; border-color: var(--border-strong); }
.build.commit::before { top: 14px; }
.build.failed .build-dot { border-color: var(--bad); }
.build.latest.failed .build-dot { background: var(--bad); box-shadow: 0 0 0 5px var(--bad-soft); }
.commit-sha { font-size: 12px; color: var(--accent); text-decoration: none; }
.commit-sha:hover { text-decoration: underline; }
.commit-msg { font-size: 13px; color: var(--text-2); min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 980px) { .grid-2.grid-even { grid-template-columns: 1fr; } }

@media (max-width: 1180px) {
  .detail-grid { grid-template-columns: 1fr; }
  .roadmap { position: static; }
  .notes { max-height: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .kpi:nth-child(3) { border-right: 0; }
  .kpi:nth-child(n+4) { border-top: 1px solid var(--border); }
}
@media (max-width: 980px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 40px 24px; }
  .hero-inner h1 { margin-top: 28px; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .shell.menu-open .sidebar { transform: none; }
  .only-mobile { display: grid; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .road-row { grid-template-columns: 1fr; }
  .road-app { border-right: 0; border-bottom: 1px solid var(--border); }
}
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .view { padding: 20px 16px 48px; }
  .demo-banner { margin: 12px 16px 0; }
  .search-trigger span, .search-trigger kbd, .sync { display: none; }
  .search-trigger { flex: 0 0 38px; width: 38px; padding: 0; justify-content: center; }
  .app-grid { grid-template-columns: 1fr; }
  .detail-hero { flex-wrap: wrap; padding: 20px; }
  .hero-actions { margin-left: 0; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi { border-right: 0 !important; border-top: 1px solid var(--border); }
  .kpi:nth-child(-n+2) { border-top: 0; }
  .filter-input { width: 100%; }
  .stat-value { font-size: 26px; }
}
