/* NERVE-WM — Work Management OS for Paragon (functional) */
:root {
  --ink: #0a0e1a;
  --ink-2: #0f1424;
  --ink-3: #161c30;
  --ink-soft: #1c2133;
  --ink-muted: #2e3650;
  --mid: #5a6480;
  --subtle: #8b95b0;
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.16);
  --surface: rgba(255,255,255,0.04);
  --surface-2: rgba(255,255,255,0.07);
  --surface-3: rgba(255,255,255,0.10);
  --s1: #2563eb; --s1-soft: rgba(37,99,235,0.15); --s1-border: rgba(37,99,235,0.35);
  --s2: #7c3aed; --s2-soft: rgba(124,58,237,0.15); --s2-border: rgba(124,58,237,0.35);
  --gold: #f59e0b; --gold-soft: rgba(245,158,11,0.15);
  --green: #10b981; --green-soft: rgba(16,185,129,0.15);
  --red: #ef4444; --red-soft: rgba(239,68,68,0.15);
  --cyan: #06b6d4; --cyan-soft: rgba(6,182,212,0.15);
  --orange: #f97316; --orange-soft: rgba(249,115,22,0.15);
  --text: #e8ecf4; --text-dim: #a0abc4; --text-muted: #606880;
  --aspiration: #f59e0b; --initiative: #2563eb; --kd: #06b6d4; --action: #7c3aed; --activity: #10b981;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--ink); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; color: inherit; background: transparent; border: none; outline: none; }
select option { background: #0f1424; color: #e8ecf4; }
kbd { font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 2px 5px; border-radius: 4px; background: rgba(255,255,255,0.08); border: 1px solid var(--border); }
code { font-family: 'JetBrains Mono', monospace; font-size: 12px; background: rgba(6,182,212,0.1); color: var(--cyan); padding: 1px 6px; border-radius: 4px; }
.hidden { display: none !important; }

/* LOGIN */
.login-screen {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 800px 600px at 70% 30%, rgba(37,99,235,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 20% 80%, rgba(124,58,237,0.08) 0%, transparent 60%),
    var(--ink);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  overflow-y: auto; padding: 40px 20px;
}
.login-card {
  width: 420px; max-width: 100%;
  background: var(--ink-2);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 36px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.4);
}
.login-error {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--red);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 12px;
}
.login-help {
  margin-top: 24px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.7;
}
.login-help strong { color: var(--text); display: block; margin-bottom: 6px; font-size: 12px; }
.login-help div { margin-bottom: 4px; }

/* LAYOUT */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; background: var(--ink-2); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 20px 14px; z-index: 10; }
.main { margin-left: 248px; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 32px; border-bottom: 1px solid var(--border); background: var(--ink); z-index: 5; gap: 12px; }
.topbar-left h1 { font-family: 'DM Serif Display', serif; font-size: 24px; font-weight: 400; line-height: 1.1; }
.page-sub { font-size: 12px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; text-transform: uppercase; margin-top: 4px; display: block; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.search-wrap { position: relative; }
#global-search { width: 380px; padding: 10px 78px 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; transition: border-color .15s, background .15s; text-overflow: ellipsis; }
#global-search:focus { border-color: var(--s1-border); background: var(--surface-2); }
#global-search::placeholder { color: var(--text-muted); }
.search-hint { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); display: flex; gap: 3px; align-items: center; pointer-events: none; opacity: 0.6; }
.search-results { position: absolute; top: calc(100% + 6px); right: 0; width: 480px; max-height: 400px; overflow-y: auto; background: var(--ink-3); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,0.4); z-index: 50; }
.search-results.empty { padding: 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
.search-result-group { padding: 8px 0; border-bottom: 1px solid var(--border); }
.search-result-group:last-child { border-bottom: none; }
.search-result-group-title { padding: 4px 14px; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; }
.search-result { padding: 10px 14px; cursor: pointer; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.search-result:hover { background: var(--surface-2); }
.search-result-context { font-size: 11px; color: var(--text-muted); margin-left: auto; }

.btn-primary { padding: 10px 16px; background: var(--s1); border-radius: 8px; font-size: 13px; font-weight: 500; color: white; transition: background .15s; }
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--text-dim); transition: border-color .15s, color .15s; }
.btn-ghost:hover { color: var(--text); border-color: var(--border-strong); }

