/* ==========================================================================
   BETOOTH — Clinical Simulator Design System (Pixel & Medical Hybrid)
   ========================================================================== */

/* V2 reuses Clinical surfaces and controls; Legacy layout is intentionally unchanged. */
.clinical-v2 { min-width: 0; margin-block: 1.5rem; overflow-wrap: anywhere; }
.clinical-v2 .v2-fields { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 1rem; }
.clinical-v2 label { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.clinical-v2 .clinical-choice-row { flex-direction: row; align-items: center; }
.clinical-v2 input:not([type=checkbox]):not([type=radio]), .clinical-v2 select, .clinical-v2 textarea { width: 100%; min-width: 0; box-sizing: border-box; padding: .65rem; color: var(--text-primary); background: var(--surface-soft); border: 1px solid var(--line); border-radius: var(--radius-control, 8px); font: inherit; }
.clinical-v2 textarea { min-height: 5rem; resize: vertical; }
.clinical-v2 button:focus-visible, .clinical-v2 input:focus-visible, .clinical-v2 summary:focus-visible { outline: 2px solid var(--betooth-cyan); outline-offset: 3px; }
.clinical-v2 .v2-inline, .clinical-v2 .v2-result-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: .75rem; align-items: end; }
.clinical-v2 .v2-exam-editor { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius-control, 8px); margin-block: 1rem; }
.clinical-v2 details { margin-block: .75rem; }
.clinical-v2 summary { cursor: pointer; padding-block: .5rem; font-weight: 600; }
.clinical-v2 img { display: block; max-width: 100%; max-height: 340px; object-fit: contain; margin-block: 1rem; }
.clinical-v2 .v2-tooth-chart { max-width: 100%; padding-block: 1rem; }
.clinical-v2 .v2-tooth-row { display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 2px; margin-block: .5rem; }
.clinical-v2 .odontogram-strip-tooth { min-width: 0; width: 100%; padding: .3rem 0; min-height: 48px; color: var(--text-primary); background: var(--surface-soft); border: 1px solid var(--line); }
.clinical-v2 .odontogram-strip-tooth.is-selected { border-color: var(--betooth-cyan); background: color-mix(in srgb, var(--surface-soft) 80%, var(--betooth-cyan) 20%); }
.clinical-v2 .strip-tooth-num { font-size: .65rem; color: var(--text-primary); }
.clinical-v2 .strip-tooth-svg { max-width: 22px; width: 100%; color: var(--text-primary); }
.clinical-v2 .clinical-case-card { padding: 1rem; }
.clinical-v2 .clinical-actions, .clinical-v2 .tooth-tools-bar { flex-wrap: wrap; margin-block: 1rem; }
.clinical-v2 .clinical-dual-tab { padding: 1rem; font: inherit; }
.v2-preview { width: min(960px, 94vw); max-height: 90vh; overflow-y: auto; padding: 1rem; background: var(--surface); color: var(--text-primary); border: 1px solid var(--line); }
.clinical-v2.v2-publisher > .v2-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.clinical-v2 .v2-wide { grid-column: 1 / -1; }
.clinical-v2 .v2-exam-editor { padding: .65rem .85rem; margin-block: .6rem; }
.clinical-v2 .v2-exam-editor > .clinical-choice-row { padding: .4rem; }
.clinical-v2 .v2-config-summary { margin-block: .4rem; color: var(--text-secondary); font-size: .85rem; }
.clinical-v2 .v2-result-fields > .v2-advanced { grid-column: 1 / -1; margin: 0; }
.clinical-v2 .v2-image-editor { border: 1px solid var(--line); border-radius: var(--radius-control, 8px); padding: .6rem .85rem; }
.clinical-v2 .v2-publisher-actions { flex-wrap: wrap; }
.clinical-v2.v2-publisher > .clinical-actions { margin-block: .25rem; }
.clinical-v2 .v2-author-warning { color: var(--text-secondary); font-size: .85rem; }
.clinical-v2 .v2-assessment-stage { border: 1px solid var(--line); border-radius: var(--radius-control, 8px); padding: .6rem .85rem; }
.clinical-v2 .v2-assessment-stage > summary { font-size: 1rem; }
.clinical-v2 .v2-assessment-stage > label { margin-block: .6rem; }
.clinical-v2 .v2-choice-editor .v2-inline { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .6rem; margin-block: .5rem; }
.clinical-v2 .v2-comparison-row { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(0, 2fr) minmax(80px, .5fr); align-items: start; gap: .7rem; padding: .65rem .8rem; border-block-end: 1px solid var(--line); }
.clinical-v2 .v2-comparison-row h4, .clinical-v2 .v2-comparison-row p { margin: 0; font-size: .875rem; line-height: 1.5; }
.clinical-v2 .v2-comparison-row details { margin: 0; }
.clinical-v2 .v2-comparison-row summary { padding: 0; min-height: 28px; }
.clinical-v2 .v2-comparison-row details[open] { grid-column: 1 / -1; }
.clinical-v2 .v2-comparison-row details[open] p { margin-block: .6rem; }
.clinical-v2 .v2-comparison-row img { width: auto; height: auto; max-width: 100%; max-height: 260px; margin-block: .6rem; }
@media (max-width: 600px) {
  .clinical-v2.v2-publisher > .v2-fields { grid-template-columns: minmax(0, 1fr); }
  .clinical-v2 .v2-comparison-row { grid-template-columns: minmax(0, 1fr) auto; gap: .3rem .7rem; }
  .clinical-v2 .v2-comparison-finding { grid-column: 1 / -1; }
  .clinical-v2 .v2-comparison-row details { grid-column: 1 / -1; }
  .clinical-v2 .v2-tooth-row { grid-template-columns: repeat(8, minmax(0, 1fr)); row-gap: .5rem; }
  .clinical-v2 .clinical-dual-tabs-track { display: grid; grid-template-columns: 1fr; }
  .clinical-v2 .clinical-actions > button { flex: 1 1 140px; }
}

