/* ==========================================================================
   DSM-5-TR Diagnostic Decision Engine UI Styling (Fully Responsive)
   Re-Mind Therapist Portal Component
   ========================================================================== */

/* Main Container Panel */
.dsm-panel-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 5px 0 60px 0;
  font-family: 'Cairo', sans-serif;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Header Hero Banner Card */
.dsm-hero-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 45%, #0f766e 100%);
  border-radius: 24px;
  padding: 26px 28px;
  color: #ffffff;
  box-shadow: 0 16px 40px -10px rgba(15, 23, 42, 0.35);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border: 1.5px solid rgba(255, 255, 255, 0.12);
}

.dsm-hero-header::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -60px;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.25), transparent 70%);
  pointer-events: none;
}

.dsm-hero-header::after {
  content: '';
  position: absolute;
  bottom: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(13, 148, 136, 0.3), transparent 70%);
  pointer-events: none;
}

/* Top Row: Brand & Language Switcher Segmented Control */
.dsm-hero-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  width: 100%;
  position: relative;
  z-index: 2;
}

.dsm-hero-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dsm-hero-icon-badge {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #2dd4bf;
  box-shadow: 0 4px 15px rgba(45, 212, 191, 0.2);
  flex-shrink: 0;
}

.dsm-hero-title {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 900;
  margin: 0;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.dsm-hero-edition-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #2dd4bf;
  background: rgba(45, 212, 191, 0.12);
  padding: 2px 8px;
  border-radius: 6px;
  margin-top: 3px;
}

/* Language Switcher Segmented Control Bar */
.dsm-lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 4px;
  border-radius: 999px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  flex-shrink: 0;
  z-index: 2;
}

.dsm-lang-switcher .btn-lang-tab {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: clamp(10.5px, 1.1vw, 12px);
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  color: rgba(241, 245, 249, 0.85);
  font-family: 'Cairo', sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  user-select: none;
  white-space: nowrap;
}

.dsm-lang-switcher .btn-lang-tab:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
}

.dsm-lang-switcher .btn-lang-tab.active {
  background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.5);
  transform: scale(1.02);
}

/* Subtitle Description */
.dsm-hero-subtitle {
  font-size: clamp(12.5px, 1.2vw, 14px);
  color: rgba(241, 245, 249, 0.82);
  margin: 0;
  line-height: 1.6;
  max-width: 900px;
  position: relative;
  z-index: 2;
}

/* Bottom Row: Action Button & Quick Stats Bar */
.dsm-hero-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 2;
}

.dsm-hero-intake-btn {
  font-size: clamp(11.5px, 1.1vw, 13px);
  padding: 10px 20px;
  border-radius: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0d9488 0%, #059669 100%);
  color: #ffffff;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
  transition: all 0.25s ease-in-out;
  font-family: 'Cairo', sans-serif;
  text-decoration: none;
}

.dsm-hero-intake-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(13, 148, 136, 0.45);
  background: linear-gradient(135deg, #0f766e 0%, #047857 100%);
}

.dsm-hero-stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dsm-stat-pill {
  font-size: 11px;
  font-weight: 700;
  color: rgba(241, 245, 249, 0.85);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dsm-stat-pill i {
  color: #2dd4bf;
}

/* Workspace Grid: Single Column Vertical Stack for Optimal Width & Readability */
.dsm-workspace-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Glass Card Component */
.dsm-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  transition: all 0.25s ease-in-out;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.dsm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1.5px solid #f1f5f9;
  padding-bottom: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.dsm-card-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Symptom Search & Filter Bar */
.dsm-search-wrapper {
  position: relative;
  margin-bottom: 14px;
  width: 100%;
  box-sizing: border-box;
}

.dsm-search-input {
  width: 100%;
  padding: 10px 42px 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  font-family: 'Cairo', sans-serif;
  font-size: 13px;
  color: #1e293b;
  transition: all 0.2s;
  box-sizing: border-box;
}

.dsm-search-input:focus {
  border-color: #0d9488;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
  outline: none;
}

.dsm-search-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 14px;
}

