/* ═══════════════════════════════════════════════════════════════════════════════
   KAIRO INTEGRATIVE MEDICINE MODULE - CSS STYLES
   ═══════════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────────
   CONTAINER & LAYOUT
   ───────────────────────────────────────────────────────────────────────────── */

.im-container {
  min-height: 100%;
  padding: 0;
  background: var(--kairo-void, #0a0a0f);
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────────────────────────────────────── */

.im-header {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.im-header-content {
  flex: 1;
  min-width: 200px;
}

.im-title {
  font-size: 28px;
  font-weight: 700;
  color: white;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.im-title-icon {
  font-size: 32px;
}

.im-subtitle {
  font-size: 14px;
  color: var(--slate-400);
  margin: 0;
}

.im-search-wrapper {
  position: relative;
  width: 300px;
}

.im-search {
  width: 100%;
  padding: 12px 16px 12px 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: white;
  font-size: 14px;
  transition: all 0.2s;
}

.im-search:focus {
  outline: none;
  border-color: var(--kairo-throat, var(--cyan-500));
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.im-search::placeholder {
  color: var(--slate-500);
}

.im-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  opacity: 0.5;
}

/* ─────────────────────────────────────────────────────────────────────────────
   NAVIGATION
   ───────────────────────────────────────────────────────────────────────────── */

.im-nav {
  display: flex;
  gap: 4px;
  padding: 12px 32px;
  background: rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: auto;
}

.im-nav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--slate-400);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.im-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.im-nav-btn.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(168, 85, 247, 0.2) 100%);
  border-color: rgba(6, 182, 212, 0.3);
  color: white;
}

.im-nav-icon {
  font-size: 18px;
}

.im-nav-label {
  font-weight: 500;
}

/* Sub-navigation */
.im-sub-nav {
  display: flex;
  gap: 8px;
  padding: 16px 0;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.im-sub-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: var(--slate-400);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

.im-sub-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.im-sub-btn.active {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
  color: var(--kairo-throat, var(--cyan-500));
}

/* ─────────────────────────────────────────────────────────────────────────────
   CONTENT AREA
   ───────────────────────────────────────────────────────────────────────────── */

.im-content {
  padding: 24px 32px;
  min-height: 400px;
}

.im-section {
  animation: im-fadeIn 0.3s ease-out;
}

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

/* ─────────────────────────────────────────────────────────────────────────────
   INFO BANNERS
   ───────────────────────────────────────────────────────────────────────────── */

.im-info-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.im-info-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.im-info-text h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: white;
}

.im-info-text p {
  margin: 0;
  font-size: 14px;
  color: var(--slate-400);
  line-height: 1.6;
}

/* Gradient backgrounds */
.im-gradient-orange {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.15) 0%, rgba(234, 179, 8, 0.1) 100%);
  border-color: rgba(249, 115, 22, 0.2);
}

.im-gradient-blue {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
  border-color: rgba(59, 130, 246, 0.2);
}

.im-gradient-purple {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%);
  border-color: rgba(168, 85, 247, 0.2);
}

.im-gradient-cyan {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15) 0%, rgba(34, 211, 238, 0.1) 100%);
  border-color: rgba(6, 182, 212, 0.2);
}

.im-gradient-red {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(244, 63, 94, 0.1) 100%);
  border-color: rgba(239, 68, 68, 0.2);
}

.im-gradient-green {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-color: rgba(34, 197, 94, 0.2);
}

/* ─────────────────────────────────────────────────────────────────────────────
   CARD GRID
   ───────────────────────────────────────────────────────────────────────────── */

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

.im-grid {
  margin-top: 16px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CARDS
   ───────────────────────────────────────────────────────────────────────────── */

.im-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.im-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.2s;
}

.im-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.im-card:hover::before {
  opacity: 1;
}

.im-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.im-card-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
  position: relative;
  z-index: 1;
}

.im-card-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.15);
  color: var(--kairo-throat, var(--cyan-500));
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.im-card-desc {
  font-size: 13px;
  color: var(--slate-400);
  line-height: 1.5;
  margin: 0 0 8px 0;
  position: relative;
  z-index: 1;
}

