:root {
  --bg: #0d1117;
  --surface: #161b22;
  --surface-raised: #1c2333;
  --fg: #e6edf3;
  --fg-secondary: #b1bac4;
  --muted: #6e7681;
  --border: #30363d;
  --border-light: #21262d;
  --accent: #58a6ff;
  --accent-soft: rgba(88, 166, 255, 0.12);
  --success: #3fb950;
  --success-soft: rgba(63, 185, 80, 0.12);
  --warning: #d29922;
  --warning-soft: rgba(210, 153, 34, 0.12);
  --danger: #f85149;
  --danger-soft: rgba(248, 81, 73, 0.12);
  --purple: #bc8cff;
  --purple-soft: rgba(188, 140, 255, 0.12);
  --teal: #39d98a;
  --teal-soft: rgba(57, 217, 138, 0.12);
  --orange: #f0883e;
  --orange-soft: rgba(240, 136, 62, 0.12);
  --pink: #f778ba;
  --pink-soft: rgba(247, 120, 186, 0.12);
  --cyan: #56d4dd;
  --cyan-soft: rgba(86, 212, 221, 0.12);
  /* aliases for pages that use --text-secondary naming */
  --text-secondary: #b1bac4;
  --surface-2: #1c2333;
  --font-display: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'IBM Plex Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 8px;
  --radius-lg: 12px;
  --radius-sm: 6px;
  --transition: 150ms ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

.app-shell { display: flex; min-height: 100vh; }

/* SIDEBAR */
.sidebar {
  width: 256px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  position: sticky; top: 0;
  background: var(--surface);
  z-index: 5;
}

.sidebar-brand .logo-icon {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; color: #fff;
  font-family: var(--font-mono);
}

.sidebar-brand h1 {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 600;
  letter-spacing: -0.01em; color: var(--fg);
}

.sidebar-brand .version {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--muted);
  background: var(--bg);
  padding: 2px 6px; border-radius: 4px;
  margin-left: auto;
}

.sidebar-nav { padding: 8px; flex: 1; }

.nav-section-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--muted);
  padding: 16px 8px 6px;
  display: flex; align-items: center; gap: 6px;
}

.nav-section-label .ring-dot {
  width: 6px; height: 6px; border-radius: 50%;
}

.nav-item {
  display: flex; align-items: center;
  gap: 10px; padding: 7px 12px;
  border-radius: var(--radius);
  color: var(--fg-secondary);
  text-decoration: none;
  font-size: 13px; font-weight: 450;
  transition: all var(--transition);
  cursor: pointer; margin-bottom: 1px;
}

.nav-item:hover { background: var(--accent-soft); color: var(--fg); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }

.nav-item .nav-icon {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 13px;
}

.nav-item.active .nav-icon { opacity: 1; }

.nav-item .badge {
  margin-left: auto;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 10px;
  min-width: 18px; text-align: center;
  font-family: var(--font-mono);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
  position: sticky; bottom: 0;
  background: var(--surface);
}

.sidebar-footer .status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success); flex-shrink: 0;
}

.sidebar-footer .status-text {
  font-size: 11px; color: var(--muted);
  font-family: var(--font-mono);
}

/* MAIN */
.main-content { margin-left: 256px; flex: 1; min-width: 0; }

.topbar {
  height: 48px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--surface);
  position: sticky; top: 0; z-index: 50;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }

.breadcrumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted);
  font-family: var(--font-mono);
}

.breadcrumb span { color: var(--fg-secondary); }

.topbar-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 32px; height: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all var(--transition);
  font-size: 14px;
}

.icon-btn:hover {
  background: var(--accent-soft);
  color: var(--fg); border-color: var(--accent);
}

/* SCREENS */
.screen { display: none; padding: 24px; animation: fadeIn 0.2s ease; }
.screen.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.screen-header { margin-bottom: 24px; }
.screen-header h2 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 600;
  letter-spacing: -0.02em; margin-bottom: 4px;
}
.screen-header p { color: var(--muted); font-size: 13px; }
.screen-header .subtitle-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--font-mono); font-size: 11px;
  padding: 2px 8px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  margin-left: 8px; vertical-align: middle;
}