/* Student V2 reuses Legacy cards/console/decision styles. Never applies to the publisher. */
.clinical-v2.v2-student { padding-bottom: 1.5rem; }
.clinical-v2.v2-student > .sim-top-nav { flex-wrap: wrap; gap: .75rem; }
.clinical-v2.v2-student .sim-top-nav h2 { margin: 0; flex: 1; min-width: 0; }
.clinical-v2.v2-student .sim-nav-btn { display: inline-flex; align-items: center; gap: .4rem; }
.clinical-v2.v2-student .sim-nav-btn .ui-icon,
.clinical-v2.v2-student .decision-submit-btn .ui-icon { width: 18px; height: 18px; flex-shrink: 0; }
.clinical-v2.v2-student .clinical-odontogram-card { margin-bottom: 0; min-width: 0; }
.clinical-v2.v2-student .v2-tooth-chart { padding-block: .35rem; align-items: start; }
.clinical-v2.v2-student .odontogram-strip-row { width: max-content; min-width: 100%; }
.clinical-v2.v2-student .odontogram-strip-tooth { width: 34px; height: 44px; min-height: 44px; padding: 3px 1px; }
.clinical-v2.v2-student .strip-tooth-num { font-size: .8125rem; }
.clinical-v2.v2-student .strip-tooth-svg { width: 14px; height: 14px; }
.clinical-v2.v2-student .odontogram-strip-tooth.is-missing { border-style: dashed; background: transparent; }
.clinical-v2.v2-student .v2-missing-marker { height: 14px; line-height: 14px; font-size: 1rem; }
.clinical-v2.v2-student .odontogram-strip-tooth.is-focus-tooth { border-color: #F59E0B; background: color-mix(in srgb, #F59E0B 14%, var(--surface-soft)); box-shadow: inset 0 0 0 1px #F59E0B; }
.clinical-v2.v2-student .v2-focus-marker { position: absolute; top: -5px; right: 1px; color: #F59E0B; font-size: 1rem; line-height: 1; }
.clinical-v2.v2-student .v2-focus-info { border-inline-start: 3px solid #F59E0B; padding: .65rem .85rem; margin-block: .75rem; background: var(--surface-soft); color: var(--text-primary); font-weight: 600; }
.clinical-v2.v2-student .v2-interview > button { display: block; width: 100%; text-align: start; margin-block: .5rem; min-height: 44px; }
.clinical-v2.v2-student .v2-interview-response { border-inline-start: 2px solid var(--betooth-cyan); padding: .5rem .8rem; margin-block: .75rem; background: var(--surface-soft); }
.clinical-v2.v2-student .v2-reasoning-task { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-control, 8px); padding: .85rem; margin-block: .85rem; }
.clinical-v2.v2-student .v2-reasoning-task legend { font-weight: 700; max-width: 100%; }
.clinical-v2.v2-student .v2-reasoning-selection { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding-block: .4rem; }
.clinical-v2.v2-student .v2-immediate-result { min-width: 0; min-height: 5rem; box-sizing: border-box; padding: .65rem .8rem; margin-block: .65rem; border: 1px solid var(--line); border-inline-start: 3px solid var(--betooth-cyan); border-radius: var(--radius-control, 8px); background: var(--surface-soft); }
.clinical-v2.v2-student .v2-immediate-result h4, .clinical-v2.v2-student .v2-immediate-result p { margin: .2rem 0; line-height: 1.5; overflow-wrap: anywhere; }
.clinical-v2.v2-student .v2-immediate-result .v2-result-caption { color: var(--text-secondary); font-size: .8125rem; }
.clinical-v2.v2-student .v2-immediate-result .v2-result-context { font-size: .875rem; }
.clinical-v2.v2-student .v2-immediate-image { height: 14rem; margin-block: .5rem; display: grid; place-items: center; }
.clinical-v2.v2-student .v2-immediate-image img { height: 100%; width: 100%; max-height: 14rem; margin: 0; object-fit: contain; }
.clinical-v2.v2-student .v2-findings > summary { cursor: pointer; min-height: 44px; padding-block: .6rem; font-weight: 700; }
.clinical-v2.v2-student .v2-findings-record { max-height: 18rem; overflow-y: auto; padding-inline-end: .4rem; }
.clinical-v2.v2-student .v2-findings .v2-comparison-row > * { min-width: 0; overflow-wrap: anywhere; }
.clinical-v2.v2-student .v2-findings-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .65rem; margin-block: .65rem; }
.clinical-v2.v2-student .v2-findings-pair label, .clinical-v2.v2-student .v2-findings-pair select { min-width: 0; width: 100%; }
.clinical-v2.v2-student .v2-findings-pair select { min-height: 44px; }
.clinical-v2.v2-student .v2-findings .v2-comparison-examination { width: 100%; min-width: 0; min-height: 44px; margin-block: .4rem; }
.clinical-v2.v2-student .v2-findings-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.clinical-v2.v2-student .v2-findings-table th, .clinical-v2.v2-student .v2-findings-table td { padding: .45rem; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; overflow-wrap: anywhere; }
.clinical-v2.v2-student .v2-findings-table p { margin-block: .3rem; }
.clinical-v2.v2-student.v2-natural .v2-primary-activity { margin-block: 1rem; }
.clinical-v2.v2-student.v2-natural .v2-primary-activity > .patient-dossier-title { margin-block-end: .75rem; }
.clinical-v2.v2-student.v2-natural .v2-case-notebook { margin-block: .75rem; padding: .8rem 1rem; }
.clinical-v2.v2-student.v2-natural .v2-case-notebook > summary { cursor: pointer; font-weight: 700; min-height: 28px; }
.clinical-v2.v2-student.v2-natural .v2-case-notebook .clinical-patient-dossier { margin-block: .8rem; }
.clinical-v2.v2-student.v2-natural .v2-notebook-fact { border-inline-start: 2px solid var(--betooth-cyan); padding-inline-start: .8rem; margin-block: .8rem; }
.clinical-v2.v2-student.v2-natural .v2-patient-reply { border-inline-start: 3px solid var(--betooth-cyan); background: var(--surface-soft); padding: .8rem 1rem; margin-block: 1rem; }
.clinical-v2.v2-student.v2-natural .v2-interview-actions { display: grid; gap: .45rem; margin-block: .75rem; }
.clinical-v2.v2-student.v2-natural .v2-interview-actions button { text-align: start; min-height: 44px; white-space: normal; }
.clinical-v2.v2-student.v2-natural .v2-activity-body > .clinical-odontogram-card { margin-block: 1rem; }
.clinical-v2.v2-student.v2-natural .v2-working-record { margin-block: .75rem; }
.clinical-v2.v2-student.v2-natural .v2-record-entry { padding-block: .6rem; border-bottom: 1px solid var(--line); }
.clinical-v2.v2-student.v2-natural .v2-decision-options { display: grid; gap: .4rem; margin-block: .75rem; }
.clinical-v2.v2-student.v2-natural .v2-decision-options button { text-align: start; min-height: 44px; white-space: normal; }
.clinical-v2.v2-student.v2-natural .v2-decision-options button[aria-pressed="true"] { border-color: var(--betooth-cyan); background: var(--surface-soft); }
.clinical-v2.v2-student.v2-natural .v2-reasoning-task input[type="search"] { width: 100%; min-width: 0; margin-block-start: .4rem; }
.clinical-v2.v2-student.v2-natural .v2-simulation-actions { flex-wrap: wrap; margin-block-start: 1rem; }
.clinical-v2.v2-student.v2-natural .v2-current-decision .v2-reasoning-selection { flex-wrap: wrap; }
.clinical-v2.v2-student.v2-natural .v2-additional-actions { margin-block: .8rem; }
.clinical-v2.v2-student .tooth-tools-bar { margin: 0; }
.clinical-v2.v2-student .tooth-tool-btn { min-height: 44px; }
.clinical-v2.v2-student .v2-comparison { min-width: 0; }
.clinical-v2.v2-student .v2-comparison > h3 { font-size: 1rem; margin: 0; }
.clinical-v2.v2-student .v2-comparison-row { padding-inline: 0; }
.clinical-v2.v2-student .clinical-decision-box { min-width: 0; }
.clinical-v2.v2-student .decision-submit-bar { justify-content: flex-end; }
.clinical-v2.v2-student .decision-submit-btn { display: inline-flex; align-items: center; gap: .5rem; }
.clinical-v2.v2-student .v2-feedback { box-shadow: none; }
.clinical-v2.v2-student .clinical-stepper { display: flex; max-width: 100%; overflow-x: auto; }
.clinical-v2.v2-student .stepper-step { flex: 1 0 105px; }
.clinical-v2.v2-student .clinical-score-value { color: var(--betooth-cyan); font-size: 2rem; font-weight: 800; margin-block: .5rem; }
.clinical-v2.v2-student .clinical-decision-box > details { border-block-start: 1px solid var(--line); padding-block: .6rem; }
@media (max-width: 600px) {
  .clinical-v2.v2-student .sim-top-nav h2 { flex-basis: 100%; order: 3; }
  .clinical-v2.v2-student .clinical-patient-dossier,
  .clinical-v2.v2-student .clinical-odontogram-card,
  .clinical-v2.v2-student .clinical-decision-box { padding: 1rem; }
  .clinical-v2.v2-student .tooth-diagnostic-console { padding: .75rem; }
  .clinical-v2.v2-student .decision-submit-btn { width: 100%; justify-content: center; }
}

.clinical-page {
  max-width: 1400px;
  margin-inline: auto;
  padding-bottom: 2.5rem;
}

/* --------------------------------------------------------------------------
   1. Hero Banner
   -------------------------------------------------------------------------- */
.clinical-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, var(--betooth-cyan, #06b6d4) 8%), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 16px);
  padding: 2rem 2.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.clinical-hero::before {
  content: '';
  position: absolute;
  inset-inline-end: -60px;
  inset-block-start: -60px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, color-mix(in srgb, var(--betooth-orange, #f97316) 18%, transparent) 0%, transparent 70%);
  pointer-events: none;
  border-radius: 50%;
}

.clinical-hero-content {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  z-index: 1;
}

.clinical-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  background: color-mix(in srgb, var(--surface-soft) 80%, var(--betooth-orange) 20%);
  border: 1px solid color-mix(in srgb, var(--line-strong) 60%, var(--betooth-orange) 40%);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--betooth-orange);
  letter-spacing: 0.02em;
}

.clinical-hero-badge .ui-icon {
  width: 16px;
  height: 16px;
}

.clinical-hero-title {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 850;
  line-height: 1.2;
  margin: 0;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.clinical-hero-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 64ch;
  margin: 0;
}

.clinical-hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.clinical-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control, 8px);
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.clinical-hero-pill .ui-icon {
  width: 15px;
  height: 15px;
  color: var(--betooth-orange);
}

.clinical-hero-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clinical-mascot-frame {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--surface-soft) 90%, var(--betooth-cyan, #06b6d4) 10%) 0%, transparent 70%);
}

.clinical-hero-mascot {
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.15));
  animation: clinicalFloat 4s ease-in-out infinite alternate;
}