.im-card-action {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--kairo-throat, var(--cyan-500));
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.im-card-herbs,
.im-card-avoid,
.im-card-small,
.im-card-sanskrit,
.im-card-function,
.im-card-fullname,
.im-card-eeg,
.im-card-research-ref,
.im-card-source {
  font-size: 12px;
  color: var(--slate-500);
  margin: 4px 0;
  position: relative;
  z-index: 1;
}

.im-card-abbr {
  display: inline-block;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--slate-400);
  margin-left: 8px;
  vertical-align: middle;
}

.im-card-number {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--kairo-throat, var(--cyan-500));
  background: rgba(6, 182, 212, 0.15);
  padding: 4px 10px;
  border-radius: 6px;
}

.im-card-number-large {
  font-size: 32px;
  font-weight: 700;
  color: var(--kairo-throat, var(--cyan-500));
}

/* Card variants */
.im-card-herb:hover { border-color: rgba(34, 197, 94, 0.3); }
.im-card-karma:hover { border-color: rgba(249, 115, 22, 0.3); }
.im-card-formula:hover { border-color: rgba(234, 179, 8, 0.3); }
.im-card-remedy:hover { border-color: rgba(59, 130, 246, 0.3); }
.im-card-salt:hover { border-color: rgba(139, 92, 246, 0.3); }
.im-card-qigong:hover { border-color: rgba(168, 85, 247, 0.3); }
.im-card-electro:hover { border-color: rgba(6, 182, 212, 0.3); }
.im-card-interaction:hover { border-color: rgba(239, 68, 68, 0.3); }

/* Difficulty badges */
.im-card-difficulty {
  display: inline-block;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 600;
  border-radius: 4px;
  margin-left: 8px;
}

.im-difficulty-beginner {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green-500);
}

.im-difficulty-intermediate {
  background: rgba(234, 179, 8, 0.15);
  color: var(--yellow-500);
}

.im-difficulty-advanced {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-500);
}

/* Badge colors */
.im-badge-green {
  background: rgba(34, 197, 94, 0.15) !important;
  color: var(--green-500) !important;
}

.im-badge-amber {
  background: rgba(234, 179, 8, 0.15) !important;
  color: var(--yellow-500) !important;
}

.im-badge-red {
  background: rgba(239, 68, 68, 0.15) !important;
  color: var(--red-500) !important;
}

.im-badge-orange {
  background: rgba(249, 115, 22, 0.15) !important;
  color: var(--orange-500) !important;
}

.im-badge-blue {
  background: rgba(59, 130, 246, 0.15) !important;
  color: var(--blue-500) !important;
}

/* ─────────────────────────────────────────────────────────────────────────────
   DOSHA CARDS (Ayurveda)
   ───────────────────────────────────────────────────────────────────────────── */

.im-dosha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.im-dosha-card {
  padding: 28px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.im-dosha-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.im-dosha-vata {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.15) 100%);
  border-color: rgba(99, 102, 241, 0.3);
}

.im-dosha-pitta {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(249, 115, 22, 0.15) 100%);
  border-color: rgba(239, 68, 68, 0.3);
}

.im-dosha-kapha {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2) 0%, rgba(34, 197, 94, 0.15) 100%);
  border-color: rgba(6, 182, 212, 0.3);
}

.im-dosha-symbol {
  font-size: 48px;
  margin-bottom: 16px;
}

.im-dosha-card h3 {
  font-size: 24px;
  font-weight: 700;
  color: white;
  margin: 0 0 4px 0;
}

.im-dosha-card p {
  font-size: 14px;
  color: var(--slate-400);
  margin: 0 0 16px 0;
}

.im-dosha-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.im-dosha-card li {
  font-size: 13px;
  color: var(--slate-300);
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.im-dosha-card li:last-child {
  border-bottom: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   INFO BOXES
   ───────────────────────────────────────────────────────────────────────────── */

.im-info-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}

.im-info-box h3 {
  font-size: 15px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
}

.im-info-box p {
  font-size: 13px;
  color: var(--slate-400);
  margin: 0;
  line-height: 1.6;
}

.im-info-warning {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.2);
}

.im-info-warning h3 {
  color: var(--red-500);
}

/* ─────────────────────────────────────────────────────────────────────────────
   TABLES
   ───────────────────────────────────────────────────────────────────────────── */

.im-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.im-table {
  width: 100%;
  border-collapse: collapse;
}

