:root {
  /* Tokyo Night color palette - inspired by Tokyo's vibrant nighttime skyline */

  /* Core background colors — matched to agent detail page */
  --tokyo-bg: #0d1016;
  --tokyo-bg-dark: #07080b;
  --tokyo-bg-highlight: #1a1e2a;
  --tokyo-terminal: #0d1016;

  /* Foreground colors */
  --tokyo-fg: #f5f7fb;
  --tokyo-fg-dark: #9aa3b2;
  --tokyo-fg-gutter: #4a5064;

  /* Accent colors */
  --tokyo-blue: #7cb8ff;
  --tokyo-cyan: #7dcfff;
  --tokyo-magenta: #bb9af7;
  --tokyo-purple: #9d7cd8;
  --tokyo-orange: #ff9e64;
  --tokyo-yellow: #ffd66b;
  --tokyo-green: #67e8a5;
  --tokyo-teal: #1abc9c;
  --tokyo-red: #ff7a8b;
  --tokyo-pink: #ff007c;

  /* UI semantic colors */
  --bg-dark: var(--tokyo-bg-dark);
  --bg-panel: var(--tokyo-bg);
  --bg-sidebar: #0d1016;
  --accent: var(--tokyo-blue);
  --accent-bright: var(--tokyo-cyan);
  --accent-soft: rgba(124, 184, 255, 0.12);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --text-main: var(--tokyo-fg);
  --text-soft: var(--tokyo-fg-dark);

  /* Legacy compatibility */
  --void-900: var(--tokyo-bg-dark);
  --void-800: var(--tokyo-bg);
  --void-700: var(--tokyo-bg-highlight);
  --emerald-500: var(--tokyo-green);
  --emerald-400: var(--tokyo-teal);
  --red-500: var(--tokyo-red);
  --red-600: #db4b4b;
  --text-primary: var(--tokyo-fg);
  --text-secondary: var(--tokyo-fg-dark);
  --text-tertiary: var(--tokyo-fg-gutter);
  --radius-lg: 18px;
  --radius-xl: 22px;

  /* Gradient for branding */
  --brand-gradient: linear-gradient(135deg, var(--tokyo-blue), var(--tokyo-magenta));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(circle at 50% -8%, rgba(140, 101, 255, .18), transparent 30%),
    radial-gradient(circle at 14% 18%, rgba(86, 163, 255, .10), transparent 24%),
    linear-gradient(180deg, #090a0e 0%, #07080b 40%, #06070a 100%);
  background-color: #07080b !important;
  background-attachment: fixed;
  color: var(--text-main);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.016) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.016) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 34%, transparent 82%);
  opacity: .22;
  z-index: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  font-weight: 600;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

#app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 90% 50% at 50% 40%, rgba(122, 162, 247, 0.12), transparent 70%),
    radial-gradient(ellipse 60% 40% at 75% 70%, rgba(192, 132, 252, 0.07), transparent 60%),
    radial-gradient(ellipse 50% 35% at 25% 65%, rgba(122, 162, 247, 0.04), transparent 50%),
    #0B0B0B;
  color: #e4e4e7;
}

.topbar {
  height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(11, 11, 11, 0.6);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03);
}

@media (max-width: 640px) {
  .topbar {
    height: auto;
    min-height: 56px;
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .logo {
    flex: 1;
  }

  .topbar-right {
    flex: 1;
    justify-content: flex-end;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.logo-text {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
}

.logo-accent {
  color: var(--tokyo-purple-bright);
  font-weight: 700;
}

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

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

.header-divider {
  width: 1px;
  height: 24px;
  background: rgba(148, 163, 184, 0.2);
}

.bridge-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.25);
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.bridge-status.connected {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.08);
  color: #86efac;
}

.bridge-status.disconnected {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}

.bridge-status:hover {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(15, 23, 42, 0.8);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s ease-in-out infinite;
}

.bridge-status.disconnected .status-dot {
  background: #ef4444;
}

.status-text {
  font-size: 12px;
}

.header-link {
  padding: 5px 10px;
  border-radius: 6px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.header-link:hover {
  color: var(--text-main);
  background: rgba(148, 163, 184, 0.1);
}

.plan-badge {
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .status-text {
    display: none;
  }

  .header-divider {
    display: none;
  }
}


.env-pill,
.connection-indicator {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  align-items: center;
  gap: 6px;
}

.connection-indicator .dot-green {
  animation: pulse 2s ease-in-out infinite;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.dot-green {
  background: #22c55e;
}

.dot-red {
  background: #ef4444;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 56px);
}

.sidebar {
  padding: 18px 16px 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(11, 11, 11, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-section+.sidebar-section {
  margin-top: 18px;
}

.sidebar-section h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0 8px;
}

.sidebar-btn {
  width: 100%;
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.sidebar-btn:hover {
  border-color: rgba(148, 163, 184, 0.6);
  color: var(--text-main);
}

.sidebar-btn-active {
  border-color: var(--tokyo-blue);
  color: var(--tokyo-purple-bright);
  background: transparent;
}

.sidebar-item {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(13, 15, 21, 0.8), rgba(12, 13, 19, 0.6));
  margin-bottom: 8px;
  animation: slideInRight 0.3s ease-out;
  transition: all 0.25s ease;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sidebar-item:hover {
  transform: translateX(4px);
  border-color: rgba(122, 162, 247, 0.3);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(122, 162, 247, 0.08);
}

/* Context Panel Styles */
.context-panel {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding-top: 12px;
  margin-top: 12px;
}

.context-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}

.context-tab {
  flex: 1;
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.context-tab:hover {
  border-color: var(--tokyo-blue);
  color: var(--text-main);
}

.context-tab.active {
  background: var(--tokyo-blue);
  border-color: var(--tokyo-blue);
  color: white;
}

.context-content {
  background: var(--tokyo-bg-dark);
  border-radius: 8px;
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 8px;
}

.context-content pre {
  margin: 0;
  font-size: 10px;
  line-height: 1.4;
  color: var(--text-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.context-actions {
  display: flex;
  gap: 8px;
}

.context-actions .sidebar-btn {
  flex: 1;
  text-align: center;
}

.sidebar-item-title {
  font-size: 13px;
}

.sidebar-item-sub {
  font-size: 11px;
  color: var(--text-soft);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.empty-state-sidebar {
  padding: 16px 10px;
  text-align: left;
  color: var(--text-soft);
  font-size: 12px;
}

.empty-state-sidebar p {
  margin: 4px 0;
}

.empty-state-sidebar .hint {
  font-size: 11px;
  color: var(--text-tertiary);
  font-style: italic;
}

.sidebar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: transparent;
}

.sidebar-btn:disabled:hover {
  transform: none;
  border-color: transparent;
  color: var(--text-soft);
}

.main-content {
  padding: 20px 22px 26px;
  background: transparent;
  overflow: auto;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.metric-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(13, 15, 21, 0.92), rgba(12, 13, 19, 0.76));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: scaleIn 0.4s ease-out;
  transition: all 0.3s ease;
}

.metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(122, 162, 247, 0.2);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 12px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(122, 162, 247, 0.08),
    0 0 80px -20px rgba(122, 162, 247, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

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

.metric-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}

.metric-icon {
  font-size: 16px;
}

.metric-value {
  font-size: 22px;
  font-weight: 600;
}

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

.section-header h1 {
  margin: 0;
  font-size: 18px;
}

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

.add-agent-btn {
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid rgba(95, 135, 175, 0.4);
  background: transparent;
  color: var(--tokyo-blue-bright);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.add-agent-btn:hover {
  border-color: var(--tokyo-purple-bright);
  background: rgba(136, 192, 208, 0.1);
}

.add-icon {
  font-size: 16px;
  font-weight: bold;
}

.empty-state-sessions {
  padding: 48px 24px;
  text-align: center;
  border: 2px dashed rgba(148, 163, 184, 0.3);
  border-radius: var(--radius-xl);
  background: var(--void-800);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0 0 8px;
}

.empty-subtitle {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}

.session-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-btn {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.back-btn:hover {
  border-color: rgba(59, 130, 246, 0.6);
  background: rgba(59, 130, 246, 0.1);
}

.section-subtitle {
  font-size: 12px;
  color: var(--text-soft);
}

.dashboard-container {
  max-width: 1400px;
}

.dashboard-header {
  margin-bottom: 24px;
  animation: fadeIn 0.6s ease-out;
}

.header-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #e0e6f0, #7aa2f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
}

.live-badge.connected {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.5);
  color: #86efac;
}

.live-badge.disconnected {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text-tertiary);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.live-badge.connected .live-dot {
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: pulse 1.5s ease-in-out infinite;
}

.live-badge.disconnected .live-dot {
  background: var(--text-tertiary);
  animation: none;
}

.dashboard-header .subtitle {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
}

.metrics-section {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
}

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

.agent-card,
.device-card {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.agent-card:hover,
.device-card:hover {
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.agent-header,
.device-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.agent-info h3,
.device-info h3 {
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
}

.agent-type,
.device-host {
  font-size: 12px;
  color: var(--text-soft);
}

.agent-stats,
.device-stats {
  display: flex;
  gap: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
}

.stat-value {
  font-size: 14px;
  font-weight: 600;
}

.sessions-section {
  margin-top: 8px;
}

.sessions-table-container {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(13, 15, 21, 0.92), rgba(12, 13, 19, 0.76));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.agent-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-name {
  font-weight: 500;
}

.agent-lang {
  font-size: 11px;
  color: var(--text-soft);
}

.last-event {
  color: var(--text-soft);
  font-size: 12px;
}

.btn-view {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(129, 161, 193, 0.6);
  background: rgba(95, 135, 175, 0.1);
  color: var(--tokyo-purple-bright);
  font-size: 11px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-view:hover {
  background: rgba(136, 192, 208, 0.2);
  border-color: var(--tokyo-purple-bright);
}

.sessions-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(26, 26, 26, 0.95) 0%, rgba(15, 15, 15, 0.98) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  animation: fadeIn 0.5s ease-out;
}

.sessions-table tbody tr {
  animation: fadeIn 0.4s ease-out;
}

/* Mobile Responsiveness */
@media (max-width: 1024px) {
  .layout {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  .sidebar {
    display: none !important;
  }

  .main-content {
    padding: 16px !important;
    height: auto !important;
    min-height: calc(100vh - 56px);
    overflow-x: hidden;
  }

  /* Agent cards: stack content vertically */
  .rc-agent-top {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px;
  }

  .rc-agent-state {
    align-self: flex-start;
  }

  /* Meta info: wrap and truncate */
  .rc-agent-meta {
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
  }
  .rc-agent-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .rc-agent-meta span::after { content: none; }

  /* Health bar */
  .rc-health-bar { height: 4px; }

  /* Status line / KPIs */
  .rc-status-line {
    flex-wrap: wrap !important;
    gap: 8px;
    font-size: 13px;
  }

  /* Featured section: simplify */
  .rc-featured-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rc-scroll-wrapper { display: none !important; }
  .rc-featured-cards { grid-template-columns: 1fr !important; }

  /* Store page extensions grid */
  .rc-ext-grid { grid-template-columns: 1fr !important; }

  /* Agent detail page */
  .ad2-hero-top { flex-direction: column; gap: 16px; }
  .ad2-actions { flex-wrap: wrap; }
  .ad2-hero-meta { grid-template-columns: 1fr 1fr; }
  .ad2-grid { grid-template-columns: 1fr !important; }
}


@media (max-width: 768px) {
  /* Dashboard Header */
  .dashboard-header h1 {
    font-size: 22px;
  }

  .dashboard-header .subtitle {
    font-size: 13px;
  }

  /* Metrics Grid */
  .metrics-section {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .metric-value {
    font-size: 18px;
  }

  /* Sessions Table */
  .sessions-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sessions-table {
    min-width: 600px;
  }

  .events-log-container {
    height: calc(100vh - 220px);
  }

  .input-form {
    padding: 10px;
    flex-wrap: wrap;
  }

  .input-form input {
    width: 100%;
    margin-bottom: 8px;
  }
}

.sessions-table thead {
  background: var(--void-900);
}

.sessions-table th,
.sessions-table td {
  padding: 9px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.sessions-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
  text-align: left;
}

.sessions-table tbody tr:last-child td {
  border-bottom: none;
}

.table-row-link {
  text-decoration: none;
  color: inherit;
  display: table-row-group;
}

.clickable-row {
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.clickable-row:hover {
  background: linear-gradient(90deg, rgba(95, 135, 175, 0.12) 0%, rgba(95, 135, 175, 0.06) 100%);
  box-shadow: inset 0 0 20px rgba(95, 135, 175, 0.08);
}

.clickable-row:hover td {
  color: var(--tokyo-purple-bright);
}

.clickable-row:active {
  background: rgba(95, 135, 175, 0.15);
  transform: scale(0.995);
}

.actions-col {
  text-align: right;
}

@media (max-width: 768px) {
  .actions-col {
    display: none;
  }
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  min-width: 60px;
  font-weight: 500;
  background: transparent;
}

.status-running {
  color: #22c55e;
}

.status-active {
  color: #22c55e;
}

.status-idle {
  color: #f59e0b;
}

.status-ended {
  color: var(--text-tertiary);
}

.status-error {
  color: #f97373;
  font-weight: 600;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  }

  50% {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
  }
}

.metric-card.critical {
  border: 2px solid #ef4444;
  animation: pulse 2s ease-in-out infinite;
}

.session-row.error {
  background: rgba(239, 68, 68, 0.05);
  border-left: 3px solid #ef4444;
}

.session-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
  gap: 18px;
}

.session-main {
  background: var(--void-800);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(95, 135, 175, 0.3);
  padding: 14px 14px 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
}

.session-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.side-card {
  background: var(--void-800);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(95, 135, 175, 0.3);
  padding: 12px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  font-size: 13px;
}

.events-log {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
  background: var(--void-900);
  border: 1px solid rgba(148, 163, 184, 0.2);
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
}

.event {
  margin-bottom: 10px;
  padding: 6px 8px;
  border-radius: 10px;
  background: var(--void-800);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.event-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.event-payload {
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.event-user {
  border-color: rgba(95, 135, 175, 0.8);
  background: linear-gradient(135deg, rgba(95, 135, 175, 0.15), var(--void-800));
}

.event-agent {
  border-color: rgba(34, 197, 94, 0.8);
}

.event-system {
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.5);
  background: var(--void-800);
}

.event-ai-response {
  border-color: rgba(139, 92, 246, 0.7);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), var(--void-800));
}

.event-error {
  border-color: rgba(248, 113, 113, 0.7);
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.12), var(--void-800));
}

.input-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.input-form input[type="text"] {
  flex: 1;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.9) 0%, rgba(10, 10, 10, 0.95) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px 16px;
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.25s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.input-form input[type="text"]:focus {
  outline: none;
  border-color: var(--tokyo-blue);
  box-shadow:
    0 0 0 3px rgba(95, 135, 175, 0.15),
    0 0 20px rgba(95, 135, 175, 0.1),
    inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.input-form input[type="text"]::placeholder {
  color: var(--text-tertiary);
}

/* Agent selector dropdown */
.agent-select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.95), rgba(15, 15, 15, 1));
  backdrop-filter: blur(10px);
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
  min-width: 100px;
}

.agent-select:hover {
  border-color: var(--tokyo-blue);
}

.agent-select:focus {
  outline: none;
  border-color: var(--tokyo-blue);
  box-shadow: 0 0 0 3px rgba(95, 135, 175, 0.15);
}

.agent-select option {
  background: var(--tokyo-bg);
  color: var(--text-main);
  padding: 8px;
}

/* Icon buttons base */
.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: linear-gradient(145deg, rgba(26, 26, 26, 0.9), rgba(15, 15, 15, 0.95));
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.icon-btn img {
  width: 20px;
  height: 20px;
  opacity: 0.9;
  transition: all 0.25s ease;
}

.icon-btn:hover {
  border-color: var(--tokyo-blue);
  background: linear-gradient(145deg, rgba(95, 135, 175, 0.15), rgba(26, 26, 26, 0.95));
  transform: translateY(-2px);
  box-shadow:
    0 4px 16px rgba(95, 135, 175, 0.2),
    0 0 20px rgba(95, 135, 175, 0.1);
}

.icon-btn:hover img {
  opacity: 1;
  filter: brightness(1.2);
}

.icon-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Enter button - primary action */
.enter-btn {
  background: linear-gradient(135deg, var(--tokyo-blue) 0%, #4a7490 100%);
  border-color: rgba(95, 135, 175, 0.5);
}

.enter-btn:hover {
  background: linear-gradient(135deg, #6b9bc0 0%, var(--tokyo-blue) 100%);
  box-shadow:
    0 4px 20px rgba(95, 135, 175, 0.35),
    0 0 30px rgba(95, 135, 175, 0.15);
}

/* Mode toggle button */
.mode-btn.terminal-mode {
  border-color: rgba(148, 163, 184, 0.3);
}

.mode-btn.agent-mode {
  border-color: rgba(180, 142, 173, 0.5);
  background: linear-gradient(145deg, rgba(180, 142, 173, 0.15), rgba(26, 26, 26, 0.95));
}

.mode-btn.agent-mode:hover {
  border-color: var(--tokyo-purple);
  box-shadow:
    0 4px 16px rgba(180, 142, 173, 0.25),
    0 0 20px rgba(180, 142, 173, 0.1);
}

.secondary-btn,
.danger-btn {
  width: 100%;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  margin-bottom: 6px;
}

.secondary-btn {
  background: transparent;
  color: var(--text-main);
  border-color: rgba(148, 163, 184, 0.7);
}

.secondary-btn:hover {
  background: rgba(15, 23, 42, 0.9);
}

.danger-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.9);
}

.danger-btn:hover {
  background: rgba(248, 113, 113, 0.2);
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .session-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 70vh;
  padding: 40px 20px;
}

.empty-state-content {
  max-width: 800px;
  text-align: center;
}

.empty-state-title {
  font-size: 36px;
  font-weight: 700;
  margin: 0 0 16px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-state-subtitle {
  font-size: 18px;
  color: var(--text-soft);
  margin: 0 0 40px;
  line-height: 1.6;
}

.value-props {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.value-prop {
  padding: 24px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(8, 47, 73, 0.9));
  text-align: left;
  transition: all 0.3s ease;
}

.value-prop:hover {
  transform: translateY(-4px);
  border-color: rgba(59, 130, 246, 0.6);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.2);
}

.value-prop-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 12px;
}

.value-prop h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
}

.value-prop p {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0;
}

.onboarding-steps {
  margin-bottom: 40px;
  text-align: left;
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
}

.onboarding-steps h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 24px;
  text-align: center;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  gap: 16px;
  align-items: start;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 8px;
}

.step-content code {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(55, 65, 81, 0.9);
  font-family: ui-monospace, monospace;
  font-size: 13px;
  color: #93c5fd;
  margin-top: 8px;
}

.step-content p {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0;
}

.cta-btn-large {
  padding: 16px 32px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.cta-btn-large:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
}

@media (max-width: 720px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    display: none;
  }

  .metrics-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .value-props {
    grid-template-columns: 1fr;
  }

  .empty-state-title {
    font-size: 28px;
  }

  .sessions-table {
    font-size: 12px;
  }

  .sessions-table th,
  .sessions-table td {
    padding: 8px 6px;
  }

  .session-id,
  .last-event {
    display: none;
  }
}