@keyframes clinicalFloat {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

/* --------------------------------------------------------------------------
   2. Filters Bar
   -------------------------------------------------------------------------- */
.clinical-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 1.5rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 12px);
}

.clinical-filters-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.clinical-filters-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.clinical-filters-label .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--betooth-orange);
}

.clinical-filters-bar select {
  min-width: 170px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control, 8px);
  background: var(--surface-soft);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  outline: none;
}

.clinical-filters-bar select:focus-visible {
  border-color: var(--betooth-orange);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--betooth-orange) 30%, transparent);
}

.clinical-count-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  padding: 0.35rem 0.75rem;
  border-radius: 12px;
}

/* --------------------------------------------------------------------------
   3. Case Cards Grid
   -------------------------------------------------------------------------- */
.clinical-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 350px), 1fr));
  gap: 1.5rem;
  margin-block: 1rem 2rem;
}

.clinical-case-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 14px);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.clinical-case-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--line-strong) 70%, var(--betooth-orange) 30%);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
}

.case-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.case-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.case-pill .pill-icon {
  width: 13px;
  height: 13px;
}

.specialty-pill {
  background: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 15%, var(--surface));
  color: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 90%, var(--text-primary));
  border: 1px solid color-mix(in srgb, var(--betooth-cyan, #06b6d4) 30%, transparent);
}

.diff-basic {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.diff-intermediate {
  background: rgba(234, 179, 8, 0.12);
  color: #ca8a04;
  border: 1px solid rgba(234, 179, 8, 0.25);
}

.diff-advanced {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.time-pill {
  background: var(--surface-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  margin-inline-start: auto;
}

.case-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.case-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
  color: var(--text-primary);
}

.case-academic {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.case-academic .academic-icon {
  width: 14px;
  height: 14px;
  color: var(--betooth-orange);
}

.case-objectives {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.case-obj-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.case-obj-item .obj-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--betooth-cyan, #06b6d4);
  margin-top: 2px;
}

.case-card-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.case-start-btn {
  width: 100%;
  justify-content: center;
  gap: 0.6rem;
  font-weight: 800;
  padding-block: 0.75rem;
  box-shadow: 0 4px 12px -2px color-mix(in srgb, var(--betooth-orange) 40%, transparent);
}

.case-start-btn .btn-icon {
  width: 16px;
  height: 16px;
}

/* --------------------------------------------------------------------------
   4. Previous Attempts Section
   -------------------------------------------------------------------------- */
.clinical-history-section {
  margin-top: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 16px);
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.clinical-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.clinical-history-head-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.clinical-history-head-left h2 {
  font-size: 1.2rem;
  font-weight: 850;
  color: var(--text-primary);
  margin: 0;
}

.clinical-history-head-left .ui-icon {
  width: 22px;
  height: 22px;
  color: var(--betooth-cyan, #06b6d4);
}

.clinical-history-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.clinical-history-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.clinical-history-card:hover {
  transform: translateY(-2px);
  border-color: var(--betooth-cyan, #06b6d4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.history-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.history-specialty-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 750;
  background: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 14%, var(--surface));
  color: var(--betooth-cyan, #06b6d4);
  border: 1px solid color-mix(in srgb, var(--betooth-cyan, #06b6d4) 30%, transparent);
}

.history-specialty-badge .ui-icon {
  width: 14px;
  height: 14px;
}

.history-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.history-date-badge .ui-icon {
  width: 13px;
  height: 13px;
}

.history-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex-grow: 1;
}

.history-case-title {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.history-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-subtle);
}

.history-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 850;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.history-score-badge.score-high {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.history-score-badge.score-mid {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.history-score-badge .ui-icon {
  width: 15px;
  height: 15px;
}

.history-status-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.history-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 750;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.history-status-badge.in-progress {
  background: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 14%, var(--surface));
  color: var(--betooth-cyan, #06b6d4);
  border: 1px solid color-mix(in srgb, var(--betooth-cyan, #06b6d4) 30%, transparent);
}

.history-status-badge .ui-icon {
  width: 14px;
  height: 14px;
}

.history-card-action {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.history-card-action.secondary {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--text-primary);
}

.history-card-action.secondary:hover {
  border-color: var(--betooth-cyan, #06b6d4);
  color: var(--betooth-cyan, #06b6d4);
  background: color-mix(in srgb, var(--surface) 90%, var(--betooth-cyan, #06b6d4) 10%);
}

.history-card-action.primary {
  background: linear-gradient(135deg, var(--betooth-cyan, #06b6d4) 0%, #0284c7 100%);
  border: 1px solid transparent;
  color: #FFFFFF;
}

.history-card-action.primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.history-card-action .btn-icon {
  width: 16px;
  height: 16px;
}

.history-attempt-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-control, 8px);
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-attempt-card:hover {
  background: color-mix(in srgb, var(--surface-soft) 80%, var(--betooth-cyan, #06b6d4) 20%);
  border-color: var(--line-strong);
}

/* --------------------------------------------------------------------------
   5. Active Simulation Workflow & Stage Stepper
   -------------------------------------------------------------------------- */
.clinical-simulation-view {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding-bottom: 5.5rem;
}

.diagnosis-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  background: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--betooth-cyan, #06b6d4) 40%, transparent);
  color: var(--betooth-cyan, #06b6d4);
  font-size: 0.78125rem;
  font-weight: 800;
  margin-top: 0.35rem;
  align-self: flex-start;
}

.clinical-choice-row.is-selected {
  background: color-mix(in srgb, var(--surface-soft) 80%, var(--betooth-orange) 20%);
  border-color: var(--betooth-orange);
  box-shadow: 0 0 0 1px var(--betooth-orange), 0 4px 14px rgba(249, 115, 22, 0.18);
}

.clinical-decision-box.is-diagnosis-stage .clinical-choice-row.is-selected {
  background: color-mix(in srgb, var(--surface-soft) 78%, var(--betooth-cyan, #06b6d4) 22%);
  border-color: var(--betooth-cyan, #06b6d4);
  box-shadow: 0 0 0 1px var(--betooth-cyan, #06b6d4), 0 4px 14px rgba(6, 182, 212, 0.22);
}

/* Floating Quick-Jump Action Dock */
.clinical-sticky-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.65rem 1.25rem;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(6, 182, 212, 0.4);
  border-radius: 999px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  max-width: min(92vw, 680px);
}

.clinical-sticky-dock.is-at-decision {
  opacity: 0.25;
  transform: translateX(-50%) translateY(8px);
  pointer-events: none;
}

.clinical-sticky-dock.is-at-decision:hover {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.clinical-dock-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.clinical-dock-status .dock-icon {
  width: 18px;
  height: 18px;
  color: var(--betooth-cyan, #06b6d4);
}

.clinical-dock-stage-title {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #F8FAFC;
}

.clinical-dock-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--betooth-orange);
  color: #FFFFFF;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
  transition: all 0.2s ease;
}

.clinical-dock-jump-btn:hover {
  background: #ea580c;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(249, 115, 22, 0.5);
}

.clinical-dock-jump-btn .dock-btn-icon {
  width: 14px;
  height: 14px;
}

.sim-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control, 10px);
}

.sim-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
}

.sim-nav-btn .btn-icon {
  width: 16px;
  height: 16px;
}

/* Stepper Component */
.clinical-stepper {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 12px);
  padding: 1rem;
  overflow-x: auto;
}

.stepper-step {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--radius-control, 8px);
  background: var(--surface-soft);
  border: 1px solid transparent;
  transition: all 0.2s ease;
  min-width: 140px;
}

.stepper-step.is-current {
  background: color-mix(in srgb, var(--surface) 80%, var(--betooth-orange) 20%);
  border-color: var(--betooth-orange);
  box-shadow: 0 0 0 1px var(--betooth-orange);
}

.stepper-step.is-completed {
  background: color-mix(in srgb, var(--surface) 88%, #22c55e 12%);
  border-color: rgba(34, 197, 94, 0.35);
}

.stepper-step.is-pending {
  opacity: 0.6;
}

.stepper-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.stepper-step.is-current .stepper-icon-wrap {
  background: var(--betooth-orange);
  color: #fff;
  border-color: var(--betooth-orange);
}

.stepper-step.is-completed .stepper-icon-wrap {
  background: #22c55e;
  color: #fff;
  border-color: #22c55e;
}

.stepper-icon-wrap .ui-icon {
  width: 16px;
  height: 16px;
}

.stepper-label-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stepper-step-num {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stepper-step-title {
  font-size: 0.8125rem;
  font-weight: 750;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   6. Patient Dossier Card
   -------------------------------------------------------------------------- */
.clinical-patient-dossier {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 14px);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.patient-dossier-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.patient-dossier-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.patient-dossier-title .ui-icon {
  width: 20px;
  height: 20px;
  color: var(--betooth-orange);
}

.patient-complaint-box {
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-soft) 88%, var(--betooth-orange) 12%) 0%, var(--surface-soft) 100%);
  border: 1px solid color-mix(in srgb, var(--border-subtle) 80%, var(--betooth-orange) 20%);
  border-inline-start: 5px solid var(--betooth-orange);
  border-radius: var(--radius-card, 12px);
  padding: 1.25rem 1.5rem;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.patient-complaint-box::before {
  content: '“';
  position: absolute;
  inset-inline-end: 1rem;
  inset-block-start: -0.5rem;
  font-size: 5rem;
  font-family: Georgia, serif;
  line-height: 1;
  color: color-mix(in srgb, var(--betooth-orange) 18%, transparent);
  pointer-events: none;
  user-select: none;
}

.complaint-quote-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 850;
  text-transform: uppercase;
  color: var(--betooth-orange);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.complaint-quote-badge .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--betooth-orange);
}

.complaint-triage-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: color-mix(in srgb, #EF4444 18%, var(--surface));
  color: #EF4444;
  border: 1px solid color-mix(in srgb, #EF4444 35%, transparent);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.complaint-text {
  font-size: 1.125rem;
  font-weight: 750;
  line-height: 1.6;
  color: #FFFFFF;
  margin: 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.patient-presentation-wrapper {
  margin-top: 0.85rem;
  padding: 0.85rem 1.15rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.presentation-meta-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.patient-presentation-text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

/* --------------------------------------------------------------------------
   7. Revealed Evidence & Lab Findings
   -------------------------------------------------------------------------- */
.clinical-evidence-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.evidence-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0;
}

.evidence-section-title .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--betooth-cyan, #06b6d4);
}

.clinical-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1rem;
}

.evidence-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control, 10px);
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-inline-start: 4px solid var(--betooth-cyan, #06b6d4);
}

.evidence-card-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 750;
  color: var(--betooth-cyan, #06b6d4);
}

.evidence-card-finding {
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

/* --------------------------------------------------------------------------
   8. Decisions & Choices
   -------------------------------------------------------------------------- */
.clinical-decision-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 16px);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  border-top: 4px solid var(--betooth-orange);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  scroll-margin-top: calc(var(--topbar-height, 70px) + 24px);
}

.clinical-decision-box.is-diagnosis-stage {
  border-top-color: var(--betooth-cyan, #06b6d4);
  box-shadow: 0 6px 26px rgba(6, 182, 212, 0.16);
}

.clinical-decision-box.highlight-pulse {
  animation: decision-pulse 1.4s ease-out;
}

@keyframes decision-pulse {
  0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.6); transform: scale(0.99); }
  50% { box-shadow: 0 0 0 8px rgba(6, 182, 212, 0.3); transform: scale(1.005); }
  100% { box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); transform: scale(1); }
}

.decision-box-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.decision-stage-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
  font-weight: 850;
  color: var(--text-primary);
  margin: 0;
}

.decision-stage-heading .ui-icon {
  width: 22px;
  height: 22px;
  color: var(--betooth-orange);
}

.decision-stage-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.clinical-choices-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.clinical-choice-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-control, 10px);
  background: var(--surface-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.clinical-choice-row:hover {
  background: color-mix(in srgb, var(--surface-soft) 85%, var(--betooth-cyan, #06b6d4) 15%);
  border-color: var(--betooth-cyan, #06b6d4);
  transform: translateX(2px);
}

html[dir="rtl"] .clinical-choice-row:hover {
  transform: translateX(-2px);
}

.clinical-choice-row input {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  accent-color: var(--betooth-orange);
  cursor: pointer;
  flex-shrink: 0;
}

.choice-row-text {
  font-size: 0.9375rem;
  font-weight: 650;
  line-height: 1.45;
  color: var(--text-primary);
}

.decision-submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.75rem;
}

.decision-submit-btn {
  padding: 0.75rem 1.75rem;
  font-size: 0.9375rem;
  font-weight: 800;
  box-shadow: 0 4px 14px -2px color-mix(in srgb, var(--betooth-orange) 45%, transparent);
}

/* --------------------------------------------------------------------------
   9. Evaluation & Results Screen
   -------------------------------------------------------------------------- */
.clinical-results-container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.results-hero-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface) 90%, #22c55e 10%), var(--surface));
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-card, 16px);
  padding: 2.25rem;
  box-shadow: 0 8px 30px -4px rgba(0, 0, 0, 0.08);
}

.results-score-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--surface);
  border: 5px solid #22c55e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.results-score-num {
  font-size: 2.1rem;
  font-weight: 900;
  color: #16a34a;
  line-height: 1;
}

.results-score-unit {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 2px;
}

.results-hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.results-tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.12);
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  align-self: flex-start;
}

.results-tier-badge .ui-icon {
  width: 16px;
  height: 16px;
}

.results-hero-title {
  font-size: 1.6rem;
  font-weight: 850;
  margin: 0;
  color: var(--text-primary);
}

.results-hero-feedback {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

/* Stage Details Accordion */
.results-breakdown-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.results-section-heading {
  font-size: 1.25rem;
  font-weight: 850;
  color: var(--text-primary);
  margin: 0;
}

.results-stage-detail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-control, 10px);
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
}

.results-stage-detail[open] {
  border-color: var(--line-strong);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.results-stage-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
}

.results-stage-summary::-webkit-details-marker {
  display: none;
}

.results-score-badge {
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}

.results-feedback-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.feedback-item-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 0.875rem;
  line-height: 1.45;
}

.feedback-tag {
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
}

.tag-safe {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.tag-unsafe {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.tag-omitted {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.tag-unselected {
  background: var(--border-subtle);
  color: var(--text-muted);
}

/* Scientific References */
.results-references-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-card, 12px);
  padding: 1.5rem;
}

.results-references-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 1rem;
}

.results-references-head .ui-icon {
  width: 18px;
  height: 18px;
  color: var(--betooth-orange);
}

.references-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.reference-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.reference-item .ref-bullet {
  color: var(--betooth-orange);
  font-weight: 900;
}

/* Empty State */
.clinical-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-card, 14px);
  margin-block: 1.5rem;
}