.im-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-400);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.im-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--slate-200);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.im-table tr {
  cursor: pointer;
  transition: background 0.15s;
}

.im-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESEARCH CARDS
   ───────────────────────────────────────────────────────────────────────────── */

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

.im-research-card {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(168, 85, 247, 0.1) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.im-research-card:hover {
  transform: translateY(-2px);
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 8px 32px rgba(6, 182, 212, 0.15);
}

.im-research-icon {
  font-size: 40px;
  margin-bottom: 16px;
}

.im-research-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin: 0 0 4px 0;
}

.im-research-card p {
  font-size: 13px;
  color: var(--slate-400);
  margin: 0;
}

.im-research-desc {
  margin-top: 12px !important;
  line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SEARCH & INTERACTIONS
   ───────────────────────────────────────────────────────────────────────────── */

.im-search-section,
.im-interaction-search {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.im-search-section h3,
.im-interaction-search h3 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0 0 16px 0;
}

.im-search-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.im-input {
  flex: 1;
  min-width: 200px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 14px;
  transition: all 0.2s;
}

.im-input:focus {
  outline: none;
  border-color: var(--kairo-throat, var(--cyan-500));
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.im-input::placeholder {
  color: var(--slate-500);
}

.im-search-results,
.im-interaction-results {
  margin-top: 16px;
}

.im-result-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 16px;
}

.im-result-box h4 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
}

.im-result-section {
  margin: 12px 0;
}

.im-result-section strong {
  color: var(--slate-400);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.im-result-section p,
.im-result-section ul {
  color: var(--slate-200);
  font-size: 13px;
  margin: 4px 0 0 0;
}

.im-result-warning {
  background: rgba(239, 68, 68, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin-top: 12px;
}

.im-result-warning strong {
  color: var(--red-500);
}

.im-result-high {
  border-color: rgba(239, 68, 68, 0.3);
}

.im-result-moderate {
  border-color: rgba(234, 179, 8, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   SECTION DIVIDERS
   ───────────────────────────────────────────────────────────────────────────── */

.im-section-divider {
  margin: 32px 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.im-section-divider h3 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   TAGS
   ───────────────────────────────────────────────────────────────────────────── */

.im-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.im-tag {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--slate-200);
  cursor: default;
}

.im-tag-herb {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.2);
  color: var(--green-500);
  cursor: pointer;
}

.im-tag-herb:hover {
  background: rgba(34, 197, 94, 0.2);
}

.im-tag-remedy {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
  color: var(--blue-500);
  cursor: pointer;
}

.im-tag-remedy:hover {
  background: rgba(59, 130, 246, 0.2);
}

/* ─────────────────────────────────────────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────────────────────────────────────────── */

.im-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

.im-btn-primary {
  background: linear-gradient(135deg, var(--kairo-throat, var(--cyan-500)) 0%, var(--kairo-crown, var(--purple-500)) 100%);
  color: white;
}

.im-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.3);
}

/* ─────────────────────────────────────────────────────────────────────────────
   LOADING & ERROR STATES
   ───────────────────────────────────────────────────────────────────────────── */

.im-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px;
  color: var(--slate-500);
  font-size: 14px;
}

.im-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--kairo-throat, var(--cyan-500));
  border-radius: 50%;
  animation: im-spin 0.8s linear infinite;
}

@keyframes im-spin {
  to { transform: rotate(360deg); }
}

.im-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px;
  text-align: center;
}

.im-error-icon {
  font-size: 48px;
}

.im-hint {
  color: var(--slate-500);
  font-size: 13px;
  font-style: italic;
}

/* ─────────────────────────────────────────────────────────────────────────────
   MODAL
   ───────────────────────────────────────────────────────────────────────────── */

.im-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.im-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.im-modal-container {
  position: relative;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  background: var(--kairo-surface, var(--surface-dark));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  animation: im-modalIn 0.25s ease-out;
}

@keyframes im-modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.im-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.im-modal-header h2 {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.im-modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 8px;
  color: var(--slate-400);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.im-modal-close:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-500);
}

.im-modal-body {
  padding: 24px;
  overflow-y: auto;
  color: var(--slate-200);
  font-size: 14px;
  line-height: 1.6;
}

/* Modal content sections */
.im-modal-section {
  margin-bottom: 20px;
}

