/* ============================================================
   TBD Control Panel — Design System
   Brand: Orbitron / Cyberpunk / Red + Cyan
   Mirrors trainingsbydesign app.css tokens exactly
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Instrument+Sans:wght@400;500;600;700&display=swap');

/* ── 1. DESIGN TOKENS ───────────────────────────────────────── */
:root {
  --bg:         #0A0C10;
  --surface:    #111318;
  --surface2:   #181B22;
  --surface3:   #1E2130;
  --border:     #2A2E3F;
  --border-glow:#3A3F55;
  --border2:    #3A3F55;

  --red:        #FF2A40;
  --red-soft:   #FF4F6B;
  --red-glow:   rgba(255, 42, 64, 0.25);
  --cyan:       #00F0FF;
  --cyan-soft:  #66F7FF;
  --cyan-glow:  rgba(0, 240, 255, 0.2);
  --cyan-dim:   rgba(0, 240, 255, 0.08);

  --accent:     #00F0FF;
  --accent2:    #FF2A40;
  --fg:         #E8EAF0;

  --success:    #00E676;
  --warn:       #FFAB40;
  --danger:     #FF2A40;
  --info:       #40C4FF;

  --text:       #E8EAF0;
  --text-bright:#FFFFFF;
  --muted:      #6B7080;
  --muted2:     #4A4F60;

  --font-head:  'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --font-body:  'Instrument Sans', 'Segoe UI', system-ui, sans-serif;

  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;

  --sidebar-w:  240px;
  --sidebar-collapsed-w: 64px;
  --topbar-h:   56px;

  --glow-cyan:  0 0 8px rgba(0, 240, 255, 0.3), 0 0 20px rgba(0, 240, 255, 0.1);
  --glow-red:   0 0 8px rgba(255, 42, 64, 0.3), 0 0 20px rgba(255, 42, 64, 0.1);
  --glow-line:  0 0 1px rgba(0, 240, 255, 0.6);

  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --speed:      200ms;
  --speed-slow: 400ms;
}

/* ── 2. RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── 3. AUTH GATE ───────────────────────────────────────────── */
.auth-gate {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.auth-card {
  width: 380px; padding: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--glow-cyan);
}
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-icon { font-size: 48px; display: block; margin-bottom: 12px; }
.auth-logo h1 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--cyan);
  letter-spacing: 2px;
}
.auth-sub { color: var(--muted); font-size: 0.82rem; margin-top: 4px; }
.auth-error {
  color: var(--danger);
  font-size: 0.82rem;
  text-align: center;
  margin-top: 12px;
  padding: 8px;
  background: var(--red-glow);
  border-radius: var(--radius);
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: border-color var(--speed) var(--ease);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px var(--cyan-dim);
}

/* ── 4. BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), #00C4CC);
  color: #0A0C10;
  border-color: transparent;
  font-weight: 700;
}
.btn-primary:hover { opacity: 0.9; color: #0A0C10; box-shadow: var(--glow-cyan); }
.btn-danger { border-color: var(--red); color: var(--red); }
.btn-danger:hover { background: var(--red-glow); }
.btn-sm { padding: 6px 12px; font-size: 0.78rem; }
.btn-full { width: 100%; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface2); }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 50%; }

/* ── 5. TOPBAR ──────────────────────────────────────────────── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-center { display: flex; align-items: center; }
.sidebar-toggle {
  background: none; border: none; color: var(--muted); font-size: 1.2rem;
  cursor: pointer; padding: 4px 8px; border-radius: var(--radius);
}
.sidebar-toggle:hover { color: var(--cyan); background: var(--surface2); }
.topbar-logo { font-size: 1.4rem; }
.topbar-title {
  font-family: var(--font-head);
  font-size: 0.85rem;
  color: var(--cyan);
  letter-spacing: 2px;
}
.topbar-btn {
  background: none; border: 1px solid transparent; color: var(--muted);
  font-size: 0.85rem; cursor: pointer; padding: 6px 10px;
  border-radius: var(--radius); position: relative;
  transition: all var(--speed) var(--ease);
}
.topbar-btn:hover { color: var(--cyan); background: var(--surface2); border-color: var(--border); }
.badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--red); color: #fff;
  font-size: 0.65rem; font-weight: 700;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.topbar-user { display: flex; align-items: center; gap: 8px; }
.user-avatar {
  width: 30px; height: 30px;
  background: var(--cyan-dim);
  border: 1px solid var(--cyan);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: 0.7rem;
  color: var(--cyan);
}

/* ── Health dots ── */
.health-dots { display: flex; gap: 8px; }
.health-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--muted2);
  transition: background var(--speed) var(--ease);
}
.health-dot.healthy { background: var(--success); box-shadow: 0 0 6px rgba(0,230,118,0.4); }
.health-dot.degraded { background: var(--warn); box-shadow: 0 0 6px rgba(255,171,64,0.4); }
.health-dot.down { background: var(--danger); box-shadow: 0 0 6px rgba(255,42,64,0.4); animation: pulse-dot 1.5s infinite; }
.health-dot.maintenance { background: var(--info); }

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── 6. SIDEBAR ─────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto;
  z-index: 90;
  transition: width var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.sidebar.collapsed { width: var(--sidebar-collapsed-w); }
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-footer { display: none; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--speed) var(--ease);
  position: relative;
  text-decoration: none;
}
.nav-item:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
.nav-item.active {
  color: var(--cyan);
  background: var(--cyan-dim);
  border-right: 3px solid var(--cyan);
}
.nav-icon { font-size: 1.1rem; width: 24px; text-align: center; flex-shrink: 0; }
.nav-label { white-space: nowrap; }
.nav-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 0.65rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
}
.nav-divider { height: 1px; background: var(--border); margin: 8px 16px; }
.nav-section {
  display: block;
  padding: 8px 20px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted2);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}