.empty-icon-frame {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-icon-frame .ui-icon {
  width: 32px;
  height: 32px;
}

/* Owner/Admin Editor Adjustments */
.clinical-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.clinical-steps button {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 700;
}

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

/* Responsive Rules */
@media (max-width: 840px) {
  .clinical-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 1.75rem 1.25rem;
  }
  .clinical-hero-content {
    align-items: center;
  }
  .clinical-hero-badge {
    align-self: center;
  }
  .clinical-hero-features {
    justify-content: center;
  }
  .clinical-hero-graphic {
    order: -1;
  }
  .results-hero-card {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
  .results-tier-badge {
    align-self: center;
  }
}

@media (max-width: 640px) {
  .clinical-stepper {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.75rem;
  }
  .stepper-step {
    scroll-snap-align: start;
    flex: 0 0 160px;
  }
  .decision-submit-bar {
    flex-direction: column-reverse;
  }
  .decision-submit-bar button {
    width: 100%;
  }
}

/* ==========================================================================
   BETOOTH — Interactive Odontogram & Clinical Graphics System
   ========================================================================== */

/* 1. Patient Vitals Realtime Monitor */
.clinical-vitals-monitor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.85) 100%);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  color: #F8FAFC;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 16px rgba(0, 0, 0, 0.25);
  margin-bottom: 1.25rem;
}

