/* ==========================================================================
   LINEX OS — Executive Unified Cockpit Design System
   Aesthetic Thesis: Obsidian Executive Cockpit & High-Craft Dark Architecture
   Typography: Outfit (Headings), Plus Jakarta Sans (Body), JetBrains Mono (Telemetry)
   ========================================================================== */

:root {
  --bg-canvas: #06080d;
  --bg-sidebar: #090c14;
  --bg-header: rgba(9, 12, 20, 0.85);
  --bg-card: rgba(16, 22, 38, 0.75);
  --bg-card-hover: rgba(22, 30, 52, 0.9);
  --bg-input: rgba(10, 14, 25, 0.8);
  
  --border-hairline: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-accent: rgba(6, 182, 212, 0.4);
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-faint: #475569;
  
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-indigo: #6366f1;
  --accent-rose: #f43f5e;
  --accent-purple: #a855f7;
  --accent-gold: #eab308;
  
  --sidebar-width: 270px;
  --header-height: 56px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.dark-theme {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Base Cockpit Layout */
.cockpit-root {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: radial-gradient(circle at 10% 10%, rgba(14, 25, 45, 0.4), transparent 60%),
              radial-gradient(circle at 90% 90%, rgba(99, 102, 241, 0.05), transparent 50%),
              var(--bg-canvas);
}

/* ==========================================================================
   SIDEBAR EXECUTIVA
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  height: 100%;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 50;
  user-select: none;
}

.brand-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-hairline);
}

.brand-emblem {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.emblem-glyph {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 19px;
  color: #fff;
  line-height: 1;
}

.brand-text {
  flex: 1;
  min-width: 0;
}

.brand-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
}

.brand-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.25);
  padding: 2px 6px;
  border-radius: 9999px;
}

/* Sidebar Nav */
.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}

.nav-category {
  padding: 12px 10px 4px 10px;
}

.nav-category span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-tab.active {
  background: linear-gradient(90deg, rgba(6, 182, 212, 0.14), rgba(99, 102, 241, 0.06));
  border-color: rgba(6, 182, 212, 0.35);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(6, 182, 212, 0.12);
}

.nav-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: inherit;
}

.nav-icon-box svg {
  width: 16px;
  height: 16px;
}

.nav-tab-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.nav-title {
  font-size: 13px;
  line-height: 1.2;
}

.nav-desc {
  font-size: 10.5px;
  color: var(--text-muted);
}

.nav-tab.active .nav-desc {
  color: rgba(255, 255, 255, 0.65);
}

.badge-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  letter-spacing: 0.02em;
}

.tag-emerald { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.tag-cyan    { background: rgba(6, 182, 212, 0.15);  color: var(--accent-cyan); }
.tag-indigo  { background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); }
.tag-purple  { background: rgba(168, 85, 247, 0.15); color: var(--accent-purple); }

.badge-counter {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  background: var(--accent-amber);
  color: #000;
  padding: 1px 7px;
  border-radius: 9999px;
}

/* Sidebar Footer & Telemetry */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-hairline);
  background: rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.telemetry-card {
  background: rgba(12, 17, 30, 0.7);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.telemetry-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.telemetry-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-emerald);
  letter-spacing: 0.04em;
}

.telemetry-stats {
  display: flex;
  justify-content: space-between;
}

.telemetry-stat {
  display: flex;
  flex-direction: column;
}

.stat-name {
  font-size: 10px;
  color: var(--text-muted);
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  color: #fff;
}

.telemetry-bar-bg {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 9999px;
  overflow: hidden;
}

.telemetry-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-emerald), var(--accent-cyan));
  border-radius: 9999px;
}

.ceo-profile-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-indigo));
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-face {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #090e17;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
}

.ceo-details {
  flex: 1;
  min-width: 0;
}

.ceo-name {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
}

.ceo-title {
  display: block;
  font-size: 10.5px;
  color: var(--accent-cyan);
}

.btn-profile-opt {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-profile-opt:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.btn-profile-opt svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   VIEWPORT PRINCIPAL DO COCKPIT
   ========================================================================== */
.cockpit-viewport {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--bg-canvas);
}

/* Header & Segmented Bar */
.cockpit-header {
  height: var(--header-height);
  padding: 0 16px;
  background: var(--bg-header);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 14px;
}

.station-segmented-control {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.45);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
}