/* Icon Buttons */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(95, 135, 175, 0.1);
  color: var(--tokyo-purple-bright);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn:hover {
  background: rgba(136, 192, 208, 0.2);
  border-color: var(--tokyo-purple-bright);
  transform: scale(1.05);
}

.icon-btn.stop-btn {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}

.icon-btn.stop-btn:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.2);
}

/* Mode Toggle Button */
.mode-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(15, 23, 42, 0.6);
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-btn:hover {
  border-color: var(--tokyo-blue);
  transform: scale(1.05);
}

.mode-btn.terminal-mode {
  background: rgba(95, 135, 175, 0.1);
  border-color: rgba(95, 135, 175, 0.4);
}

.mode-btn.agent-mode {
  background: rgba(180, 142, 173, 0.15);
  border-color: rgba(180, 142, 173, 0.5);
  box-shadow: 0 0 12px rgba(180, 142, 173, 0.2);
}

/* Table Column Width Limits */
.sessions-table .session-id-col {
  max-width: 100px;
  width: 100px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-tertiary);
}

.sessions-table .workspace-col {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Input Form Styling */
.input-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-form input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: var(--void-900);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
}

.input-form input:focus {
  outline: none;
  border-color: var(--tokyo-blue);
  box-shadow: 0 0 0 2px rgba(95, 135, 175, 0.2);
}

.input-form input::placeholder {
  color: var(--text-tertiary);
}

/* Session Page Layout */
.session-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
}

.session-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.session-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: var(--void-800);
}

.side-card h2 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-soft);
  margin: 0 0 12px;
}

.side-card p {
  margin: 6px 0;
  font-size: 13px;
}

.side-card strong {
  color: var(--text-soft);
  font-weight: 500;
}

/* Events Log */
.events-log-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 180px);
  gap: 16px;
}

.events-log {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.98) 0%, rgba(5, 5, 5, 1) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.4),
    0 4px 20px rgba(0, 0, 0, 0.3);
}

.event {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.event:hover {
  transform: translateX(4px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.event-user {
  background: linear-gradient(90deg, rgba(95, 135, 175, 0.12) 0%, rgba(95, 135, 175, 0.05) 100%);
  border-left: 3px solid var(--tokyo-blue);
}

.event-system {
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.03) 100%);
  border-left: 3px solid var(--emerald-500);
}

.event-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 11px;
}

.event-direction {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
}

.event-time {
  color: var(--text-tertiary);
}

.event-payload {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.event-ai-response {
  background: linear-gradient(90deg, rgba(167, 139, 250, 0.1) 0%, rgba(167, 139, 250, 0.03) 100%);
  border-left: 3px solid #a78bfa;
}

.event-error {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.03) 100%);
  border-left: 3px solid #ef4444;
}

