/* ============================================================
   Content Machine — Global Stylesheet
   Dark industrial / developer-tool aesthetic
   ============================================================ */

/* --- Google Fonts import --- */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&family=DM+Sans:wght@400;500;700&family=Syne:wght@700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-hover: #1c1c1c;
  --border: #2a2a2a;
  --border-accent: #3a3a3a;
  --text-primary: #f0f0f0;
  --text-secondary: #888888;
  --text-muted: #555555;
  --accent: #e8ff00;
  --accent-dim: #b8cc00;
  --danger: #ff4444;
  --success: #00cc66;
  --platform-youtube: #ff4444;
  --platform-tiktok: #00f2ea;
  --platform-instagram: #e1306c;
  --platform-facebook: #1877f2;

  --sidebar-collapsed: 56px;
  --sidebar-expanded: 220px;
  --topbar-height: 52px;
  --transition-fast: 150ms ease;
  --transition-med: 220ms ease;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
}

a {
  color: var(--text-primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul, ol {
  list-style: none;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ============================================================
   LAYOUT — Sidebar
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-collapsed);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width var(--transition-med);
  z-index: 100;
}

.sidebar:hover {
  width: var(--sidebar-expanded);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px;
  height: var(--topbar-height);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  white-space: nowrap;
}

.sidebar-logo-icon {
  width: 24px;
  height: 24px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  color: #0a0a0a;
  letter-spacing: -0.5px;
}

.sidebar-logo-text {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 13px;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity var(--transition-med);
}

.sidebar:hover .sidebar-logo-text {
  opacity: 1;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  border-radius: 0;
  transition: background var(--transition-fast), color var(--transition-fast);
  font-size: 13px;
  font-weight: 500;
}

.sidebar-nav a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-nav a.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-right: 2px solid var(--accent);
}

.sidebar-nav a .nav-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}

.sidebar-nav a .nav-label {
  opacity: 0;
  transition: opacity var(--transition-med);
}

.sidebar:hover .sidebar-nav a .nav-label {
  opacity: 1;
}

/* ============================================================
   LAYOUT — Top bar + Main content
   ============================================================ */
.layout {
  margin-left: var(--sidebar-collapsed);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.topbar-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

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

.topbar-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.main-content {
  flex: 1;
  padding: 32px;
  max-width: 1400px;
  width: 100%;
}

/* ============================================================
   BANNER
   ============================================================ */
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(232, 255, 0, 0.06);
  border: 1px solid rgba(232, 255, 0, 0.3);
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-primary);
}

.banner a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

h1 { font-size: 28px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }

.section-heading {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-heading .count-badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 100px;
}

.label-muted {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--transition-fast), color var(--transition-fast), opacity var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--accent-dim);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  font-family: 'DM Sans', sans-serif;
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-accent);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 5px 10px;
}

.btn-danger:hover {
  background: rgba(255, 68, 68, 0.08);
  border-color: rgba(255, 68, 68, 0.2);
}

.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  overflow: hidden;
}

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

.stat-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 6px;
}

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

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
}

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

.card-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ============================================================
   VIDEO CARD
   ============================================================ */
.video-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.video-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.video-row:hover {
  background: var(--bg-hover);
}

.video-row.expanded {
  flex-wrap: wrap;
  background: var(--bg-hover);
}

.video-rank {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
  width: 20px;
  flex-shrink: 0;
  text-align: right;
}

.video-thumb {
  width: 120px;
  height: 68px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.video-thumb-placeholder {
  width: 120px;
  height: 68px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 20px;
}

.video-info {
  flex: 1;
  min-width: 0;
}

.video-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.video-channel {
  font-size: 12px;
  color: var(--text-secondary);
}

.video-expand-detail {
  display: none;
  width: 100%;
  padding: 12px 0 4px 156px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.video-row.expanded .video-expand-detail {
  display: block;
}

.video-expand-detail a {
  color: var(--accent);
  font-size: 12px;
}

.video-expand-detail .expand-row {
  display: flex;
  gap: 16px;
  margin-top: 8px;
}

.video-expand-detail .expand-label {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

/* ============================================================
   METRIC CHIP + BADGES
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.chip-accent {
  background: rgba(232, 255, 0, 0.08);
  color: var(--accent);
  border-color: rgba(232, 255, 0, 0.2);
}

.chip-success {
  background: rgba(0, 204, 102, 0.08);
  color: var(--success);
  border-color: rgba(0, 204, 102, 0.2);
}

.chip-danger {
  background: rgba(255, 68, 68, 0.08);
  color: var(--danger);
  border-color: rgba(255, 68, 68, 0.2);
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'DM Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  color: #0a0a0a;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.platform-badge.youtube  { background: var(--platform-youtube); color: #fff; }
.platform-badge.tiktok   { background: var(--platform-tiktok); color: #0a0a0a; }
.platform-badge.instagram { background: var(--platform-instagram); color: #fff; }
.platform-badge.facebook { background: var(--platform-facebook); color: #fff; }

.type-badge {
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.type-badge.longform {
  background: rgba(232, 255, 0, 0.1);
  color: var(--accent);
  border: 1px solid rgba(232, 255, 0, 0.25);
}

.type-badge.shortform {
  background: rgba(0, 242, 234, 0.08);
  color: var(--platform-tiktok);
  border: 1px solid rgba(0, 242, 234, 0.2);
}

.upcoming-badge {
  display: inline-flex;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(0, 204, 102, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 204, 102, 0.2);
}

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

.data-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  white-space: nowrap;
}

.data-table thead th:first-child {
  border-radius: var(--radius-sm) 0 0 0;
}

.data-table thead th:last-child {
  border-radius: 0 var(--radius-sm) 0 0;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

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

.data-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
  color: var(--text-primary);
}

.data-table tbody td.mono-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-secondary);
}

.data-table tbody td.highlight-cell {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.data-table tbody td .cell-title {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: var(--text-primary);
}

.data-table tbody td .cell-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-input,
.form-select,
.form-textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 9px 12px;
  font-size: 13px;
  transition: border-color var(--transition-fast);
  width: 100%;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-accent);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar .form-select {
  width: auto;
  min-width: 140px;
}

.filter-bar .form-select.compact {
  min-width: 100px;
}

/* ============================================================
   SCENARIOS — Two-column layout
   ============================================================ */
.scenarios-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  min-height: calc(100vh - var(--topbar-height) - 64px);
}

.scenario-list-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-y: auto;
  max-height: calc(100vh - var(--topbar-height) - 64px);
}

.scenario-list-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 14px;
}