.im-modal-section:last-child {
  margin-bottom: 0;
}

.im-modal-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0 0 10px 0;
}

.im-modal-section p {
  margin: 0;
  color: var(--slate-400);
}

.im-modal-section ul {
  margin: 8px 0 0 0;
  padding-left: 20px;
}

.im-modal-section li {
  margin-bottom: 6px;
  color: var(--slate-300);
}

.im-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.im-modal-grid div {
  font-size: 13px;
  color: var(--slate-400);
}

.im-modal-grid strong {
  color: var(--slate-200);
}

.im-modal-warning {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 16px;
}

.im-modal-warning h3 {
  color: var(--red-500);
}

.im-modal-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

/* Modal text utilities */
.im-text-red { color: var(--red-500); }
.im-text-green { color: var(--green-500); }
.im-text-amber { color: var(--yellow-500); }
.im-text-blue { color: var(--blue-500); }

/* Dosha modal variants */
.im-dosha-vata-modal { border-left: 4px solid var(--indigo-500); }
.im-dosha-pitta-modal { border-left: 4px solid var(--red-500); }
.im-dosha-kapha-modal { border-left: 4px solid var(--cyan-500); }

/* ─────────────────────────────────────────────────────────────────────────────
   BIOELECTRIC INTELLIGENCE SECTION
   ───────────────────────────────────────────────────────────────────────────── */

/* Purple gradient for bioelectric */
.im-gradient-purple {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(168, 85, 247, 0.1) 100%);
  border-left: 4px solid var(--purple-500);
}

/* Stats Grid */
.im-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.im-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.2s ease;
}

.im-stat-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(168, 85, 247, 0.3);
}

.im-stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--purple-500);
  line-height: 1;
  margin-bottom: 8px;
}

.im-stat-label {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin-bottom: 4px;
}

.im-stat-detail {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Section Title */
.im-section-title {
  font-size: 18px;
  font-weight: 600;
  color: white;
  margin: 24px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Concept Cards */
.im-card-concept {
  border-top: 3px solid var(--purple-500);
}

.im-card-concept .im-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.im-card-concept h4 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 12px;
}

.im-card-concept p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 6px 0;
}

.im-card-note {
  font-size: 12px !important;
  color: rgba(168, 85, 247, 0.8) !important;
  font-style: italic;
  margin-top: 12px !important;
}

/* Research List */
.im-research-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.im-research-item {
  display: flex;
  gap: 16px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.im-research-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(168, 85, 247, 0.3);
}

.im-research-year {
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--purple-500) 0%, var(--violet-500) 100%);
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

.im-research-content h4 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0 0 6px 0;
  line-height: 1.4;
}

.im-research-authors {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 4px 0;
}

.im-research-journal {
  font-size: 12px;
  color: rgba(168, 85, 247, 0.8);
  font-style: italic;
  margin: 0;
}

/* Search Box */
.im-search-box {
  position: relative;
  margin-bottom: 16px;
}

.im-search-input {
  width: 100%;
  padding: 14px 48px 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: white;
  font-size: 14px;
  transition: all 0.2s ease;
}

.im-search-input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.im-search-box .im-search-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
}

/* Filter Tabs */
.im-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.im-filter-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.im-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(168, 85, 247, 0.3);
}

.im-filter-btn.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2) 0%, rgba(139, 92, 246, 0.2) 100%);
  border-color: rgba(168, 85, 247, 0.5);
  color: white;
}

/* Table */
.im-table-container {
  overflow-x: auto;
  margin-bottom: 16px;
}

.im-table {
  width: 100%;
  border-collapse: collapse;
}

.im-table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.im-table td {
  padding: 12px 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: top;
}

.im-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.im-phenotype {
  max-width: 350px;
  font-size: 12px;
  line-height: 1.4;
}