.station-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.station-pill:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.station-pill.active {
  color: #fff;
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(6, 182, 212, 0.35);
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(6, 182, 212, 0.15);
}

.station-pill svg {
  width: 14px;
  height: 14px;
}

.header-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.connection-status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 5px var(--accent-emerald);
}

.status-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.control-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: var(--border-hover);
}

.control-btn svg {
  width: 15px;
  height: 15px;
}

/* ==========================================================================
   ÁREA DE ESTÁGIOS / VISÕES (TABBED STAGE)
   ========================================================================== */
.views-stage {
  flex: 1;
  width: 100%;
  height: calc(100vh - var(--header-height));
  position: relative;
  overflow: hidden;
}

.station-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
  overflow: hidden;
}

.station-view.active {
  display: flex;
  flex-direction: column;
}

.embedded-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #080c14;
}

/* Escritório Container */
.office-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a14;
}

.office-floating-hud {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(10, 14, 25, 0.88);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-hairline);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

.hud-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #fff;
}

.chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px var(--accent-emerald);
}

.hud-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent-cyan);
}

/* ==========================================================================
   CENTRO DE CONTROLE & GOVERNANÇA (CTRL.AI STYLE)
   ========================================================================== */
.ctrl-layout {
  display: grid;
  grid-template-columns: 290px 1fr 360px;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 20%, rgba(14, 25, 45, 0.5), transparent 70%), var(--bg-canvas);
}

.ctrl-sidebar-panel {
  padding: 20px;
  border-right: 1px solid var(--border-hairline);
  background: rgba(8, 12, 20, 0.4);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s ease;
}

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

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-card-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-card-number {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.stat-card-caption {
  font-size: 11px;
  color: var(--text-faint);
}

.card-alert {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.05);
}

.text-amber { color: var(--accent-amber); }
.icon-emerald { color: var(--accent-emerald); width: 16px; height: 16px; }
.icon-cyan    { color: var(--accent-cyan);    width: 16px; height: 16px; }
.icon-amber   { color: var(--accent-amber);   width: 16px; height: 16px; }

.integration-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.integration-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.int-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.int-dot.green { background: var(--accent-emerald); }

/* Centro: Canvas de Agentes */
.ctrl-center-canvas {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.canvas-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 14px;
}

.canvas-title {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.canvas-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.canvas-legend {
  display: flex;
  gap: 12px;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}

.legend-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-color.gold  { background: var(--accent-gold); }
.legend-color.blue  { background: var(--accent-cyan); }
.legend-color.green { background: var(--accent-emerald); }

/* Árvore de Agentes (Topology Grid) */
.agent-tree-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.tree-tier {
  width: 100%;
  max-width: 620px;
}

.tree-node {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25);
}

.tree-node:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.human-node {
  border-color: rgba(6, 182, 212, 0.4);
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(99, 102, 241, 0.04));
}

.manager-node {
  border-color: rgba(234, 179, 8, 0.35);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.08), rgba(245, 158, 11, 0.03));
}

.node-avatar-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.node-avatar-box.crown {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.node-avatar-box.gold {
  background: rgba(234, 179, 8, 0.15);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.node-main-content {
  flex: 1;
  min-width: 0;
}

.node-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.node-title-row strong {
  font-size: 14px;
  color: #fff;
  font-weight: 600;
}

.node-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.35;
}

.pill-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 9999px;
}

.human-badge {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.tier-expert {
  background: rgba(234, 179, 8, 0.15);
  color: var(--accent-gold);
  border: 1px solid rgba(234, 179, 8, 0.3);
}

.pulse-status-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  letter-spacing: 0.04em;
}

.pulse-status-badge.online {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.connector-line-v {
  width: 2px;
  height: 16px;
  background: linear-gradient(to bottom, rgba(6, 182, 212, 0.4), rgba(234, 179, 8, 0.4));
}

/* Switch Toggle (ShadCN style) */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-toggle .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 9999px;
}

.switch-toggle .slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
}

.switch-toggle input:checked + .slider {
  background: var(--accent-cyan);
}

.switch-toggle input:checked + .slider:before {
  transform: translateX(16px);
}

.switch-toggle.sm {
  width: 30px;
  height: 17px;
}

.switch-toggle.sm .slider:before {
  height: 11px;
  width: 11px;
}

