/* ─── Modern Technical Dashboard Theme (High Density, Dark Tech Cockpit) ─────── */
:root {
  /* Dark Tech Palette */
  --bg-base: #090a0f;
  --bg-sidebar: #0d0f17;
  --bg-card: #131722;
  --bg-card-header: #171c2a;
  --bg-input: #0b0d13;
  --bg-hover: #1c2233;
  
  --border-color: #23293a;
  --border-focus: #3b82f6;
  --border-subtle: #191f2d;
  
  /* Primary Accent: Electric Blue */
  --accent-primary: #3b82f6;
  --accent-primary-hover: #2563eb;
  --accent-primary-glow: rgba(59, 130, 246, 0.15);

  /* Status Colors */
  --accent-cyan: #06b6d4;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-purple: #a855f7;
  --accent-spotify: #1db954;

  /* Typography Colors */
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Structural */
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  
  --sidebar-width: 250px;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.45;
  font-size: 12.5px;
  display: flex;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ─── Global Utilities & Text Accents ────────────────────────── */
.text-cyan { color: var(--accent-cyan) !important; }
.text-green { color: var(--accent-green) !important; }
.text-yellow { color: var(--accent-yellow) !important; }
.text-red { color: var(--accent-red) !important; }
.text-purple { color: var(--accent-purple) !important; }
.text-spotify { color: var(--accent-spotify) !important; }
.text-primary { color: var(--accent-primary) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-dim { color: var(--text-dim) !important; }
.font-mono { font-family: 'JetBrains Mono', monospace !important; }
.w-full { width: 100%; }
.flex-1 { flex: 1; }

/* ─── Sidebar Navigation ─────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  position: relative;
  flex-shrink: 0;
  height: 100vh;
}

.sidebar-header {
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-header);
}

.sidebar-logo-icon {
  font-size: 22px;
  line-height: 1;
}

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
  white-space: nowrap;
}

.sidebar-subtitle {
  font-size: 10.5px;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
  white-space: nowrap;
}

.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 10px 6px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: 1px solid transparent;
  user-select: none;
}

.nav-item:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-primary);
  border-color: rgba(59, 130, 246, 0.3);
  font-weight: 600;
}

.nav-icon {
  font-size: 14px;
  width: 18px;
  text-align: center;
  display: inline-block;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card-header);
}

.user-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 1px solid var(--border-color);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 10px;
  color: var(--accent-cyan);
  text-transform: uppercase;
  font-weight: 600;
}

.logout-btn {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 6px;
  border-radius: 4px;
  transition: all 0.15s;
}
.logout-btn:hover {
  color: var(--accent-red);
  background: rgba(239, 68, 68, 0.15);
}

/* ─── Main Content Area ──────────────────────────────────────── */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  background: var(--bg-base);
  overflow: hidden;
}

/* Top Bar */
.top-bar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  z-index: 10;
  flex-shrink: 0;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-bar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.top-bar-subtitle {
  font-size: 11px;
  color: var(--text-dim);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.header-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--border-focus);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent-green);
  font-family: 'JetBrains Mono', monospace;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
}
.status-dot.active {
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* View Container */
.view-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 90px 24px;
  position: relative;
}

.view-panel {
  display: none;
}
.view-panel.active {
  display: block;
  animation: fadeIn 0.15s ease-out;
}

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

/* ─── Compact KPI Metrics Strip (6 Dense Cards) ──────────────── */
.metrics-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 1200px) {
  .metrics-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .metrics-strip { grid-template-columns: repeat(2, 1fr); }
}

.metric-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color 0.15s;
}

.metric-pill:hover {
  border-color: #333d54;
}

.metric-pill-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-pill-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
}

.metric-pill-value {
  font-size: 20px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1.1;
  color: var(--text-main);
}

.metric-pill-icon {
  font-size: 18px;
  opacity: 0.8;
}

/* ─── Unified Card Component (Cockpit Density) ───────────────── */
.card, .studio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  overflow: hidden;
}

.card-header, .card-title-bar {
  padding: 10px 16px;
  background: var(--bg-card-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.1px;
}

.card-subtitle {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
}

.card-body {
  padding: 14px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ─── Form Elements ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 10px;
}

.form-label {
  display: block;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}

.input-field {
  width: 100%;
  padding: 6px 10px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 12px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input-field:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 1px var(--accent-primary);
}

select.input-field {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 14px;
  padding-right: 28px;
}

/* Buttons */
.btn {
  box-sizing: border-box;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  font-family: inherit;
  text-decoration: none;
  transition: all 0.15s;
  user-select: none;
  text-overflow: ellipsis;
}

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

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-primary-hover);
}

.btn-secondary {
  background: var(--bg-input);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: #3b455e;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--accent-red);
}
.btn-danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.22);
}

.btn-warning {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--accent-yellow);
}
.btn-warning:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.22);
}