.im-badge-system {
  background: rgba(168, 85, 247, 0.15);
  color: var(--purple-500);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* Source Note */
.im-source-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Full Width Container */
.im-full-width {
  width: 100%;
}

/* Vmem Scale Visualization */
.im-vmem-scale {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.im-vmem-bar {
  position: relative;
  height: 60px;
  background: linear-gradient(90deg,
    rgba(34, 197, 94, 0.3) 0%,
    rgba(34, 197, 94, 0.2) 35%,
    rgba(234, 179, 8, 0.2) 50%,
    rgba(239, 68, 68, 0.2) 75%,
    rgba(239, 68, 68, 0.3) 100%
  );
  border-radius: 8px;
  margin-bottom: 8px;
}

.im-vmem-zone {
  position: absolute;
  top: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.im-vmem-depolarized {
  background: rgba(239, 68, 68, 0.3);
  border: 2px solid rgba(239, 68, 68, 0.5);
}

.im-vmem-normal {
  background: rgba(34, 197, 94, 0.3);
  border: 2px solid rgba(34, 197, 94, 0.5);
}

.im-vmem-label {
  font-size: 11px;
  font-weight: 600;
  color: white;
  text-align: center;
  line-height: 1.3;
}

.im-vmem-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
}

/* Vmem Cards */
.im-card-vmem {
  text-align: center;
}

.im-vmem-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--purple-500);
  margin-bottom: 8px;
}

.im-vmem-cancer .im-vmem-value {
  color: var(--red-500);
}

.im-vmem-stem .im-vmem-value {
  color: var(--yellow-500);
}

.im-card-vmem h5 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
}

.im-card-detail {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Category Section */
.im-category-section {
  margin-bottom: 32px;
}

.im-category-title {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Interpretation Box */
.im-interpretation-box {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin: 24px 0;
}

.im-interpretation-box h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--purple-500);
  margin: 0 0 12px 0;
}

.im-interpretation-box ul {
  margin: 0;
  padding-left: 20px;
}

.im-interpretation-box li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.im-interpretation-box p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 8px 0;
}

.im-disclaimer {
  background: rgba(234, 179, 8, 0.08);
  border-color: rgba(234, 179, 8, 0.2);
}

.im-disclaimer h4 {
  color: var(--yellow-500);
}

/* Highlight Card */
.im-highlight-card {
  display: flex;
  gap: 20px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 2px solid rgba(168, 85, 247, 0.3);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
}

.im-highlight-icon {
  font-size: 48px;
  flex-shrink: 0;
}

.im-highlight-content h4 {
  font-size: 18px;
  font-weight: 700;
  color: white;
  margin: 0 0 12px 0;
}

.im-highlight-content p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin: 8px 0;
}

.im-highlight-organisms {
  font-size: 12px !important;
  color: var(--purple-500) !important;
}

/* Gene Cards */
.im-card-gene {
  border-top: 3px solid rgba(168, 85, 247, 0.5);
}

.im-gene-cross-kingdom {
  border-top-color: var(--green-500);
  background: rgba(34, 197, 94, 0.05);
}

.im-gene-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.im-gene-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--purple-500);
}

.im-badge-special {
  background: linear-gradient(135deg, var(--green-500) 0%, var(--green-600) 100%);
  color: white;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.im-card-gene h5 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
}

.im-gene-significance {
  font-size: 12px;
  color: rgba(168, 85, 247, 0.8);
  font-style: italic;
}

.im-gene-organisms {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 8px;
}

/* Cancer Cards */
.im-cancer-interpretation {
  display: flex;
  gap: 20px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
}

.im-interpretation-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.im-interpretation-content h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--red-500);
  margin: 0 0 12px 0;
}

.im-interpretation-content p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 6px 0;
}

.im-card-cancer {
  border-top: 3px solid var(--red-500);
}

.im-card-cancer h4 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
}

.im-cancer-vmem {
  font-size: 14px;
  color: var(--red-500);
  margin-bottom: 12px;
  font-weight: 500;
}

.im-cancer-detail {
  margin-top: 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.im-cancer-detail strong {
  display: block;
  margin-bottom: 6px;
  color: white;
}

.im-tag-therapeutic {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green-500);
  border-color: rgba(34, 197, 94, 0.3);
}

/* Protocol Builder */
.im-protocol-builder {
  margin-bottom: 24px;
}

.im-protocol-form {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.im-form-group {
  margin-bottom: 16px;
}

.im-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: white;
  margin-bottom: 8px;
}

.im-form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  transition: all 0.2s ease;
}