/* Category Filter Chips Scroller */
.dsm-chapter-scroller {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 8px 2px;
  margin-bottom: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

.dsm-chapter-scroller::-webkit-scrollbar {
  height: 4px !important;
  background: transparent !important;
}

.dsm-chapter-scroller::-webkit-scrollbar-track {
  background: transparent !important;
}

.dsm-chapter-scroller::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4) !important;
  border-radius: 999px !important;
}

.dsm-chapter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
  flex-shrink: 0;
}

.dsm-chapter-chip.active,
.dsm-chapter-chip:hover {
  background: #0d9488;
  color: #ffffff;
  border-color: #0d9488;
}

/* Symptoms Container (Wrapped & Fluid) */
.dsm-symptoms-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
  -webkit-overflow-scrolling: touch;
}

.dsm-symptoms-list::-webkit-scrollbar {
  width: 4px !important;
  background: transparent !important;
}

.dsm-symptoms-list::-webkit-scrollbar-track {
  background: transparent !important;
}

.dsm-symptoms-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.4) !important;
  border-radius: 999px !important;
}

/* Dark mode for DSM-5 Scrollers */
body.dark-mode .dsm-chapter-scroller,
body.dark-mode .dsm-symptoms-list {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent !important;
}

body.dark-mode .dsm-chapter-scroller::-webkit-scrollbar-thumb,
body.dark-mode .dsm-symptoms-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2) !important;
}

body.dark-mode .dsm-chapter-scroller::-webkit-scrollbar-thumb:hover,
body.dark-mode .dsm-symptoms-list::-webkit-scrollbar-thumb:hover {
  background: #2dd4bf !important;
}

.dsm-symptom-chip {
  padding: 8px 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  box-sizing: border-box;
  text-align: right;
  line-height: 1.4;
}

.dsm-symptom-chip:hover {
  border-color: #0d9488;
  background: #f0fdf4;
}

.dsm-symptom-chip.selected {
  background: linear-gradient(135deg, #0d9488, #059669);
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  transform: scale(1.02);
}

.dsm-symptom-chip .check-icon {
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.dsm-symptom-chip.selected .check-icon {
  opacity: 1;
}

/* Diagnostic Match Cards */
.dsm-candidate-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.25s ease;
  position: relative;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  word-break: break-word;
}

.dsm-candidate-card:hover {
  border-color: #0d9488;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
}

.dsm-candidate-card.high-match {
  border-color: #10b981;
  background: #f0fdf4;
}

.dsm-candidate-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.dsm-candidate-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #0f172a;
  margin: 0 0 4px 0;
  word-break: break-word;
}