/* STATS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px; margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color var(--transition);
}

.stat-card:hover { border-color: var(--accent); }

.stat-card .stat-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted); margin-bottom: 6px;
  display: flex; align-items: center; gap: 6px;
}

.stat-card .stat-label .dot {
  width: 6px; height: 6px; border-radius: 50%;
}

.stat-card .stat-value {
  font-family: var(--font-mono);
  font-size: 26px; font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-sub {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--muted); margin-top: 2px;
}

/* PANEL */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden; margin-bottom: 16px;
}

.panel-header {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  justify-content: space-between;
}

.panel-header h3 {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
}

.panel-body { padding: 18px; }
.panel-header .panel-actions { display: flex; gap: 6px; }

.chip {
  font-family: var(--font-mono);
  font-size: 11px; padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: transparent; color: var(--fg-secondary);
  cursor: pointer; transition: all var(--transition);
}

.chip:hover, .chip.active {
  background: var(--accent-soft);
  border-color: var(--accent); color: var(--accent);
}

/* GRID */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* TABLE */
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }

.data-table th {
  text-align: left; padding: 8px 12px;
  font-weight: 600; font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
}

.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--accent-soft); }

/* PILLS */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 12px;
  font-size: 11px; font-weight: 500;
  font-family: var(--font-mono);
}

.pill.success { background: var(--success-soft); color: var(--success); }
.pill.warning { background: var(--warning-soft); color: var(--warning); }
.pill.danger { background: var(--danger-soft); color: var(--danger); }
.pill.info { background: var(--accent-soft); color: var(--accent); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.teal { background: var(--teal-soft); color: var(--teal); }
.pill.orange { background: var(--orange-soft); color: var(--orange); }
.pill.pink { background: var(--pink-soft); color: var(--pink); }
.pill.cyan { background: var(--cyan-soft); color: var(--cyan); }

/* ACTIVITY */
.activity-list { list-style: none; }
.activity-item {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border-light); font-size: 12px;
}
.activity-item:last-child { border-bottom: none; }

.activity-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 5px; flex-shrink: 0;
}

.activity-content { flex: 1; }
.activity-content .activity-title { color: var(--fg); font-weight: 500; margin-bottom: 2px; }
.activity-content .activity-time { color: var(--muted); font-family: var(--font-mono); font-size: 11px; }

/* PROGRESS BAR */
.progress-bar {
  height: 6px; background: var(--border);
  border-radius: 3px; overflow: hidden;
}

.progress-fill {
  height: 100%; border-radius: 3px;
  transition: width 0.5s ease;
}

/* MINI BARS */
.mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; }
.mini-bar {
  width: 6px; border-radius: 2px;
  background: var(--accent); opacity: 0.6;
  transition: opacity var(--transition);
}
.mini-bar:hover { opacity: 1; }

/* USAGE RING */
.usage-ring-container {
  display: flex; align-items: center;
  justify-content: center; position: relative;
}

.usage-ring-label { position: absolute; text-align: center; }
.usage-ring-label .ring-value {
  font-family: var(--font-mono); font-size: 20px; font-weight: 700;
}
.usage-ring-label .ring-text {
  font-size: 9px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* RING MODEL BADGE */
.ring-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius-lg);
  border: 1px solid var(--border); background: var(--surface);
  font-size: 12px;
}

.ring-badge .ring-num {
  font-family: var(--font-mono);
  font-size: 20px; font-weight: 800;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.ring-badge .ring-info { line-height: 1.3; }
.ring-badge .ring-info .ring-title { font-weight: 600; font-size: 12px; }
.ring-badge .ring-info .ring-desc { font-size: 10px; color: var(--muted); }

/* COMMAND CARD */
.cmd-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px; transition: all var(--transition);
  cursor: default;
}

.cmd-card:hover { border-color: var(--accent); background: var(--surface-raised); }

.cmd-card .cmd-name {
  font-family: var(--font-mono); font-size: 15px;
  font-weight: 700; color: var(--accent); margin-bottom: 6px;
}

.cmd-card .cmd-desc { font-size: 12px; color: var(--fg-secondary); line-height: 1.6; }