.im-form-input:focus {
  outline: none;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.im-form-input.im-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.im-form-input.im-select option {
  background: #1e1e2e;
  color: white;
  padding: 8px;
}

.im-btn-large {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  margin-top: 8px;
}

.im-protocol-results {
  margin-top: 24px;
}

.im-protocol-output {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 12px;
  padding: 24px;
}

.im-protocol-output > h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--purple-500);
  margin: 0 0 8px 0;
}

.im-protocol-symptoms {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
}

.im-protocol-section {
  margin: 20px 0;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
}

.im-protocol-section h5 {
  font-size: 14px;
  font-weight: 600;
  color: white;
  margin: 0 0 12px 0;
}

.im-protocol-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.im-protocol-item {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  padding: 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  border-left: 3px solid rgba(168, 85, 247, 0.4);
}

.im-protocol-item.im-research {
  font-style: italic;
  color: rgba(255, 255, 255, 0.6);
  border-left-color: rgba(34, 197, 94, 0.4);
}

.im-protocol-steps {
  margin: 0;
  padding-left: 24px;
}

.im-protocol-steps li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 10px;
  line-height: 1.5;
}

.im-protocol-citations {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.im-protocol-citations h5 {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 8px 0;
}

.im-protocol-citations ul {
  margin: 0;
  padding-left: 20px;
}

.im-protocol-citations li {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.im-badge-evidence {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green-500);
  font-size: 11px;
}

/* ─────────────────────────────────────────────────────────────────────────────
   GENETIC RISK ANALYSIS STYLES
   ───────────────────────────────────────────────────────────────────────────── */

.im-genetic-lookup {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(139, 92, 246, 0.08);
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.im-genetic-lookup .im-form-group {
  flex: 1;
  margin-bottom: 0;
}

.im-genetic-results {
  margin-top: 24px;
}

.im-genetic-analysis {
  background: rgba(30, 30, 40, 0.6);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.im-genetic-analysis h4 {
  font-size: 18px;
  font-weight: 600;
  color: #f0f0f0;
  margin: 0 0 8px 0;
}

.im-patient-id {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
}

/* Risk Score Card */
.im-risk-score-card {
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.05));
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.im-risk-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.im-risk-label {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
}

.im-risk-value {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.im-risk-tier {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.im-risk-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
}

.im-risk-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.5s ease;
}

.im-risk-recommendation {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  line-height: 1.5;
}

/* Risk tier colors */
.im-risk-high {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.05));
  border-color: rgba(239, 68, 68, 0.4);
}
.im-risk-high .im-risk-tier { color: var(--red-500); }
.im-risk-high .im-risk-fill { background: linear-gradient(90deg, var(--red-500), var(--red-400)); }

.im-risk-moderate {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.05));
  border-color: rgba(245, 158, 11, 0.4);
}
.im-risk-moderate .im-risk-tier { color: var(--amber-500); }
.im-risk-moderate .im-risk-fill { background: linear-gradient(90deg, var(--amber-500), var(--amber-400)); }

.im-risk-low {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.05));
  border-color: rgba(34, 197, 94, 0.4);
}
.im-risk-low .im-risk-tier { color: var(--green-500); }
.im-risk-low .im-risk-fill { background: linear-gradient(90deg, var(--green-500), var(--green-400)); }

.im-risk-minimal {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.05));
  border-color: rgba(59, 130, 246, 0.4);
}
.im-risk-minimal .im-risk-tier { color: var(--blue-500); }
.im-risk-minimal .im-risk-fill { background: linear-gradient(90deg, var(--blue-500), var(--blue-400)); }

/* Genetic Stats */
.im-genetic-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.im-gen-stat {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.im-gen-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--violet-400);
  margin-bottom: 4px;
}

.im-gen-stat-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Section Blocks */
.im-section-block {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.im-section-block h5 {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-200);
  margin: 0 0 16px 0;
}

/* Variants Table */
.im-variants-table {
  width: 100%;
  border-collapse: collapse;
}

.im-variants-table th,
.im-variants-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.im-variants-table th {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.im-variants-table td {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.im-result-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.2);
  color: var(--violet-400);
}

.im-relevance-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.im-rel-direct-ion-channel {
  background: rgba(239, 68, 68, 0.15);
  color: var(--red-500);
}

.im-rel-supporting-function {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-500);
}

.im-rel-other {
  background: rgba(156, 163, 175, 0.15);
  color: var(--gray-400);
}