/* Sidebar Info Section */
.sidebar-info {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(10, 10, 10, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.sidebar-info p {
  margin: 6px 0;
  font-size: 12px;
  color: var(--text-main);
}

.sidebar-info p:first-child {
  margin-top: 0;
}

.sidebar-info p:last-child {
  margin-bottom: 0;
}

.sidebar-info strong {
  color: var(--text-soft);
  font-weight: 500;
}

/* Sidebar Actions */
.sidebar-actions .sidebar-btn {
  width: 100%;
  text-align: center;
  margin-bottom: 8px;
}

.sidebar-btn-danger {
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  background: transparent;
}

.sidebar-btn-danger:hover {
  border-color: rgba(239, 68, 68, 0.8);
  color: #fecaca;
  background: transparent;
}

/* Icon Buttons - Enhanced */
.btn-icon {
  font-size: 14px;
  font-weight: 700;
}

.enter-btn .btn-icon {
  font-size: 16px;
}

@media (max-width: 900px) {
  .events-log-container {
    height: calc(100vh - 220px);
  }
}

/* Primary Button - New Session */
.primary-btn {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(74, 222, 128, 0.5);
  background: transparent;
  color: rgba(74, 222, 128, 0.9);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.primary-btn:hover:not(:disabled) {
  border-color: rgba(74, 222, 128, 0.8);
  background: rgba(74, 222, 128, 0.08);
  box-shadow: 0 4px 16px rgba(74, 222, 128, 0.1);
  transform: translateY(-1px);
}

.primary-btn:disabled {
  border-color: rgba(248, 113, 113, 0.4);
  background: transparent;
  color: rgba(248, 113, 113, 0.6);
  cursor: not-allowed;
}

/* Header title group */
.header-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-content {
  background: linear-gradient(145deg, var(--tokyo-bg), #0f0f0f);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-soft);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}

.form-select,
.form-input {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(26, 26, 26, 0.9);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.form-select:focus,
.form-input:focus {
  outline: none;
  border-color: var(--tokyo-blue);
  box-shadow: 0 0 0 3px rgba(95, 135, 175, 0.15);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
}

.btn-secondary {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: transparent;
  color: var(--text-soft);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  border-color: rgba(148, 163, 184, 0.5);
  color: var(--text-main);
}

.btn-primary {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  background: var(--tokyo-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background: var(--tokyo-purple-bright);
  box-shadow: 0 4px 16px rgba(95, 135, 175, 0.3);
}

.workspace-picker {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.workspace-picker .form-input {
  flex: 1;
}

.browse-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 30, 30, 0.8);
  color: var(--text-soft);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.browse-btn:hover {
  border-color: var(--tokyo-blue);
  color: var(--text-main);
  background: rgba(40, 40, 40, 0.9);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
/* ==============================================
   Command Cards - Rich Session Interactivity
   ============================================== */

.command-card {
  background: var(--tokyo-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  animation: fadeIn 0.2s ease-out;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: var(--tokyo-bg-dark);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.75rem;
}

.card-direction {
  font-weight: 600;
  color: var(--tokyo-cyan);
}

.card-time {
  color: var(--text-soft);
}

.card-content {
  padding: 12px;
}

/* Card type variants */
.card-code {
  border-left: 3px solid var(--tokyo-purple);
}

.card-diff {
  border-left: 3px solid var(--tokyo-orange);
}

.card-action {
  border-left: 3px solid var(--tokyo-yellow);
  background: linear-gradient(135deg, var(--tokyo-bg) 0%, rgba(224, 175, 104, 0.05) 100%);
}

.card-thinking {
  border-left: 3px solid var(--tokyo-blue);
  opacity: 0.85;
}

.card-text .text-content {
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  font-family: inherit;
  color: var(--text-main);
}

/* Code blocks */
.code-block-wrapper {
  background: var(--tokyo-bg-dark);
  border-radius: 8px;
  overflow: hidden;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  background: var(--tokyo-bg-highlight);
  font-size: 0.7rem;
}

.code-lang {
  color: var(--tokyo-purple);
  font-weight: 600;
  text-transform: uppercase;
}

.copy-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.copy-btn:hover {
  opacity: 1;
}

.code-block {
  margin: 0;
  padding: 12px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--tokyo-fg);
}

/* Diff view */
.diff-view {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  line-height: 1.6;
}

.diff-added {
  background: rgba(158, 206, 106, 0.15);
  color: var(--tokyo-green);
}

.diff-removed {
  background: rgba(247, 118, 142, 0.15);
  color: var(--tokyo-red);
}

.diff-hunk {
  background: rgba(122, 162, 247, 0.1);
  color: var(--tokyo-blue);
  font-weight: 600;
}

.diff-context {
  color: var(--text-soft);
}

/* Action cards */
.action-card {
  text-align: center;
}

.action-description {
  margin-bottom: 16px;
  color: var(--text-main);
  font-size: 0.95rem;
}

.action-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.btn-approve, .btn-deny {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-approve {
  background: var(--tokyo-green);
  color: var(--tokyo-bg-dark);
}

.btn-approve:hover {
  background: #b5e890;
  transform: translateY(-2px);
}

.btn-deny {
  background: var(--tokyo-red);
  color: white;
}

.btn-deny:hover {
  background: #ff8fa3;
  transform: translateY(-2px);
}

/* Thinking card */
.thinking-card {
  display: flex;
  align-items: center;
  gap: 12px;
}

.thinking-indicator {
  display: flex;
  gap: 4px;
}

.thinking-dot {
  width: 8px;
  height: 8px;
  background: var(--tokyo-blue);
  border-radius: 50%;
  animation: pulse 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes pulse {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.thinking-details {
  flex: 1;
}

.thinking-details summary {
  color: var(--tokyo-blue);
  cursor: pointer;
  font-style: italic;
}

.thinking-details pre {
  margin-top: 8px;
  padding: 8px;
  background: var(--tokyo-bg-dark);
  border-radius: 6px;
  font-size: 0.8rem;
  color: var(--text-soft);
  max-height: 200px;
  overflow-y: auto;
}

/* File Tree Explorer Styles */
.file-tree-panel {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.file-tree {
  margin-top: 8px;
  font-size: 12px;
}

.file-tree-root {
  padding: 8px 0;
}

.file-tree-item {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  margin: 2px 0;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.file-tree-item:hover {
  background: var(--tokyo-bg-highlight);
  cursor: pointer;
}

.folder-icon, .file-icon {
  margin-right: 6px;
  font-size: 14px;
}

.folder-name, .file-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-tree-contents {
  margin-left: 12px;
  padding-left: 8px;
  border-left: 1px solid rgba(148, 163, 184, 0.2);
}

.file-tree-placeholder {
  padding: 8px;
  color: var(--text-tertiary);
  font-style: italic;
  font-size: 11px;
}

.folder-name {
  font-weight: 500;
  color: var(--tokyo-cyan);
}

.file-name {
  color: var(--text-soft);
}

/* ── Landing Page — Raycast/Linear Style ──────────────── */

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

#landing-root {
  --lp-bg: #0B0B0B;
  --lp-card: #111111;
  --lp-border: #1E1E1E;
  --lp-text: #e4e4e7;
  --lp-text-dim: #71717a;
  --lp-text-muted: #52525b;
  --lp-accent: #7aa2f7;
  --lp-green: #4ade80;
  --lp-red: #f87171;
  --lp-yellow: #fbbf24;
  --lp-blue: #60a5fa;
  --lp-purple: #c084fc;

  min-height: 100vh;
  background:
    radial-gradient(ellipse 100% 60% at 50% -10%, rgba(122, 162, 247, 0.22), transparent 70%),
    radial-gradient(ellipse 80% 50% at 70% 90%, rgba(192, 132, 252, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 40% at 30% 95%, rgba(122, 162, 247, 0.06), transparent 50%),
    var(--lp-bg);
  color: var(--lp-text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Header */
.lp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--lp-border);
}

.lp-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.lp-signin {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--lp-border);
  background: transparent;
  color: var(--lp-text-dim);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
.lp-signin:hover {
  border-color: #333;
  color: var(--lp-text);
}

/* Main */
.lp-main {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Hero (two-column grid) */
.lp-hero {
  padding: 72px 0 48px;
  position: relative;
}
.lp-hero::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 600px;
  background:
    radial-gradient(ellipse 50% 50% at 50% 40%, rgba(122,162,247,0.15), transparent 70%),
    radial-gradient(ellipse 40% 40% at 60% 60%, rgba(192,132,252,0.10), transparent 70%);
  pointer-events: none;
  z-index: 0;
  filter: blur(40px);
}
.lp-hero > * { position: relative; z-index: 1; }

.lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  gap: 32px;
  align-items: center;
}


/* Eyebrow badge */
.lp-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--lp-border);
  color: #d6def0;
  background: rgba(255,255,255,0.04);
  font-size: 13px;
  margin-bottom: 22px;
  backdrop-filter: blur(10px);
}
.lp-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #6ee7a8;
  box-shadow: 0 0 14px #6ee7a8;
  animation: lp-pulse 1.8s ease-in-out infinite;
  display: inline-block;
  flex-shrink: 0;
}
@keyframes lp-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.92); opacity: 0.75; }
}

.lp-h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.065em;
  line-height: 0.96;
  margin: 0;
  max-width: 12ch;
  color: #f5f7fb;
}

.lp-h2 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 2px 0 0;
  background: linear-gradient(135deg, var(--lp-accent) 0%, var(--lp-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lp-sub {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--lp-text-dim);
  line-height: 1.65;
  margin: 22px 0 0;
  max-width: 34ch;
  letter-spacing: -0.015em;
}

/* Pills */
.lp-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.lp-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  border: 1px solid var(--lp-border);
  color: #c3cad6;
  font-size: 13px;
}

/* CTAs */
.lp-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}
.lp-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.14);
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.07));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow:
    0 14px 28px rgba(0,0,0,0.24),
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 0 40px rgba(126,126,255,0.15);
}
.lp-cta:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.22);
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.10));
}
.lp-cta-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: #f5f7fb;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.lp-cta-ghost:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}
.lp-cta-note {
  margin-top: 14px;
  color: var(--lp-text-muted);
  font-size: 13px;
}

.lp-cta-lg { padding: 14px 28px; font-size: 15px; }

.lp-cta-sub {
  margin-top: 12px;
  font-size: 12px;
  color: var(--lp-text-muted);
}

/* Hero Card (right column — window chrome) */
.lp-hero-card {
  position: relative;
  isolation: isolate;
  padding: 22px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018));
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  min-height: 540px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  transform: perspective(1600px) rotateY(-6deg) rotateX(4deg);
  box-shadow:
    0 30px 80px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.06);
}
.lp-hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 15%, rgba(177,133,255,0.22), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(88,162,255,0.18), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.05), transparent 28%);
  pointer-events: none;
}

/* Window top bar */
.lp-window-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 1;
}
.lp-window-dots {
  display: flex;
  gap: 8px;
}
.lp-window-dots span {
  width: 11px;
  height: 11px;
  border-radius: 999px;
}
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.lp-window-label {
  font-size: 13px;
  color: #d9deea;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lp-window-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  color: #dce5f5;
  font-size: 12px;
}

/* Stats strip */
.lp-stats-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}
.lp-mini-stat {
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.07);
}
.lp-mini-stat strong {
  display: block;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}
.lp-mini-stat span {
  display: block;
  color: rgba(255,255,255,0.55);
  margin-top: 4px;
  font-size: 11px;
}

/* Hero mini cluster cards */
.lp-hero-cluster {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lp-hcluster-card {
  min-height: 160px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(10,11,16,0.86), rgba(10,11,16,0.62));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
  overflow: hidden;
}
.lp-hcluster-card.wide {
  grid-column: span 2;
  min-height: 140px;
}
.lp-hcluster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 12px;
  color: #d6dded;
  font-weight: 600;
}
.lp-hcluster-head small {
  color: var(--lp-text-muted);
  font-weight: 500;
  font-size: 11px;
}
.lp-hcluster-log {
  display: grid;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #ced6e3;
  letter-spacing: -0.02em;
}
.lp-hlog-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* Responsive hero */
@media (max-width: 1100px) {
  .lp-hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .lp-hero-card {
    transform: none;
    min-height: auto;
  }
  .lp-h1 { max-width: none; }
}
@media (max-width: 760px) {
  .lp-hero { padding-top: 34px; }
  .lp-hero-actions { align-items: stretch; }
  .lp-hero-actions .lp-cta,
  .lp-hero-actions .lp-cta-ghost { width: 100%; justify-content: center; }
  .lp-stats-strip, .lp-hero-cluster { grid-template-columns: 1fr; }
  .lp-hcluster-card.wide { grid-column: span 1; }
}

/* Cluster View */
.lp-cluster {
  padding: 80px 0 0;
}

.lp-cluster-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.lp-cluster-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lp-cluster-tagline {
  font-size: 13px;
  color: var(--lp-text-dim);
  margin-bottom: 16px;
}

.lp-cluster-stats {
  display: flex;
  gap: 20px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--lp-text-muted);
}
.lp-cluster-stats span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.lp-cluster-state {
  display: none;
}

.lp-cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Runtime Card — aligned with agent detail page panels */
.lp-runtime-card {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 70px rgba(0,0,0,.40);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.lp-runtime-card::before {
  content: "";
  position: absolute;
  inset: auto -12% -52% auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(132,101,255,0.08), transparent 65%);
  pointer-events: none;
}
.lp-runtime-card:hover {
  border-color: rgba(255,255,255,.14);
  transform: translateY(-1px);
  box-shadow:
    0 20px 70px rgba(0,0,0,.50),
    0 0 0 1px rgba(255,255,255,.04) inset;
}

.lp-runtime-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.lp-runtime-name {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: #e0e6f0;
  letter-spacing: -0.02em;
}
.lp-runtime-issue {
  display: block;
  margin-top: 3px;
  color: var(--lp-text-muted);
  font-size: 0.8rem;
}
.lp-runtime-badge {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.09);
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.lp-runtime-badge.connecting,
.lp-runtime-badge.cloning {
  color: #bfefff;
  background: rgba(121,231,255,0.09);
  border-color: rgba(121,231,255,0.2);
}
.lp-runtime-badge.analyzing {
  color: #ffe49e;
  background: rgba(255,214,107,0.09);
  border-color: rgba(255,214,107,0.2);
}
.lp-runtime-badge.patching {
  color: #d4c2ff;
  background: rgba(178,145,255,0.09);
  border-color: rgba(178,145,255,0.2);
}
.lp-runtime-badge.testing {
  color: #b9f3d2;
  background: rgba(110,231,168,0.09);
  border-color: rgba(110,231,168,0.2);
}
.lp-runtime-badge.done {
  color: #b9f3d2;
  background: rgba(110,231,168,0.12);
  border-color: rgba(110,231,168,0.24);
}

