.ai-media-panel {
  background: rgba(17,24,39,0.6);
  border-radius: 8px;
  padding: 20px;
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.1));
  margin-bottom: 20px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.asset-card {
  background: rgba(31,41,55,0.6);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(55,65,81,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}

.asset-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.asset-preview {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
}

.asset-info {
  padding: 12px;
}

.asset-name {
  font-weight: 600;
  color: #f3f4f6;
  margin-bottom: 4px;
}

.asset-meta {
  font-size: 12px;
  color: #9ca3af;
  display: flex;
  justify-content: space-between;
}

.status-badge {
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.ready {
  background: rgba(34,197,94,0.2);
  color: #4ade80;
  border: 1px solid rgba(34,197,94,0.4);
}

.status-badge.processing {
  background: rgba(251,146,60,0.2);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.4);
}

/* ── RENDER PIPELINE CARD ───────────────────────────────────────────────
   Control Panel V3 design language: slate-950/900 surfaces, slate-800
   borders, amber-500 pending, emerald-500 armed, mono telemetry. No gradients.
*/
.rp-card {
  grid-column: 1 / -1;
  background: #0f172a;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.rp-header__mark {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid #1e293b;
  padding: 4px;
  flex: 0 0 auto;
}

.rp-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: #e2e8f0;
}

.rp-sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
}

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

.rp-fieldset {
  border: 1px solid #1e293b;
  border-radius: 6px;
  background: #020617;
  padding: 14px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rp-legend {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f59e0b;
  padding: 0 4px;
}

.rp-label {
  display: block;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 5px;
}

.rp-input {
  width: 100%;
  box-sizing: border-box;
  background: #0b1220;
  border: 1px solid #1e293b;
  border-radius: 4px;
  color: #e2e8f0;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 12.5px;
  padding: 8px 10px;
}

.rp-input:focus {
  outline: none;
  border-color: #f59e0b;
}

.rp-input::placeholder {
  color: #475569;
}

.rp-toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rp-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #1e293b;
  border-radius: 4px;
  background: #0b1220;
  color: #94a3b8;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.rp-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.rp-toggle:hover {
  border-color: #334155;
  color: #cbd5e1;
}

.rp-toggle:has(input:checked) {
  border-color: #f59e0b;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.rp-toggle:has(input:focus-visible) {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.rp-toggle__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1px solid #334155;
  background: transparent;
  flex: 0 0 auto;
}

.rp-toggle:has(input:checked) .rp-toggle__dot {
  background: #10b981;
  border-color: #10b981;
}

.status-badge.pending {
  background: rgba(251,146,60,0.2);
  color: #fb923c;
  border: 1px solid rgba(251,146,60,0.4);
}

.rp-telemetry {
  border: 1px solid #1e293b;
  border-radius: 6px;
  background: #020617;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rp-telemetry-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.rp-telemetry-label {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  white-space: nowrap;
}

.rp-telemetry-value {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
  color: #cbd5e1;
  text-align: right;
  word-break: break-all;
}

.rp-telemetry-value--ok { color: #34d399; }
.rp-telemetry-value--warn { color: #fbbf24; }

.rp-issues {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rp-issue {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
  line-height: 1.5;
  padding: 7px 10px;
  border-radius: 4px;
  border: 1px solid #1e293b;
  background: #0b1220;
}

.rp-issue--block {
  border-color: rgba(245, 158, 11, 0.4);
  background: rgba(245, 158, 11, 0.08);
  color: #fbbf24;
}

.rp-issue--advisory {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.06);
  color: #7dd3fc;
}

.rp-issue--clear {
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.08);
  color: #34d399;
}

.rp-preview {
  background: #020617;
  border: 1px solid #1e293b;
  border-radius: 6px;
  padding: 14px;
  max-height: 320px;
  overflow: auto;
  margin: 0;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
  line-height: 1.55;
  color: #a5b4fc;
  white-space: pre;
  tab-size: 2;
}

.rp-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.rp-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.rp-btn:focus-visible {
  outline: 2px solid #f59e0b;
  outline-offset: 2px;
}

.rp-btn--primary {
  background: rgba(245, 158, 11, 0.14);
  border-color: #f59e0b;
  color: #fbbf24;
}

.rp-btn--primary:hover {
  background: rgba(245, 158, 11, 0.24);
}

.rp-btn--secondary {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
}

.rp-btn--secondary:hover {
  background: rgba(16, 185, 129, 0.2);
}

.rp-feedback {
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 11.5px;
  color: #94a3b8;
  min-height: 1em;
}

.rp-feedback--ok { color: #34d399; }
.rp-feedback--warn { color: #fbbf24; }
.rp-feedback--bad { color: #f87171; }

@media (max-width: 640px) {
  .rp-telemetry-row {
    flex-direction: column;
    gap: 2px;
  }
  .rp-telemetry-value {
    text-align: left;
  }
  .rp-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}