/* Channelopathy Matches */
.im-channelopathy-matches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.im-channelopathy-card {
  background: rgba(239, 68, 68, 0.08);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.im-channelo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.im-channelo-gene {
  font-size: 16px;
  font-weight: 600;
  color: var(--red-400);
}

.im-channelo-phenotype {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.im-channelo-protein {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 8px 0;
}

.im-channelo-matched {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.im-no-matches {
  font-size: 14px;
  color: rgba(34, 197, 94, 0.8);
  padding: 12px;
  background: rgba(34, 197, 94, 0.08);
  border-radius: 8px;
  margin: 0;
}

.im-no-matches-block {
  background: rgba(34, 197, 94, 0.05);
  border-color: rgba(34, 197, 94, 0.2);
}

/* Risk Factors */
.im-risk-factors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.im-risk-factor-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.im-rf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.im-rf-gene {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-200);
}

.im-rf-level {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.im-rf-high .im-rf-level {
  background: rgba(239, 68, 68, 0.2);
  color: var(--red-500);
}

.im-rf-moderate .im-rf-level {
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber-500);
}

.im-rf-low .im-rf-level {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green-500);
}

.im-rf-details p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 6px 0;
}

/* Recommendations */
.im-recommendations-list,
.im-recommendations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.im-recommendation-card {
  background: rgba(139, 92, 246, 0.08);
  border-radius: 12px;
  padding: 18px;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.im-recommendation-card h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--violet-400);
  margin: 0 0 12px 0;
}

.im-recommendation-card ul {
  margin: 0 0 12px 0;
  padding-left: 20px;
}

.im-recommendation-card li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 6px;
  line-height: 1.4;
}

.im-rec-rationale {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 8px 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.im-rec-levin {
  font-size: 12px;
  color: rgba(139, 92, 246, 0.8);
  margin: 0;
  font-style: italic;
}

/* Levin Research Section */
.im-levin-genes,
.im-vmem-implications {
  margin-bottom: 16px;
}

.im-levin-genes h6,
.im-vmem-implications h6 {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 10px 0;
}

.im-levin-gene-card {
  background: rgba(139, 92, 246, 0.08);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 3px solid var(--violet-500);
}

.im-levin-gene-card strong {
  color: var(--violet-400);
}

.im-levin-gene-card p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  margin: 6px 0 0 0;
}

.im-levin-papers {
  font-size: 11px !important;
  color: rgba(255, 255, 255, 0.5) !important;
}

.im-vmem-implications ul {
  margin: 0;
  padding-left: 20px;
}

.im-vmem-implications li {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}

/* Protocol Personalization */
.im-genetic-personalization {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.02));
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.im-genetic-personalization h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--violet-400);
  margin: 0 0 16px 0;
}

.im-gene-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.im-gene-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.15);
  color: var(--violet-400);
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.im-channelopathy-match {
  background: rgba(239, 68, 68, 0.08);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  border-left: 3px solid var(--red-500);
}

/* Risk Factors Table */
.im-risk-factors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.im-risk-factors-table th,
.im-risk-factors-table td {
  padding: 10px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.im-risk-factors-table th {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
}

.im-level-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.im-level-high { background: rgba(239, 68, 68, 0.2); color: var(--red-500); }
.im-level-moderate { background: rgba(245, 158, 11, 0.2); color: var(--amber-500); }
.im-level-low { background: rgba(34, 197, 94, 0.2); color: var(--green-500); }

/* Protocol Modifications */
.im-modifications-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.im-modification-item {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.im-phase-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(139, 92, 246, 0.2);
  color: var(--violet-400);
  margin-bottom: 10px;
}

.im-mod-warning {
  color: var(--amber-500);
  font-size: 13px;
  margin: 8px 0;
  padding: 8px;
  background: rgba(245, 158, 11, 0.1);
  border-radius: 6px;
}

.im-mod-text,
.im-mod-addition,
.im-mod-enhanced {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  margin: 8px 0;
}

.im-mod-reason {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin: 8px 0 0 0;
}

/* Human Channelopathy Gene Reference */
.im-channelopathy-reference {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.im-channelopathy-gene-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.im-system-group {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  padding: 16px;
}

.im-system-header {
  font-size: 14px;
  font-weight: 600;
  color: var(--violet-400);
  margin: 0 0 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.im-system-header .im-count {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.4);
}

.im-gene-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.im-gene-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.im-gene-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-200);
  margin-bottom: 4px;
}

