/* ========================================================
   BrainCoach Unified Cockpit — Premium Glassmorphic Stylesheet
   Typography: Plus Jakarta Sans, JetBrains Mono
   Aesthetics: Deep Space Slate, Glow Accents, Micro-interactions
   ======================================================== */

:root {
  --bg-main: #070a12;
  --bg-surface: #0e1526;
  --bg-card: rgba(18, 27, 49, 0.72);
  --bg-card-hover: rgba(28, 41, 71, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(6, 182, 212, 0.45);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --accent-cyan: #06b6d4;
  --accent-cyan-glow: rgba(6, 182, 212, 0.25);
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-amber: #f59e0b;
  --accent-amber-glow: rgba(245, 158, 11, 0.25);
  --accent-purple: #a855f7;
  --accent-purple-glow: rgba(168, 85, 247, 0.25);
  --accent-gold: #fbbf24;
  --accent-red: #ef4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body.dark-theme {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(168, 85, 247, 0.08) 0px, transparent 50%),
    radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.06) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.cockpit-container {
  display: flex;
  flex-direction: column;
  max-width: 1720px;
  margin: 0 auto;
  padding: 16px 24px 40px;
}

/* ----------------------------------------------------
   TOP BAR & BRAND
   ---------------------------------------------------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-orb {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(168, 85, 247, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
}

.brain-icon {
  font-size: 22px;
}

.pulse-ring {
  position: absolute;
  inset: -3px;
  border-radius: 14px;
  border: 1px solid var(--accent-cyan);
  opacity: 0.4;
  animation: pulseGlow 2.5s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.98); opacity: 0.6; }
  50% { transform: scale(1.06); opacity: 0.1; }
  100% { transform: scale(0.98); opacity: 0.6; }
}

.brand-text .title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-text h1 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #ffffff, #cbd5e1);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-os {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  letter-spacing: 0.04em;
  -webkit-text-fill-color: var(--accent-cyan);
}

.system-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

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

.subtitle {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 500;
  margin-top: 1px;
}

/* Quick KPI Ribbon */
.top-kpi-ribbon {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.kpi-mini {
  display: flex;
  flex-direction: column;
  padding: 6px 14px;
  background: rgba(14, 21, 38, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.kpi-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.kpi-value {
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.text-emerald { color: var(--accent-emerald); }
.text-cyan { color: var(--accent-cyan); }
.text-gold { color: var(--accent-gold); }
.text-purple { color: var(--accent-purple); }

.topbar-actions .btn-refresh {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 12px;
  transition: var(--transition);
}

.topbar-actions .btn-refresh:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* ----------------------------------------------------
   NAVIGATION TABS
   ---------------------------------------------------- */
.cockpit-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(14, 21, 38, 0.5);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  overflow-x: auto;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

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

.nav-tab.active {
  background: rgba(6, 182, 212, 0.14);
  color: #fff;
  border: 1px solid rgba(6, 182, 212, 0.35);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.12);
}

.tab-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.nav-tab.active .tab-badge {
  background: rgba(6, 182, 212, 0.25);
  color: #fff;
}

/* ----------------------------------------------------
   TAB CONTENT
   ---------------------------------------------------- */
.tab-content {
  display: none;
  animation: fadeIn 0.25s ease-in-out;
}

.tab-content.active {
  display: block;
}

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

/* ----------------------------------------------------
   FILTER BAR
   ---------------------------------------------------- */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  flex: 1;
  max-width: 440px;
  min-width: 260px;
}

.search-box input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: var(--font-main);
  font-size: 13px;
  width: 100%;
  outline: none;
}

.search-box input::placeholder {
  color: var(--text-dim);
}

.filter-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.chip.active {
  background: rgba(6, 182, 212, 0.18);
  border-color: rgba(6, 182, 212, 0.4);
  color: #fff;
}

/* ----------------------------------------------------
   KANBAN BOARD (5 COLUMNS)
   ---------------------------------------------------- */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 20px;
}

.kanban-col {
  background: rgba(14, 21, 38, 0.55);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  min-width: 290px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
}

.border-cyan { border-bottom-color: var(--accent-cyan); }
.border-amber { border-bottom-color: var(--accent-amber); }
.border-emerald { border-bottom-color: var(--accent-emerald); }
.border-purple { border-bottom-color: var(--accent-purple); }
.border-gold { border-bottom-color: var(--accent-gold); }

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

.col-title h3 {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.stage-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.dot-cyan { background: var(--accent-cyan); box-shadow: 0 0 8px var(--accent-cyan); }
.dot-amber { background: var(--accent-amber); box-shadow: 0 0 8px var(--accent-amber); }
.dot-emerald { background: var(--accent-emerald); box-shadow: 0 0 8px var(--accent-emerald); }
.dot-purple { background: var(--accent-purple); box-shadow: 0 0 8px var(--accent-purple); }
.dot-gold { background: var(--accent-gold); box-shadow: 0 0 8px var(--accent-gold); }

.col-count {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.col-hint {
  font-size: 11px;
  color: var(--text-dim);
  font-style: italic;
  margin-top: -4px;
}

.cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

/* Kanban Lead Card */
.lead-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.lead-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lead-card.urgent {
  border-left: 3px solid var(--accent-amber);
}

.lead-card.paid {
  border-left: 3px solid var(--accent-emerald);
}

.lead-card.enrolled {
  border-left: 3px solid var(--accent-gold);
}

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

.lead-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.lead-child {
  font-size: 12px;
  color: var(--accent-cyan);
  font-weight: 600;
  margin-top: 1px;
}

.amount-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  white-space: nowrap;
}

.card-notes {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-dim);
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.time-silent {
  display: flex;
  align-items: center;
  gap: 4px;
}

.time-silent.alert {
  color: var(--accent-amber);
  font-weight: 600;
}

.card-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.btn-card {
  flex: 1;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-wa {
  background: rgba(37, 211, 102, 0.15);
  color: #25d366;
  border: 1px solid rgba(37, 211, 102, 0.3);
}

.btn-wa:hover {
  background: rgba(37, 211, 102, 0.25);
  transform: translateY(-1px);
}

.btn-next {
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  border: 1px solid var(--border-subtle);
}

.btn-next:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* ----------------------------------------------------
   MARKETING & KPI CARDS
   ---------------------------------------------------- */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.card-glass {
  background: var(--bg-card);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.kpi-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

.kpi-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.badge-spend { background: rgba(255, 255, 255, 0.08); color: #cbd5e1; }
.badge-cpl { background: rgba(6, 182, 212, 0.15); color: var(--accent-cyan); }
.badge-revenue { background: rgba(251, 191, 36, 0.15); color: var(--accent-gold); }
.badge-roas { background: rgba(16, 185, 129, 0.2); color: var(--accent-emerald); }

.kpi-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.kpi-number {
  font-size: 26px;
  font-weight: 800;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}

.kpi-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.kpi-footer {
  font-size: 11px;
}

.highlight-card {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.08);
}

/* Agent Insight Banner */
.agent-insight-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(168, 85, 247, 0.08));
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 24px;
}

.curator-banner {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(251, 191, 36, 0.08));
  border-color: rgba(168, 85, 247, 0.25);
}

.agent-avatar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.avatar-icon {
  font-size: 28px;
  background: rgba(255, 255, 255, 0.06);
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
}

.agent-role {
  font-size: 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}

.curator-banner .agent-role {
  color: var(--accent-purple);
}

.agent-speech-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.agent-speech h4 {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.agent-speech .timestamp {
  font-size: 11px;
  color: var(--text-dim);
}

.agent-speech p {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Creatives Table */
.section-card {
  margin-bottom: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.section-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}

.badge-source {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(6, 182, 212, 0.25);
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 14px;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
}

.data-table td {
  padding: 14px;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.creative-title {
  font-weight: 700;
  color: #fff;
}

.creative-sub {
  font-size: 11px;
  color: var(--text-dim);
}

.tag-decision {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 6px;
}

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

.tag-hold {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.tag-stop {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ----------------------------------------------------
   LMS STUDENTS CARDS
   ---------------------------------------------------- */
.students-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.student-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  transition: var(--transition);
}

.student-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(168, 85, 247, 0.3);
  transform: translateY(-2px);
}

.student-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.student-title h4 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.student-parent {
  font-size: 12px;
  color: var(--text-muted);
}

.course-badge {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(168, 85, 247, 0.15);
  color: var(--accent-purple);
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Progress bar */
.progress-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
  border-radius: 10px;
  transition: width 0.6s ease;
}

.trainer-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.stat-item .stat-label {
  font-size: 10px;
  color: var(--text-dim);
  text-transform: uppercase;
}

.stat-item .stat-val {
  font-size: 13px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #fff;
}

.student-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

/* ----------------------------------------------------
   AGENTS TAB & CARDS
   ---------------------------------------------------- */
.agents-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}

.agent-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.agent-id-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 3px 8px;
  border-radius: 6px;
}

.status-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-emerald);
}

