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

:root {
  --background: #343541;
  --foreground: #ececf1;
  --card: #40414f;
  --card-foreground: #ececf1;
  --muted: #40414f;
  --muted-foreground: #8e8ea0;
  --border: #4d4d4f;
  --input: #40414f;
  --ring: #8e8ea0;
  --radius: 0.5rem;
  --sidebar-bg: #202123;
  --primary: #10a37f;
  --primary-hover: #1a7f64;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* Light Theme */
[data-theme="light"] {
  --background: #f7f7f8;
  --foreground: #1a1a1a;
  --card: #ffffff;
  --card-foreground: #1a1a1a;
  --muted: #f0f0f0;
  --muted-foreground: #6b6b6b;
  --border: #e5e5e5;
  --input: #ffffff;
  --ring: #6b6b6b;
  --sidebar-bg: #ffffff;
}

[data-theme="light"] .sidebar {
  border-right-color: var(--border);
  box-shadow: 2px 0 8px rgba(0,0,0,0.05);
}

[data-theme="light"] .nav-item:hover {
  background: var(--muted);
}

[data-theme="light"] .command-palette {
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--background);
  color: var(--foreground);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Dashboard Layout */
.dashboard {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
}

.sidebar.collapsed {
  width: 0;
  transform: translateX(-260px);
  overflow: hidden;
}

/* When sidebar is collapsed, show expand button and adjust content */
.dashboard:has(.sidebar.collapsed) .sidebar-expand {
  opacity: 1;
  pointer-events: auto;
}

.dashboard:has(.sidebar.collapsed) .content {
  margin-left: 0;
}

.sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-header h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.sidebar-header .subtitle {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem;
}

.nav-section {
  margin-bottom: 0.5rem;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  padding: 0.75rem 0.75rem 0.5rem;
  text-transform: uppercase;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #10a37f;
  transform: scaleY(0);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background: var(--muted);
  color: var(--foreground);
  padding-left: 1rem;
}

.nav-item:active {
  transform: scale(0.98);
}

.nav-item.active {
  background: var(--muted);
  color: var(--foreground);
}

.nav-item.active::before {
  transform: scaleY(1);
}

.nav-icon {
  font-family: monospace;
  font-size: 14px;
  width: 20px;
  text-align: center;
  opacity: 0.5;
}

.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  font-size: 11px;
  padding: 0.125rem 0.5rem;
  background: #10a37f;
  color: #ffffff;
  font-weight: 500;
  border-radius: 9999px;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: sticky;
  bottom: 0;
  background: var(--sidebar-bg);
}

.sidebar-footer .version {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-left: auto;
}