.im-gene-protein {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
}

.im-gene-phenotypes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.im-phenotype-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(139, 92, 246, 0.15);
  color: rgba(255, 255, 255, 0.7);
}

.im-more {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.4);
  padding: 2px 4px;
}

.im-gene-count {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  text-align: right;
  margin-top: 12px;
}

/* Form Row for Protocol Builder */
.im-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.im-btn-secondary {
  background: rgba(139, 92, 246, 0.15);
  color: var(--violet-400);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.im-btn-secondary:hover {
  background: rgba(139, 92, 246, 0.25);
}

.im-protocol-output.im-personalized {
  border-color: rgba(139, 92, 246, 0.3);
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.8), rgba(139, 92, 246, 0.05));
}

.im-no-data {
  text-align: center;
  padding: 40px;
  color: rgba(255, 255, 255, 0.5);
}

.im-no-data-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.im-no-data-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 8px;
}

.im-section-desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 20px 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   CLICKABLE ELEMENTS & HINTS
   ───────────────────────────────────────────────────────────────────────────── */

/* Clickable element base styles */
.im-clickable {
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.im-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.2);
}

.im-clickable:active {
  transform: translateY(0);
}

/* Hint text styles */
.im-click-hint,
.im-card-hint,
.im-stat-hint,
.im-section-hint {
  font-size: 11px;
  color: rgba(139, 92, 246, 0.7);
  font-style: italic;
  transition: all 0.2s ease;
}

.im-click-hint {
  position: absolute;
  top: 8px;
  right: 12px;
  opacity: 0.6;
}

.im-card-hint {
  display: block;
  margin-top: 10px;
  opacity: 0.7;
}

.im-stat-hint {
  display: block;
  margin-top: 6px;
  opacity: 0.6;
}

.im-section-hint {
  font-weight: 400;
  margin-left: 8px;
  opacity: 0.6;
}

/* Hover state for hints */
.im-clickable:hover .im-click-hint,
.im-clickable:hover .im-card-hint,
.im-clickable:hover .im-stat-hint {
  color: var(--violet-400);
  opacity: 1;
}

/* Clickable cards specific */
.im-risk-score-card.im-clickable:hover {
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.25);
  border-color: rgba(139, 92, 246, 0.5);
}

.im-gen-stat.im-clickable:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.3);
}

.im-channelopathy-card.im-clickable:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
}

.im-risk-factor-card.im-clickable:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(139, 92, 246, 0.4);
}

.im-recommendation-card.im-clickable:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.4);
}

.im-section-block.im-clickable:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.3);
}

/* Clickable table rows */
.im-variant-row.im-clickable {
  cursor: pointer;
}

.im-variant-row.im-clickable:hover {
  background: rgba(139, 92, 246, 0.1) !important;
}

.im-variant-row.im-clickable:hover td {
  color: white;
}

/* Recommendation preview styles */
.im-rec-preview {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.im-more-items {
  font-size: 12px;
  color: rgba(139, 92, 246, 0.8);
  margin: 8px 0 0 0;
}

/* Levin preview section */
.im-levin-preview {
  padding: 12px;
  background: rgba(139, 92, 246, 0.05);
  border-radius: 8px;
}

.im-levin-preview p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  margin: 4px 0;
}

/* Pulse animation for important clickable elements */
@keyframes im-pulse-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
  }
}

.im-risk-score-card.im-clickable {
  animation: im-pulse-glow 3s ease-in-out infinite;
}

.im-risk-score-card.im-clickable:hover {
  animation: none;
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .im-header {
    padding: 20px;
  }

  .im-search-wrapper {
    width: 100%;
  }

  .im-nav {
    padding: 12px 16px;
  }

  .im-nav-btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .im-nav-label {
    display: none;
  }

  .im-content {
    padding: 16px;
  }

  .im-card-grid {
    grid-template-columns: 1fr;
  }

  .im-dosha-grid {
    grid-template-columns: 1fr;
  }

  .im-modal-container {
    max-height: 90vh;
    border-radius: 16px;
  }

  .im-modal-grid {
    grid-template-columns: 1fr;
  }
}