.btn-success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-green);
}
.btn-success:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.22);
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  transition: 0.2s;
  border-radius: 18px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 2px;
  bottom: 2px;
  background-color: var(--text-dim);
  transition: 0.2s;
  border-radius: 50%;
}
input:checked + .slider {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
}
input:checked + .slider:before {
  transform: translateX(14px);
  background-color: #ffffff;
}

/* ─── Telemetry & Progress Box ───────────────────────────────── */
.progress-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-cyan));
  transition: width 0.25s ease;
  border-radius: 3px;
}

/* Console Box */
.console-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.log-line {
  line-height: 1.45;
  word-break: break-all;
}
.log-time {
  color: var(--text-dim);
  margin-right: 8px;
  user-select: none;
}
.log-info { color: var(--text-main); }
.log-success { color: var(--accent-green); }
.log-warning { color: var(--accent-yellow); }
.log-error { color: var(--accent-red); }

/* Genre Distribution Mini-Bars */
.genre-list-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.genre-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.genre-name {
  width: 70px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.genre-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-base);
  border-radius: 2px;
  overflow: hidden;
}
.genre-bar-fill {
  height: 100%;
  background: var(--accent-purple);
  border-radius: 2px;
}
.genre-count {
  width: 35px;
  text-align: right;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-dim);
}

/* ─── Data Tables ───────────────────────────────────────────── */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-input);
}

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

.data-table th {
  padding: 9px 12px;
  background: var(--bg-card-header);
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  font-size: 11.5px;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

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

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

/* Badges */
.badge {
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 10.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.badge-success { background: rgba(16,185,129,0.12); color: var(--accent-green); border: 1px solid rgba(16,185,129,0.25); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--accent-yellow); border: 1px solid rgba(245,158,11,0.25); }
.badge-danger { background: rgba(239,68,68,0.12); color: var(--accent-red); border: 1px solid rgba(239,68,68,0.25); }
.badge-info { background: rgba(6,182,212,0.12); color: var(--accent-cyan); border: 1px solid rgba(6,182,212,0.25); }
.badge-purple { background: rgba(168,85,247,0.12); color: var(--accent-purple); border: 1px solid rgba(168,85,247,0.25); }

/* ─── Modals ────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-overlay.active, .modal-overlay[style*="display: flex"] {
  display: flex !important;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0,0,0,0.6);
  overflow: hidden;
}

.modal-container.large { max-width: 820px; }
.modal-container.medium { max-width: 640px; }

.modal-header {
  padding: 14px 18px;
  background: var(--bg-card-header);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  line-height: 1;
}
.modal-close:hover { color: var(--text-main); background: var(--bg-hover); }

.modal-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-card-header);
}

/* ─── Grid & Flex Layouts ───────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.flex-row { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; gap: 10px; }

/* ─── In-App Player Dock (High Precision Dock) ──────────────── */
.player-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 72px;
  background: var(--bg-sidebar);
  border-top: 1px solid var(--border-color);
  z-index: 99990;
  padding: 0 24px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.6);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.player-bar.active, .player-bar[style*="display: flex"] {
  display: flex !important;
}

.player-track-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 300px;
  min-width: 220px;
  overflow: hidden;
}

.player-cover {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  flex-shrink: 0;
}

.player-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}

.player-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.player-controls {
  flex: 1;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

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

.player-ctrl-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.player-ctrl-btn:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.btn-play {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #ffffff;
  border: none;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}
.btn-play:hover {
  transform: scale(1.06);
  background: var(--accent-primary-hover);
}

.player-scrubber {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.player-time {
  font-size: 10.5px;
  color: var(--text-dim);
  min-width: 32px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
}

.range-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  transition: height 0.15s;
}
.range-slider:hover {
  height: 6px;
}
.range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-main);
  cursor: pointer;
}

.player-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 300px;
}

/* ─── Metadata Inspector Modal Styles ───────────────────────── */
.inspector-header-card {
  display: flex;
  gap: 16px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 14px;
}
.inspector-cover {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
  flex-shrink: 0;
}
.inspector-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow: hidden;
}
.inspector-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}
.inspector-artist {
  font-size: 12.5px;
  color: var(--accent-cyan);
  font-weight: 600;
}
.metadata-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
@media (max-width: 800px) {
  .metadata-grid { grid-template-columns: repeat(2, 1fr); }
}
.meta-cell {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.meta-cell-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.meta-cell-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
}
.raw-json-box {
  background: var(--bg-base);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: #67e8f9;
  max-height: 380px;
  overflow-y: auto;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* Quick Presets Chips */
.quick-preset-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 6px;
}
.quick-preset-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}
.quick-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.preset-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.preset-chip:hover {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--accent-cyan);
  color: #ffffff;
  transform: translateY(-1px);
}
.preset-chip.active {
  background: var(--accent-cyan);
  color: #000000;
  font-weight: 700;
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #23293a; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #3b455e; }

/* ─── Flexbox & Layout Utilities ────────────────────────────── */
.flex-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

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