.switch-toggle.sm input:checked + .slider:before {
  transform: translateX(13px);
}

/* Grid de Subagentes */
.tree-subagents-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 620px;
}

.subagent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s ease;
}

.subagent-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.subagent-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sub-avatar-box {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.sub-avatar-box.blue    { background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.25); }
.sub-avatar-box.emerald { background: rgba(16, 185, 129, 0.15); border: 1px solid rgba(16, 185, 129, 0.25); }
.sub-avatar-box.rose    { background: rgba(244, 63, 94, 0.15);  border: 1px solid rgba(244, 63, 94, 0.25); }
.sub-avatar-box.cyan    { background: rgba(6, 182, 212, 0.15);  border: 1px solid rgba(6, 182, 212, 0.25); }

.sub-meta {
  flex: 1;
  min-width: 0;
}

.sub-meta strong {
  display: block;
  font-size: 13px;
  color: #fff;
}

.sub-meta span {
  display: block;
  font-size: 10.5px;
  color: var(--text-muted);
}

.sub-details {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sub-model {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--accent-cyan);
}

.sub-task {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.35;
}

/* Painel de Aprovações (Gatekeeper) */
.ctrl-approvals-panel {
  padding: 20px;
  border-left: 1px solid var(--border-hairline);
  background: rgba(8, 12, 20, 0.4);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inbox-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  background: rgba(245, 158, 11, 0.18);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 7px;
  border-radius: 9999px;
  font-weight: 700;
}

.inbox-subtext {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
}

.approvals-scroll-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ShadCN Card Composition for Approvals */
.approval-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-left: 3px solid var(--accent-amber);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.approval-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
}

.approval-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.approval-card-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
}

.approval-card-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.approval-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.approval-card-meta {
  font-size: 11px;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  display: flex;
  justify-content: space-between;
}

.approval-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.btn-approve {
  flex: 1;
  background: var(--accent-emerald);
  color: #000;
  font-weight: 700;
  border: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn-approve:hover {
  filter: brightness(1.1);
}

.btn-reject {
  background: rgba(244, 63, 94, 0.12);
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  cursor: pointer;
}

.btn-reject:hover {
  background: rgba(244, 63, 94, 0.2);
}

/* ==========================================================================
   JORNAL & KNOWLEDGE VAULT LAYOUT
   ========================================================================== */
.vault-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  height: 100%;
  overflow: hidden;
}

.vault-column {
  height: 100%;
  overflow: hidden;
}

.column-card {
  background: var(--bg-card);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-hairline);
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.col-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.col-title-group svg {
  width: 22px;
  height: 22px;
}

.col-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.col-subtitle {
  font-size: 11.5px;
  color: var(--text-muted);
}

.btn-refresh-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-hairline);
  color: var(--text-secondary);
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.btn-refresh-sm:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-refresh-sm svg {
  width: 14px;
  height: 14px;
}

.markdown-article-body {
  flex: 1;
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  padding-right: 6px;
}

.markdown-article-body h1, .markdown-article-body h2, .markdown-article-body h3 {
  color: #fff;
  margin: 14px 0 8px 0;
  font-family: 'Outfit', sans-serif;
}

.markdown-article-body p {
  margin-bottom: 10px;
}

.markdown-article-body ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

.markdown-article-body li {
  margin-bottom: 4px;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.search-input-wrapper input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 10px 14px 10px 36px;
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}

.search-input-wrapper input:focus {
  border-color: var(--accent-cyan);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.btn-search-action {
  background: rgba(6, 182, 212, 0.14);
  border: 1px solid rgba(6, 182, 212, 0.3);
  color: var(--accent-cyan);
  font-weight: 600;
  padding: 0 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 12.5px;
  transition: all 0.15s ease;
}

.btn-search-action:hover {
  background: rgba(6, 182, 212, 0.25);
  color: #fff;
}

.memory-results-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 6px;
}

.empty-search-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: var(--text-faint);
  gap: 8px;
  font-size: 12px;
}

.empty-icon {
  width: 24px;
  height: 24px;
  opacity: 0.5;
}

.memory-item-card {
  background: rgba(8, 12, 22, 0.6);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.memory-item-meta {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  color: var(--accent-cyan);
}

.memory-item-content {
  font-size: 12.5px;
  color: var(--text-primary);
  line-height: 1.45;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border-top-color: var(--accent-cyan);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}