.dsm-candidate-meta {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.dsm-match-badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.dsm-badge-high {
  background: #d1fae5;
  color: #047857;
}

.dsm-badge-med {
  background: #fef3c7;
  color: #b45309;
}

.dsm-badge-low {
  background: #f1f5f9;
  color: #64748b;
}

/* Progress Bar */
.dsm-progress-track {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
  box-sizing: border-box;
}

.dsm-progress-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dsm-fill-high {
  background: linear-gradient(90deg, #10b981, #059669);
}

.dsm-fill-med {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.dsm-fill-low {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

/* Criteria Checklist */
.dsm-criteria-box {
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 12px;
  color: #334155;
  margin-top: 10px;
  border: 1px solid #e2e8f0;
  width: 100%;
  box-sizing: border-box;
}

.dsm-symptom-tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin: 2px 4px 2px 0;
  word-break: break-word;
}

.dsm-tag-matched {
  background: #dcfce7;
  color: #15803d;
}

.dsm-tag-missing {
  background: #f1f5f9;
  color: #94a3b8;
}

/* Comorbidity Warning Box */
.dsm-comorbidity-banner {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  border: 1.5px solid #fdba74;
  border-radius: 16px;
  padding: 16px;
  margin-top: 15px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

.dsm-comorbidity-icon {
  font-size: 20px;
  color: #ea580c;
  flex-shrink: 0;
  margin-top: 2px;
}

.dsm-comorbidity-text {
  font-size: 12.5px;
  color: #9a3412;
  line-height: 1.6;
  font-weight: 700;
}

/* ── INTAKE DECISION TREE WIZARD STYLES ── */
.intake-domains-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px;
}

.intake-domain-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.intake-domain-card:hover {
  border-color: #0d9488;
  background: #f0fdf4;
}

.intake-domain-card.selected {
  background: linear-gradient(135deg, #f0fdf4, #e6fffa);
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.12);
}

.intake-domain-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.intake-domain-card.selected .intake-domain-icon {
  background: #0d9488;
  color: #ffffff;
}

.intake-domain-info {
  flex: 1;
}

.intake-domain-name {
  font-size: 12.5px;
  font-weight: 800;
  color: #0f172a;
}

.intake-domain-count {
  font-size: 10.5px;
  color: #64748b;
  font-weight: 600;
}

.intake-domain-check {
  color: #cbd5e1;
  font-size: 16px;
}

.intake-domain-card.selected .intake-domain-check {
  color: #0d9488;
}

.intake-symptoms-scroller {
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px;
}

.intake-symptom-row {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.intake-symptom-row:hover {
  border-color: #0d9488;
}

.intake-symptom-row.checked {
  background: #f0fdf4;
  border-color: #0d9488;
}

.intake-symptom-checkbox {
  font-size: 18px;
  color: #cbd5e1;
  margin-top: 2px;
}

.intake-symptom-row.checked .intake-symptom-checkbox {
  color: #0d9488;
}

.intake-symptom-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}

.intake-symptom-desc {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.4;
}

.intake-gate-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 16px;
  padding: 16px;
}

.intake-gate-question {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 12px;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.intake-gate-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.intake-option-btn {
  flex: 1;
  min-width: 140px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.intake-option-btn.selected {
  background: linear-gradient(135deg, #0d9488, #059669);
  color: #ffffff;
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(13,148,136,0.2);
}

.intake-hero-match {
  background: linear-gradient(135deg, #f0fdf4, #ccfbf1);
  border: 1.5px solid #5eead4;
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

/* Intake Wizard Base Styles */
.intake-modal-body {
  background: #f8fafc;
  color: #0f172a;
}

.intake-modal-footer {
  background: #ffffff;
  border-top: 1.5px solid #f1f5f9;
}

.intake-step-subtitle {
  font-size: 12.5px;
  color: #64748b;
  margin-bottom: 14px;
  font-weight: 700;
}

/* ──────────────────────────────────────────────────────────────────────────
   DARK MODE INTAKE DECISION TREE WIZARD MODAL
   ────────────────────────────────────────────────────────────────────────── */
body.dark-mode #dsmIntakeModal .glass-modal-content {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6) !important;
}

body.dark-mode .intake-modal-body {
  background: #0f172a !important;
  color: #ffffff !important;
}

body.dark-mode .intake-modal-footer {
  background: #1e293b !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

body.dark-mode #intake-step-title {
  color: #ffffff !important;
}

body.dark-mode .intake-step-subtitle,
body.dark-mode .intake-modal-body div[style*="color:#64748b"],
body.dark-mode .intake-modal-body div[style*="color: #64748b"],
body.dark-mode .intake-modal-body div[style*="color:#475569"],
body.dark-mode .intake-modal-body div[style*="color: #475569"] {
  color: #94a3b8 !important;
}

body.dark-mode .intake-domain-card {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25) !important;
}

body.dark-mode .intake-domain-card:hover {
  border-color: #2dd4bf !important;
  background: #243247 !important;
}

body.dark-mode .intake-domain-card.selected {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.25) 0%, #1e293b 100%) !important;
  border-color: #2dd4bf !important;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3) !important;
}

body.dark-mode .intake-domain-icon {
  background: rgba(45, 212, 191, 0.15) !important;
  color: #2dd4bf !important;
}

body.dark-mode .intake-domain-card.selected .intake-domain-icon {
  background: #0d9488 !important;
  color: #ffffff !important;
}

body.dark-mode .intake-domain-name {
  color: #ffffff !important;
}

body.dark-mode .intake-domain-count {
  color: #94a3b8 !important;
}

body.dark-mode .intake-domain-check {
  color: #475569 !important;
}

body.dark-mode .intake-domain-card.selected .intake-domain-check {
  color: #2dd4bf !important;
}

body.dark-mode .intake-symptom-row {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .intake-symptom-row:hover {
  border-color: #2dd4bf !important;
  background: #243247 !important;
}

body.dark-mode .intake-symptom-row.checked {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.22) 0%, #1e293b 100%) !important;
  border-color: #2dd4bf !important;
}

body.dark-mode .intake-symptom-title {
  color: #ffffff !important;
}

body.dark-mode .intake-symptom-desc {
  color: #94a3b8 !important;
}

body.dark-mode .intake-symptom-checkbox {
  color: #475569 !important;
}

body.dark-mode .intake-symptom-row.checked .intake-symptom-checkbox {
  color: #2dd4bf !important;
}

body.dark-mode .intake-gate-card {
  background: #1e293b !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.dark-mode .intake-gate-question {
  color: #ffffff !important;
}

body.dark-mode .intake-option-btn {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #cbd5e1 !important;
}

body.dark-mode .intake-option-btn:hover {
  border-color: #2dd4bf !important;
  color: #ffffff !important;
  background: #141f36 !important;
}

body.dark-mode .intake-option-btn.selected {
  background: linear-gradient(135deg, #0d9488, #059669) !important;
  color: #ffffff !important;
  border-color: #2dd4bf !important;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35) !important;
}

body.dark-mode .intake-hero-match {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.22) 0%, #1e293b 100%) !important;
  border: 1.5px solid rgba(45, 212, 191, 0.35) !important;
}

body.dark-mode .intake-hero-match div[style*="color:#0f172a"],
body.dark-mode .intake-hero-match div[style*="color: #0f172a"] {
  color: #ffffff !important;
}

body.dark-mode #intake-preview-notes {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc !important;
}

/* Modal Viewport Centering & Overlay */
#dsmIntakeModal {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(15, 23, 42, 0.82) !important;
  backdrop-filter: blur(8px) !important;
  z-index: 999999 !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ──────────────────────────────────────────────────────────────────────────
   RESPONSIVE MOBILE STYLES FOR DSM-5 ENGINE
   ────────────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dsm-hero-header {
    padding: 16px 14px !important;
    border-radius: 18px !important;
    gap: 12px !important;
  }

  .dsm-hero-top-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }

  .dsm-hero-brand {
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .dsm-hero-icon-badge {
    width: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
  }

  .dsm-hero-title {
    font-size: 14.5px !important;
    line-height: 1.3 !important;
  }

  .dsm-hero-edition-badge {
    font-size: 9px !important;
    padding: 2px 6px !important;
  }

  .dsm-lang-switcher {
    width: 100% !important;
    display: flex !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    padding: 3px !important;
  }

  .dsm-lang-switcher .btn-lang-tab {
    flex: 1 !important;
    justify-content: center !important;
    padding: 6px 6px !important;
    font-size: 11px !important;
    gap: 4px !important;
  }

  .dsm-hero-subtitle {
    font-size: 11.5px !important;
    line-height: 1.5 !important;
  }

  .dsm-hero-bottom-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding-top: 12px !important;
  }

  .dsm-hero-intake-btn {
    width: 100% !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 9px 12px !important;
    font-size: 11.5px !important;
    box-sizing: border-box !important;
    border-radius: 12px !important;
  }

  .dsm-hero-stats {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }

  .dsm-stat-pill {
    width: 100% !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 5px 2px !important;
    font-size: 9.5px !important;
    gap: 4px !important;
  }

  .dsm-stat-pill i {
    font-size: 10px !important;
  }

  .dsm-card {
    padding: 14px !important;
    border-radius: 16px !important;
  }

  .dsm-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    padding-bottom: 10px !important;
  }
}

@media (max-width: 420px) {
  .dsm-hero-stats {
    grid-template-columns: 1fr 1fr !important;
  }
  .dsm-stat-pill:last-child {
    grid-column: span 2 !important;
  }
}