.cmd-card .cmd-tags { margin-top: 10px; display: flex; gap: 4px; flex-wrap: wrap; }

/* SKILL CARD */
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px; transition: all var(--transition);
}

.skill-card:hover { border-color: var(--purple); }

.skill-card .skill-name {
  font-family: var(--font-mono); font-size: 13px;
  font-weight: 600; color: var(--fg); margin-bottom: 4px;
}

.skill-card .skill-trigger {
  font-family: var(--font-mono); font-size: 10px;
  color: var(--muted); margin-bottom: 6px;
}

.skill-card .skill-desc { font-size: 11px; color: var(--fg-secondary); line-height: 1.5; }

/* PIPELINE VIS */
.pipeline-flow {
  display: flex; align-items: center;
  gap: 0; overflow-x: auto;
  padding: 20px 0;
}

.pipeline-stage {
  display: flex; flex-direction: column;
  align-items: center; min-width: 100px;
  text-align: center; position: relative;
}

.pipeline-stage .stage-icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; margin-bottom: 8px;
  border: 2px solid var(--border);
  background: var(--surface);
  transition: all var(--transition);
}

.pipeline-stage.completed .stage-icon {
  border-color: var(--success); background: var(--success-soft);
}

.pipeline-stage.running .stage-icon {
  border-color: var(--accent); background: var(--accent-soft);
  animation: pulse 2s infinite;
}

.pipeline-stage.pending .stage-icon { opacity: 0.5; }

.pipeline-stage .stage-label {
  font-family: var(--font-mono); font-size: 11px;
  font-weight: 600; color: var(--fg-secondary);
}

.pipeline-stage .stage-sub {
  font-size: 10px; color: var(--muted); margin-top: 2px;
}

.pipeline-arrow {
  width: 40px; height: 2px;
  background: var(--border); margin: 0 4px;
  flex-shrink: 0; position: relative;
  top: -12px;
}

.pipeline-arrow.active { background: var(--accent); }
.pipeline-arrow.done { background: var(--success); }

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.3); }
  50% { box-shadow: 0 0 0 8px rgba(88, 166, 255, 0); }
}

/* AGENT CARD */
.agent-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.agent-card .agent-name {
  font-family: var(--font-display); font-size: 14px;
  font-weight: 600; margin-bottom: 4px;
}

.agent-card .agent-role {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--accent); margin-bottom: 6px;
}

.agent-card .agent-desc {
  font-size: 12px; color: var(--fg-secondary); line-height: 1.5;
}

/* INTEGRATION CARD */
.integration-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex; gap: 14px; align-items: flex-start;
}

.integration-card .int-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

.integration-card .int-info { flex: 1; }
.integration-card .int-name { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.integration-card .int-desc { font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.integration-card .int-assets { display: flex; gap: 4px; flex-wrap: wrap; }

/* HOOK ROW */
.hook-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}

.hook-row:last-child { border-bottom: none; }

.hook-row .hook-event {
  font-family: var(--font-mono); font-size: 12px;
  font-weight: 600; width: 140px; flex-shrink: 0;
}

.hook-row .hook-cmd {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--fg-secondary); flex: 1;
}

.hook-row .hook-desc {
  font-size: 11px; color: var(--muted); width: 200px; flex-shrink: 0;
}

/* SETTINGS */
.settings-group { margin-bottom: 24px; }
.settings-group-title {
  font-family: var(--font-display); font-size: 16px;
  font-weight: 600; margin-bottom: 12px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

.setting-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}

.setting-row:last-child { border-bottom: none; }
.setting-info { flex: 1; }
.setting-info .setting-name { font-weight: 500; font-size: 13px; margin-bottom: 2px; }
.setting-info .setting-desc { font-size: 11px; color: var(--muted); }
.setting-control { flex-shrink: 0; margin-left: 24px; }

.toggle {
  position: relative; width: 40px; height: 22px;
  border-radius: 11px; background: var(--border);
  cursor: pointer; transition: background var(--transition);
}

.toggle.on { background: var(--accent); }

.toggle::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; top: 3px; left: 3px;
  transition: transform var(--transition);
}