.sidebar-version { font-size: 0.7rem; color: var(--muted2); }

/* ── 7. MAIN CONTENT ────────────────────────────────────────── */
.main-content {
  margin-top: var(--topbar-h);
  margin-left: var(--sidebar-w);
  padding: 24px;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
  transition: margin-left var(--speed) var(--ease);
}
.sidebar.collapsed ~ .main-content { margin-left: var(--sidebar-collapsed-w); }

.loading-view {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 300px; color: var(--muted); gap: 16px;
}
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 8. VIEW HEADER ─────────────────────────────────────────── */
.view-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.view-header h2 {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--text-bright);
  letter-spacing: 1px;
}
.view-header .view-actions { display: flex; gap: 8px; }

/* ── 9. KPI CARDS ───────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--speed) var(--ease);
}
.kpi-card:hover { border-color: var(--border-glow); }
.kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.kpi-value {
  font-family: var(--font-head);
  font-size: 1.6rem;
  color: var(--text-bright);
  font-weight: 700;
}
.kpi-trend {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.75rem; font-weight: 600;
  margin-top: 6px;
}
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend.flat { color: var(--muted); }
.kpi-spark { height: 30px; margin-top: 8px; }

/* ── 10. CARDS & PANELS ─────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.card-title {
  font-family: var(--font-head);
  font-size: 0.82rem;
  color: var(--text-bright);
  letter-spacing: 0.5px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }

/* ── 11. TABLES ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.data-table th:hover { color: var(--cyan); }
.data-table td {
  padding: 10px 14px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tr:hover td { background: var(--surface2); }
.data-table .sort-arrow { font-size: 0.65rem; margin-left: 4px; color: var(--cyan); }

/* ── 12. STATUS BADGES ──────────────────────────────────────── */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
}
.status-badge.healthy, .status-badge.pass { background: rgba(0,230,118,0.12); color: var(--success); }
.status-badge.degraded { background: rgba(255,171,64,0.12); color: var(--warn); }
.status-badge.down, .status-badge.fail, .status-badge.error { background: var(--red-glow); color: var(--red); }
.status-badge.maintenance { background: rgba(64,196,255,0.12); color: var(--info); }
.status-badge.running { background: var(--cyan-dim); color: var(--cyan); }