/* SIDEBAR */
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 24px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.brand-mark { width: 36px; height: 36px; border-radius: 9px; background: linear-gradient(135deg, var(--s1), var(--s2)); display: flex; align-items: center; justify-content: center; font-family: 'DM Serif Display', serif; font-size: 20px; color: white; }
.brand-name { font-weight: 600; font-size: 15px; letter-spacing: 0.02em; }
.brand-name span { color: var(--s1); }
.brand-sub { font-size: 10px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; text-transform: uppercase; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 13px; color: var(--text-dim); transition: background .15s, color .15s; }
.nav-item:hover { background: var(--surface); color: var(--text); }
.nav-item.active { background: var(--s1-soft); color: white; font-weight: 500; }
.nav-icon { font-size: 16px; width: 18px; text-align: center; opacity: 0.85; }
.sidebar-footer { border-top: 1px solid var(--border); padding-top: 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; }
.user-name { font-size: 13px; font-weight: 500; }
.user-role { font-size: 11px; color: var(--text-muted); }
.version { font-size: 10px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* AVATAR */
.avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: white; flex-shrink: 0; letter-spacing: 0.02em; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { border: 2px solid var(--ink); margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.cc-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 4px; background: var(--surface); font-size: 11px; color: var(--text-dim); border: 1px dashed var(--border); }
.cc-tag::before { content: 'cc'; font-size: 9px; opacity: 0.7; }

/* VIEW */
.view-root { flex: 1; overflow-y: auto; padding: 28px 32px 60px; }
.section-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.section-title { font-family: 'DM Serif Display', serif; font-size: 22px; font-weight: 400; margin-bottom: 16px; }

/* DASHBOARD */
.kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 28px; }
.kpi-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; position: relative; overflow: hidden; transition: border-color .15s; cursor: pointer; }
.kpi-card:hover { border-color: var(--border-strong); }
.kpi-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent, var(--s1)); }
.kpi-card.aspiration { --accent: var(--aspiration); }
.kpi-card.initiative { --accent: var(--initiative); }
.kpi-card.kd { --accent: var(--kd); }
.kpi-card.action { --accent: var(--action); }
.kpi-card.activity { --accent: var(--activity); }
.kpi-label { font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 8px; }
.kpi-num { font-family: 'DM Serif Display', serif; font-size: 36px; line-height: 1; margin-bottom: 6px; }
.kpi-detail { font-size: 11px; color: var(--text-dim); }
.kpi-detail strong { color: var(--text); font-weight: 500; }
.dash-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 16px; margin-bottom: 16px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.panel-title { font-size: 14px; font-weight: 600; }
.panel-action { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.1em; }

.attention-list { display: flex; flex-direction: column; gap: 8px; }
.attention-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.attention-item:hover { border-color: var(--border-strong); background: var(--surface-3); }
.attention-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 14px; flex-shrink: 0; }
.attention-icon.warn { background: var(--gold-soft); color: var(--gold); }
.attention-icon.danger { background: var(--red-soft); color: var(--red); }
.attention-icon.info { background: var(--s1-soft); color: var(--s1); }
.attention-body { flex: 1; min-width: 0; }
.attention-title { font-size: 13px; font-weight: 500; margin-bottom: 2px; }
.attention-meta { font-size: 11px; color: var(--text-muted); }

.feed { display: flex; flex-direction: column; gap: 12px; }
.feed-item { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 8px 4px; cursor: pointer; border-radius: 6px; transition: background .15s; }
.feed-item:hover { background: var(--surface); }
.feed-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.feed-text { font-size: 13px; color: var(--text-dim); }
.feed-text strong { color: var(--text); font-weight: 500; }

.workload-list { display: flex; flex-direction: column; gap: 10px; }
.workload-row { display: grid; grid-template-columns: 140px 1fr 60px; gap: 12px; align-items: center; font-size: 12px; }
.workload-name { display: flex; align-items: center; gap: 8px; }
.workload-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; position: relative; }
.workload-bar-fill { height: 100%; border-radius: 4px; transition: width .3s; }
.workload-num { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--text-dim); }