.toggle.on::after { transform: translateX(18px); }

.input-field {
  font-family: var(--font-mono); font-size: 12px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg); color: var(--fg);
  width: 200px; transition: border-color var(--transition);
}

.input-field:focus { outline: none; border-color: var(--accent); }

.select-field {
  font-family: var(--font-mono); font-size: 12px;
  padding: 6px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg); color: var(--fg); cursor: pointer;
}

.select-field:focus { outline: none; border-color: var(--accent); }

.btn {
  font-family: var(--font-display); font-size: 12px;
  font-weight: 500; padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent; color: var(--fg-secondary);
  cursor: pointer; transition: all var(--transition);
}

.btn:hover { border-color: var(--fg-secondary); color: var(--fg); }

.btn-primary {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

.btn-primary:hover { background: #79b8ff; border-color: #79b8ff; }

/* MEMORY NODE LIST */
.mem-node {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
}

.mem-node:last-child { border-bottom: none; }

.mem-node .node-type {
  font-family: var(--font-mono); font-size: 10px;
  padding: 2px 8px; border-radius: 10px;
  font-weight: 600; min-width: 70px; text-align: center;
}

.mem-node .node-title { font-weight: 500; flex: 1; }
.mem-node .node-importance { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* GRAPH */
.graph-container {
  background: var(--bg); border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden; position: relative;
}

.graph-canvas {
  width: 100%; height: 500px;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}

.graph-node {
  position: absolute; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-mono);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  z-index: 2;
}

.graph-node:hover { transform: scale(1.15); z-index: 3; }

.graph-node .node-label {
  position: absolute; bottom: -18px;
  white-space: nowrap; font-size: 10px;
  color: var(--fg-secondary); font-weight: 400;
}

.graph-svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 1;
}

.graph-controls {
  position: absolute; top: 12px; right: 12px;
  display: flex; gap: 6px; z-index: 10;
}

.graph-legend {
  display: flex; gap: 16px; padding: 14px 20px;
  border-top: 1px solid var(--border);
  font-size: 11px; color: var(--muted);
}

.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }

/* RESPONSIVE */
.mobile-header {
  display: none; height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  align-items: center; padding: 0 16px;
  justify-content: space-between;
  position: sticky; top: 0; z-index: 200;
}

.mobile-header .hamburger {
  width: 36px; height: 36px;
  background: transparent; border: none;
  color: var(--fg); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.5); z-index: 99;
}

@media (max-width: 768px) {
  .mobile-header { display: flex; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .topbar { display: none; }
  .screen { padding: 16px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 20px; }
  .grid-2, .grid-3, .grid-2-1, .grid-4 { grid-template-columns: 1fr; }
  .graph-canvas { height: 350px; }
  .setting-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .setting-control { margin-left: 0; }
  .pipeline-flow { overflow-x: auto; }
  .hook-row { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hook-row .hook-event, .hook-row .hook-desc { width: auto; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .screen-header h2 { font-size: 20px; }
}

/* SEARCH BAR */
.search-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px 12px;
  transition: border-color var(--transition);
}

.search-bar:focus-within { border-color: var(--accent); }

.search-bar input {
  background: transparent; border: none; outline: none;
  color: var(--fg); font-size: 12px;
  font-family: var(--font-mono); width: 180px;
}

.search-bar input::placeholder { color: var(--muted); }
.search-bar .search-icon { color: var(--muted); font-size: 14px; }

/* SHARED PAGE LAYOUT (Memory, Integrations, Settings, etc.) */
.page {
  padding: 24px;
  max-width: 1100px;
}

.page-header {
  margin-bottom: 24px;
}

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 4px;
}

.page-header p {
  font-size: 13px;
  color: var(--fg-secondary);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  background: var(--surface-raised);
  color: var(--fg-secondary);
  border: 1px solid var(--border);
}

.badge-outline {
  background: transparent;
}

.badge-wip {
  background: var(--warning-soft);
  color: var(--warning);
  border-color: transparent;
}

.loading {
  padding: 32px;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.error-msg {
  padding: 16px;
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius);
  font-size: 13px;
}