.priority-badge { font-size: 0.72rem; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.priority-badge.urgent { background: var(--red-glow); color: var(--red); }
.priority-badge.high { background: rgba(255,171,64,0.15); color: var(--warn); }
.priority-badge.medium { background: var(--cyan-dim); color: var(--cyan); }
.priority-badge.low { background: rgba(107,112,128,0.15); color: var(--muted); }

.product-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: 4px;
  font-size: 0.72rem; font-weight: 600;
}
.product-badge.training { background: rgba(0,240,255,0.12); color: var(--cyan); }
.product-badge.taxonomy { background: rgba(139,92,246,0.12); color: #8B5CF6; }
.product-badge.trusting { background: rgba(0,230,118,0.12); color: var(--success); }
.product-badge.testing { background: rgba(255,171,64,0.12); color: var(--warn); }
.product-badge.talent { background: rgba(244,114,182,0.12); color: #F472B6; }

/* ── 13. PIPELINE / KANBAN ──────────────────────────────────── */
.pipeline-board {
  display: flex; gap: 12px;
  overflow-x: auto; padding-bottom: 12px;
}
.pipeline-column {
  min-width: 240px; flex: 1;
  background: var(--surface2);
  border-radius: var(--radius-lg);
  padding: 12px;
}
.pipeline-column-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.pipeline-column-title {
  font-size: 0.75rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.5px;
}
.pipeline-column-count {
  font-size: 0.7rem; font-weight: 700;
  color: var(--muted2);
  background: var(--surface);
  padding: 2px 6px; border-radius: 8px;
}
.pipeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 8px;
  cursor: grab;
  transition: all var(--speed) var(--ease);
}
.pipeline-card:hover { border-color: var(--cyan); }
.pipeline-card.dragging { opacity: 0.5; }
.pipeline-card-title { font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.pipeline-card-value {
  font-family: var(--font-head); font-size: 0.9rem;
  color: var(--cyan); margin-bottom: 4px;
}
.pipeline-card-contact { font-size: 0.75rem; color: var(--muted); }

/* ── 14. TICKET THREAD ──────────────────────────────────────── */
.ticket-thread { display: flex; flex-direction: column; gap: 12px; }
.ticket-note {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.ticket-note.reply { border-left: 3px solid var(--cyan); }
.ticket-note.internal { border-left: 3px solid var(--warn); }
.ticket-note.system { border-left: 3px solid var(--muted2); background: var(--surface); }
.ticket-note-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px;
}
.ticket-note-author { font-size: 0.8rem; font-weight: 600; }
.ticket-note-time { font-size: 0.72rem; color: var(--muted); }
.ticket-note-body { font-size: 0.85rem; line-height: 1.6; }

/* ── 15. AGENT TIMELINE ─────────────────────────────────────── */
.agent-timeline { position: relative; padding-left: 28px; }
.agent-timeline::before {
  content: '';
  position: absolute; left: 10px; top: 0; bottom: 0;
  width: 2px; background: var(--border);
}
.timeline-item { position: relative; margin-bottom: 16px; }
.timeline-dot {
  position: absolute; left: -22px; top: 4px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
}
.timeline-dot.pass { background: var(--success); border-color: var(--success); }
.timeline-dot.fail { background: var(--danger); border-color: var(--danger); }
.timeline-dot.running { background: var(--cyan); border-color: var(--cyan); animation: pulse-dot 1.5s infinite; }

/* ── 16. HEALTH GRID ────────────────────────────────────────── */
.health-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  transition: border-color var(--speed) var(--ease);
}
.health-card:hover { border-color: var(--border-glow); }
.health-status-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.health-status-icon.healthy { background: rgba(0,230,118,0.12); box-shadow: 0 0 12px rgba(0,230,118,0.2); }
.health-status-icon.degraded { background: rgba(255,171,64,0.12); }
.health-status-icon.down { background: var(--red-glow); animation: pulse-dot 1.5s infinite; }
.health-product-name {
  font-family: var(--font-head);
  font-size: 0.82rem;
  margin-bottom: 8px;
}
.health-metric {
  display: flex; justify-content: space-between;
  padding: 4px 0;
  font-size: 0.78rem;
}
.health-metric-label { color: var(--muted); }
.health-metric-value { font-weight: 600; }

/* ── 17. PLATFORM LAUNCH CARDS ──────────────────────────────── */
.platform-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  text-align: center;
  transition: all var(--speed-slow) var(--ease);
  position: relative;
  overflow: hidden;
}
.platform-card:hover {
  border-color: var(--cyan);
  box-shadow: var(--glow-cyan);
  transform: translateY(-2px);
}
.platform-card-icon { font-size: 2.5rem; margin-bottom: 12px; }
.platform-card-name {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text-bright);
  margin-bottom: 4px;
}
.platform-card-domain { font-size: 0.75rem; color: var(--muted); margin-bottom: 16px; }
.platform-card-stats {
  display: flex; justify-content: center; gap: 16px;
  margin-bottom: 16px;
}
.platform-stat {
  text-align: center;
}
.platform-stat-value {
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--text-bright);
  font-weight: 700;
}
.platform-stat-label { font-size: 0.68rem; color: var(--muted); }