.scenario-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.scenario-item:hover {
  background: var(--bg-hover);
}

.scenario-item.active {
  background: var(--bg-hover);
  border-left: 2px solid var(--accent);
}

.scenario-item:last-child {
  border-bottom: none;
}

.scenario-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scenario-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scenario-item-date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-muted);
}

.scenario-viewer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  overflow-y: auto;
  max-height: calc(100vh - var(--topbar-height) - 64px);
}

.scenario-content-pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  margin: 20px 0;
  max-height: 400px;
  overflow-y: auto;
}

.scenario-editor-textarea {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-primary);
  white-space: pre-wrap;
  width: 100%;
  min-height: 320px;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition-fast);
}

.scenario-editor-textarea:focus {
  border-color: var(--border-accent);
}

.inspiration-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0;
}

/* ============================================================
   SETTINGS — System info card
   ============================================================ */
.sysinfo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 8px;
}

.sysinfo-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sysinfo-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

.api-key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

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

.api-key-status {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

.api-key-status.ok { color: var(--success); }
.api-key-status.missing { color: var(--danger); }

/* ============================================================
   TERMINAL LOG
   ============================================================ */
.terminal-log {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.8;
  color: var(--text-secondary);
  min-height: 80px;
  max-height: 200px;
  overflow-y: auto;
}

.terminal-log .log-line {
  display: flex;
  gap: 10px;
}

.terminal-log .log-time {
  color: var(--text-muted);
  flex-shrink: 0;
}

.terminal-log .log-msg {
  color: var(--success);
}

.terminal-log .log-msg.running {
  color: var(--accent);
}

/* ============================================================
   SKELETON LOADER
   ============================================================ */
@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

.skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  animation: pulse 1.6s ease-in-out infinite;
}

.skeleton-stat {
  height: 96px;
}

.skeleton-row {
  height: 64px;
  border-radius: var(--radius-sm);
  margin-bottom: 1px;
}

.skeleton-text {
  height: 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  animation: pulse 1.6s ease-in-out infinite;
}

/* ============================================================
   EMPTY STATE + ERROR
   ============================================================ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 32px;
  text-align: center;
}

.empty-state-icon {
  font-size: 36px;
  opacity: 0.3;
}

.empty-state-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--text-secondary);
}

.empty-state-sub {
  font-size: 13px;
  color: var(--text-muted);
}

.error-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 68, 68, 0.06);
  border: 1px solid rgba(255, 68, 68, 0.2);
  border-radius: var(--radius-md);
  color: var(--danger);
  font-size: 13px;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 0;
  justify-content: flex-end;
}

.pagination-info {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================================
   RUN NOW INDICATOR
   ============================================================ */
.run-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-muted);
}

.run-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
}

.run-dot.running {
  background: var(--accent);
  animation: pulse 1s ease-in-out infinite;
}

.run-dot.success {
  background: var(--success);
}

/* ============================================================
   DIVIDER
   ============================================================ */
.divider {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

.section-gap {
  margin-bottom: 32px;
}

/* ============================================================
   CHANNELS TABLE
   ============================================================ */
.channel-url-cell a {
  color: var(--text-secondary);
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
  display: inline-block;
}

.channel-url-cell a:hover {
  color: var(--accent);
}

/* ============================================================
   RESPONSIVE — mobile
   ============================================================ */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--topbar-height);
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    overflow: visible;
    z-index: 200;
  }

  .sidebar:hover {
    width: 100%;
  }

  .sidebar-logo {
    border-bottom: none;
    border-right: 1px solid var(--border);
    height: 100%;
  }

  .sidebar-logo-text,
  .sidebar:hover .sidebar-logo-text {
    opacity: 1;
  }

  .sidebar-nav {
    flex-direction: row;
    padding: 0 12px;
    gap: 0;
  }

  .sidebar-nav a .nav-label,
  .sidebar:hover .sidebar-nav a .nav-label {
    display: none;
  }

  .sidebar-nav a.active {
    border-right: none;
    border-bottom: 2px solid var(--accent);
  }

  .layout {
    margin-left: 0;
    margin-top: var(--topbar-height);
  }

  .topbar {
    display: none;
  }

  .main-content {
    padding: 16px;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card-grid-2 {
    grid-template-columns: 1fr;
  }

  .scenarios-layout {
    grid-template-columns: 1fr;
  }

  .scenario-list-panel {
    max-height: 280px;
  }

  .sysinfo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filter-bar {
    gap: 6px;
  }

  .filter-bar .form-select {
    min-width: 110px;
  }
}