.vital-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.vital-icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
}

.vital-item.vital-pulse .vital-icon-wrap { color: #EF4444; background: rgba(239, 68, 68, 0.15); }
.vital-item.vital-bp .vital-icon-wrap { color: #38BDF8; background: rgba(56, 189, 248, 0.15); }
.vital-item.vital-spo2 .vital-icon-wrap { color: #10B981; background: rgba(16, 185, 129, 0.15); }
.vital-item.vital-temp .vital-icon-wrap { color: #F59E0B; background: rgba(245, 158, 11, 0.15); }

.vital-data {
  display: flex;
  flex-direction: column;
}

.vital-label {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #94A3B8;
  letter-spacing: 0.05em;
}

.vital-val {
  font-size: 1rem;
  font-weight: 850;
  color: #FFFFFF;
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.vital-val small {
  font-size: 0.6875rem;
  color: #94A3B8;
  font-weight: 600;
}

.ecg-mini-line {
  width: 44px;
  height: 18px;
  stroke: #10B981;
  stroke-width: 1.8;
  fill: none;
  animation: ecg-pulse 1.8s linear infinite;
}

@keyframes ecg-pulse {
  0% { stroke-dashoffset: 60; }
  100% { stroke-dashoffset: 0; }
}

/* 2. Interactive Odontogram Card */
.clinical-odontogram-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.odontogram-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.odontogram-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.odontogram-title-wrap h3 {
  font-size: 1.15rem;
  font-weight: 850;
  margin: 0;
  color: var(--text-primary);
}

.odontogram-hint {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}

.odontogram-head.compact-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.65rem;
}

.odontogram-orient-chips {
  direction: ltr !important;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.orient-chip {
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
}

.orient-chip.chip-r {
  color: var(--betooth-orange);
  border-color: color-mix(in srgb, var(--betooth-orange) 40%, transparent);
  background: color-mix(in srgb, var(--betooth-orange) 8%, transparent);
}

.orient-chip.chip-l {
  color: var(--betooth-cyan, #06b6d4);
  border-color: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 40%, transparent);
  background: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 8%, transparent);
}

.orient-midline-label {
  color: var(--text-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
}

/* Arch Container & Strip Rows (Strictly LTR) */
.odontogram-arch-container,
.odontogram-strip-row,
.arch-strip-quad {
  direction: ltr !important;
}

.odontogram-arch-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  width: 100%;
  padding: 0.35rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.odontogram-strip-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.strip-jaw-badge {
  font-size: 0.65rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

.arch-strip-quad {
  display: flex;
  align-items: center;
  gap: 3px;
}

.strip-midline {
  width: 2px;
  height: 36px;
  background: var(--betooth-orange);
  opacity: 0.6;
  margin: 0 4px;
  border-radius: 1px;
  flex-shrink: 0;
}

/* Tooth Buttons (Compact Clinic Style) */
.odontogram-strip-tooth {
  direction: ltr !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 34px;
  height: 44px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 3px 1px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  user-select: none;
  flex-shrink: 0;
}

.odontogram-strip-tooth:hover {
  background: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 15%, var(--surface-soft));
  border-color: var(--betooth-cyan, #06b6d4);
  transform: translateY(-2px);
}

.odontogram-strip-tooth.is-selected {
  background: color-mix(in srgb, var(--betooth-cyan, #06b6d4) 24%, var(--surface));
  border-color: var(--betooth-cyan, #06b6d4);
  box-shadow: 0 0 0 1.5px var(--betooth-cyan, #06b6d4), 0 3px 10px rgba(6, 182, 212, 0.35);
  transform: translateY(-2px);
}

.odontogram-strip-tooth.is-target-tooth {
  border-color: #EF4444;
  background: color-mix(in srgb, #EF4444 14%, var(--surface-soft));
  box-shadow: 0 0 0 1.5px rgba(239, 68, 68, 0.7), 0 0 10px rgba(239, 68, 68, 0.4);
  animation: strip-tooth-pulse 2s infinite ease-in-out;
}

@keyframes strip-tooth-pulse {
  0%, 100% { box-shadow: 0 0 0 1.5px rgba(239, 68, 68, 0.7), 0 0 8px rgba(239, 68, 68, 0.35); }
  50% { box-shadow: 0 0 0 2.5px rgba(239, 68, 68, 0.95), 0 0 16px rgba(239, 68, 68, 0.6); }
}

.tooth-target-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 6px #EF4444;
  pointer-events: none;
}

.strip-tooth-svg {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  transition: transform 0.2s ease, color 0.2s ease;
}

.odontogram-strip-tooth.is-target-tooth .strip-tooth-svg {
  color: #EF4444;
}

.odontogram-strip-tooth.is-selected .strip-tooth-svg {
  color: var(--betooth-cyan, #06b6d4);
  transform: scale(1.15);
}

.strip-tooth-num {
  font-size: 0.8125rem;
  font-weight: 850;
  line-height: 1;
  color: var(--text-primary);
}

.odontogram-strip-tooth.is-selected .strip-tooth-num {
  color: var(--betooth-cyan, #06b6d4);
}

.odontogram-strip-tooth.is-target-tooth .strip-tooth-num {
  color: #EF4444;
}

/* Compact Tooth Diagnostic Console */
.tooth-diagnostic-console {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.15rem;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(20, 32, 48, 0.95) 100%);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  width: 100%;
}

.console-compact-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.5rem;
}

.console-tooth-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9375rem;
  color: #FFFFFF;
}

.console-tooth-title .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--betooth-cyan, #06b6d4);
}

.console-tooth-type {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.console-status-badge {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.console-status-badge.is-target {
  background: color-mix(in srgb, #EF4444 18%, var(--surface));
  color: #EF4444;
  border: 1px solid color-mix(in srgb, #EF4444 35%, transparent);
}

.console-status-badge.is-sound {
  background: color-mix(in srgb, #10B981 18%, var(--surface));
  color: #10B981;
  border: 1px solid color-mix(in srgb, #10B981 35%, transparent);
}

.tooth-tools-bar.compact-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tooth-tool-btn.compact-tool-btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.75rem;
  border-radius: 8px;
}

.tooth-tool-btn.compact-tool-btn .pill-icon {
  width: 14px;
  height: 14px;
}

.tooth-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 0.8125rem;
  font-weight: 750;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  position: relative;
}

.tooth-tool-btn .pill-icon {
  width: 15px;
  height: 15px;
  transition: transform 0.2s ease;
}

.tooth-tool-btn:hover {
  transform: translateY(-2px);
  border-color: var(--betooth-cyan);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

.tooth-tool-btn:hover .pill-icon {
  transform: scale(1.15);
}

/* Tool Signature Color Themes */
.tooth-tool-btn.tool-cold.is-active {
  background: color-mix(in srgb, #38BDF8 20%, var(--surface));
  border-color: #38BDF8;
  color: #F0F9FF;
  box-shadow: 0 0 0 1px #38BDF8, 0 0 14px rgba(56, 189, 248, 0.35);
}
.tooth-tool-btn.tool-cold.is-active .pill-icon { color: #38BDF8; }

.tooth-tool-btn.tool-ept.is-active {
  background: color-mix(in srgb, #C084FC 20%, var(--surface));
  border-color: #C084FC;
  color: #FAF5FF;
  box-shadow: 0 0 0 1px #C084FC, 0 0 14px rgba(192, 132, 252, 0.35);
}
.tooth-tool-btn.tool-ept.is-active .pill-icon { color: #C084FC; }

.tooth-tool-btn.tool-percussion.is-active {
  background: color-mix(in srgb, #F59E0B 20%, var(--surface));
  border-color: #F59E0B;
  color: #FFFBEB;
  box-shadow: 0 0 0 1px #F59E0B, 0 0 14px rgba(245, 158, 11, 0.35);
}
.tooth-tool-btn.tool-percussion.is-active .pill-icon { color: #F59E0B; }

.tooth-tool-btn.tool-xray.is-active {
  background: color-mix(in srgb, #34D399 20%, var(--surface));
  border-color: #34D399;
  color: #ECFDF5;
  box-shadow: 0 0 0 1px #34D399, 0 0 14px rgba(52, 211, 153, 0.35);
}
.tooth-tool-btn.tool-xray.is-active .pill-icon { color: #34D399; }

.tooth-tool-btn.tool-probe.is-active {
  background: color-mix(in srgb, #2DD4BF 20%, var(--surface));
  border-color: #2DD4BF;
  color: #F0FDFA;
  box-shadow: 0 0 0 1px #2DD4BF, 0 0 14px rgba(45, 212, 191, 0.35);
}
.tooth-tool-btn.tool-probe.is-active .pill-icon { color: #2DD4BF; }

/* Diagnostic Telemetry Output Screen */
.tooth-test-output.compact-output {
  margin-top: 0.25rem;
  padding: 0.85rem 1.15rem;
  border-radius: 10px;
  font-size: 0.875rem;
}

.tooth-test-output {
  padding: 1rem 1.25rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(23, 49, 59, 0.9) 100%);
  border: 1px solid rgba(56, 189, 248, 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 18px rgba(0, 0, 0, 0.25);
  animation: fadeIn 0.2s ease-out;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
}

.tooth-test-output.tool-cold { border-color: rgba(56, 189, 248, 0.55); box-shadow: 0 0 16px rgba(56, 189, 248, 0.15); }
.tooth-test-output.tool-ept { border-color: rgba(192, 132, 252, 0.55); box-shadow: 0 0 16px rgba(192, 132, 252, 0.15); }
.tooth-test-output.tool-percussion { border-color: rgba(245, 158, 11, 0.55); box-shadow: 0 0 16px rgba(245, 158, 11, 0.15); }
.tooth-test-output.tool-xray { border-color: rgba(52, 211, 153, 0.55); box-shadow: 0 0 16px rgba(52, 211, 153, 0.15); }
.tooth-test-output.tool-probe { border-color: rgba(45, 212, 191, 0.55); box-shadow: 0 0 16px rgba(45, 212, 191, 0.15); }

.test-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 0.45rem;
}

.test-tool-chip {
  font-size: 0.8125rem;
  font-weight: 800;
  color: var(--betooth-cyan, #06b6d4);
  letter-spacing: 0.02em;
}

.test-target-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: #CBD5E1;
}

.test-status-badge {
  font-size: 0.75rem;
  font-weight: 850;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  letter-spacing: 0.02em;
}

.test-status-badge.is-pathological {
  background: rgba(239, 68, 68, 0.22);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.45);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

.test-status-badge.is-physiological {
  background: rgba(16, 185, 129, 0.22);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.test-output-result {
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.6;
  color: #F8FAFC;
}

.test-output-prompt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #94A3B8;
  font-size: 0.875rem;
  font-weight: 600;
}
.test-output-prompt .prompt-icon {
  font-size: 1.15rem;
}

/* 4. Case Catalog Cards Dental Art & Visual Meter */
.case-card-arch-preview {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.case-card-arch-preview .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--betooth-cyan, #06b6d4);
}

.case-workflow-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 0.5rem;
}

.case-step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: all 0.2s ease;
}

.case-step-dot.active {
  background: var(--betooth-orange, #f97316);
  box-shadow: 0 0 6px var(--betooth-orange, #f97316);
}

/* ==========================================================================
   BETOOTH — Dual Professional Clinical Mode Navigation (Dental vs Medical)
   ========================================================================== */

.clinical-dual-nav-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.clinical-dual-tabs-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 0.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

@media (max-width: 680px) {
  .clinical-dual-tabs-track {
    grid-template-columns: minmax(0, 1fr);
  }
  .clinical-dual-tab { min-width: 0; flex-wrap: wrap; }
  .clinical-tab-copy { min-width: 0; flex-basis: 140px; }
}

.clinical-dual-tab {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.35rem;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: start;
}

.clinical-dual-tab:hover {
  transform: translateY(-2px);
  border-color: var(--tab-accent, var(--betooth-cyan));
  color: var(--text-primary);
  background: color-mix(in srgb, var(--tab-accent, var(--betooth-cyan)) 8%, var(--surface-soft));
}

.clinical-dual-tab.is-active {
  background: color-mix(in srgb, var(--tab-accent, var(--betooth-cyan)) 14%, var(--surface));
  border-color: var(--tab-accent, var(--betooth-cyan));
  box-shadow: 0 0 0 2px var(--tab-accent, var(--betooth-cyan)), 0 8px 24px -4px color-mix(in srgb, var(--tab-accent, var(--betooth-cyan)) 30%, transparent);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.clinical-dual-tab[data-mode="dental"] {
  --tab-accent: var(--betooth-cyan, #06b6d4);
}

.clinical-dual-tab[data-mode="medical"] {
  --tab-accent: #10B981;
}

.clinical-tab-icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--tab-accent, var(--betooth-cyan)) 16%, var(--surface));
  color: var(--tab-accent, var(--betooth-cyan));
  border: 1px solid color-mix(in srgb, var(--tab-accent, var(--betooth-cyan)) 30%, transparent);
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.clinical-dual-tab:hover .clinical-tab-icon-wrap,
.clinical-dual-tab.is-active .clinical-tab-icon-wrap {
  transform: scale(1.1);
}

.clinical-tab-icon-wrap .ui-icon {
  width: 26px;
  height: 26px;
}

.clinical-tab-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.clinical-tab-eyebrow {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tab-accent, var(--betooth-cyan));
}

.clinical-tab-title {
  font-size: 1.05rem;
  font-weight: 850;
  color: var(--text-primary);
  line-height: 1.25;
}

.clinical-tab-desc {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.clinical-tab-badge {
  font-size: 0.8125rem;
  font-weight: 900;
  padding: 0.35rem 0.75rem;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  align-self: center;
}

.clinical-dual-tab.is-active .clinical-tab-badge {
  background: var(--tab-accent, var(--betooth-cyan));
  color: #0E1B21;
  border-color: var(--tab-accent, var(--betooth-cyan));
}

/* Editorial Station Banner */
.clinical-station-banner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.65rem 2rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, color-mix(in srgb, var(--banner-accent, var(--betooth-cyan)) 12%, #0F1E28) 0%, #0B131B 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.clinical-station-banner[data-mode="dental"] {
  --banner-accent: var(--betooth-cyan, #06b6d4);
}

.clinical-station-banner[data-mode="medical"] {
  --banner-accent: #10B981;
}

.station-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.station-banner-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--banner-accent);
}

.station-banner-eyebrow .ui-icon {
  width: 16px;
  height: 16px;
}

.station-banner-dismiss-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #94A3B8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.station-banner-dismiss-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #FCA5A5;
}

.station-banner-dismiss-btn .ui-icon {
  width: 14px;
  height: 14px;
}

.station-banner-collapsed-bar {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 0.75rem;
}

.station-banner-restore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-soft);
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  font-size: 0.825rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.station-banner-restore-btn:hover {
  border-color: var(--betooth-cyan, #06b6d4);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--surface-soft) 85%, var(--betooth-cyan, #06b6d4) 15%);
}

.station-banner-restore-btn .ui-icon {
  width: 16px;
  height: 16px;
  color: var(--betooth-cyan, #06b6d4);
}

.station-banner-title {
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 850;
  margin: 0;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.station-banner-title .ui-icon {
  width: 24px;
  height: 24px;
  color: var(--banner-accent);
}

.station-banner-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #CBD5E1;
  margin: 0;
  max-width: 78ch;
}

/* Modern Capability Grid */
.station-capabilities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
  margin-top: 0.5rem;
}

.station-cap-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}

.station-cap-card:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--banner-accent);
  transform: translateY(-2px);
}

.cap-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--banner-accent) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--banner-accent) 40%, transparent);
  color: var(--banner-accent);
  flex-shrink: 0;
}

.cap-icon-wrap .cap-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

.cap-content {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.cap-title {
  font-size: 0.825rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.3;
}

.cap-desc {
  font-size: 0.75rem;
  color: #94A3B8;
  line-height: 1.3;
}

/* Legacy & Fallback Pill */
.station-banner-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.station-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  font-weight: 750;
  color: #E2E8F0;
}

.station-badge-pill .pill-icon {
  width: 18px !important;
  height: 18px !important;
  flex-shrink: 0;
}

/* ==========================================================================
   GENERAL MEDICAL DIAGNOSTIC WORKSTATION (محطة الفحص الطبي العام)
   ========================================================================== */

.medical-diagnostic-workstation {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.medical-station-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.medical-station-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.medical-station-title h3 {
  font-size: 1.15rem;
  font-weight: 850;
  margin: 0;
  color: var(--text-primary);
}

.medical-station-hint {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
}

.medical-tool-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 4px;
  background: var(--surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

.medical-tool-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.medical-tool-tab-btn:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.medical-tool-tab-btn.is-active {
  background: var(--surface);
  color: #10B981;
  border-color: #10B981;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.medical-station-panel {
  padding: 1.25rem;
  background: linear-gradient(135deg, var(--surface-soft) 0%, color-mix(in srgb, #10B981 6%, var(--surface-soft)) 100%);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
}

/* Medical Labs Results Table */
.medical-lab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.medical-lab-table th {
  text-align: start;
  padding: 0.65rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 2px solid var(--border-subtle);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.medical-lab-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border-subtle);
}

.lab-flag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  font-weight: 850;
  text-transform: uppercase;
}

.lab-flag.flag-critical {
  background: rgba(239, 68, 68, 0.15);
  color: #EF4444;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.lab-flag.flag-high {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.lab-flag.flag-normal {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Stethoscope Auscultation Visualizer */
.auscultation-display {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (max-width: 680px) {
  .auscultation-display {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.stethoscope-art-frame {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(16, 185, 129, 0.12);
  border: 2px solid #10B981;
  color: #10B981;
  margin-inline: auto;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
}

.auscultation-soundwave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 36px;
  margin-block: 0.5rem;
}

.soundwave-bar {
  width: 4px;
  height: 20%;
  border-radius: 2px;
  background: #10B981;
  animation: wave 1.2s ease-in-out infinite alternate;
}

.soundwave-bar:nth-child(2) { animation-delay: 0.15s; height: 60%; }
.soundwave-bar:nth-child(3) { animation-delay: 0.3s; height: 95%; }
.soundwave-bar:nth-child(4) { animation-delay: 0.45s; height: 40%; }
.soundwave-bar:nth-child(5) { animation-delay: 0.6s; height: 80%; }
.soundwave-bar:nth-child(6) { animation-delay: 0.2s; height: 100%; }
.soundwave-bar:nth-child(7) { animation-delay: 0.5s; height: 50%; }

@keyframes wave {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1.1); }
}

/* Emergency Drugs Grid */
.emergency-drugs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.drug-card {
  padding: 0.85rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.drug-card-name {
  font-size: 0.9375rem;
  font-weight: 850;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.drug-card-dose {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #10B981;
}

.drug-card-use {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.4;
}