/* Engine badges (cli / mcp / service) */
.lp-engine-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 4px;
  vertical-align: middle;
}
.lp-engine-badge.cli     { color: #7aa2f7; background: rgba(122,162,247,0.12); border: 1px solid rgba(122,162,247,0.3); }
.lp-engine-badge.mcp     { color: #bb9af7; background: rgba(187,154,247,0.12); border: 1px solid rgba(187,154,247,0.3); }
.lp-engine-badge.antigravity { color: #bb9af7; background: rgba(187,154,247,0.12); border: 1px solid rgba(187,154,247,0.3); }
.lp-engine-badge.agent   { color: #bb9af7; background: rgba(187,154,247,0.12); border: 1px solid rgba(187,154,247,0.3); }
.lp-engine-badge.service { color: #1abc9c; background: rgba(26,188,156,0.12); border: 1px solid rgba(26,188,156,0.3); }

/* Agent type badges */
.lp-type-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 6px;
  vertical-align: middle;
}
.lp-type-badge.builder  { color: #7dd3fc; background: rgba(56,189,248,0.12); border: 1px solid rgba(56,189,248,0.25); }
.lp-type-badge.reviewer { color: #fbbf24; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.25); }
.lp-type-badge.fixer    { color: #fb7185; background: rgba(251,113,133,0.12); border: 1px solid rgba(251,113,133,0.25); }
.lp-type-badge.guardian { color: #c4b5fd; background: rgba(167,139,250,0.12); border: 1px solid rgba(167,139,250,0.25); }
.lp-type-badge.shipper  { color: #6ee7b7; background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.25); }
.lp-type-badge.tester   { color: #93c5fd; background: rgba(96,165,250,0.12); border: 1px solid rgba(96,165,250,0.25); }

.lp-runtime-log {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: #d4dbe8;
  min-height: 0;
  max-height: 200px;
  overflow-y: auto;
  scroll-behavior: smooth;
  display: grid;
  gap: 3px;
  position: relative;
  z-index: 1;
  margin-top: auto; /* Pushes the log block to the trailing bottom of the uniform flex column */
  padding-top: 8px;
  border-top: 1px solid rgba(255,255,255,0.05);
}
.lp-runtime-log::-webkit-scrollbar { width: 3px; }
.lp-runtime-log::-webkit-scrollbar-track { background: transparent; }
.lp-runtime-log::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }

.lp-runtime-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--lp-text-muted);
  font-size: 0.78rem;
  font-family: 'JetBrains Mono', monospace;
}

.lp-agent-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--lp-border);
  background: rgba(255,255,255,0.015);
}

.lp-agent-repo {
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-text);
  font-family: 'JetBrains Mono', monospace;
  flex: 1;
}

.lp-agent-id {
  font-size: 10px;
  color: var(--lp-text-muted);
  font-family: 'JetBrains Mono', monospace;
}

.lp-agent-sep {
  color: #333;
  font-size: 10px;
}

.lp-agent-issue {
  font-size: 10px;
  color: var(--lp-accent);
  font-family: 'JetBrains Mono', monospace;
}

.lp-agent-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  animation: lp-pulse 1.5s ease-in-out infinite;
}
.lp-agent-dot.connecting { background: var(--lp-yellow); box-shadow: 0 0 6px var(--lp-yellow); }
.lp-agent-dot.cloning { background: var(--lp-blue); box-shadow: 0 0 6px var(--lp-blue); }
.lp-agent-dot.analyzing { background: var(--lp-yellow); box-shadow: 0 0 6px var(--lp-yellow); }
.lp-agent-dot.patching { background: var(--lp-purple); box-shadow: 0 0 6px var(--lp-purple); }
.lp-agent-dot.testing { background: var(--lp-blue); box-shadow: 0 0 6px var(--lp-blue); }
.lp-agent-dot.done { background: var(--lp-green); box-shadow: 0 0 6px var(--lp-green); animation: none; }
.lp-agent-dot.idle { background: var(--lp-text-muted); animation: none; }

.lp-agent-log {
  padding: 10px 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  min-height: 180px;
  max-height: 260px;
  overflow-y: auto;
}

.lp-term-val { color: var(--lp-accent); }

/* Agent log lines */
.lp-aline {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 1.5px 0;
  animation: lp-lineIn 0.25s ease-out;
}

.lp-alabel {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 28px;
  text-align: center;
  padding: 1px 3px;
  border-radius: 2px;
  flex-shrink: 0;
  margin-top: 1px;
}
.lp-alabel.fail { color: var(--lp-red); background: rgba(248,113,113,0.1); }
.lp-alabel.pass { color: var(--lp-green); background: rgba(74,222,128,0.1); }
.lp-alabel.analyze { color: var(--lp-yellow); background: rgba(251,191,36,0.08); }
.lp-alabel.patch { color: var(--lp-purple); background: rgba(192,132,252,0.08); }
.lp-alabel.diff_del { color: var(--lp-red); background: rgba(248,113,113,0.06); }
.lp-alabel.diff_add { color: var(--lp-green); background: rgba(74,222,128,0.06); }
.lp-alabel.meta { color: var(--lp-text-muted); }
.lp-alabel.info { color: #444; }
.lp-alabel.run { color: var(--lp-blue, #7aa2f7); background: rgba(122,162,247,0.08); }

.lp-atime {
  color: #555;
  font-size: 0.72rem;
  flex-shrink: 0;
  min-width: 52px;
}

.lp-atext {
  color: #b4b4b8;
  line-height: 1.4;
  word-break: break-word;
}

/* Runtime badge states for dashboard */
.lp-runtime-badge.running {
  color: #ffe49e;
  background: rgba(255,214,107,0.09);
  border-color: rgba(255,214,107,0.2);
}
.lp-runtime-badge.idle {
  color: #94a3b8;
  background: rgba(148,163,184,0.09);
  border-color: rgba(148,163,184,0.2);
}
.lp-runtime-badge.error {
  color: #fb7185;
  background: rgba(251,113,133,0.09);
  border-color: rgba(251,113,133,0.2);
}
.lp-runtime-badge.offline {
  color: #64748b;
  background: rgba(100,116,139,0.09);
  border-color: rgba(100,116,139,0.2);
}

/* Semantic line colors */
.lp-t-fail .lp-atext { color: var(--lp-red); }
.lp-t-pass .lp-atext { color: var(--lp-green); }
.lp-t-analyze .lp-atext { color: var(--lp-yellow); }
.lp-t-patch .lp-atext { color: var(--lp-purple); }
.lp-t-meta .lp-atext { color: var(--lp-text-muted); font-style: italic; }
.lp-t-diff_del .lp-atext { color: var(--lp-red); }
.lp-t-diff_add .lp-atext { color: var(--lp-green); }

.lp-acursor {
  padding: 4px 0 0;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.lp-acursor.done {
  color: var(--lp-green);
  font-size: 10px;
}

.lp-blink {
  color: var(--lp-accent);
  animation: lp-blink 1s steps(1) infinite;
}

/* Mid CTA */
.lp-mid-cta {
  padding: 40px 0 0;
  text-align: center;
}
.lp-mid-cta .lp-cta-sub {
  display: block;
  margin-top: 10px;
}

.lp-infra-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  display: inline-block;
  animation: lp-pulse 1.5s ease-in-out infinite;
}
.lp-infra-dot.green { background: var(--lp-green); }
.lp-infra-dot.blue { background: var(--lp-blue); }
.lp-infra-dot.purple { background: var(--lp-purple); }

@keyframes lp-lineIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes lp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
@keyframes lp-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Responsive cluster */
@media (max-width: 768px) {
  .lp-cluster-grid {
    grid-template-columns: 1fr;
  }
  .lp-cluster-header {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .lp-cluster-stats {
    flex-wrap: wrap;
    gap: 12px;
  }
  .lp-cluster-state {
    flex-wrap: wrap;
    gap: 8px 20px;
  }
}


/* Metrics */
.lp-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--lp-border);
  border-radius: 12px;
  overflow: hidden;
  margin: 80px 0;
}

.lp-metric {
  background: var(--lp-card);
  padding: 24px 20px;
  text-align: center;
}

.lp-metric-label {
  display: block;
  font-size: 11px;
  color: var(--lp-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 500;
  margin-bottom: 8px;
}

.lp-metric-value {
  display: block;
  font-size: 28px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section title */
.lp-section-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 32px;
  text-align: center;
}

/* How it works */
.lp-how {
  padding: 80px 0;
  border-top: 1px solid var(--lp-border);
}

.lp-steps {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0;
}

.lp-step {
  flex: 1;
  max-width: 280px;
  padding: 32px 24px 28px;
  border: 1px solid var(--lp-border);
  background: var(--lp-card);
  text-align: center;
  position: relative;
}
.lp-step:first-child { border-radius: 12px 0 0 12px; }
.lp-step:last-child { border-radius: 0 12px 12px 0; }

.lp-step-num {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--lp-accent);
  color: #0B0B0B;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lp-step-icon {
  width: 28px; height: 28px;
  color: var(--lp-text-dim);
  margin-bottom: 12px;
}

.lp-step h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 600;
}
.lp-step p {
  margin: 0;
  font-size: 13px;
  color: var(--lp-text-dim);
  line-height: 1.5;
}

.lp-step-line {
  width: 1px;
  background: var(--lp-border);
  align-self: stretch;
}

/* Activity Map */
.lp-activity {
  padding: 0 0 80px;
}

.lp-fixes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.lp-fix {
  padding: 16px;
  border-radius: 10px;
  border: 1px solid var(--lp-border);
  background: var(--lp-card);
  transition: border-color 0.15s;
}
.lp-fix:hover { border-color: #333; }

.lp-fix-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.lp-fix-repo {
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--lp-accent);
}
.lp-fix-time {
  font-size: 11px;
  color: var(--lp-text-muted);
  font-family: 'JetBrains Mono', monospace;
}
.lp-fix-bug {
  font-size: 13px;
  color: var(--lp-text-dim);
}

/* Demo */
.lp-demo {
  padding: 0 0 80px;
  border-top: 1px solid var(--lp-border);
  padding-top: 80px;
}

.lp-demo-card {
  max-width: 560px;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid var(--lp-border);
  background: var(--lp-card);
  overflow: hidden;
}

.lp-demo-issue { padding: 20px; border-bottom: 1px solid var(--lp-border); }

.lp-demo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.lp-demo-title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
}

.lp-demo-label {
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--lp-red);
  font-size: 10px;
  font-weight: 600;
}

.lp-demo-body {
  font-size: 13px;
  color: var(--lp-text-dim);
  margin: 0;
  line-height: 1.5;
}

.lp-demo-arrow {
  padding: 10px 20px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--lp-accent);
  background: rgba(122, 162, 247, 0.04);
  border-bottom: 1px solid var(--lp-border);
}

.lp-demo-result { padding: 16px 20px; }

.lp-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  color: var(--lp-green);
  font-weight: 500;
}

.lp-check-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--lp-green);
  flex-shrink: 0;
}

/* Final CTA */
.lp-final-cta {
  padding: 80px 0;
  text-align: center;
  border-top: 1px solid var(--lp-border);
}
.lp-final-cta h3 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px;
  letter-spacing: -0.02em;
}

.lp-cta-lg {
  padding: 14px 28px;
  font-size: 15px;
}

.lp-cta-hint {
  margin-top: 12px;
  font-size: 12px;
  color: var(--lp-text-muted);
}

/* Pricing */
.lp-pricing {
  padding: 0 0 80px;
}

.lp-pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--lp-border);
  border-radius: 12px;
  overflow: hidden;
}

.lp-plan {
  background: var(--lp-card);
  padding: 28px 24px;
}
.lp-plan h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--lp-text-dim);
}
.lp-price {
  font-size: 32px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 20px;
  color: var(--lp-text);
}
.lp-price span {
  font-size: 13px;
  font-weight: 400;
  color: var(--lp-text-muted);
}

.lp-plan-featured {
  background: linear-gradient(180deg, rgba(122,162,247,0.06) 0%, var(--lp-card) 100%);
}
.lp-plan-featured h4 { color: var(--lp-accent); }

.lp-plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lp-plan li {
  padding: 5px 0;
  font-size: 13px;
  color: var(--lp-text-dim);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.lp-plan li::before {
  content: "· ";
  color: var(--lp-text-muted);
}

/* Footer */
.lp-footer {
  padding: 24px 32px;
  text-align: center;
  border-top: 1px solid var(--lp-border);
  font-size: 12px;
  color: var(--lp-text-muted);
}
.lp-footer a {
  color: var(--lp-text-dim);
  text-decoration: none;
}
.lp-footer a:hover { color: var(--lp-text); }

/* Responsive */
@media (max-width: 768px) {
  .lp-hero { padding: 48px 0 24px; }
  .lp-h1 { font-size: 32px; }
  .lp-h2 { font-size: 24px; }
  .lp-metrics { grid-template-columns: repeat(2, 1fr); }
  .lp-steps { flex-direction: column; align-items: center; gap: 12px; }
  .lp-step { max-width: 100%; border-radius: 12px !important; }
  .lp-step-line { display: none; }
  .lp-fixes { grid-template-columns: 1fr; }
  .lp-pricing-grid { grid-template-columns: 1fr; }
}

/* ==========================================================
   AGENTS LIVE PAGE (/live)
   ========================================================== */

.al-page {
  min-height: 100vh;
  background: #0a0a0f;
  color: #e2e8f0;
  font-family: 'Inter', -apple-system, sans-serif;
  padding: 0 24px 48px;
}
.al-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 24px;
}
.al-header-left { display: flex; align-items: center; gap: 8px; }
.al-logo { font-size: 16px; font-weight: 700; color: #fff; text-decoration: none; letter-spacing: -0.02em; }
.al-separator { color: rgba(255,255,255,0.2); font-weight: 300; }
.al-section-title { font-size: 14px; color: rgba(255,255,255,0.5); font-weight: 400; }
.al-header-right { display: flex; align-items: center; gap: 10px; }
.al-avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.1); }
.al-user { font-size: 13px; color: rgba(255,255,255,0.6); }

.al-stats { display: flex; gap: 32px; padding: 16px 0; margin-bottom: 20px; }
.al-stat { display: flex; align-items: baseline; gap: 6px; }
.al-stat-value { font-size: 22px; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: #fff; }
.al-stat-label { font-size: 12px; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.05em; }

.al-empty { text-align: center; padding: 80px 24px; max-width: 520px; margin: 0 auto; }
.al-empty-title { font-size: 20px; font-weight: 600; color: rgba(255,255,255,0.7); margin-bottom: 12px; }
.al-empty-text { font-size: 14px; color: rgba(255,255,255,0.35); line-height: 1.6; margin-bottom: 24px; }
.al-token-section { margin: 24px 0; }
.al-token {
  display: block; padding: 12px 16px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  font-size: 11px; font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.6); word-break: break-all; text-align: left;
}
.al-token-hint { margin-top: 8px; font-size: 11px; font-family: 'JetBrains Mono', monospace; color: rgba(255,255,255,0.25); }
.al-empty-cmd { margin-top: 20px; }
.al-empty-cmd code {
  padding: 10px 16px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 8px;
  font-size: 12px; font-family: 'JetBrains Mono', monospace; color: rgba(255,255,255,0.5);
}

.al-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 16px; }

.al-card {
  background: rgba(255,255,255,0.025); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; overflow: hidden; transition: border-color 0.3s;
}
.al-card.running { border-color: rgba(251,191,36,0.2); }
.al-card.done { border-color: rgba(110,231,168,0.15); }
.al-card.error { border-color: rgba(251,113,133,0.2); }
.al-card.offline { opacity: 0.5; }