/* STRATEGY */
.strategy-controls { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.view-toggle { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.view-toggle button { padding: 8px 14px; border-radius: 6px; font-size: 12px; color: var(--text-dim); transition: background .15s, color .15s; }
.view-toggle button.active { background: var(--s1-soft); color: white; }
.filter-group { display: flex; gap: 8px; align-items: center; }
.filter-select { padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 12px; color: var(--text-dim); cursor: pointer; }

.tree-canvas { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; overflow-x: auto; }
.tree-aspiration { margin-bottom: 16px; border-left: 3px solid var(--aspiration); padding-left: 16px; }
.tree-node { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; transition: background .15s; position: relative; }
.tree-node:hover { background: var(--surface-2); }
.tree-children { margin-left: 16px; border-left: 1px solid var(--border); padding-left: 14px; }
.tree-controls { display: flex; gap: 6px; margin-bottom: 12px; }
.tree-controls .btn-ghost { padding: 4px 10px; font-size: 11px; }
.tree-chev { display: inline-flex; width: 16px; height: 18px; align-items: center; justify-content: center; color: var(--text-muted); font-size: 10px; user-select: none; transition: color .15s, transform .15s; flex-shrink: 0; margin-top: 2px; border-radius: 3px; }
.tree-chev:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.tree-chev-spacer { display: inline-block; width: 16px; flex-shrink: 0; }
.child-count { font-family: 'JetBrains Mono', monospace; font-size: 10px; padding: 1px 6px; background: var(--surface-2); color: var(--text-muted); border-radius: 8px; }

.node-type-tag { font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.08em; padding: 2px 6px; border-radius: 3px; text-transform: uppercase; font-weight: 500; margin-right: 6px; flex-shrink: 0; margin-top: 2px; }
.tag-ASP { background: var(--gold-soft); color: var(--gold); }
.tag-INI { background: var(--s1-soft); color: #93c5fd; }
.tag-KD  { background: var(--cyan-soft); color: var(--cyan); }
.tag-ACT { background: var(--s2-soft); color: #c4b5fd; }
.tag-AVT { background: var(--green-soft); color: var(--green); }

.node-title { flex: 1; min-width: 0; }
.node-meta { display: flex; gap: 8px; align-items: center; margin-left: 12px; flex-shrink: 0; }
.status-pill { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; letter-spacing: 0.05em; }
.status-on-track { background: var(--green-soft); color: var(--green); }
.status-at-risk { background: var(--gold-soft); color: var(--gold); }
.status-blocked { background: var(--red-soft); color: var(--red); }
.status-done { background: var(--surface-2); color: var(--text-muted); }
.status-planning { background: var(--s1-soft); color: #93c5fd; }
.cross-link { font-size: 10px; color: var(--cyan); font-family: 'JetBrains Mono', monospace; margin-left: 6px; }
.cross-link::before { content: '⇄ '; }

.circle-canvas { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 0; display: block; min-height: 700px; overflow: hidden; }
.circle-wrap { position: relative; width: 100%; height: 800px; }
.circle-wrap svg { width: 100%; height: 100%; display: block; touch-action: none; user-select: none; }
.circle-node text { fill: var(--text); font-family: 'DM Sans', sans-serif; font-size: 11px; text-anchor: middle; pointer-events: none; }
.circle-node circle { cursor: pointer; transition: stroke-width .15s, opacity .15s; }
.circle-node:hover circle { stroke-width: 3; }
.circle-legend { position: absolute; top: 14px; left: 14px; background: rgba(15, 20, 36, 0.72); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: var(--text-dim); pointer-events: none; backdrop-filter: blur(4px); }
.circle-legend .ldot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: middle; opacity: 0.85; }
.zoom-controls { position: absolute; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 6px; z-index: 5; }
.zoom-controls button { width: 34px; height: 34px; border-radius: 8px; background: rgba(20, 28, 50, 0.85); color: var(--text); border: 1px solid var(--border); cursor: pointer; font-size: 18px; font-weight: 600; line-height: 1; display: flex; align-items: center; justify-content: center; backdrop-filter: blur(4px); transition: background .15s, border-color .15s; }
.zoom-controls button:hover { background: rgba(40, 55, 95, 0.95); border-color: #6e8bff; }
.zoom-hint { position: absolute; bottom: 12px; right: 14px; font-size: 10px; color: var(--text-dim); background: rgba(15, 20, 36, 0.6); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; pointer-events: none; opacity: 0.75; }

.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th { text-align: left; font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; padding: 14px 16px; border-bottom: 1px solid var(--border); background: var(--ink-3); position: sticky; top: 0; }
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--text-dim); vertical-align: middle; }
.data-table tr { cursor: pointer; transition: background .15s; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* DETAIL */
.panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 90; }
.detail-panel { position: fixed; right: 0; top: 0; bottom: 0; width: 640px; max-width: 92vw; background: var(--ink-2); border-left: 1px solid var(--border-strong); z-index: 100; overflow-y: auto; box-shadow: -16px 0 48px rgba(0,0,0,0.4); }
.detail-inner { padding: 28px 32px; }
.detail-close { position: absolute; right: 20px; top: 20px; width: 32px; height: 32px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--text-dim); transition: background .15s; }
.detail-close:hover { background: var(--surface-2); color: var(--text); }
.detail-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.05em; flex-wrap: wrap; }
.detail-breadcrumb a { color: var(--text-dim); cursor: pointer; }
.detail-breadcrumb a:hover { color: white; text-decoration: underline; }
.detail-breadcrumb-sep { opacity: 0.4; }
.detail-title { font-family: 'DM Serif Display', serif; font-size: 24px; line-height: 1.2; margin-bottom: 10px; }
.detail-meta-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.detail-meta-row .meta-block { display: flex; flex-direction: column; gap: 3px; }
.meta-block-label { font-size: 10px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.meta-block-value { font-size: 13px; color: var(--text); }

.detail-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.detail-tab { padding: 10px 14px; font-size: 13px; color: var(--text-dim); border-bottom: 2px solid transparent; transition: color .15s, border-color .15s; white-space: nowrap; }
.detail-tab:hover { color: var(--text); }
.detail-tab.active { color: white; border-bottom-color: var(--s1); }
.detail-tab .count { font-size: 10px; background: var(--surface-2); padding: 1px 6px; border-radius: 8px; margin-left: 5px; color: var(--text-muted); }
.tab-content { display: none; }
.tab-content.active { display: block; }
.section-block { margin-bottom: 24px; }
.section-block h3 { font-size: 12px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.1em; color: var(--text-muted); text-transform: uppercase; margin-bottom: 10px; font-weight: 500; }
.description-text { font-size: 14px; color: var(--text-dim); line-height: 1.7; }

.criteria-list { display: flex; flex-direction: column; gap: 6px; }
.criteria-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; background: var(--surface); border-left: 2px solid var(--cyan); border-radius: 6px; font-size: 13px; color: var(--text-dim); }
.criteria-check { width: 16px; height: 16px; border: 1.5px solid var(--cyan); border-radius: 4px; margin-top: 1px; flex-shrink: 0; cursor: pointer; }
.criteria-check.done { background: var(--cyan); position: relative; }
.criteria-check.done::after { content: '✓'; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--ink); font-size: 11px; font-weight: 700; }