.theme-toggle {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-toggle:hover {
  background: var(--muted);
  color: var(--foreground);
  border-color: var(--muted-foreground);
}

.theme-icon {
  font-size: 14px;
}

/* Icon set via JavaScript textContent */

.sidebar-toggle {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-toggle:hover {
  background: var(--muted);
  color: var(--foreground);
  transform: scale(1.05);
}

.sidebar-toggle:active {
  transform: scale(0.95);
}

.toggle-icon {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cache-bust-btn {
  width: 28px;
  height: 28px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cache-bust-btn:hover {
  background: var(--muted);
  color: var(--foreground);
  transform: rotate(180deg);
}

.cache-bust-btn:active {
  transform: rotate(180deg) scale(0.9);
}

/* Expand button (visible when sidebar collapsed) */
.sidebar-expand {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: 36px;
  height: 36px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.sidebar-expand:hover {
  background: var(--muted);
  color: var(--foreground);
  transform: scale(1.1);
}

.sidebar-expand:active {
  transform: scale(0.95);
}

/* Main Content */
.content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  min-height: 100vh;
  transition: margin-left 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed ~ .content-wrapper .content {
  margin-left: 0;
}

/* Page system */
.page {
  display: none;
  max-width: 1200px;
}

.page.active {
  display: block;
}

/* Page Header */
.page-header {
  margin-bottom: 2rem;
}

.page-header h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.page-header p {
  font-size: 14px;
  color: var(--muted-foreground);
}

.page-actions {
  margin-top: 1rem;
}

.action-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: #10a37f;
  border: none;
  border-radius: var(--radius);
  color: #ffffff;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.action-btn:hover {
  opacity: 0.85;
}

/* Stats Grid (Home) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.02em;
}

.stat-desc {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* Info Section */
.info-section {
  margin-top: 2rem;
}

.info-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.link-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.15s ease;
}

.link-card:hover {
  background: var(--muted);
}

.link-icon {
  font-size: 11px;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  background: var(--muted);
  color: var(--muted-foreground);
  border-radius: calc(var(--radius) - 2px);
  font-family: monospace;
}

/* Legend */
.legend {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  color: var(--muted-foreground);
}

.legend-circle {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
}

.legend-circle.new {
  background: #22c55e;
}

/* Feedback List */
.list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.empty {
  padding: 3rem;
  text-align: center;
  color: var(--muted-foreground);
}

.item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

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

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

.status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex-shrink: 0;
}

.status.new {
  background: #22c55e;
}

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

.title {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.meta {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-top: 0.125rem;
}

/* Quality Legend */
.quality-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.dim-chip {
  font-size: 11px;
  font-family: monospace;
  padding: 0.25rem 0.5rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
}

/* Quality Grid */
.quality-grid {
  overflow-x: auto;
}

.quality-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;
}

.quality-table th,
.quality-table td {
  padding: 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.quality-table th {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  background: var(--muted);
}

.quality-table th:first-child,
.quality-table td:first-child {
  text-align: left;
  padding-left: 1rem;
}

.quality-table td:first-child {
  color: var(--foreground);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-full { color: #22c55e; }
.cell-partial { color: #eab308; }
.cell-empty { color: var(--muted-foreground); }
.cell-zero { color: #ef4444; }

/* Workers Grid */
.workers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1rem;
}

.worker-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.worker-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.worker-url {
  font-size: 12px;
  font-family: monospace;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  word-break: break-all;
}

.worker-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.worker-endpoints {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.endpoint {
  font-size: 11px;
  font-family: monospace;
  padding: 0.25rem 0.5rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted-foreground);
}

/* Info Cards */
/* Stat Grid for Storage/DB pages */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}

.stat-card.warning {
  border-color: var(--warning);
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
  font-family: var(--font-mono);
}

.stat-card.warning .stat-value {
  color: var(--warning);
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.5rem;
}

/* Buckets Grid for Storage */
.buckets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.bucket-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.bucket-card.primary {
  border-color: var(--primary);
  background: rgba(168, 85, 247, 0.05);
}

.bucket-name {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.bucket-card.primary .bucket-name {
  color: var(--primary);
}

.bucket-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.bucket-size {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

.bucket-count {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  align-self: flex-end;
}

.bucket-meta {
  font-size: 0.7rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1rem;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.info-card.important {
  border-color: #ef4444;
}

.info-card-header {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 14px;
  gap: 1rem;
}

.info-label {
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.info-value {
  color: var(--foreground);
  text-align: right;
  word-break: break-word;
}

.info-value.mono {
  font-family: monospace;
  font-size: 12px;
}

.info-value.warning {
  color: #ef4444;
}

.warning-text {
  color: #ef4444;
  font-size: 14px;
  line-height: 1.5;
}

.code-block {
  font-family: monospace;
  font-size: 12px;
  background: var(--muted);
  padding: 1rem;
  border-radius: var(--radius);
  overflow-x: auto;
  white-space: pre;
  color: var(--muted-foreground);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
}

.modal-box {
  position: relative;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.5rem;
}

.close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  font-size: 20px;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
}

.close:hover {
  color: var(--foreground);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.field {
  margin-bottom: 1rem;
}

.field-label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  margin-bottom: 0.25rem;
}

.field-value {
  font-size: 14px;
  color: var(--foreground);
  line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--muted);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted-foreground);
}

/* Content Wrapper (for mobile sliding) */
.content-wrapper {
  display: contents;
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--sidebar-bg);
  border-bottom: 1px solid var(--border);
  z-index: 50;
  align-items: center;
  padding: 0 1rem;
  gap: 1rem;
}

.mobile-header h1 {
  font-size: 16px;
  font-weight: 600;
  color: var(--foreground);
}

/* Hamburger Button */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--foreground);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

/* Search and Filter Inputs */
.search-input {
  font-family: inherit;
  font-size: 14px;
  padding: 0.5rem 0.75rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  width: 200px;
  margin-right: 0.5rem;
}

.search-input::placeholder {
  color: var(--muted-foreground);
}

.search-input:focus {
  outline: none;
  border-color: #10a37f;
}

.filter-select {
  font-family: inherit;
  font-size: 14px;
  padding: 0.5rem 0.75rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  margin-right: 0.5rem;
  cursor: pointer;
}

.filter-select:focus {
  outline: none;
  border-color: #10a37f;
}

/* Episodes Stats Bar */
.episodes-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.mini-stat {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border-radius: var(--radius);
  min-width: 100px;
}

.mini-stat.warning .mini-stat-value {
  color: #eab308;
}

.mini-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--foreground);
}

.mini-stat-label {
  font-size: 11px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Episode Item in List */
.episode-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

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

.episode-item:hover {
  background: var(--muted);
}

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

.episode-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.episode-radioshow {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 0.5rem;
}

.episode-logline {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.episode-badges {
  display: flex;
  gap: 0.375rem;
  flex-shrink: 0;
}

.badge {
  font-size: 10px;
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

.badge-short {
  background: #eab30833;
  color: #eab308;
}

.badge-long {
  background: #ef444433;
  color: #ef4444;
}

.badge-ok {
  background: #22c55e33;
  color: #22c55e;
}

.badge-missing {
  background: #8e8ea033;
  color: #8e8ea0;
}

/* Load More Controls */
.load-more-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 1rem;
}

.load-more-info {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Expandable Sections */
.expandable-section {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.expand-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border: none;
  color: var(--foreground);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}

.expand-btn:hover {
  background: var(--card);
}

.expand-icon {
  font-size: 0.7rem;
  transition: transform 0.2s ease;
}

.expand-meta {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  font-weight: 400;
}

.expand-content {
  display: none;
  padding: 1rem;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.expand-content.expanded {
  display: block;
}

.content-box {
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--foreground);
  white-space: pre-wrap;
  max-height: 400px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.themes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.theme-tag {
  padding: 0.25rem 0.75rem;
  background: rgba(16, 163, 127, 0.15);
  color: #10a37f;
  border-radius: 999px;
  font-size: 0.8rem;
}

.ner-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ner-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.8rem;
  background: var(--muted);
  color: var(--foreground);
}

.ner-tag small {
  opacity: 0.6;
  margin-left: 0.25rem;
}

.ner-tag.person { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.ner-tag.gpe, .ner-tag.location { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.ner-tag.org, .ner-tag.organization { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.ner-tag.date { background: rgba(234, 179, 8, 0.15); color: #eab308; }

.quality-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
}

.quality-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: var(--muted);
  border-radius: 4px;
  font-size: 0.8rem;
}

.quality-row span:first-child {
  color: var(--muted-foreground);
}

.quality-row span:last-child {
  font-weight: 500;
  color: var(--foreground);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
}

.pagination button {
  font-family: inherit;
  font-size: 13px;
  padding: 0.5rem 0.75rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
}

.pagination button:hover {
  background: var(--card);
  color: var(--foreground);
}

.pagination button.active {
  background: #10a37f;
  color: #ffffff;
  border-color: #10a37f;
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Pipeline Overview */
.pipeline-overview {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.pipeline-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.pipeline-card-header {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.pipeline-progress {
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar {
  height: 100%;
  background: #10a37f;
  border-radius: 4px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-bar.warning {
  background: #eab308;
}

.progress-bar.danger {
  background: #ef4444;
}

.pipeline-stats {
  font-size: 14px;
  color: var(--foreground);
  text-align: center;
}

/* Worker Status Grid */
.worker-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.worker-status-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.worker-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex-shrink: 0;
}

.worker-status-dot.active {
  background: #22c55e;
}

.worker-status-dot.error {
  background: #ef4444;
}

.worker-status-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
}

.worker-status-url {
  font-size: 11px;
  font-family: monospace;
  color: var(--muted-foreground);
  margin-left: auto;
}

/* Validation List */
.validation-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 400px;
  overflow-y: auto;
}

.validation-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

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

.validation-issue {
  font-size: 11px;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 500;
  flex-shrink: 0;
}

.validation-issue.short {
  background: #eab30833;
  color: #eab308;
}

.validation-issue.long {
  background: #ef444433;
  color: #ef4444;
}

.validation-issue.banned {
  background: #a855f733;
  color: #a855f7;
}

.validation-episode {
  flex: 1;
  color: var(--foreground);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.validation-chars {
  font-size: 12px;
  color: var(--muted-foreground);
  font-family: monospace;
}

/* Episode Detail Modal */
.episode-detail {
  max-height: 70vh;
  overflow-y: auto;
}

.detail-section {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.detail-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.detail-section-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 13px;
}

.detail-label {
  color: var(--muted-foreground);
}

.detail-value {
  color: var(--foreground);
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

.detail-value.good {
  color: #22c55e;
}

.detail-value.warning {
  color: #eab308;
}

.detail-value.bad {
  color: #ef4444;
}

.logline-preview {
  font-size: 13px;
  color: var(--foreground);
  line-height: 1.5;
  padding: 0.75rem;
  background: var(--muted);
  border-radius: var(--radius);
  margin-top: 0.5rem;
}

.logline-char-count {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
  text-align: right;
}

/* Cost Explorer */
.cost-summary {
  margin-bottom: 2rem;
}

.cost-total-card {
  background: linear-gradient(135deg, #10a37f 0%, #0d8a6a 100%);
  border-radius: var(--radius);
  padding: 1.5rem 2rem;
  text-align: center;
  max-width: 300px;
}

.cost-total-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.5rem;
}

.cost-total-value {
  font-size: 36px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.cost-total-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.25rem;
}

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

.cost-badge {
  font-size: 10px;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-weight: 500;
  text-transform: uppercase;
}

.cost-badge.free {
  background: #22c55e33;
  color: #22c55e;
}

.cost-badge.paid {
  background: #eab30833;
  color: #eab308;
}

.cost-row {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.cost-value {
  font-weight: 600;
}

.cost-value.free {
  color: #22c55e;
}

.cost-value.paid {
  color: #eab308;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.tip-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.tip-icon {
  width: 28px;
  height: 28px;
  background: #10a37f;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.tip-content {
  flex: 1;
}

.tip-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.tip-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.4;
}

/* Domains Page */
.domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.domain-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.domain-card.primary {
  border-color: #10a37f;
  border-width: 2px;
}

.domain-name {
  font-size: 14px;
  font-weight: 600;
  font-family: monospace;
  color: var(--foreground);
  margin-bottom: 0.25rem;
  word-break: break-all;
}

.domain-type {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.domain-details {
  margin-bottom: 0.75rem;
}

.domain-row {
  display: flex;
  justify-content: space-between;
  padding: 0.375rem 0;
  font-size: 13px;
}

.domain-label {
  color: var(--muted-foreground);
}

.domain-value {
  color: var(--foreground);
}

.domain-value.mono {
  font-family: monospace;
  font-size: 12px;
}

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

.ssl-warning {
  color: #ef4444;
}

.subdomain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.subdomain {
  font-size: 11px;
  font-family: monospace;
  padding: 0.2rem 0.5rem;
  background: var(--muted);
  border-radius: 3px;
  color: var(--muted-foreground);
}

/* Command Palette */
.command-palette {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
}

.command-palette.active {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
}

.command-palette-bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.command-palette-box {
  position: relative;
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 90%;
  max-width: 500px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.command-input {
  width: 100%;
  padding: 1rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--foreground);
  font-family: inherit;
  font-size: 16px;
  outline: none;
}

.command-input::placeholder {
  color: var(--muted-foreground);
}

.command-list {
  max-height: 400px;
  overflow-y: auto;
}

.command-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  transition: background 0.1s;
}

.command-item:hover,
.command-item.selected {
  background: var(--muted);
}

.command-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  font-size: 12px;
  font-family: monospace;
  color: var(--muted-foreground);
}

.command-name {
  font-size: 14px;
  color: var(--foreground);
}

.command-subtitle {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-left: auto;
}

.kbd-hint {
  font-size: 11px;
  padding: 0.2rem 0.4rem;
  background: var(--muted);
  border-radius: 3px;
  color: var(--muted-foreground);
  font-family: monospace;
}

/* Loading States */
.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.skeleton-card {
  height: 120px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.skeleton-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.loading {
  padding: 2rem;
  text-align: center;
  color: var(--muted-foreground);
}

.loading-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
}

.loading-spinner {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loading-message {
  color: var(--muted-foreground);
  font-size: 13px;
  font-family: monospace;
}

/* Skeleton Elements */
.skeleton {
  pointer-events: none;
}

/* Base skeleton shape - gray box with shimmer */
.skel {
  background: var(--muted);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.skel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  animation: skeleton-shimmer 1.5s infinite;
}

/* Inline skeleton for updated time */
.skeleton-inline {
  display: inline-block;
  width: 100px;
  height: 14px;
}

/* Stat card skeletons */
.stat-card.skeleton {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skeleton-label {
  width: 70%;
  height: 11px;
}

.skeleton-value {
  width: 45%;
  height: 36px;
}

.skeleton-desc {
  width: 85%;
  height: 13px;
}

/* Coverage bar skeletons */
.coverage-item.skeleton {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skeleton-bar-label {
  width: 70px;
  height: 14px;
  flex-shrink: 0;
}

.skeleton-bar-fill {
  width: 60%;
  height: 100%;
}

.skeleton-bar-pct {
  width: 32px;
  height: 14px;
  flex-shrink: 0;
}

/* Worker status skeletons */
.worker-mini.skeleton {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.skeleton-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-worker-name {
  width: 60px;
  height: 12px;
}

/* Top radio shows skeletons */
.top-radioshow-item.skeleton {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.skeleton-rank {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-show-name {
  flex: 1;
  height: 14px;
}

.skeleton-show-count {
  width: 45px;
  height: 12px;
  flex-shrink: 0;
}

/* Feedback skeletons */
.recent-feedback-item.skeleton {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.recent-feedback-item.skeleton .feedback-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.skeleton-feedback-title {
  width: 65%;
  height: 14px;
}

.skeleton-feedback-meta {
  width: 45%;
  height: 11px;
}

.skeleton-feedback-date {
  width: 55px;
  height: 12px;
  flex-shrink: 0;
}

.error-state {
  padding: 2rem;
  text-align: center;
  color: #ef4444;
  background: #ef444410;
  border-radius: var(--radius);
}

/* Home Page */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.home-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.home-section h3 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.stat-card.clickable {
  cursor: pointer;
  transition: all 0.15s;
}

.stat-card.clickable:hover {
  background: var(--muted);
  border-color: #10a37f;
}

.stat-card.alert {
  border-color: #ef4444;
}

.stat-card.alert .stat-value {
  color: #ef4444;
}

/* Coverage Bars */
.coverage-bars {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.coverage-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.coverage-label {
  font-size: 13px;
  color: var(--muted-foreground);
  width: 80px;
  flex-shrink: 0;
}

.coverage-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
}

.coverage-bar {
  height: 100%;
  background: #10a37f;
  border-radius: 4px;
  transition: width 0.3s;
}

.coverage-bar.warning {
  background: #eab308;
}

.coverage-pct {
  font-size: 12px;
  color: var(--foreground);
  width: 40px;
  text-align: right;
  font-family: monospace;
}

/* Worker Mini Grid */
.worker-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.worker-mini {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
}

.worker-mini-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex-shrink: 0;
}

.worker-mini-dot.checking {
  animation: pulse 1s infinite;
}

.worker-mini-dot.online {
  background: #22c55e;
}

.worker-mini-dot.offline {
  background: #ef4444;
}

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

.worker-mini-name {
  font-size: 12px;
  color: var(--foreground);
}

/* Top Series List */
.top-radioshow-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.top-radioshow-item {
  display: grid;
  grid-template-columns: 1.5rem 1fr auto auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  cursor: pointer;
  transition: background 0.15s;
}

.top-radioshow-item:hover {
  background: var(--border);
}

.top-radioshow-rank {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.875rem;
}

.top-radioshow-name {
  font-size: 0.875rem;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-radioshow-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.top-radioshow-bar {
  width: 60px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.top-radioshow-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 2px;
}

/* Recent Feedback */
.recent-feedback {
  display: flex;
  flex-direction: column;
}

.recent-feedback-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}

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

.recent-feedback-item:hover {
  background: var(--muted);
  margin: 0 -0.5rem;
  padding: 0.625rem 0.5rem;
  border-radius: calc(var(--radius) - 2px);
}

.feedback-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex-shrink: 0;
}

.feedback-dot.new {
  background: #22c55e;
}

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

.feedback-title {
  font-size: 13px;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.feedback-meta {
  font-size: 11px;
  color: var(--muted-foreground);
}

.feedback-date {
  font-size: 11px;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

/* Feedback Rows */
.feedback-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

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

.feedback-row:hover {
  background: var(--muted);
}

.feedback-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex-shrink: 0;
}

.feedback-status.new {
  background: #22c55e;
}

.feedback-status.done {
  background: var(--muted-foreground);
}

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

.feedback-episode {
  font-size: 14px;
  font-weight: 500;
  color: var(--foreground);
}

.feedback-radioshow {
  font-size: 12px;
  color: var(--muted-foreground);
}

.feedback-issue {
  font-size: 11px;
  padding: 0.2rem 0.5rem;
  background: var(--muted);
  border-radius: 3px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  flex-shrink: 0;
}

.feedback-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  flex: 2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Episodes Table */
.episodes-table {
  display: flex;
  flex-direction: column;
}

.episodes-header {
  display: flex;
  padding: 0.75rem 1rem;
  background: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  border-bottom: 1px solid var(--border);
}

.episodes-row {
  display: flex;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.episodes-row:hover {
  background: var(--muted);
}

.ep-col-name {
  width: 200px;
  flex-shrink: 0;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-col-radioshow {
  width: 150px;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ep-col-logline {
  flex: 1;
  font-size: 13px;
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 1rem;
}

.ep-col-status {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  gap: 0.375rem;
  justify-content: flex-end;
}

.status-badge {
  font-size: 10px;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 500;
}

.status-badge.ok {
  background: #22c55e33;
  color: #22c55e;
}

.status-badge.short {
  background: #eab30833;
  color: #eab308;
}

.status-badge.long {
  background: #ef444433;
  color: #ef4444;
}

.status-badge.missing {
  background: var(--muted);
  color: var(--muted-foreground);
}

.status-badge.banned {
  background: #a855f733;
  color: #a855f7;
}

/* Validation */
.validation-summary {
  display: flex;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.validation-stat {
  font-size: 12px;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius);
}

.validation-stat.short {
  background: #eab30820;
  color: #eab308;
}

.validation-stat.long {
  background: #ef444420;
  color: #ef4444;
}

.validation-stat.banned {
  background: #a855f720;
  color: #a855f7;
}

.validation-items {
  max-height: 300px;
  overflow-y: auto;
}

.validation-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  cursor: pointer;
}

.validation-item:hover {
  background: var(--muted);
}

.validation-badge {
  font-size: 10px;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 500;
  flex-shrink: 0;
}

.validation-badge.short {
  background: #eab30833;
  color: #eab308;
}

.validation-badge.long {
  background: #ef444433;
  color: #ef4444;
}

.validation-badge.banned {
  background: #a855f733;
  color: #a855f7;
}

.validation-name {
  flex: 1;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.validation-radioshow {
  color: var(--muted-foreground);
  font-size: 12px;
}

.validation-detail {
  font-size: 11px;
  font-family: monospace;
  color: var(--muted-foreground);
  flex-shrink: 0;
}

.validation-more {
  padding: 0.75rem 1rem;
  font-size: 12px;
  color: var(--muted-foreground);
  text-align: center;
}

/* Processing Grid */
.processing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
}

.processing-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius);
  text-align: center;
}

.processing-item.done .processing-icon {
  color: #22c55e;
}

.processing-item.pending .processing-icon {
  color: var(--muted-foreground);
}

.processing-item.clickable {
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.processing-item.clickable:hover {
  background: var(--card);
  transform: scale(1.05);
}

.processing-item.clickable .processing-icon {
  color: var(--primary);
  font-weight: 600;
}

.processing-icon {
  font-size: 18px;
  margin-bottom: 0.5rem;
}

.processing-name {
  font-size: 12px;
  color: var(--foreground);
}

.processing-detail {
  font-size: 10px;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.processing-loading {
  padding: 1rem;
  text-align: center;
  color: var(--muted-foreground);
}

/* Episode Files List */
.episode-files-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.episode-file-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--muted);
  border-radius: var(--radius);
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.15s, background 0.15s;
}

.episode-file-row:hover {
  background: var(--card);
}

.episode-file-row.selected {
  border-color: var(--primary);
  background: var(--card);
}

.file-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex-shrink: 0;
}

.episode-file-row.selected .file-indicator {
  background: var(--primary);
}

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

.file-path {
  font-size: 13px;
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-meta {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.25rem;
  font-size: 11px;
  color: var(--muted-foreground);
}

.file-id {
  font-family: var(--font-mono);
}

.file-status {
  display: flex;
  gap: 0.25rem;
}

.file-status .status-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
}

.file-status .status-dot.checking {
  background: var(--muted);
  color: var(--muted-foreground);
}

.file-status .status-dot.done {
  background: #22c55e33;
  color: #22c55e;
}

.file-status .status-dot.pending {
  background: var(--border);
  color: var(--muted-foreground);
}

.file-status .status-dot.error {
  background: #ef444433;
  color: #ef4444;
}

/* Processing Actions */
.processing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.processing-actions .action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.processing-actions .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  font-size: 10px;
  font-weight: 600;
}

.processing-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 24px;
  font-size: 13px;
}

.processing-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.processing-status .success-icon {
  color: #22c55e;
  font-weight: 600;
}

.processing-status .error-icon {
  color: #ef4444;
  font-weight: 600;
}

/* Series Detail Modal */
.radioshow-detail {
  padding: 0.5rem 0;
}

.radioshow-stats {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.radioshow-stat {
  text-align: center;
}

.radioshow-stat-value {
  font-size: 28px;
  font-weight: 600;
  color: var(--foreground);
}

.radioshow-stat-label {
  font-size: 12px;
  color: var(--muted-foreground);
}

.radioshow-progress-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.radioshow-progress-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.progress-name {
  font-size: 13px;
  color: var(--muted-foreground);
  width: 80px;
}

.progress-track {
  flex: 1;
  height: 8px;
  background: var(--muted);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #10a37f;
  border-radius: 4px;
}

.progress-count {
  font-size: 12px;
  color: var(--foreground);
  font-family: monospace;
  width: 60px;
  text-align: right;
}

.radioshow-actions {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Episode Detail Modal */
.detail-grid {
  display: grid;
  gap: 1.5rem;
}

.detail-description {
  font-size: 14px;
  color: var(--foreground);
  line-height: 1.5;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.detail-actions {
  margin-top: 0.5rem;
}

.detail-actions ul {
  margin: 0.5rem 0 0 1rem;
  padding: 0;
}

.detail-actions li {
  font-size: 13px;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.detail-value.mono {
  font-family: monospace;
  font-size: 11px;
}

.logline-box {
  font-size: 14px;
  color: var(--foreground);
  line-height: 1.6;
  padding: 1rem;
  background: var(--muted);
  border-radius: var(--radius);
  border-left: 3px solid var(--muted-foreground);
}

.logline-box.ok {
  border-left-color: #22c55e;
}

.logline-box.warning {
  border-left-color: #eab308;
}

.logline-meta {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
  text-align: right;
  font-family: monospace;
}

/* Database Stats */
.db-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.db-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.db-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
}

.db-stat-label {
  font-size: 11px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Cost Grid */
.cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.cost-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.cost-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.cost-service {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
}

.cost-items {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cost-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.cost-item span:first-child {
  color: var(--muted-foreground);
}

.cost-item span:last-child {
  color: var(--foreground);
}

.cost-total {
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  text-align: right;
}

/* Time Filters */
.time-filters {
  display: flex;
  gap: 0.5rem;
}

.time-filter {
  padding: 0.5rem 1rem;
  font-size: 13px;
  font-weight: 500;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.time-filter:hover {
  background: var(--muted);
  color: var(--foreground);
}

.time-filter[aria-pressed="true"] {
  background: var(--foreground);
  color: var(--background);
  border-color: var(--foreground);
}

/* Cost List */
.cost-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.cost-list-header {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  padding: 0.75rem 1rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.cost-list-item {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  padding: 0.875rem 1rem;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.cost-list-item:last-of-type {
  border-bottom: none;
}

.cost-list-item.free {
  opacity: 0.6;
}

.cost-service-name {
  font-weight: 500;
  color: var(--foreground);
}

.cost-type {
  color: var(--muted-foreground);
}

.cost-source {
  font-size: 12px;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  width: fit-content;
}

.cost-source.live {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.cost-source.calc {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.cost-source.fixed {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.cost-amount {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--foreground);
}

.cost-list-total {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1fr;
  padding: 1rem;
  font-size: 14px;
  font-weight: 600;
  background: var(--muted);
  border-top: 2px solid var(--border);
}

.cost-usage {
  color: var(--muted-foreground);
  font-size: 13px;
}

.cost-list-total span:last-child {
  text-align: right;
  color: #10a37f;
  font-size: 16px;
}

.cost-list-footer {
  padding: 0.75rem 1rem;
  font-size: 12px;
  color: var(--muted-foreground);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Domain Cards */
.domain-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.domain-card.primary {
  border-color: #10a37f;
  border-width: 2px;
}

.domain-badge {
  font-size: 10px;
  padding: 0.2rem 0.5rem;
  background: var(--muted);
  border-radius: 3px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: inline-block;
}

.domain-name {
  font-size: 13px;
  font-family: monospace;
  color: var(--foreground);
  word-break: break-all;
  margin-bottom: 0.25rem;
}

.domain-meta {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.domain-status {
  font-size: 11px;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 500;
  display: inline-block;
}

.domain-status.online {
  background: #22c55e33;
  color: #22c55e;
}

.domain-status.warning {
  background: #eab30833;
  color: #eab308;
}

/* Worker Card Extended */
.worker-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.worker-status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted-foreground);
  flex-shrink: 0;
}

.worker-status-indicator.checking {
  animation: pulse 1s infinite;
}

.worker-status-indicator.online {
  background: #22c55e;
}

.worker-status-indicator.offline {
  background: #ef4444;
}

.worker-health,
.worker-latency {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 0.375rem 0;
}

.health-label,
.latency-label {
  color: var(--muted-foreground);
}

.health-value,
.latency-value {
  color: var(--foreground);
}

.health-value.online { color: #22c55e; }
.health-value.offline { color: #ef4444; }
.latency-value.good { color: #22c55e; }
.latency-value.warning { color: #eab308; }
.latency-value.bad { color: #ef4444; }

.worker-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.action-btn.small {
  padding: 0.375rem 0.75rem;
  font-size: 12px;
}

.action-btn.secondary {
  background: var(--muted);
  color: var(--foreground);
}

.action-btn.secondary:hover {
  background: var(--card);
}

.action-btn.primary {
  background: #10a37f;
  color: #fff;
}

/* Quality Table Enhanced */
.quality-table .quality-row {
  display: table-row;
  cursor: pointer;
  transition: background 0.15s;
}

.quality-table .quality-row:hover {
  background: var(--muted);
}

.cell-low { color: #f97316; }

.quality-table td:last-child {
  white-space: nowrap;
  min-width: 120px;
}

.mini-progress {
  width: 60px;
  height: 6px;
  background: var(--muted);
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 0.5rem;
}

.mini-progress-bar {
  height: 100%;
  border-radius: 3px;
}

.mini-progress-bar.good { background: #22c55e; }
.mini-progress-bar.warning { background: #eab308; }
.mini-progress-bar.bad { background: #ef4444; }

.mini-pct {
  font-size: 11px;
  font-family: monospace;
  color: var(--muted-foreground);
}

/* Legend Chips */
.legend-chip {
  font-size: 11px;
  padding: 0.25rem 0.5rem;
  background: var(--muted);
  border-radius: 3px;
  color: var(--muted-foreground);
  font-family: monospace;
}

/* Section Styles */
.section-divider {
  height: 1px;
  background: var(--border);
  margin: 2rem 0;
}

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

.section-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.section-header .section-title {
  margin-bottom: 0;
}

/* Mini Stat Danger */
.mini-stat.danger .mini-stat-value {
  color: #ef4444;
}

/* Text Utilities */
.text-sm { font-size: 11px; }
.good { color: #22c55e; }
.bad { color: #ef4444; }
.warning-color { color: #eab308; }

/* Page Header Enhanced */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-header-content {
  flex: 1;
  min-width: 200px;
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Storage Stats */
.storage-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.storage-stat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.storage-stat-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--foreground);
}

.storage-stat-label {
  font-size: 11px;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Quick Actions */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.quick-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.quick-action:hover {
  background: var(--card);
  border-color: #10a37f;
}

.quick-action-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: calc(var(--radius) - 2px);
  font-size: 14px;
  flex-shrink: 0;
}

.quick-action-name {
  flex: 1;
}

/* Keyboard Shortcuts */
.shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.shortcut-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--muted);
  border-radius: var(--radius);
}

.shortcut-keys {
  font-family: monospace;
  font-size: 13px;
  padding: 0.375rem 0.625rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  min-width: 50px;
  text-align: center;
}

.shortcut-desc {
  font-size: 13px;
  color: var(--muted-foreground);
}

.shortcuts-section {
  margin-bottom: 1.5rem;
}

.shortcuts-section:last-child {
  margin-bottom: 0;
}

.shortcuts-section-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.shortcuts-list.compact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}

.shortcuts-list.compact .shortcut-item {
  padding: 0.5rem 0.75rem;
}

.shortcuts-list.compact .shortcut-keys {
  min-width: 36px;
  padding: 0.25rem 0.5rem;
  font-size: 11px;
}

/* Domain Status Checking */
.domain-status.checking {
  background: var(--muted);
  color: var(--muted-foreground);
}

/* Info Card Content */
.info-card-content {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

/* Home Quick Actions */
.home-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.home-quick-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.875rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.home-quick-btn:hover {
  background: var(--card);
  border-color: #10a37f;
}

.quick-icon {
  font-size: 14px;
  opacity: 0.7;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 300;
}

.toast {
  padding: 0.75rem 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success {
  border-left: 3px solid #22c55e;
}

.toast-error {
  border-left: 3px solid #ef4444;
}

.toast-warning {
  border-left: 3px solid #eab308;
}

.toast-info {
  border-left: 3px solid #10a37f;
}

/* Home Header */
.home-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.last-updated {
  font-size: 12px;
  color: var(--muted-foreground);
}

.refresh-btn {
  font-family: inherit;
  font-size: 12px;
  padding: 0.375rem 0.75rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.refresh-btn:hover {
  background: var(--card);
  color: var(--foreground);
}

/* Workers Page */
.workers-count {
  font-size: 12px;
  color: var(--muted-foreground);
  padding: 0.375rem 0.75rem;
  background: var(--muted);
  border-radius: var(--radius);
}

/* Action Button Disabled */
.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Copy Button */
.copy-btn {
  font-family: inherit;
  font-size: 10px;
  padding: 0.2rem 0.4rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted-foreground);
  cursor: pointer;
  margin-left: 0.5rem;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--card);
  color: var(--foreground);
}

/* Pagination Info */
.pagination-info {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-right: 1rem;
}

/* Activity Panel */
.activity-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--background);
  border-left: 1px solid var(--border);
  z-index: 200;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.activity-panel.open {
  right: 0;
}

.activity-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.activity-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.activity-controls {
  display: flex;
  gap: 0.5rem;
}

.activity-refresh,
.activity-close {
  background: transparent;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

.activity-refresh:hover,
.activity-close:hover {
  background: var(--muted);
  color: var(--foreground);
}

.activity-filters {
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.activity-filter {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.activity-filter:hover {
  background: var(--muted);
}

.activity-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.activity-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
}

.activity-loading {
  padding: 2rem;
  text-align: center;
  color: var(--muted-foreground);
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.activity-item:hover {
  background: var(--muted);
}

.activity-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.activity-icon-wrap.feedback {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.activity-icon-wrap.processing {
  background: rgba(168, 85, 247, 0.15);
  color: var(--primary);
}

.activity-icon-wrap.system {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.activity-icon-wrap.success {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

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

.activity-title {
  font-size: 0.875rem;
  color: var(--foreground);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.activity-meta {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.activity-time {
  font-size: 0.7rem;
  color: var(--muted-foreground);
  white-space: nowrap;
}

.activity-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 100;
  transition: transform 0.15s, background 0.15s;
}

.activity-toggle:hover {
  transform: scale(1.05);
  background: var(--primary-hover, #9333ea);
}

.activity-icon {
  font-size: 20px;
}

.activity-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
}

.activity-badge.show {
  display: flex;
}

.activity-date-divider {
  padding: 0.5rem 1.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--muted);
}

.activity-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: var(--muted-foreground);
}

/* Analytics Page */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.analytics-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.analytics-section.full-width {
  grid-column: 1 / -1;
}

.analytics-section h3 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

/* Histogram */
.histogram-container {
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 1rem 0;
}

.histogram-bar {
  flex: 1;
  min-width: 8px;
  max-width: 20px;
  background: var(--muted);
  border-radius: 2px 2px 0 0;
  transition: background 0.2s;
  position: relative;
  cursor: pointer;
}

.histogram-bar:hover {
  opacity: 0.8;
}

.histogram-bar.short {
  background: #eab308;
}

.histogram-bar.optimal {
  background: #22c55e;
}

.histogram-bar.long {
  background: #ef4444;
}

.histogram-bar .bar-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sidebar-bg);
  border: 1px solid var(--border);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  z-index: 10;
}

.histogram-bar:hover .bar-tooltip {
  opacity: 1;
}

.histogram-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.histogram-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 12px;
  color: var(--muted-foreground);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.short { background: #eab308; }
.legend-color.optimal { background: #22c55e; }
.legend-color.long { background: #ef4444; }

/* Logline Stats */
.logline-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.logline-stat-item {
  padding: 0.75rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  text-align: center;
}

.logline-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  font-family: var(--font-mono);
}

.logline-stat-label {
  font-size: 0.7rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* System Health Score */
.health-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
}

.health-score-ring {
  position: relative;
  width: 120px;
  height: 120px;
}

.health-score-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.health-score-ring .score-bg {
  fill: none;
  stroke: var(--muted);
  stroke-width: 8;
}

.health-score-ring .score-fill {
  fill: none;
  stroke: #22c55e;
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}

.health-score-ring .score-fill.warning {
  stroke: #eab308;
}

.health-score-ring .score-fill.danger {
  stroke: #ef4444;
}

.health-score-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.health-score-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--foreground);
}

.health-score-label {
  font-size: 0.7rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
}

.health-score-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
}

.health-score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  padding: 0.25rem 0;
}

.health-score-item-name {
  color: var(--muted-foreground);
}

.health-score-item-value {
  color: var(--foreground);
  font-weight: 500;
}

.health-score-item-value.good { color: #22c55e; }
.health-score-item-value.warning { color: #eab308; }
.health-score-item-value.bad { color: #ef4444; }

/* Quote Gallery */
.section-desc {
  font-size: 13px;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
}

.quote-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.quote-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
  transition: border-color 0.15s, transform 0.15s;
}

.quote-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.quote-text {
  font-size: 1rem;
  font-style: italic;
  color: var(--foreground);
  line-height: 1.5;
  margin-bottom: 1rem;
  position: relative;
  padding-left: 1.5rem;
}

.quote-text::before {
  content: '"';
  position: absolute;
  left: 0;
  top: -0.25rem;
  font-size: 2rem;
  color: var(--primary);
  opacity: 0.5;
  font-family: Georgia, serif;
}

.quote-source {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 0.75rem;
}

.quote-episode {
  color: var(--foreground);
  font-weight: 500;
}

.quote-radioshow {
  color: var(--muted-foreground);
}

/* Entity Explorer */
.entity-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.entity-filter {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted-foreground);
  cursor: pointer;
  transition: all 0.15s;
}

.entity-filter:hover {
  background: var(--card);
  color: var(--foreground);
}

.entity-filter.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.entity-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 150px;
}

.entity-tag {
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
}

.entity-tag:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.entity-tag.PERSON {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.entity-tag.GPE {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.entity-tag.ORG {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
}

.entity-tag.DATE {
  background: rgba(251, 146, 60, 0.2);
  color: #fb923c;
}

.entity-tag.MONEY {
  background: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

/* Sizing based on frequency */
.entity-tag.size-1 { font-size: 0.7rem; }
.entity-tag.size-2 { font-size: 0.8rem; }
.entity-tag.size-3 { font-size: 0.9rem; }
.entity-tag.size-4 { font-size: 1rem; font-weight: 500; }
.entity-tag.size-5 { font-size: 1.1rem; font-weight: 600; }

/* Database Usage Gauges */
.db-usage-section {
  margin-bottom: 2rem;
}

.usage-gauges {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.usage-gauge {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gauge-ring {
  position: relative;
  width: 140px;
  height: 140px;
}

.gauge-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.gauge-bg {
  fill: none;
  stroke: var(--muted);
  stroke-width: 10;
}

.gauge-fill {
  fill: none;
  stroke: #22c55e;
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease, stroke 0.3s ease;
}

.gauge-fill.warning {
  stroke: #eab308;
}

.gauge-fill.danger {
  stroke: #ef4444;
}

.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.gauge-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--foreground);
  display: block;
}

.gauge-label {
  font-size: 0.65rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gauge-footer {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  text-align: center;
}

.gauge-used {
  color: var(--foreground);
  font-weight: 500;
}

.gauge-limit {
  color: var(--muted-foreground);
}

/* Batch Job Launcher */
.batch-launcher {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.batch-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.batch-select {
  flex: 1;
  min-width: 180px;
  padding: 0.625rem 1rem;
  font-family: inherit;
  font-size: 0.875rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  cursor: pointer;
  transition: border-color 0.15s;
}

.batch-select:hover {
  border-color: var(--muted-foreground);
}

.batch-select:focus {
  outline: none;
  border-color: var(--primary);
}

.batch-status {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--muted);
  border-radius: calc(var(--radius) - 2px);
  min-height: 80px;
}

.batch-status-idle {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  text-align: center;
}

.batch-status-running {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.batch-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.batch-progress-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.batch-progress-bar {
  height: 100%;
  background: var(--primary);
  transition: width 0.3s ease;
}

.batch-progress-text {
  font-size: 0.75rem;
  color: var(--foreground);
  font-weight: 500;
  min-width: 50px;
}

.batch-log {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted-foreground);
  max-height: 100px;
  overflow-y: auto;
  line-height: 1.4;
}

.batch-log-entry {
  display: flex;
  gap: 0.5rem;
}

.batch-log-time {
  color: var(--muted-foreground);
}

.batch-log-message.success {
  color: #22c55e;
}

.batch-log-message.error {
  color: #ef4444;
}

/* Pipeline Tracker */
.pipeline-tracker-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pipeline-tracker {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tracker-header {
  display: grid;
  grid-template-columns: 2fr 1.5fr repeat(5, 1fr);
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--muted);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted-foreground);
}

.tracker-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr repeat(5, 1fr);
  gap: 0.5rem;
  padding: 0.625rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s;
}

.tracker-row:hover {
  background: var(--muted);
}

.tracker-episode {
  font-weight: 500;
  color: var(--foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-radioshow {
  color: var(--muted-foreground);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracker-status {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tracker-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 600;
}

.tracker-dot.done {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
}

.tracker-dot.missing {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.tracker-dot.pending {
  background: var(--muted);
  color: var(--muted-foreground);
}

.tracker-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.tracker-pagination button {
  font-family: inherit;
  font-size: 0.75rem;
  padding: 0.375rem 0.75rem;
  background: var(--muted);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  color: var(--foreground);
  cursor: pointer;
}

.tracker-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Series Comparison */
.radioshow-compare-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.compare-vs {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.radioshow-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.compare-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--muted-foreground);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.compare-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.compare-header {
  padding: 1rem 1.25rem;
  background: var(--muted);
  border-bottom: 1px solid var(--border);
}

.compare-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.compare-header .subtitle {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.compare-stats {
  padding: 1.25rem;
}

.compare-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.compare-stat-row:last-child {
  border-bottom: none;
}

.compare-stat-label {
  font-size: 0.8rem;
  color: var(--muted-foreground);
}

.compare-stat-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.compare-stat-num {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
}

.compare-stat-pct {
  font-size: 0.75rem;
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
  font-weight: 500;
}

.compare-stat-pct.high {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.compare-stat-pct.medium {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.compare-stat-pct.low {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.compare-bar {
  height: 6px;
  background: var(--muted);
  border-radius: 3px;
  margin-top: 1rem;
  overflow: hidden;
}

.compare-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.compare-bar-fill.radioshow-1 {
  background: #3b82f6;
}

.compare-bar-fill.radioshow-2 {
  background: #8b5cf6;
}

/* Spectral Analysis Section */
.spectral-analysis-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.spectral-analysis-chart {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  min-height: 200px;
}

.aq-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
  gap: 3px;
}

.aq-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
}

.aq-cell:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  z-index: 10;
}

.aq-cell.excellent { background: #22c55e; }
.aq-cell.good { background: #84cc16; }
.aq-cell.fair { background: #eab308; }
.aq-cell.poor { background: #ef4444; }
.aq-cell.no-data { background: var(--muted); opacity: 0.4; }

.aq-cell::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sidebar-bg);
  color: var(--foreground);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 20;
  border: 1px solid var(--border);
}

.aq-cell:hover::after {
  opacity: 1;
}

.spectral-analysis-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.aq-stat {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
}

.aq-stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
}

.aq-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

.aq-stat-bar {
  display: block;
  height: 4px;
  margin-top: 0.75rem;
  border-radius: 2px;
  background: var(--muted);
  overflow: hidden;
}

.aq-stat-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  border-radius: 2px;
}

.aq-stat-bar.excellent::after { background: #22c55e; }
.aq-stat-bar.good::after { background: #84cc16; }
.aq-stat-bar.fair::after { background: #eab308; }
.aq-stat-bar.poor::after { background: #ef4444; }

/* Worker Latency Section */
.worker-latency-section {
  margin-top: 1rem;
}

.latency-chart {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
  min-height: 200px;
}

.latency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.latency-worker {
  background: var(--muted);
  border-radius: var(--radius);
  padding: 1rem;
}

.latency-worker-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.latency-avg {
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.latency-avg.fast { color: #22c55e; }
.latency-avg.medium { color: #eab308; }
.latency-avg.slow { color: #ef4444; }

.latency-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 40px;
}

.latency-bar {
  flex: 1;
  border-radius: 2px 2px 0 0;
  min-width: 4px;
  transition: height 0.3s ease;
  cursor: pointer;
}

.latency-bar:hover {
  opacity: 0.8;
}

.latency-bar.fast { background: #22c55e; }
.latency-bar.medium { background: #eab308; }
.latency-bar.slow { background: #ef4444; }

.latency-legend {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.latency-legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.latency-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.latency-dot.fast { background: #22c55e; }
.latency-dot.medium { background: #eab308; }
.latency-dot.slow { background: #ef4444; }

/* Cost History Section */
.cost-history {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

.cost-chart-container {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--border);
}

.cost-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 180px;
  padding-bottom: 1.5rem;
}

.cost-bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.cost-bar-stack {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  max-width: 40px;
}

.cost-bar-segment {
  width: 100%;
  min-height: 2px;
  transition: height 0.3s ease;
}

.cost-bar-segment.r2 { background: #3b82f6; }
.cost-bar-segment.transcription { background: #f97316; }
.cost-bar-segment.openai { background: #a855f7; }
.cost-bar-segment.other { background: #6b7280; }

.cost-bar-label {
  font-size: 0.65rem;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
  text-align: center;
}

.cost-bar-total {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.cost-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding: 0 4px;
}

.cost-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.breakdown-color {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.breakdown-color.r2 { background: #3b82f6; }
.breakdown-color.transcription { background: #f97316; }
.breakdown-color.openai { background: #a855f7; }
.breakdown-color.other { background: #6b7280; }

.breakdown-label {
  flex: 1;
  font-size: 0.875rem;
  color: var(--foreground);
}

.breakdown-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
}

/* Cost Projection Section */
.cost-projection {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.projection-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.25rem;
  border: 1px solid var(--border);
  text-align: center;
}

.projection-label {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.projection-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.projection-progress {
  height: 6px;
  background: var(--muted);
  border-radius: 3px;
  overflow: hidden;
}

.projection-bar {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #10a37f, #22c55e);
  transition: width 0.3s ease;
  width: 0%;
}

/* Responsive for spectral analysis */
@media (max-width: 1000px) {
  .spectral-analysis-section {
    grid-template-columns: 1fr;
  }

  .spectral-analysis-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .aq-stat {
    flex: 1;
    min-width: 120px;
  }

  .cost-history {
    grid-template-columns: 1fr;
  }

  .cost-projection {
    grid-template-columns: 1fr;
  }
}

/* Responsive */
@media (max-width: 900px) {
  .sidebar {
    width: 220px;
  }

  .content {
    margin-left: 220px;
    padding: 1.5rem;
  }

  .info-cards {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 600px) {
  .mobile-header {
    display: flex;
  }

  .sidebar {
    width: 280px;
    z-index: 40;
  }

  .content-wrapper {
    display: block;
    position: relative;
    background: var(--background);
    min-height: 100vh;
    transition: transform 0.3s ease;
    z-index: 50;
  }

  .content-wrapper.open {
    transform: translateX(280px);
  }

  .content {
    margin-left: 0;
    padding: 1rem;
    padding-top: calc(56px + 1rem);
  }
}

/* ============== SECURITY PAGE ============== */
.security-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.security-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.security-table th {
  text-align: left;
  color: var(--muted-foreground);
  font-weight: 500;
  padding: 0.375rem 0;
  border-bottom: 1px solid var(--border);
}

.security-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

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

.security-link {
  display: block;
  padding: 0.5rem;
  background: var(--muted);
  border-radius: 4px;
  font-size: 13px;
  color: var(--foreground);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: background 0.15s ease;
}

.security-link:hover {
  background: var(--border);
  text-decoration: none;
}

.info-note {
  font-size: 12px;
  color: var(--muted-foreground);
  margin-top: 0.75rem;
  font-style: italic;
}