.al-card-head {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px;
}
.al-card-identity { display: flex; align-items: center; gap: 6px; min-width: 0; }
.al-card-task {
  font-size: 13px; font-weight: 500; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.al-card-state {
  font-size: 11px; font-weight: 600; font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.06em; flex-shrink: 0;
}

.al-card-meta {
  padding: 0 16px 10px; font-size: 11px; color: rgba(255,255,255,0.3);
  font-family: 'JetBrains Mono', monospace; display: flex; gap: 4px;
}
.al-meta-sep { opacity: 0.3; }

.al-card-log {
  background: rgba(0,0,0,0.25); border-top: 1px solid rgba(255,255,255,0.04);
  padding: 8px 0; max-height: 260px; overflow-y: auto;
  font-family: 'JetBrains Mono', monospace; font-size: 11.5px;
}
.al-log-line { display: flex; align-items: baseline; gap: 8px; padding: 2px 16px; line-height: 1.6; }
.al-log-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 1px 5px; border-radius: 3px; flex-shrink: 0;
}
.al-log-label.info { color: #7dd3fc; background: rgba(56,189,248,0.1); }
.al-log-label.pass { color: #6ee7b7; background: rgba(52,211,153,0.1); }
.al-log-label.fail { color: #fb7185; background: rgba(251,113,133,0.1); }
.al-log-time { color: rgba(255,255,255,0.2); flex-shrink: 0; font-size: 10px; }
.al-log-text { color: rgba(255,255,255,0.65); word-break: break-word; }

.al-token-footer {
  margin-top: 24px; padding: 12px 16px; background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05); border-radius: 8px;
  display: flex; align-items: center; gap: 10px;
}
.al-token-footer-label { font-size: 11px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; }
.al-token-inline { font-size: 10px; font-family: 'JetBrains Mono', monospace; color: rgba(255,255,255,0.4); word-break: break-all; }

@media (max-width: 600px) {
  .al-grid { grid-template-columns: 1fr; }
  .al-stats { gap: 16px; }
  .al-page { padding: 0 12px 32px; }
}

/* ==========================================
   CONTROL PLANE — Dashboard v2
   ========================================== */

/* --- Premium Health Bar --- */
.health-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 24px;
  border-radius: 12px; /* Sleeker rounded rectangle instead of pill */
  margin-bottom: 32px;
  background: rgba(20, 20, 24, 0.5); /* deep glass backdrop */
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.health-healthy  { 
  background: linear-gradient(90deg, rgba(110,231,168,0.06) 0%, rgba(20,20,24,0.5) 25%); 
  border-left: 2px solid rgba(110,231,168,0.3); 
}
.health-degraded { 
  background: linear-gradient(90deg, rgba(251,191,36,0.08) 0%, rgba(20,20,24,0.5) 25%); 
  border-left: 2px solid rgba(251,191,36,0.3); 
}
.health-offline  { 
  background: linear-gradient(90deg, rgba(100,116,139,0.08) 0%, rgba(20,20,24,0.5) 25%); 
  border-left: 2px solid rgba(100,116,139,0.3); 
}

.health-status {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.health-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
}
.health-healthy .health-dot  { background: #6ee7b7; box-shadow: 0 0 8px rgba(110,231,168,0.6); }
.health-degraded .health-dot { background: #fbbf24; box-shadow: 0 0 8px rgba(251,191,36,0.6); animation: pulse-warn 1.5s ease-in-out infinite; }
.health-offline .health-dot  { background: #64748b; }

.health-label {
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.8);
}
.health-healthy .health-label  { color: #6ee7b7; }
.health-degraded .health-label { color: #fbbf24; }
.health-offline .health-label  { color: #64748b; }

.health-stats {
  display: flex;
  align-items: center;
  gap: 16px; /* increased for premium spacing */
  flex-wrap: wrap;
}
.health-stat {
  color: rgba(255,255,255,0.5);
  white-space: nowrap;
}
.health-stat strong {
  color: rgba(255,255,255,0.85);
  font-weight: 600;
}
.health-sep {
  color: rgba(255,255,255,0.1);
  font-size: 10px;
}

@media (max-width: 768px) {
  .health-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }
  .health-stats {
    gap: 8px;
  }
  .hidden-mobile {
    display: none !important;
  }
}

/* === CONTROL PLANE AGENT LIST === */
.cp-agent-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 4px;
}

/* Group header */
/* Group header */
.cp-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 0 4px;
}
.cp-group-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.cp-group-count {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 1px 7px;
  min-width: 18px;
  text-align: center;
}
.cp-group-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Row link */
.cp-row-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Agent row — clean 3-part flex */
.cp-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 10px;
  gap: 14px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}
.cp-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 10px 0 0 10px;
  background: transparent;
  transition: background 0.2s ease;
}
.cp-row:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

/* === STATE HIERARCHY (ambient glow — no generic left bars) === */
.cp-row.error {
  background: linear-gradient(90deg, rgba(251,113,133,0.08) 0%, rgba(251,113,133,0.02) 30%, rgba(255,255,255,0.015) 100%);
  border-color: rgba(251,113,133,0.18);
  box-shadow: inset 0 0 30px rgba(251,113,133,0.04), 0 0 20px rgba(251,113,133,0.03);
}
.cp-row.error::before { background: linear-gradient(180deg, #fb7185, #e11d48); box-shadow: 0 0 8px rgba(251,113,133,0.3); }
.cp-row.error:hover { background: linear-gradient(90deg, rgba(251,113,133,0.12) 0%, rgba(251,113,133,0.04) 30%, rgba(255,255,255,0.03) 100%); }
.cp-row.running {
  background: linear-gradient(90deg, rgba(16,185,129,0.04) 0%, transparent 40%);
  border-color: rgba(16,185,129,0.10);
  box-shadow: 0 0 24px rgba(16,185,129,0.03);
}
.cp-row.running::before { background: transparent; }
.cp-row.running:hover { background: linear-gradient(90deg, rgba(16,185,129,0.07) 0%, rgba(16,185,129,0.02) 40%, rgba(255,255,255,0.02) 100%); border-color: rgba(16,185,129,0.15); }
.cp-row.completed, .cp-row.done { opacity: 0.45; }
.cp-row.completed::before, .cp-row.done::before { background: transparent; }
.cp-row.completed:hover, .cp-row.done:hover { opacity: 0.7; }
.cp-row.offline { opacity: 0.3; }
.cp-row.offline:hover { opacity: 0.5; }

/* Pulse animations */
@keyframes cp-error-pulse {
  0%, 100% { box-shadow: 0 0 6px rgba(251,113,133,0.5); }
  50% { box-shadow: 0 0 14px rgba(251,113,133,0.8), 0 0 4px rgba(251,113,133,1); }
}
.cp-row.error .cp-status-dot { animation: cp-error-pulse 2s ease-in-out infinite; }

@keyframes cp-running-pulse {
  0%, 100% { box-shadow: 0 0 5px rgba(16,185,129,0.4); }
  50% { box-shadow: 0 0 12px rgba(16,185,129,0.7), 0 0 3px rgba(16,185,129,1); }
}
.cp-row.running .cp-status-dot { animation: cp-running-pulse 2.5s ease-in-out infinite; }

/* === PROGRESS RING === */
.cp-ring-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.cp-ring {
  width: 36px;
  height: 36px;
  transform: rotate(-90deg);
}
.cp-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.06);
  stroke-width: 3;
}
.cp-ring-fill {
  fill: none;
  stroke: #9ca3af;
  stroke-width: 3;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.4s ease;
}
.cp-ring-fill.running { stroke: #10b981; }
.cp-ring-fill.error { stroke: #fb7185; }
.cp-ring-fill.completed, .cp-ring-fill.done { stroke: #60a5fa; }
.cp-ring-fill.idle { stroke: rgba(255,255,255,0.15); }
.cp-ring-fill.offline { stroke: rgba(255,255,255,0.08); }
.cp-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
}
.cp-ring-fill.warning { stroke: #f59e0b; }

/* === MODEL-FIRST RESOURCE CARDS === */
.cp-model-card {
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 16px 18px 12px;
  transition: all 0.2s ease;
}
.cp-model-card:hover {
  border-color: rgba(255,255,255,0.08);
}
.cp-model-card.exhausted {
  border-color: rgba(251,113,133,0.15);
  background: rgba(251,113,133,0.02);
}

/* Model top line: name + spacer + percentage */
.cp-model-top {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.cp-model-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  font-family: 'Space Grotesk', sans-serif;
  white-space: nowrap;
}
.cp-model-spacer { flex: 1; }
.cp-model-pct {
  font-size: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}
.cp-model-pct.healthy { color: #10b981; }
.cp-model-pct.warning { color: #f59e0b; }
.cp-model-pct.error { color: #fb7185; }
.cp-model-pct.exhausted { color: #fb7185; }
.cp-model-exhausted {
  font-size: 12px;
  font-weight: 700;
  color: #fb7185;
  letter-spacing: 0.02em;
}

/* Dot bar ●●●●●●●●○○ */
.cp-model-dots {
  font-size: 11px;
  letter-spacing: 2px;
  margin: 4px 0;
  font-family: 'JetBrains Mono', monospace;
}
.cp-model-dots.healthy { color: #10b981; }
.cp-model-dots.warning { color: #f59e0b; }
.cp-model-dots.error { color: #fb7185; }
.cp-model-dots.exhausted { color: #fb7185; opacity: 0.5; }

/* Agent count + resets */
.cp-model-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 6px;
}
.cp-model-running {
  color: rgba(16,185,129,0.7);
  font-weight: 500;
}
.cp-model-idle {
  color: rgba(255,255,255,0.3);
}
.cp-model-resets {
  color: rgba(251,113,133,0.6);
}
.cp-model-capacity-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
.cp-model-capacity-label {
  font-size: 10px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 0.03em;
  font-family: 'JetBrains Mono', monospace;
}
.cp-model-available {
  color: #10b981;
  font-weight: 600;
}
.cp-model-unavailable {
  color: #fb7185;
  font-weight: 600;
}
.cp-model-capacity-warn {
  color: rgba(245,158,11,0.7);
  font-weight: 500;
}
.cp-agent-state.inactive {
  color: rgba(255,255,255,0.25);
}
.cp-status-dot.inactive {
  background: rgba(255,255,255,0.15);
  box-shadow: none;
}

/* Compact agent rows */
.cp-model-agents {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}
.cp-agent-row-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.cp-agent-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  position: relative;
  overflow: hidden;
  transition: background 0.15s ease;
}
.cp-agent-row-main {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-width: 0;
}
.cp-agent-row-main > * { position: relative; z-index: 1; }
.cp-agent-row-step {
  padding-left: 16px;
  width: 100%;
  min-width: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.cp-step-desc {
  color: rgba(255,255,255,0.25);
  font-size: 11px;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.cp-agent-row:hover {
  background: rgba(255,255,255,0.04);
}
/* Background task progress */
.cp-agent-row::after {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: var(--task-progress, 0%);
  background: linear-gradient(90deg, rgba(16,185,129,0.15) 0%, rgba(16,185,129,0.04) 100%);
  border-radius: 6px 0 0 6px;
  border-left: 2px solid rgba(16,185,129,0.35);
  pointer-events: none;
  transition: width 0.5s ease;
  z-index: 0;
}

.cp-agent-row.done::after, .cp-agent-row.completed::after {
  background: linear-gradient(90deg, rgba(96,165,250,0.04) 0%, rgba(96,165,250,0.01) 100%);
}
.cp-agent-id {
  color: rgba(255,255,255,0.5);
  font-weight: 500;
}
.cp-agent-sep {
  color: rgba(255,255,255,0.15);
  font-size: 10px;
}
.cp-agent-state {
  font-weight: 500;
  font-size: 11px;
}
.cp-agent-state.running { color: #10b981; }
.cp-agent-state.error { color: #fb7185; }
.cp-agent-state.idle { color: rgba(255,255,255,0.3); }
.cp-agent-state.completed { color: #60a5fa; }
.cp-agent-state.offline { color: rgba(255,255,255,0.2); }
.cp-agent-task {
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.cp-agent-progress {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(16,185,129,0.6);
  margin-left: auto;
}
.cp-agent-row.done .cp-agent-progress { color: rgba(96,165,250,0.5); }
.cp-agent-row.offline, .cp-agent-row.done, .cp-agent-row.completed { opacity: 0.5; }
.cp-agent-row.offline:hover, .cp-agent-row.done:hover, .cp-agent-row.completed:hover { opacity: 0.7; }
.cp-row-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cp-row-line1 {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.cp-card-name {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.cp-card-sep {
  color: rgba(255,255,255,0.15);
  flex-shrink: 0;
  font-size: 12px;
}
.cp-card-id {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-ctx-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.cp-ctx-status.running { color: #10b981; }
.cp-ctx-status.completed { color: #60a5fa; }
.cp-ctx-status.error { color: #fb7185; }
.cp-ctx-status.idle { color: #9ca3af; }
.cp-ctx-status.offline { color: #6b7280; }

.cp-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  flex-shrink: 0;
}
.cp-status-dot.running { background: #10b981; }
.cp-status-dot.completed { background: #60a5fa; }
.cp-status-dot.error { background: #fb7185; }
.cp-status-dot.idle { background: #9ca3af; }
.cp-status-dot.offline { background: #6b7280; }

.cp-row-line3 {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  min-width: 0;
}
.cp-row-task-name {
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cp-meta-sep {
  color: rgba(255,255,255,0.1);
  flex-shrink: 0;
}
.cp-meta-host {
  color: rgba(255,255,255,0.2);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  white-space: nowrap;
}

/* Actions */
.cp-row-actions {
  flex-shrink: 0;
}
.cp-actions-trigger {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255,255,255,0.25);
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
}
.cp-row:hover .cp-actions-trigger { opacity: 1; }
.cp-actions-trigger:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.1);
  color: #fff;
}

/* === MOBILE === */
@media (max-width: 1024px) {
  .cp-row {
    gap: 12px;
  }
  .cp-row-line3 {
    flex-wrap: wrap;
  }
  .cp-actions-trigger {
    opacity: 1;
  }
}
.cp-status-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

/* Stream time column */
.ev-time {
  color: rgba(255,255,255,0.25);
  flex-shrink: 0;
  min-width: 52px;
  font-variant-numeric: tabular-nums;
}

/* === ACTIVITY FEED === */
.cp-activity-feed {
  margin-top: 28px;
  background: rgba(255,255,255,0.015);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  overflow: hidden;
}
.cp-feed-header {
  padding: 12px 18px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.cp-feed-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cp-feed-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}
.cp-feed-count {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  padding: 1px 8px;
  min-width: 18px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}
.cp-feed-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 4px 0;
}
.cp-feed-list::-webkit-scrollbar { width: 4px; }
.cp-feed-list::-webkit-scrollbar-track { background: transparent; }
.cp-feed-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.cp-feed-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 18px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11.5px;
  line-height: 1.6;
  transition: background 0.15s ease;
}
.cp-feed-item:hover {
  background: rgba(255,255,255,0.03);
}
.cp-feed-item.fail {
  background: linear-gradient(90deg, rgba(251,113,133,0.06) 0%, transparent 50%);
}
.cp-feed-time {
  color: rgba(255,255,255,0.2);
  flex-shrink: 0;
  min-width: 56px;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.cp-feed-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cp-feed-dot.info { background: #7dd3fc; }
.cp-feed-dot.pass { background: #6ee7b7; box-shadow: 0 0 6px rgba(110,231,168,0.4); }
.cp-feed-dot.fail { background: #fb7185; box-shadow: 0 0 6px rgba(251,113,133,0.5); }
.cp-feed-text {
  color: rgba(255,255,255,0.6);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cp-feed-item.fail .cp-feed-text { color: rgba(251,113,133,0.8); }
.cp-feed-item.pass .cp-feed-text { color: rgba(110,231,168,0.8); }
.cp-feed-agent {
  color: rgba(255,255,255,0.15);
  font-size: 10px;
  flex-shrink: 0;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .cp-feed-agent { display: none; }
  .cp-feed-item { padding: 5px 12px; }
}

/* ============================================================
   RAYCAST CONTROL PLANE (rc-*)
   ============================================================ */

.rc-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 22px 80px;
  position: relative;
  z-index: 1;
}

/* --- Topbar --- */
.rc-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.rc-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: 16px;
}
.rc-brand-mark {
  width: 34px; height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #a855f7, #3b82f6);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 10px 24px rgba(99,102,241,.28);
}
.rc-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #98a2b3;
  font-size: 14px;
}
.rc-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  color: #d5d8df;
  text-decoration: none;
  font-size: 14px;
}

/* --- Attention Banner --- */
.rc-attention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(245,196,81,0.22);
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  margin-bottom: 14px;
}
.rc-attention-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.rc-attention-badge {
  width: 30px; height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(245,196,81,0.12);
  color: #f5c451;
  font-weight: 700;
  flex: 0 0 auto;
}
.rc-attention h3 { margin: 0; font-size: 14px; letter-spacing: -0.02em; }
.rc-attention p { margin: 2px 0 0; color: #98a2b3; font-size: 13px; line-height: 1.45; }

/* --- Status Line --- */
.rc-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 2px;
  margin-bottom: 18px;
}
.rc-status-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.rc-status-dot {
  width: 10px; height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.rc-status-dot.healthy  { background: #32d583; box-shadow: 0 0 14px rgba(50,213,131,0.65); }
.rc-status-dot.degraded { background: #f5c451; box-shadow: 0 0 14px rgba(245,196,81,0.65); }
.rc-status-dot.offline  { background: #6b7280; }
.rc-status-label {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.rc-status-label.healthy  { color: #d0ffe8; }
.rc-status-label.degraded { color: #fff8df; }
.rc-status-label.offline  { color: #98a2b3; }
.rc-status-meta {
  color: #98a2b3;
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.rc-status-meta span::after {
  content: "·";
  margin-left: 10px;
  color: #555;
}
.rc-status-meta span:last-child::after { content: none; }

/* --- Layout --- */
.rc-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

/* --- Sidebar / Stream --- */
.rc-sidebar {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px);
  padding: 14px;
  position: sticky;
  top: 18px;
}
.rc-section-title { margin-bottom: 14px; }
.rc-section-title h3 { margin: 0; font-size: 14px; letter-spacing: -0.02em; }
.rc-section-title p { margin: 2px 0 0; color: #98a2b3; font-size: 13px; line-height: 1.45; }

.rc-stream-list {
  display: grid;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
}
.rc-stream-item {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 10px 11px;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.05);
}
.rc-stream-agent { color: #d4d8e0; white-space: nowrap; }
.rc-stream-text  { color: #98a2b3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Tags (shared by stream + logs) --- */
.rc-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.rc-tag.info { background: rgba(96,165,250,0.10); color: #b8d8ff; border-color: rgba(96,165,250,0.18); }
.rc-tag.pass { background: rgba(50,213,131,0.10); color: #bcf7d8; border-color: rgba(50,213,131,0.18); }
.rc-tag.fail { background: rgba(249,112,102,0.10); color: #fde7a3; border-color: rgba(249,112,102,0.18); }

/* --- KPIs --- */
.rc-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.rc-kpi {
  padding: 14px 14px 12px;
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}
.rc-kpi-label { color: #98a2b3; font-size: 12.5px; }
.rc-kpi strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.05em;
}
.rc-kpi.critical { border-color: rgba(249,112,102,0.2); }
.rc-kpi.critical strong { color: #f97066; }

/* --- Main Panel --- */
.rc-main-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px);
  padding: 16px;
}
.rc-agents { display: grid; gap: 12px; }

/* --- Agent Card --- */
.rc-agent-card {
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.016));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px);
  padding: 16px;
}
.rc-agent-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.rc-agent-kind {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.06);
  color: #c8ced8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.rc-agent-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 2px;
}
.rc-agent-task {
  color: #d7dbe2;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

/* --- Agent State Badge --- */
.rc-agent-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.rc-dot {
  width: 8px; height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.rc-agent-state.running .rc-dot   { background: #32d583; box-shadow: 0 0 12px rgba(50,213,131,0.6); }
.rc-agent-state.running           { color: #32d583; }
.rc-agent-state.idle .rc-dot      { background: #9ca3af; }
.rc-agent-state.idle              { color: #9ca3af; }
.rc-agent-state.completed .rc-dot { background: #60a5fa; box-shadow: 0 0 12px rgba(96,165,250,0.5); }
.rc-agent-state.completed         { color: #60a5fa; }
.rc-agent-state.error .rc-dot     { background: #f97066; box-shadow: 0 0 12px rgba(249,112,102,0.5); }
.rc-agent-state.error             { color: #f97066; }
.rc-agent-state.offline .rc-dot   { background: #6b7280; }
.rc-agent-state.offline           { color: #6b7280; }

/* --- Agent Meta --- */
.rc-agent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  color: #98a2b3;
  font-size: 13px;
  margin-bottom: 12px;
}
.rc-agent-meta span::after {
  content: "·";
  margin-left: 10px;
  color: #555;
}
.rc-agent-meta span:last-child::after { content: none; }

/* Heartbeat color in meta */
.rc-agent-meta .hb-ok    { color: #32d583; }
.rc-agent-meta .hb-warn  { color: #f5c451; }
.rc-agent-meta .hb-stale { color: #f97066; animation: rc-pulse 1.2s ease-in-out infinite; }
.rc-agent-meta .hb-off   { color: #6b7280; }
.rc-agent-meta .hb-idle  { color: #9ca3af; }

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

/* --- Agent Log --- */
.rc-agent-log {
  display: grid;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
}
.rc-log-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 10px;
  align-items: start;
  color: #d6dbe4;
}
.rc-log-time { color: #6b7280; white-space: nowrap; }
.rc-log-text { color: #98a2b3; line-height: 1.45; }
.rc-awaiting { color: #6b7280; font-style: italic; }

/* --- Responsive --- */
@media (max-width: 1080px) {
  .rc-layout { grid-template-columns: 1fr; }
  .rc-sidebar { position: static; }
  .rc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .rc-wrap { padding: 20px 14px 56px; }
  .rc-topbar, .rc-status-line { flex-direction: column; align-items: stretch; }
  .rc-kpis { grid-template-columns: 1fr; }
  .rc-stream-item, .rc-log-row { grid-template-columns: auto 1fr; }
  .rc-stream-agent, .rc-log-time { display: none; }
  .rc-agent-top { flex-direction: column; align-items: flex-start; gap: 8px; }
  .rc-agent-meta { flex-direction: column; gap: 4px; font-size: 12px; }
  .rc-agent-meta span { max-width: 100%; }
  .rc-agent-meta span::after { content: none; }
  .rc-agent-state { align-self: flex-start; }
  .rc-health-bar { height: 4px; }
}

.cp-card {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cp-card.error {
  border-color: rgba(251,113,133,0.25) !important;
  box-shadow: 0 0 12px rgba(251,113,133,0.08);
}
.cp-card.running {
  border-color: rgba(110,231,168,0.15) !important;
}

.cp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.cp-card-identity {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.cp-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.06em;
}
.cp-status-badge.running   { color: #6ee7b7; background: rgba(110,231,168,0.1); }
.cp-status-badge.completed { color: #7aa2f7; background: rgba(122,162,247,0.1); }
.cp-status-badge.error     { color: #fb7185; background: rgba(251,113,133,0.12); }
.cp-status-badge.idle      { color: #94a3b8; background: rgba(148,163,184,0.08); }
.cp-status-badge.offline   { color: #64748b; background: rgba(100,116,139,0.08); }

.cp-status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.cp-status-dot.running   { background: #6ee7b7; box-shadow: 0 0 6px rgba(110,231,168,0.5); }
.cp-status-dot.completed { background: #7aa2f7; }
.cp-status-dot.error     { background: #fb7185; box-shadow: 0 0 6px rgba(251,113,133,0.5); }
.cp-status-dot.idle      { background: #94a3b8; }
.cp-status-dot.offline   { background: #64748b; }

.cp-card-info {
  padding: 0;
}
.cp-card-task {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1px;
  line-height: 1.35;
}
.cp-card-meta {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  font-family: 'JetBrains Mono', monospace;
}
.cp-meta-sep {
  color: rgba(255,255,255,0.15);
  margin: 0 3px;
}
.cp-card.completed {
  border-color: rgba(122,162,247,0.15) !important;
  opacity: 0.85;
}

.cp-card-stats {
  display: flex;
  gap: 0;
  padding: 8px 14px;
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: rgba(0,0,0,0.15);
}
.cp-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.cp-stat-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.3);
  font-family: 'JetBrains Mono', monospace;
}
.cp-stat-value {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  font-family: 'JetBrains Mono', monospace;
}

/* Heartbeat indicators */
.cp-stat-value.hb-ok    { color: #6ee7b7; }
.cp-stat-value.hb-warn  { color: #fbbf24; }
.cp-stat-value.hb-stale { color: #fb7185; animation: pulse-warn 1.2s ease-in-out infinite; }
.cp-stat-value.hb-off   { color: #64748b; }
.cp-stat-value.hb-idle  { color: #94a3b8; }

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

/* --- Sidebar Event Stream --- */
.event-stream {
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-height: 400px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
}
.event-stream::-webkit-scrollbar { width: 2px; }
.event-stream::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); }

.event-line {
  display: flex;
  gap: 4px;
  align-items: baseline;
  font-size: 10px;
  line-height: 1.5;
  padding: 1px 0;
}
.ev-label {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
  flex-shrink: 0;
}
.ev-label.info { color: #7aa2f7; background: rgba(122,162,247,0.1); }
.ev-label.pass { color: #6ee7b7; background: rgba(52,211,153,0.1); }
.ev-label.fail { color: #fb7185; background: rgba(251,113,133,0.1); }
.ev-agent {
  color: rgba(255,255,255,0.4);
  flex-shrink: 0;
  max-width: 85px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-text {
  color: rgba(255,255,255,0.55);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* --- Attention Section --- */
.attention-section {
  background: rgba(251,113,133,0.04);
  border: 1px solid rgba(251,113,133,0.12);
  border-radius: 10px;
  padding: 10px 14px;
}
.attention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
}
.attention-item.error { color: #fb7185; }
.attention-item.warning { color: #fbbf24; }
.attention-count {
  font-size: 16px;
  font-weight: 700;
  min-width: 20px;
}

/* ─── Agent Detail Page ────────────────────────────────── */

/* Card link (dashboard → detail) */
.ad-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.ad-card-link:hover .lp-runtime-card {
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}


/* ─── Agent Detail v2 (ad2-*) — execution control surface ─ */

.ad2-container { width: min(calc(100% - 40px), 1240px); margin: 0 auto; position: relative; z-index: 1; }
.ad2-hero { padding: 32px 0 22px; }

.ad2-crumb {
  display: inline-flex; align-items: center; gap: 10px;
  color: #9aa3b2; font-size: 13px; margin-bottom: 20px;
}
.ad2-crumb a { color: #9aa3b2; text-decoration: none; transition: color .15s; }
.ad2-crumb a:hover { color: #f5f7fb; }
.ad2-crumb-sep { opacity: .45; }

.ad2-hero-card {
  padding: 28px; border-radius: 28px;
  background:
    radial-gradient(circle at 20% 16%, rgba(122,184,255,.08), transparent 28%),
    radial-gradient(circle at 80% 18%, rgba(104,232,165,.07), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 70px rgba(0,0,0,.40);
  backdrop-filter: blur(20px);
}

.ad2-hero-top {
  display: flex; align-items: start; justify-content: space-between;
  gap: 22px; flex-wrap: wrap;
}

.ad2-eyebrow {
  display: inline-flex; align-items: center; height: 28px;
  padding: 0 10px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  color: #d5dced; font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 14px;
}

.ad2-title {
  margin: 0; font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: .96; letter-spacing: -.065em; font-weight: 800;
  color: #f5f7fb;
}

.ad2-subtitle {
  margin: 16px 0 0; color: #9aa3b2; font-size: 1.04rem;
  line-height: 1.7; max-width: 54ch; letter-spacing: -.01em;
}

.ad2-status-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.ad2-pill {
  height: 34px; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 12px; border-radius: 999px; font-size: 13px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03); color: #d8dfec;
}

.ad2-dot {
  width: 8px; height: 8px; border-radius: 999px; flex: 0 0 auto;
}
.ad2-dot-green { background: #67e8a5; box-shadow: 0 0 14px rgba(103,232,165,.65); }
.ad2-dot-blue { background: #7cb8ff; box-shadow: 0 0 14px rgba(124,184,255,.55); }
.ad2-dot-red { background: #ff7a8b; box-shadow: 0 0 14px rgba(255,122,139,.55); }
.ad2-dot-yellow { background: #ffd66b; box-shadow: 0 0 14px rgba(255,214,107,.55); }
.ad2-dot-dim { background: #737c8c; }

.ad2-pill-green { border-color: rgba(103,232,165,.18); }
.ad2-pill-red { border-color: rgba(255,122,139,.18); }
.ad2-pill-yellow { border-color: rgba(255,214,107,.18); }

/* Actions */
.ad2-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.ad2-btn {
  min-height: 46px; padding: 0 16px; border-radius: 16px;
  color: #f5f7fb; font-size: 14px; font-weight: 600; letter-spacing: -.01em;
  border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.03);
  backdrop-filter: blur(12px); cursor: pointer;
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  font-family: inherit;
}
.ad2-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
}
.ad2-btn:disabled { opacity: .5; cursor: default; }

.ad2-btn-primary {
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  border-color: rgba(255,255,255,.14);
  box-shadow: 0 14px 30px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.04) inset;
}

.ad2-btn-danger {
  color: #ff7a8b;
  border-color: rgba(255,122,139,.2);
}

/* Hero meta grid */
.ad2-hero-meta {
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
}

.ad2-meta-card {
  padding: 14px 14px 12px; border-radius: 18px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
}

.ad2-meta-label { color: #737c8c; font-size: 12px; letter-spacing: -.01em; }
.ad2-meta-card strong {
  display: block; margin-top: 8px; font-size: 1.05rem;
  letter-spacing: -.03em; color: #f5f7fb;
}

/* Content area */
.ad2-content { padding: 24px 0 72px; }

.ad2-grid {
  display: grid; grid-template-columns: minmax(0, 1.4fr) 320px;
  gap: 20px; align-items: start;
}

.ad2-panel {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 20px 70px rgba(0,0,0,.40);
  backdrop-filter: blur(18px); overflow: hidden;
}

.ad2-panel-head {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ad2-panel-head h2 {
  margin: 0; font-size: 1.05rem; letter-spacing: -.03em; color: #f5f7fb;
}
.ad2-panel-head p { margin: 6px 0 0; color: #9aa3b2; font-size: 13px; line-height: 1.5; }

/* Timeline */
.ad2-timeline { padding: 8px 10px 12px; }

.ad2-event {
  display: grid; grid-template-columns: 72px auto 1fr;
  gap: 12px; align-items: start;
  padding: 12px 10px; border-radius: 16px;
  transition: background .16s ease;
}
.ad2-event:hover { background: rgba(255,255,255,.025); }

.ad2-event-time {
  color: #737c8c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px; white-space: nowrap; padding-top: 2px;
}

.ad2-badge {
  min-width: 42px; height: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 8px; border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; border: 1px solid transparent;
}
.ad2-badge-info { background: rgba(124,184,255,.10); color: #c7e0ff; border-color: rgba(124,184,255,.18); }
.ad2-badge-pass { background: rgba(103,232,165,.10); color: #cbf7dc; border-color: rgba(103,232,165,.18); }
.ad2-badge-fail { background: rgba(255,122,139,.10); color: #ffc5cc; border-color: rgba(255,122,139,.18); }

.ad2-event-text { color: #e5e9f2; font-size: 14px; line-height: 1.55; letter-spacing: -.01em; }
.ad2-event-fail .ad2-event-text { color: #ff7a8b; }
.ad2-event-pass .ad2-event-text { color: #67e8a5; }
.ad2-event-sub {
  color: #9aa3b2; font-size: 12.5px; margin-top: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ad2-empty { color: #737c8c; font-style: italic; font-size: 14px; padding: 24px 18px; }

/* Sidebar */
.ad2-sidebar-block {
  padding: 18px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.ad2-sidebar-block:last-child { border-bottom: 0; }
.ad2-sidebar-block h3 { margin: 0; font-size: .98rem; letter-spacing: -.03em; color: #f5f7fb; }
.ad2-sidebar-hint { margin: 8px 0 0; color: #9aa3b2; font-size: 13px; line-height: 1.55; }

.ad2-kv {
  display: grid; grid-template-columns: 90px 1fr;
  gap: 10px 12px; margin-top: 14px; align-items: start;
}
.ad2-kv dt { color: #737c8c; font-size: 12px; margin: 0; }
.ad2-kv dd {
  margin: 0; color: #e6ebf3; font-size: 13px; line-height: 1.45;
  word-break: break-word;
}

.ad2-mini-actions { display: grid; gap: 10px; margin-top: 14px; }
.ad2-mini-btn {
  min-height: 40px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: #dfe5f1; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.ad2-mini-btn:hover:not(:disabled) {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.14);
}
.ad2-mini-btn:disabled { opacity: .5; cursor: default; }

/* Send Prompt Form */
.ad2-prompt-form { margin-top: 10px; }
.ad2-prompt-input {
  width: 100%; box-sizing: border-box;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  color: #dfe5f1; font-size: 13px; font-family: inherit;
  resize: vertical; min-height: 60px;
  transition: border-color .15s, background .15s;
}
.ad2-prompt-input:focus {
  outline: none;
  border-color: rgba(122, 162, 247, .4);
  background: rgba(255,255,255,.05);
}
.ad2-prompt-input::placeholder { color: rgba(255,255,255,.25); }

/* Responsive */
@media (max-width: 1080px) {
  .ad2-hero-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ad2-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .ad2-hero-card { padding: 20px; }
  .ad2-hero-top { flex-direction: column; }
  .ad2-hero-meta { grid-template-columns: 1fr; }
  .ad2-event { grid-template-columns: auto 1fr; }
  .ad2-event-time { display: none; }
}

/* Context line below status pills */
.ad2-context-line {
  margin-top: 14px;
  font-size: 13px;
  color: #737c8c;
  letter-spacing: -.01em;
}

/* Logo as link — no underline */
a.logo { text-decoration: none; color: inherit; }

/* ─── Status inline line ──────────────────────────────── */
.ad2-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 14px;
  color: #d8dfec;
  letter-spacing: -.01em;
}

.ad2-status-dot {
  width: 10px; height: 10px;
  border-radius: 999px; flex: 0 0 auto;
}

.ad2-status-sep { color: #4a5064; }

.ad2-status-text { font-weight: 700; letter-spacing: .04em; }
.ad2-status-green { color: #67e8a5; }
.ad2-status-red { color: #ff7a8b; }
.ad2-status-yellow { color: #ffd66b; }

/* ─── EMPTY STATE (reference: temp.html) ─── */
.es-status-row { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-bottom:18px; }
.es-pill { min-height:34px; padding:0 12px; border-radius:999px; display:inline-flex; align-items:center; gap:8px; background:rgba(255,255,255,.035); border:1px solid rgba(255,255,255,.08); color:#dbe3f0; font-size:13px; }
.es-pill .dot { width:8px; height:8px; border-radius:999px; background:#848a97; flex:0 0 auto; }

.es-hero h2 { margin:0; font-size:clamp(1.6rem,3vw,2.4rem); line-height:1; letter-spacing:-.04em; font-weight:800; color:rgba(255,255,255,.96); }
.es-hero p.sub { margin:14px 0 0; color:#9aa3b2; font-size:15px; line-height:1.65; max-width:48ch; letter-spacing:-.01em; }
.es-hero p.muted { margin:8px 0 0; color:#737c8c; font-size:12px; }

.es-cta-row { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin:24px 0; }
.es-cta { min-height:50px; padding:0 22px; border-radius:16px; display:inline-flex; align-items:center; justify-content:center; gap:10px; border:1px solid rgba(255,255,255,.12); background:linear-gradient(180deg,rgba(255,255,255,.14),rgba(255,255,255,.06)); color:#f5f7fb; font-size:15px; font-weight:700; letter-spacing:-.02em; cursor:pointer; box-shadow:0 16px 30px rgba(0,0,0,.22),0 0 0 1px rgba(255,255,255,.04) inset; transition:transform .2s,border-color .2s; }
.es-cta:hover { transform:translateY(-1px); border-color:rgba(255,255,255,.18); }
.es-cta-sub { color:#737c8c; font-size:13px; }

.es-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:4px; }
.es-card { padding:18px; border-radius:20px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.07); }
.es-card h3 { margin:0; font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:#dce3ef; }
.es-card p.card-sub { margin:7px 0 0; color:#9aa3b2; font-size:13px; line-height:1.55; }

.es-steps { display:grid; gap:14px; margin-top:16px; }
.es-step { display:grid; grid-template-columns:26px 1fr; gap:12px; align-items:start; }
.es-step-num { width:26px; height:26px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.08); color:#dfe5f1; font-size:12px; font-weight:700; }
.es-step h4 { margin:0; font-size:14px; letter-spacing:-.02em; color:#f0f2f8; }
.es-step p { margin:4px 0 0; color:#9aa3b2; font-size:13px; line-height:1.5; }

.es-token-row, .es-cmd { margin-top:10px; min-height:42px; border-radius:14px; border:1px solid rgba(255,255,255,.08); background:rgba(8,10,14,.72); display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 12px; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:12.5px; color:#dfe6f1; }
.es-copy-btn { min-height:30px; padding:0 10px; border-radius:10px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.04); color:#dce4f2; font-size:12px; font-weight:600; cursor:pointer; display:inline-flex; align-items:center; gap:5px; }

.es-outcomes { display:grid; gap:14px; margin-top:16px; }
.es-outcomes h4 { margin:0; font-size:14px; letter-spacing:-.02em; color:#f0f2f8; }
.es-outcomes p { margin:4px 0 0; color:#9aa3b2; font-size:13px; line-height:1.55; }

.es-method-tag { display:inline-flex; align-items:center; justify-content:center; padding:2px 8px; border-radius:999px; font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; border:1px solid transparent; }
.es-method-tag.cli { color:#d5c5ff; background:rgba(179,145,255,.10); border-color:rgba(179,145,255,.2); }
.es-method-tag.ws { color:#cae3ff; background:rgba(124,184,255,.10); border-color:rgba(124,184,255,.2); }
.es-method-tag.rest { color:#c6f8dc; background:rgba(103,232,165,.10); border-color:rgba(103,232,165,.2); }

@media (max-width:900px) { .es-grid { grid-template-columns:1fr; } }

/* ─── STREAM SIDEBAR (reference: temp.html) ─── */
.sl-lines { display:grid; gap:10px; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; font-size:12.5px; color:#e4e9f2; }
.sl-line { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:center; padding:10px 12px; border-radius:14px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.05); animation:floatIn .7s ease both; }
.sl-line:nth-child(1) { animation-delay:.05s; }
.sl-line:nth-child(2) { animation-delay:.16s; }
.sl-line:nth-child(3) { animation-delay:.26s; }
.sl-line:nth-child(4) { animation-delay:.36s; }
.sl-tag { min-width:44px; height:22px; padding:0 8px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; font-size:10px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; border:1px solid transparent; }
.sl-tag.init { color:#d5c5ff; background:rgba(179,145,255,.10); border-color:rgba(179,145,255,.2); }
.sl-tag.scan { color:#cae3ff; background:rgba(124,184,255,.10); border-color:rgba(124,184,255,.2); }
.sl-tag.test { color:#ffe59d; background:rgba(255,214,107,.10); border-color:rgba(255,214,107,.2); }
.sl-tag.edit { color:#c6f8dc; background:rgba(103,232,165,.10); border-color:rgba(103,232,165,.2); }
.sl-text { color:#e5eaf3; line-height:1.45; }
.sl-footer { margin-top:16px; padding-top:14px; border-top:1px solid rgba(255,255,255,.07); display:flex; align-items:center; gap:8px; font-size:13px; color:var(--green,#67e8a5); }
.sl-pulse { width:8px; height:8px; border-radius:50%; background:#67e8a5; animation:pulse 2s infinite; }
@keyframes floatIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }
.ad2-status-dim { color: #737c8c; }

/* ─── AGENTS STORE (Raycast Clone) ─── */

/* -- Store Page Layout -- */
.rc-store-page {
  min-height: 100vh;
  overflow-x: hidden;
}

/* -- Hero Section -- */
.rc-hero {
  text-align: center;
  padding: 60px 40px 48px;
  position: relative;
  overflow: hidden;
}

.rc-hero::before {
  display: none;
}

/* -- Scrolling Icon Strip with Fade -- */
.rc-scroll-strip {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 0 auto 48px;
  padding: 20px 0;
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
}

.rc-scroll-track {
  display: flex;
  gap: 14px;
  animation: rc-scroll 30s linear infinite;
  width: max-content;
}

.rc-scroll-track:hover {
  animation-play-state: paused;
}

@keyframes rc-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.rc-scroll-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
  transition: transform 0.3s ease, border-color 0.3s ease;
  overflow: visible;
}

.rc-scroll-icon:hover {
  transform: scale(1.12);
  border-color: rgba(255,255,255,0.18);
}

.rc-scroll-icon .rc-tool-label {
  position: absolute;
  bottom: -18px;
  font-size: 9px;
  color: rgba(255,255,255,0.35);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.rc-scroll-icon:hover .rc-tool-label { opacity: 1; }

.rc-scroll-icon svg, .rc-scroll-icon img { width: 24px; height: 24px; object-fit: contain; }
.rc-f-icon img, .rc-e-icon img { width: 100%; height: 100%; object-fit: contain; }

.rc-hero h1 {
  font-size: clamp(48px, 8vw, 80px);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  line-height: 1;
  position: relative;
}

.rc-hero .rc-subtitle {
  font-size: 18px;
  color: rgba(255,255,255,0.45);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* -- Content Container -- */
.rc-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* -- Section Headers -- */
.rc-section-header {
  margin-bottom: 24px;
}

.rc-section-header h2 {
  font-size: 22px;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.rc-section-header p {
  font-size: 14px;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

/* -- Featured Cards (3-column tall cards) -- */
.rc-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 64px;
}

@media (max-width: 800px) {
  .rc-featured-grid { grid-template-columns: 1fr; }
}

.rc-featured-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 28px 32px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all 0.25s ease;
}

.rc-featured-card:hover {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
  transform: translateY(-2px);
}

.rc-featured-card .rc-f-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
}

.rc-featured-card .rc-f-icon svg { width: 28px; height: 28px; }

.rc-featured-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0 0 8px;
}

.rc-featured-card .rc-f-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
  margin: 0 0 16px;
  flex: 1;
}

.rc-featured-card .rc-f-author {
  font-size: 12px;
  color: rgba(255,255,255,0.35);
  margin-bottom: 16px;
}

.rc-install-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #e0e0e0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rc-install-btn:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #ffffff;
}

/* -- Extensions Grid (2-column list cards) -- */
.rc-ext-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

@media (max-width: 700px) {
  .rc-ext-grid { grid-template-columns: 1fr; }
}

.rc-ext-card {
  display: flex;
  flex-direction: column;
  padding: 20px 24px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.rc-ext-card:hover {
  border-color: rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.04);
}

.rc-ext-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.rc-ext-card-header .rc-e-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.rc-ext-card-header .rc-e-icon svg { width: 18px; height: 18px; }

.rc-ext-card-header .rc-e-name {
  font-size: 15px;
  font-weight: 600;
  color: #f0f0f0;
  flex: 1;
  margin: 0;
}

.rc-ext-card-header .rc-install-btn {
  padding: 6px 14px;
  font-size: 12px;
}

.rc-ext-card .rc-e-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  line-height: 1.5;
  margin: 0 0 14px;
}

.rc-ext-card .rc-e-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-top: auto;
}

.rc-ext-card .rc-e-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* -- Category Tabs -- */
.rc-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  width: fit-content;
}

.rc-tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.5);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rc-tab:hover { color: rgba(255,255,255,0.8); }
.rc-tab.active {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
}

/* -- Provider Detail (kept for detail view) -- */
.es-provider-detail {
  background: rgba(11, 11, 11, 0.6);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: 0;
  animation: floatIn 0.3s ease-out forwards;
}

.es-back-btn {
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}

.es-back-btn:hover { color: #f5f7fb; }

.es-provider-header h3 {
  font-size: 22px;
  color: #f5f7fb;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.es-provider-header p {
  font-size: 14px;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

.es-instruction-box {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.es-ib-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #d5c5ff;
  margin-bottom: 8px;
}

.es-instruction-box p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 12px;
}

/* Typewriter Effect CSS */
@keyframes text-flip { 0%, 22% { content: "Agents"; } 25%, 47% { content: "CLIs"; } 50%, 72% { content: "MCPs"; } 75%, 97% { content: "Extensions"; } 100% { content: "Agents"; } } @keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } } .tw-word::before { content: "Agents"; animation: text-flip 6s steps(1) infinite; } .tw-cursor { display: inline-block; width: 2px; height: 1.2em; background: var(--brand-color-accent-primary, #10b981); vertical-align: text-bottom; margin-left: 4px; animation: blink 1s step-end infinite; }

/* === AGENT COMMAND CENTER (Redesign) === */
.ac-layout {
  --bg: #0B0B0B;
  --bg2: #0d0d0d;
  --panel: rgba(18, 18, 20, 0.78);
  --panel-strong: rgba(14, 14, 16, 0.96);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .12);
  --text: #e4e4e7;
  --muted: #9aa3b2;
  --soft: #758093;
  --green: #67e8a5;
  --blue: #7aa2f7;
  --yellow: #ffd66b;
  --red: #ff7d8f;
  --purple: #b391ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --max: 1260px;
  
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
      radial-gradient(ellipse 90% 50% at 50% 40%, rgba(122, 162, 247, 0.12), transparent 70%),
      radial-gradient(ellipse 60% 40% at 75% 70%, rgba(192, 132, 252, 0.07), transparent 60%),
      radial-gradient(ellipse 50% 35% at 25% 65%, rgba(122, 162, 247, 0.04), transparent 50%),
      #0B0B0B;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.ac-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
      linear-gradient(rgba(255, 255, 255, .016) 1px, transparent 1px),
      linear-gradient(90deg, rgba(255, 255, 255, .016) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 34%, transparent 82%);
  -webkit-mask-image: radial-gradient(circle at center, black 34%, transparent 82%);
  opacity: .18;
  z-index: 0;
}

.ac-wrap {
  width: min(calc(100% - 40px), var(--max));
  margin: 0 auto;
  position: relative;
  z-index: 1;
  padding: 18px 0 72px;
}

.ac-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  margin-bottom: 22px;
}

.ac-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: inherit;
  text-decoration: none;
}

.ac-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ac-chip, .ac-ghost, .ac-btn, .ac-tab {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: rgba(255, 255, 255, .45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.ac-crumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 16px;
}
.ac-crumb a { color: inherit; text-decoration: none; }
.ac-crumb .sep { opacity: .45; }

.ac-hero {
  border-radius: var(--radius-xl);
  background:
      radial-gradient(circle at 20% 14%, rgba(124, 184, 255, .09), transparent 24%),
      radial-gradient(circle at 82% 18%, rgba(179, 145, 255, .11), transparent 28%),
      linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
  margin-bottom: 22px;
}

.ac-hero-inner {
  padding: 26px;
  display: grid;
  gap: 22px;
}

.ac-hero-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.ac-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .07);
  color: #d7dff0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.ac-hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4.2vw, 4.8rem);
  line-height: .95;
  letter-spacing: -.07em;
  font-weight: 800;
  max-width: 11ch;
  color: #fff;
}

.ac-hero-task {
  margin: 14px 0 0;
  color: #e5ebf4;
  font-size: 1.06rem;
  line-height: 1.6;
  max-width: 56ch;
  letter-spacing: -.01em;
}

.ac-hero-context {
  margin-top: 12px;
  color: var(--muted);
  font-size: 14px;
}

.ac-hero-status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ac-status-pill {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: #dce4f2;
  font-size: 13px;
}

.ac-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}
.ac-dot.offline { background: #808897; }
.ac-dot.run { background: var(--green); box-shadow: 0 0 14px rgba(103, 232, 165, .7); }
.ac-dot.done { background: var(--blue); box-shadow: 0 0 14px rgba(124, 184, 255, .55); }

.ac-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.ac-btn {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.ac-btn:hover, .ac-tab:hover, .ac-ghost:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .14);
}

.ac-btn.primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .22), 0 0 0 1px rgba(255, 255, 255, .04) inset;
}

.ac-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 16px;
}

.ac-hero-box {
  padding: 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}

.ac-box-label {
  color: var(--soft);
  font-size: 12px;
  letter-spacing: -.01em;
}

.ac-now-title {
  margin-top: 8px;
  font-size: 1rem;
  letter-spacing: -.03em;
}

.ac-now-copy {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ac-health-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ac-health-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #e5ebf4;
  font-size: 13px;
}
.ac-health-item span:last-child { color: var(--muted); }

.ac-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.ac-tab.active {
  background: rgba(122, 162, 247, 0.15);
  color: #7aa2f7;
  border-color: rgba(122, 162, 247, 0.3);
}

.ac-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) 320px;
  gap: 20px;
  align-items: start;
}

.ac-panel {
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.ac-panel-head {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.ac-panel-head h2, .ac-side-block h3 {
  margin: 0;
  font-size: 1.02rem;
  letter-spacing: -.03em;
  color: #fff;
}

.ac-panel-head p, .ac-side-block p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ac-timeline { padding: 8px 10px 12px; }

.ac-event {
  display: grid;
  grid-template-columns: 74px auto 1fr;
  gap: 12px;
  align-items: start;
  padding: 12px 10px;
  border-radius: 16px;
  transition: background .16s ease;
}

.ac-event:hover { background: rgba(255, 255, 255, .024); }

.ac-time {
  color: var(--soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  white-space: nowrap;
  padding-top: 2px;
}

.ac-badge {
  min-width: 42px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.ac-init { background: rgba(179, 145, 255, .10); color: #dccaff; border-color: rgba(179, 145, 255, .2); }
.ac-run { background: rgba(124, 184, 255, .10); color: #c7e0ff; border-color: rgba(124, 184, 255, .18); }
.ac-ok { background: rgba(103, 232, 165, .10); color: #cbf7dc; border-color: rgba(103, 232, 165, .18); }
.ac-err { background: rgba(255, 125, 143, .10); color: #ffd1d7; border-color: rgba(255, 125, 143, .18); }

.ac-event-text {
  color: #e5eaf3;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -.01em;
}

.ac-event-sub {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ac-sidebar { display: grid; gap: 16px; }
.ac-side-block { padding: 18px; }

.ac-kv {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 10px 12px;
  margin-top: 14px;
  align-items: start;
}
.ac-kv dt { color: var(--soft); font-size: 12px; margin: 0; }
.ac-kv dd { margin: 0; color: #e6ebf3; font-size: 13px; line-height: 1.45; word-break: break-word; }

.ac-side-actions { display: grid; gap: 10px; margin-top: 14px; }

.ac-mini-btn {
  min-height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  background: rgba(255, 255, 255, .03);
  color: #dfe5f1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ac-mini-btn:hover { background: rgba(255, 255, 255, .05); }

.ac-remote {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  color: #dfe5f1;
  font-size: 13px;
}
.ac-remote .pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 125, 143, .65);
  flex: 0 0 auto;
}
.ac-remote .pulse.active {
  background: var(--green);
  box-shadow: 0 0 14px rgba(103, 232, 165, .65);
}

@media (max-width: 1100px) {
  .ac-hero-grid, .ac-content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .ac-wrap { width: min(calc(100% - 24px), var(--max)); }
  .ac-topbar, .ac-hero-top { flex-direction: column; align-items: stretch; }
  .ac-hero-inner, .ac-hero { padding-inline: 0; }
  .ac-hero-inner { padding: 20px; }
  .ac-content-grid { grid-template-columns: 1fr; }
  .ac-event { grid-template-columns: auto 1fr; }
  .ac-time { display: none; }
}