.linked-list { display: flex; flex-direction: column; gap: 6px; }
.linked-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; cursor: pointer; transition: border-color .15s; }
.linked-item:hover { border-color: var(--border-strong); }
.linked-arrow { color: var(--text-muted); font-size: 10px; font-family: 'JetBrains Mono', monospace; }

.comment-filter { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.comment-filter button { padding: 4px 10px; border-radius: 12px; font-size: 11px; background: var(--surface); border: 1px solid var(--border); color: var(--text-dim); }
.comment-filter button.active { background: var(--s1-soft); color: white; border-color: var(--s1-border); }
.comment-tag { font-size: 10px; font-family: 'JetBrains Mono', monospace; letter-spacing: 0.05em; padding: 2px 7px; border-radius: 3px; text-transform: uppercase; }
.tag-discussion { background: var(--s1-soft); color: #93c5fd; }
.tag-task { background: var(--gold-soft); color: var(--gold); }
.tag-working-session { background: var(--s2-soft); color: #c4b5fd; }
.tag-decision { background: var(--green-soft); color: var(--green); }
.tag-question { background: var(--orange-soft); color: var(--orange); }

.comment { display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment-head { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.comment-author { font-size: 13px; font-weight: 500; }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-target { font-size: 11px; font-family: 'JetBrains Mono', monospace; color: var(--cyan); cursor: pointer; }
.comment-target:hover { text-decoration: underline; }
.comment-body { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

.comment-input { margin-top: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.comment-input textarea { width: 100%; resize: vertical; min-height: 60px; font-size: 13px; background: transparent; color: var(--text); }
.comment-input-toolbar { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.comment-input-toolbar select { padding: 4px 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; font-size: 11px; }

/* DOCS */
.docs-tree { display: flex; flex-direction: column; gap: 6px; }
.doc-group { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 10px; }
.doc-group-head { padding: 14px 16px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.doc-group-head:hover { background: var(--surface-2); }
.doc-group-children { border-top: 1px solid var(--border); padding: 6px 0; }
.doc-row { display: grid; grid-template-columns: 30px 1fr auto auto; gap: 10px; align-items: center; padding: 9px 16px; font-size: 13px; cursor: pointer; }
.doc-row:hover { background: var(--surface-2); }
.doc-icon { width: 28px; height: 28px; border-radius: 6px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.doc-name { color: var(--text); }
.doc-context { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.doc-links { display: flex; gap: 4px; align-items: center; font-size: 11px; color: var(--cyan); }

/* WORKLOAD */
.workload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.person-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.person-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.person-name { font-size: 14px; font-weight: 600; }
.person-role { font-size: 11px; color: var(--text-muted); }
.capacity-meter { margin: 12px 0; }
.capacity-track { height: 8px; background: var(--surface-2); border-radius: 4px; position: relative; overflow: hidden; }
.capacity-fill { height: 100%; border-radius: 4px; }
.capacity-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted); margin-top: 4px; font-family: 'JetBrains Mono', monospace; }
.assignment-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.assignment-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; font-size: 12px; cursor: pointer; }
.assignment-row:hover { background: var(--surface-3); }

/* MEETINGS */
.mom-list { display: flex; flex-direction: column; gap: 12px; }
.mom-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; cursor: pointer; transition: border-color .15s; }
.mom-card:hover { border-color: var(--border-strong); }
.mom-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; gap: 12px; }
.mom-title { font-size: 15px; font-weight: 600; }
.mom-date { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.mom-tag { font-size: 10px; padding: 3px 8px; border-radius: 4px; font-family: 'JetBrains Mono', monospace; text-transform: uppercase; }
.mom-summary { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; line-height: 1.6; }
.mom-meta { display: flex; gap: 12px; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.mom-linked { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.mom-link-pill { font-size: 10px; padding: 3px 8px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; color: var(--text-dim); font-family: 'JetBrains Mono', monospace; cursor: pointer; }
.mom-link-pill:hover { border-color: var(--border-strong); }

/* LEARNING */
.learning-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 24px; }
.learn-col { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px; }
.learn-col h2 { font-family: 'DM Serif Display', serif; font-size: 18px; font-weight: 400; margin-bottom: 14px; }
.learn-col.went-well { border-top: 3px solid var(--green); }
.learn-col.even-better { border-top: 3px solid var(--gold); }
.lesson-item { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-dim); line-height: 1.6; }
.lesson-item:last-child { border-bottom: none; }
.lesson-source { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; margin-top: 4px; cursor: pointer; }
.lesson-source:hover { color: var(--cyan); }

/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: var(--ink-2); border: 1px solid var(--border-strong); border-radius: 14px; padding: 28px; width: 540px; max-width: 92vw; max-height: 88vh; overflow-y: auto; }
.modal-title { font-family: 'DM Serif Display', serif; font-size: 22px; margin-bottom: 18px; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 11px; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; letter-spacing: 0.08em; text-transform: uppercase; }
.form-row input, .form-row textarea, .form-row select { padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: 13px; color: var(--text); }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus { border-color: var(--s1-border); }
.form-row textarea { min-height: 80px; resize: vertical; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.multi-select-options { display: flex; flex-wrap: wrap; gap: 6px; }
.opt-chip { padding: 6px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; font-size: 12px; cursor: pointer; }
.opt-chip.selected { background: var(--s1-soft); border-color: var(--s1-border); color: white; }

/* TOAST */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--ink-3); border: 1px solid var(--border-strong); padding: 14px 20px; border-radius: 10px; font-size: 13px; z-index: 300; box-shadow: 0 12px 32px rgba(0,0,0,0.4); max-width: 360px; }
.toast.success { border-left: 3px solid var(--green); }
.toast.warn { border-left: 3px solid var(--gold); }
.toast.error { border-left: 3px solid var(--red); }

.loading { position: fixed; top: 16px; right: 16px; background: var(--ink-3); padding: 8px 14px; border-radius: 20px; font-size: 12px; color: var(--text-dim); z-index: 500; border: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; }

.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--ink-muted); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--mid); }

@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .dash-grid, .learning-grid { grid-template-columns: 1fr; } }
@media (max-width: 800px) { .sidebar { transform: translateX(-100%); transition: transform .2s; } .sidebar.open { transform: translateX(0); } .main { margin-left: 0; } .topbar { padding: 14px 18px; flex-wrap: wrap; gap: 10px; } #global-search { width: 100%; } .view-root { padding: 18px; } .detail-panel { width: 100%; } }