/* ── 18. FILTERS BAR ────────────────────────────────────────── */
.filters-bar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-input {
  padding: 7px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  min-width: 160px;
}
.filter-input:focus { outline: none; border-color: var(--cyan); }
.filter-select {
  padding: 7px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.82rem;
  cursor: pointer;
}

/* ── 19. TABS ───────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab {
  padding: 10px 20px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--speed) var(--ease);
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ── 20. MODAL ──────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 90%; max-width: 600px; max-height: 85vh;
  display: flex; flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 {
  font-family: var(--font-head);
  font-size: 0.9rem;
  color: var(--text-bright);
  letter-spacing: 0.5px;
}
.modal-close {
  background: none; border: none; color: var(--muted);
  font-size: 1.2rem; cursor: pointer;
  padding: 4px 8px; border-radius: var(--radius);
}
.modal-close:hover { color: var(--text); background: var(--surface2); }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
}

/* ── 21. TOAST ──────────────────────────────────────────────── */
.toast-container {
  position: fixed; top: calc(var(--topbar-h) + 12px); right: 20px;
  z-index: 2000; display: flex; flex-direction: column; gap: 8px;
}
.toast {
  padding: 12px 20px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: toast-in 0.3s var(--ease);
  max-width: 400px;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.warn { border-left: 3px solid var(--warn); }
.toast.info { border-left: 3px solid var(--info); }
.toast.fade-out { animation: toast-out 0.3s var(--ease) forwards; }

@keyframes toast-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-10px); } }

/* ── 22. COMMAND PALETTE ────────────────────────────────────── */
.cmd-palette-overlay {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 120px;
}
.cmd-palette {
  width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
  overflow: hidden;
}
.cmd-palette input {
  width: 100%; padding: 16px 20px;
  background: var(--surface);
  border: none; border-bottom: 1px solid var(--border);
  color: var(--text); font-family: var(--font-body); font-size: 1rem;
  outline: none;
}
.cmd-results { max-height: 300px; overflow-y: auto; }
.cmd-result {
  padding: 10px 20px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 0.85rem;
  transition: background var(--speed) var(--ease);
}
.cmd-result:hover, .cmd-result.active { background: var(--surface2); color: var(--cyan); }
.cmd-result-icon { font-size: 1rem; width: 24px; text-align: center; }
.cmd-result-hint { margin-left: auto; font-size: 0.72rem; color: var(--muted2); }

/* ── 23. EMPTY STATE ────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--muted);
}
.empty-state-icon { font-size: 2.5rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state-title { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty-state-desc { font-size: 0.85rem; margin-bottom: 16px; }

/* ── 24. PAGINATION ─────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; margin-top: 12px;
}
.pagination-info { font-size: 0.78rem; color: var(--muted); }
.pagination-btns { display: flex; gap: 4px; }
.page-btn {
  padding: 6px 10px; background: var(--surface2);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--muted); font-size: 0.78rem; cursor: pointer;
}
.page-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.page-btn.active { background: var(--cyan-dim); color: var(--cyan); border-color: var(--cyan); }

/* ── 25. COMPACT PLATFORM CARDS ────────────────────────────── */
.grid-platform-compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}
.platform-card-compact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s var(--ease);
}
.platform-card-compact:hover {
.platform-card-compact:hover {
  border-color: var(--cyan);
  box-shadow: 0 2px 12px rgba(0, 210, 255, 0.08);
  transform: translateY(-1px);
}
.pcc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pcc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.pcc-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcc-domain {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcc-stats {
  display: flex;
  gap: 8px;
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.pcc-actions {
  display: flex;
  gap: 4px;
}
.health-dot-inline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.health-dot-inline.degraded { background: var(--warn); }
.health-dot-inline.down { background: var(--red); }
.health-dot-inline.unknown { background: var(--muted); }
.btn-xs {
  padding: 3px 8px;
  font-size: 0.65rem;
  border-radius: 4px;
  font-weight: 500;
}

/* ── 26. RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 1200px) {
  .grid-platform-compact {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { padding-left: 12px; }
  .grid-platform-compact {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 8px;
  }
  .platform-card-compact { padding: 10px; }
  .pcc-icon { width: 28px; height: 28px; font-size: 0.85rem; }
}
