/* ==========================================================================
   CardioAgent-Ops Studio | Clean Modern Clinical AI Theme
   Matches User Design Mockup with Precision
   ========================================================================== */

:root {
  --bg-app: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --border-light: #e2e8f0;
  --border-hover: #cbd5e1;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --primary-blue: #2563eb;
  --primary-blue-hover: #1d4ed8;
  --primary-blue-soft: #eff6ff;

  --accent-purple: #7c3aed;
  --accent-purple-soft: #f5f3ff;
  --accent-pink: #db2777;
  --accent-pink-soft: #fdf2f8;
  --accent-green: #10b981;
  --accent-green-soft: #ecfdf5;
  --accent-red: #e11d48;
  --accent-red-soft: #ffe4e6;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 16px -2px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 10px 24px -4px rgba(15, 23, 42, 0.07);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */
.studio-app {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ==========================================================================
   LEFT SIDEBAR
   ========================================================================== */
.studio-sidebar {
  width: 250px;
  min-width: 250px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 24px 8px;
  border-bottom: 1px solid #f1f5f9;
}

.brand-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 20px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.nav-item:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
}

.nav-item.active {
  background-color: #e0edff;
  color: var(--primary-blue);
  font-weight: 700;
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Sidebar Bottom Widgets */
.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.platform-status-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  border: 1px solid var(--border-light);
}

.pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.status-meta {
  display: flex;
  flex-direction: column;
}

.status-name {
  font-size: 12px;
  font-weight: 700;
  color: #065f46;
}

.status-count {
  font-size: 11px;
  color: var(--text-muted);
}

.academic-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid #eef2f6;
}

.academic-icon {
  display: flex;
  gap: 3px;
}

.cube-accent {
  width: 9px;
  height: 9px;
  border-radius: 2px;
}
.cube-accent.c1 { background-color: #10b981; }
.cube-accent.c2 { background-color: #ec4899; }

.academic-meta {
  display: flex;
  flex-direction: column;
}

.academic-institution {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
}

.academic-title {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */
.studio-main {
  flex: 1;
  padding: 24px 36px 40px 36px;
  overflow-y: auto;
}

/* Header Banner */
.studio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.title-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.main-title {
  font-size: 34px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
}

.studio-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #ede9fe;
  color: #6d28d9;
  font-size: 26px;
  font-weight: 800;
  padding: 2px 16px;
  border-radius: var(--radius-pill);
}

.studio-pill .pill-accent {
  font-size: 16px;
  opacity: 0.6;
}

.main-subtitle {
  font-size: 14.5px;
  color: var(--text-muted);
  margin-top: 6px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-illustration-box {
  display: flex;
  align-items: center;
}

.hero-sketch-svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.03));
}

.header-user-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease;
}

.icon-circle-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.notification-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--accent-red);
  position: absolute;
  top: 8px;
  right: 8px;
}

.user-avatar-badge {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background-color: var(--primary-blue);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
  cursor: pointer;
}

/* ==========================================================================
   MICROSERVICES ROW
   ========================================================================== */
.microservices-section {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 24px;
}

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