.agent-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.agent-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.45;
}

.agent-meta {
  background: rgba(0, 0, 0, 0.25);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-dim);
}

.meta-row {
  display: flex;
  justify-content: space-between;
}

.meta-row code {
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.agent-stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 6px;
}

.stat-num {
  font-size: 20px;
  font-family: var(--font-mono);
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 11px;
  color: var(--text-dim);
}

/* Event Stream */
.event-stream {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stream-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-cyan);
  font-size: 12px;
}

.stream-item.payment { border-left-color: var(--accent-emerald); }
.stream-item.hot { border-left-color: var(--accent-amber); }
.stream-item.lms { border-left-color: var(--accent-purple); }

.stream-time {
  font-family: var(--font-mono);
  color: var(--text-dim);
  font-size: 11px;
  white-space: nowrap;
}

.stream-text {
  color: #cbd5e1;
  flex: 1;
}

.stream-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

/* ----------------------------------------------------
   MODAL
   ---------------------------------------------------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
}

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

.modal-title-box h3 {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.modal-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: #fff; }

.modal-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  color: #cbd5e1;
}

.modal-section-title {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 6px;
}

.modal-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: var(--radius-sm);
}

.modal-history-box {
  background: rgba(0, 0, 0, 0.35);
  padding: 12px;
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
}

.chat-bubble {
  padding: 8px 12px;
  border-radius: 10px;
  max-width: 85%;
  line-height: 1.4;
}

.chat-bubble.coach {
  background: rgba(6, 182, 212, 0.15);
  border: 1px solid rgba(6, 182, 212, 0.3);
  align-self: flex-end;
  color: #e2e8f0;
}

.chat-bubble.lead {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
  color: #cbd5e1;
}

.modal-footer {
  padding: 16px 22px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ----------------------------------------------------
   RESPONSIVE DESIGN (TELEGRAM MINI APP / MOBILE)
   ---------------------------------------------------- */
@media (max-width: 1200px) {
  .kanban-board {
    grid-template-columns: repeat(5, 280px);
  }
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .students-grid, .agents-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .cockpit-container {
    padding: 10px 12px 24px;
  }
  .topbar {
    padding: 12px;
  }
  .top-kpi-ribbon {
    width: 100%;
    justify-content: space-between;
  }
  .kpi-mini {
    padding: 4px 8px;
  }
  .kpi-value {
    font-size: 13px;
  }
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .kanban-col {
    min-width: 260px;
  }
}