.title-with-doodle {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.sec-icon {
  font-size: 18px;
}

.sec-heading {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.doodle-underline {
  position: absolute;
  bottom: -6px;
  left: 28px;
}

.btn-docker-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid #bfdbfe;
  background-color: #eff6ff;
  color: var(--primary-blue);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-docker-pill:hover {
  background-color: #dbeafe;
}

.microservices-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}

.service-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.service-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.service-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.bg-robot { background-color: #f1f5f9; color: #475569; }
.bg-db { background-color: #f1f5f9; color: #475569; }
.bg-audio { background-color: #f1f5f9; color: #475569; }
.bg-orchestrator { background-color: #f1f5f9; color: #475569; }
.bg-gateway { background-color: #f1f5f9; color: #475569; }
.bg-mlflow { background-color: #f1f5f9; color: #475569; }

.service-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.service-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: #059669;
  margin-bottom: 12px;
}

.status-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-indicator-dot.online {
  background-color: var(--accent-green);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.btn-service-test {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: #f8fafc;
  color: var(--primary-blue);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-service-test:hover {
  background-color: #eff6ff;
  border-color: #bfdbfe;
}

/* ==========================================================================
   2-COLUMN STUDIO GRID
   ========================================================================== */
.studio-grid {
  display: grid;
  grid-template-columns: 2.1fr 1fr;
  gap: 24px;
}

/* ==========================================================================
   LEFT COLUMN: 3 ACTION CARDS + 3 UTILITY CARDS
   ========================================================================== */
.studio-col-left {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.features-three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-card {
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: all 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-hover);
}

/* Card 1: Lavender */
.card-audio-lavender {
  background-color: var(--accent-purple-soft);
  border: 1px solid #e9d5ff;
}

/* Card 2: Light Blue */
.card-agents-blue {
  background-color: var(--primary-blue-soft);
  border: 1px solid #dbeafe;
}

/* Card 3: Soft Pink */
.card-rag-pink {
  background-color: var(--accent-pink-soft);
  border: 1px solid #fbcfe8;
}

.card-header-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.card-icon-round {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.icon-purple { background-color: #ede9fe; color: var(--accent-purple); }
.icon-blue { background-color: #dbeafe; color: var(--primary-blue); }
.icon-pink { background-color: #fce7f3; color: var(--accent-pink); }

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
}

.doodle-sparkle {
  font-size: 11px;
  color: var(--text-subtle);
  margin-left: auto;
}

.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 16px;
  min-height: 34px;
}

/* Dropzone in Card 1 */
.dropzone-box {
  background: #ffffff;
  border: 1.5px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  margin-bottom: 12px;
  min-height: 110px;
}

.dropzone-box:hover {
  border-color: var(--accent-purple);
  background-color: #faf5ff;
}

.drop-icon-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.drop-text-primary {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

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

.active-file-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-purple);
  margin-top: 6px;
}

.preset-selector-mini {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.preset-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.sample-select-dropdown {
  width: 100%;
  padding: 6px 10px;
  font-size: 11.5px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  color: var(--text-main);
  font-family: var(--font-sans);
}

/* Checkbox list in Card 2 */
.agent-checkbox-list {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
  min-height: 154px;
}

.custom-checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
}

.custom-checkbox-row input {
  display: none;
}

.checkmark-box {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1.5px solid #cbd5e1;
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.custom-checkbox-row input:checked + .checkmark-box {
  background-color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.custom-checkbox-row input:checked + .checkmark-box::after {
  content: "✓";
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
}

/* RAG Search in Card 3 */
.rag-search-box {
  margin-bottom: 10px;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

.search-lens {
  color: var(--text-subtle);
  flex-shrink: 0;
}

.search-input-wrapper input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 12px;
  font-family: var(--font-sans);
  color: var(--text-main);
  outline: none;
}

.rag-quick-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
  min-height: 98px;
}

.rag-pill-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 8px;
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.rag-pill-chip:hover {
  background: #fdf2f8;
  border-color: #fbcfe8;
  color: var(--accent-pink);
}

/* Primary Action Buttons */
.btn-action-primary {
  width: 100%;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  border: none;
  background-color: var(--primary-blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.2);
  margin-top: auto;
}

.btn-action-primary:hover {
  background-color: var(--primary-blue-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   BOTTOM 3 UTILITY CARDS
   ========================================================================== */
.utilities-three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.utility-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.utility-card:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.util-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bg-purple-soft { background-color: #f5f3ff; }
.bg-pink-soft { background-color: #fdf2f8; }
.bg-blue-soft { background-color: #eff6ff; }

.util-meta {
  flex: 1;
}

.util-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
}

.util-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.util-arrow {
  color: var(--text-subtle);
  font-size: 16px;
  font-weight: 700;
  transition: transform 0.15s ease;
}

.utility-card:hover .util-arrow {
  transform: translateX(3px);
  color: var(--primary-blue);
}

/* ==========================================================================
   RIGHT COLUMN: SYSTEM OVERVIEW, LAST ANALYSIS, QUICK ACTIONS
   ========================================================================== */
.studio-col-right {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.side-panel-card {
  background-color: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #0f172a;
}

.panel-header h3 {
  font-size: 15px;
  font-weight: 800;
}

/* System Overview */
.overview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.overview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.icon-check-round {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: var(--accent-green-soft);
  color: var(--accent-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.item-value {
  font-weight: 700;
  color: #0f172a;
}

.item-value.highlight-green {
  color: var(--accent-green);
  font-weight: 800;
}

/* Last Analysis */
.last-analysis-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.waveform-widget {
  background: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.sound-bars-row {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 36px;
  padding: 0 4px;
}

.sound-bars-row .bar {
  width: 3px;
  background-color: var(--accent-purple);
  border-radius: 2px;
  animation: pulse-bar 1.4s infinite ease-in-out;
}
.bar.h1 { height: 10px; }
.bar.h2 { height: 18px; animation-delay: 0.2s; }
.bar.h3 { height: 26px; animation-delay: 0.4s; }
.bar.h4 { height: 32px; animation-delay: 0.1s; }
.bar.h5 { height: 22px; animation-delay: 0.3s; }
.bar.h6 { height: 14px; animation-delay: 0.5s; }

@keyframes pulse-bar {
  0%, 100% { transform: scaleY(0.7); opacity: 0.6; }
  50% { transform: scaleY(1.1); opacity: 1; }
}

.analysis-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analysis-filename-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #0f172a;
}

.file-time {
  font-size: 11px;
  color: var(--text-subtle);
}

.analysis-tags-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.badge-abnormal {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-red-soft);
  color: var(--accent-red);
}

.badge-conf {
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background-color: #f1f5f9;
  color: var(--text-muted);
}

.btn-view-report {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  color: var(--text-main);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-view-report:hover {
  background-color: #f8fafc;
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

/* Quick Actions List */
.actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-row-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}

.action-row-btn:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.action-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.action-text {
  font-size: 12.5px;
  font-weight: 600;
  color: #1e293b;
}

.action-arrow {
  color: var(--text-subtle);
  font-size: 14px;
  font-weight: 700;
}

/* ==========================================================================
   MODALS SYSTEM
   ========================================================================== */
.studio-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 20px;
}

.studio-modal-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px -8px rgba(0,0,0,0.2);
  border: 1px solid var(--border-light);
  overflow: hidden;
  animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.studio-modal-card.modal-wide {
  max-width: 880px;
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
}

.modal-title-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-badge-service {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background-color: #ede9fe;
  color: var(--accent-purple);
}
.modal-badge-service.bg-docker { background-color: #dbeafe; color: var(--primary-blue); }
.modal-badge-service.bg-ci { background-color: #d1fae5; color: #065f46; }
.modal-badge-service.bg-report { background-color: #ffe4e6; color: var(--accent-red); }

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
}
.modal-close-btn:hover {
  color: var(--text-main);
  background: #f1f5f9;
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Diagnostic Status Banner */
.test-status-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f8fafc;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.status-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill-green {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-green-soft);
  color: #065f46;
}

.meta-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #e2e8f0;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.latency-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.latency-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-green);
}

/* Teacher Pedagogy Card */
.teacher-pedagogy-card {
  background-color: #f5f3ff;
  border: 1px solid #e9d5ff;
  border-radius: var(--radius-md);
  padding: 16px;
}

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

.pedagogy-header h4 {
  font-size: 13.5px;
  font-weight: 800;
  color: #5b21b6;
}

.pedagogy-text {
  font-size: 12.5px;
  color: #4c1d95;
  line-height: 1.5;
}

/* Checks List */
.checks-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.checks-card h4 {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.checks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.check-status-icon {
  color: var(--accent-green);
  font-weight: 800;
}

.check-name {
  font-weight: 700;
  color: #1e293b;
}

.check-detail {
  color: var(--text-muted);
}

/* JSON Code Viewer */
.payload-box {
  background: #0f172a;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.payload-tabs {
  display: flex;
  background: #1e293b;
  padding: 4px;
}

.payload-tab {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 4px;
}

.payload-tab.active {
  background: #0f172a;
  color: #ffffff;
}

.json-code-block {
  padding: 14px;
  margin: 0;
  max-height: 240px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #38bdf8;
  line-height: 1.4;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-light);
  background-color: #f8fafc;
}

.btn-modal-primary {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background-color: var(--primary-blue);
  color: #ffffff;
  border: none;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.btn-modal-secondary {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  color: #1e293b;
  border: 1px solid var(--border-light);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .microservices-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .studio-app {
    flex-direction: column;
  }
  .studio-sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .features-three-grid, .utilities-three-grid {
    grid-template-columns: 1fr;
  }
  .microservices-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
