/* 
  =========================================
  BIOCROSS - PREMIUM DESIGN SYSTEM
  Modern CSS with Sleek Dark Theme, Glassmorphism, 
  Advanced Typography & Soft Micro-animations.
  =========================================
*/

/* Core Reset & Variables - Agencidev AI-First Obsidian Design System */
:root {
  /* Agencidev Pure Dark HSL Palette */
  --bg-primary: #050505;
  --bg-secondary: rgba(18, 18, 22, 0.75);
  --bg-sidebar: #09090b;
  --bg-card: rgba(24, 24, 28, 0.55);
  --bg-hover: rgba(38, 38, 45, 0.5);
  
  --border-color: rgba(255, 255, 255, 0.12);
  --border-color-glow: rgba(255, 255, 255, 0.22);
  
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  /* Brand accents */
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.25);
  --emerald-light: rgba(16, 185, 129, 0.1);
  
  --blue: #38bdf8;
  --blue-glow: rgba(56, 189, 248, 0.25);
  --blue-light: rgba(56, 189, 248, 0.1);
  
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.25);
  --purple-light: rgba(168, 85, 247, 0.1);
  
  --amber: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.25);
  --amber-light: rgba(245, 158, 11, 0.1);
  
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.3);
  --red-light: rgba(239, 68, 68, 0.1);

  --green-success: #10b981;
  
  /* Agencidev Lens UI details */
  --border-radius-sm: 8px;
  --border-radius-md: 14px;
  --border-radius-lg: 24px;
  --border-radius-pill: 9999px;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 30px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.85);
  --font-family-title: 'Outfit', sans-serif;
  --font-family-body: 'Inter', sans-serif;
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --blur: blur(20px) saturate(180%);
}

/* Light Theme Variables Toggle */
body.light-theme {
  --bg-primary: hsl(210, 20%, 96%);
  --bg-secondary: hsla(210, 20%, 99%, 0.8);
  --bg-sidebar: hsl(222, 20%, 93%);
  --bg-card: hsla(210, 20%, 100%, 0.75);
  --bg-hover: hsla(210, 20%, 90%, 0.6);
  
  --border-color: hsla(210, 20%, 80%, 0.4);
  --border-color-glow: hsla(210, 20%, 70%, 0.2);
  
  --text-primary: hsl(222, 25%, 12%);
  --text-secondary: hsl(222, 15%, 35%);
  --text-muted: hsl(222, 10%, 55%);
  
  --emerald-glow: hsla(150, 80%, 42%, 0.15);
  --blue-glow: hsla(210, 90%, 55%, 0.15);
  --purple-glow: hsla(265, 85%, 62%, 0.15);
  --amber-glow: hsla(38, 92%, 52%, 0.15);
  --red-glow: hsla(358, 85%, 52%, 0.15);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
}

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

body {
  font-family: var(--font-family-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: var(--transition);
}

/* Background Ambient Glow */
.glow-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
  transition: var(--transition);
}

.glow-1 {
  top: -10%;
  left: 20%;
  width: 400px;
  height: 400px;
  background: var(--emerald);
}

.glow-2 {
  bottom: 10%;
  right: 10%;
  width: 500px;
  height: 500px;
  background: var(--purple);
}

.glow-3 {
  top: 40%;
  left: 50%;
  width: 300px;
  height: 300px;
  background: var(--blue);
}

/* App Container Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* Sidebar Navigation Styles */
.sidebar {
  width: 280px;
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px;
  flex-shrink: 0;
  z-index: 10;
  transition: var(--transition);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--emerald), var(--blue));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.brand-icon {
  width: 22px;
  height: 22px;
  color: white;
}

.brand-text h1 {
  font-family: var(--font-family-title);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  display: block;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  font-family: var(--font-family-body);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  position: relative;
  transition: var(--transition);
}

.nav-btn i {
  width: 18px;
  height: 18px;
  transition: var(--transition);
}

.nav-btn:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.nav-btn:hover i {
  transform: translateX(2px);
}

.nav-btn.active {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(255,255,255,0.08);
}

.nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background: linear-gradient(to bottom, var(--emerald), var(--blue));
  border-radius: 0 4px 4px 0;
}

.badge {
  background-color: var(--emerald);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: auto;
  box-shadow: 0 0 10px var(--emerald-glow);
}

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-indicator, .api-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--text-muted);
}

.status-dot.green {
  background-color: var(--green-success);
  box-shadow: 0 0 8px var(--green-success);
}

.status-dot.yellow {
  background-color: var(--amber);
  box-shadow: 0 0 8px var(--amber-glow);
}

.status-dot.red {
  background-color: var(--red);
  box-shadow: 0 0 8px var(--red-glow);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100vh;
}

/* Top Bar Styles - Agencidev Lens Floating Pill Bar */
.topbar {
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin: 16px 24px 20px 24px;
  padding: 0 20px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 100;
}

.topbar-search {
  position: relative;
  width: 420px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.topbar-search input {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px 10px 42px;
  color: var(--text-primary);
  font-family: var(--font-family-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.topbar-search input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 10px var(--blue-glow);
  background-color: var(--bg-hover);
}

/* Autocomplete suggestions */
.suggestions-box {
  position: absolute;
  top: 105%;
  left: 0;
  width: 100%;
  background-color: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-lg);
  max-height: 300px;
  overflow-y: auto;
  z-index: 20;
  backdrop-filter: var(--blur);
}

.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: var(--bg-hover);
}

.suggestion-text {
  font-size: 14px;
  font-weight: 500;
}

.suggestion-type {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.btn-theme-toggle {
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: var(--transition);
}

.btn-theme-toggle:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-theme-toggle .sun-icon {
  display: none;
}

body.light-theme .btn-theme-toggle .moon-icon {
  display: none;
}

body.light-theme .btn-theme-toggle .sun-icon {
  display: block;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.security-badge-icon {
  width: 16px;
  height: 16px;
  color: var(--emerald);
}

/* Viewport Containers */
.view-container {
  padding: 32px;
  flex-grow: 1;
  position: relative;
}

.view-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.4s ease-out;
}

.view-content.hidden,
.modal.hidden,
.hidden {
  display: none !important;
}

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

.view-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 8px;
}

.view-header-title h2 {
  font-family: var(--font-family-title);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.view-header-title p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.current-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 12px;
  border-radius: 8px;
}

/* Stat Cards Styles */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  backdrop-filter: var(--blur);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-color-glow);
}

.stat-card.border-emerald:hover { border-color: var(--emerald); box-shadow: 0 8px 24px var(--emerald-glow); }
.stat-card.border-blue:hover { border-color: var(--blue); box-shadow: 0 8px 24px var(--blue-glow); }
.stat-card.border-purple:hover { border-color: var(--purple); box-shadow: 0 8px 24px var(--purple-glow); }
.stat-card.border-amber:hover { border-color: var(--amber); box-shadow: 0 8px 24px var(--amber-glow); }

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon i {
  width: 22px;
  height: 22px;
}

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

.stat-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-family: var(--font-family-title);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin: 2px 0;
}

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

/* Colors specifically */
.bg-emerald-light { background-color: var(--emerald-light); }
.text-emerald { color: var(--emerald); }
.bg-blue-light { background-color: var(--blue-light); }
.text-blue { color: var(--blue); }
.bg-purple-light { background-color: var(--purple-light); }
.text-purple { color: var(--purple); }
.bg-amber-light { background-color: var(--amber-light); }
.text-amber { color: var(--amber); }
.bg-red-light { background-color: var(--red-light); }
.text-red { color: var(--red); }

/* Hero Card Dashboard */
.dashboard-hero-section {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  background: linear-gradient(135deg, hsla(222, 25%, 15%, 0.8), hsla(222, 25%, 10%, 0.9));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--blur);
}

.hero-text-content h3 {
  font-family: var(--font-family-title);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero-text-content p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 24px;
  max-width: 600px;
}

.hero-actions {
  display: flex;
  gap: 14px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  font-family: var(--font-family-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn i {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--blue));
  color: white;
  box-shadow: 0 4px 15px var(--blue-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--blue-glow);
  filter: brightness(1.1);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.08);
}

.btn-secondary:hover {
  background-color: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn-emerald {
  background-color: var(--emerald);
  color: white;
}

.btn-emerald:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-danger-outline {
  background: none;
  border: 1px solid var(--red);
  color: var(--red);
}

.btn-danger-outline:hover {
  background-color: var(--red-light);
}

.btn-secondary-outline {
  background: none;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
}

.btn-secondary-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-small {
  padding: 8px 16px;
  font-size: 12px;
}

.btn-large {
  padding: 14px 28px;
  font-size: 15px;
}

.w-full {
  width: 100%;
}

.animate-glow {
  animation: buttonPulse 2s infinite;
}

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

.hero-visual-card {
  background-color: rgba(239, 68, 68, 0.05);
  border: 1px dashed var(--red);
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.circle-pulse {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: var(--red-light);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.circle-pulse::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--red-glow);
  animation: pulseRing 1.8s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { opacity: 0.3; }
  100% { transform: scale(1.4); opacity: 0; }
}

.pulse-icon {
  width: 28px;
  height: 28px;
  color: var(--red);
  z-index: 2;
}

.hero-pulse-data h4 {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--text-primary);
}

.hero-pulse-data p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 4px;
}

.badge-danger {
  background-color: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  letter-spacing: 0.5px;
}

/* Dashboard Panels Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

.dashboard-panel {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 24px;
  backdrop-filter: var(--blur);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h3 {
  font-family: var(--font-family-title);
  font-size: 18px;
  font-weight: 600;
}

.panel-info-icon {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  cursor: help;
}

.badge-info {
  background-color: var(--blue-light);
  color: var(--blue);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--blue-glow);
}

/* Quick Search Panel Specifics */
.search-quick-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.search-quick-box input {
  width: 100%;
  background-color: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.quick-results-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.quick-result-card {
  background-color: var(--bg-hover);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  cursor: pointer;
}

.quick-result-card:hover {
  border-color: var(--text-muted);
}

.quick-result-info h5 {
  font-size: 13px;
  font-weight: 600;
}

.quick-result-info p {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

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

.status-high-risk { background-color: var(--red-light); color: var(--red); }
.status-med-risk { background-color: var(--amber-light); color: var(--amber); }
.status-safe { background-color: var(--emerald-light); color: var(--emerald); }

/* Live trials Feed */
.trials-live-feed {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
}

.trial-feed-card {
  padding: 12px;
  background-color: var(--bg-hover);
  border-left: 3px solid var(--blue);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: var(--transition);
}

.trial-feed-card:hover {
  background-color: hsla(210, 90%, 55%, 0.05);
}

.trial-feed-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.trial-feed-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.trial-feed-status {
  color: var(--blue);
  font-weight: 600;
}

/* Loading Spinners */
.loading-spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  color: var(--text-muted);
  gap: 12px;
  font-size: 13px;
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border-color);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* INTERSECT VIEW - ENGINE */
.intersect-selection-bar {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  backdrop-filter: var(--blur);
}

.selector-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.selector-box label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.select-premium, .select-premium-small {
  width: 100%;
  background-color: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  color: var(--text-primary);
  font-family: var(--font-family-body);
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.select-premium-small {
  padding: 8px 12px;
  font-size: 12px;
}

.select-premium:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 10px var(--emerald-glow);
}

.intersect-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2px;
}

.connector-arrow {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

/* Intersect Results Area */
.intersect-results-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  animation: fadeIn 0.4s ease-out;
}

.risk-assessment-banner {
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  border: 1px solid transparent;
}

.risk-assessment-banner.bg-high-risk {
  background: linear-gradient(135deg, hsla(358, 85%, 52%, 0.15), hsla(358, 85%, 52%, 0.05));
  border-color: var(--red);
  box-shadow: 0 4px 20px var(--red-glow);
}
.risk-assessment-banner.bg-high-risk .risk-badge { background-color: var(--red); color: white; }

.risk-assessment-banner.bg-med-risk {
  background: linear-gradient(135deg, hsla(38, 92%, 52%, 0.15), hsla(38, 92%, 52%, 0.05));
  border-color: var(--amber);
  box-shadow: 0 4px 20px var(--amber-glow);
}
.risk-assessment-banner.bg-med-risk .risk-badge { background-color: var(--amber); color: black; }

.risk-assessment-banner.bg-safe {
  background: linear-gradient(135deg, hsla(150, 80%, 42%, 0.15), hsla(150, 80%, 42%, 0.05));
  border-color: var(--emerald);
  box-shadow: 0 4px 20px var(--emerald-glow);
}
.risk-assessment-banner.bg-safe .risk-badge { background-color: var(--emerald); color: white; }

.risk-badge {
  padding: 8px 16px;
  border-radius: 8px;
  font-family: var(--font-family-title);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.risk-info h3 {
  font-family: var(--font-family-title);
  font-size: 20px;
  font-weight: 700;
}

.risk-info p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.intersect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.intersect-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.result-card {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 24px;
  backdrop-filter: var(--blur);
}

/* ==========================================================================
   PHASE 7 - $1B ENTERPRISE HEALTHTECH SUITE STYLES
   ========================================================================== */

/* PK/PD Pharmacokinetic Canvas Widget */
.pkpd-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 20px;
  margin-top: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.pkpd-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.pkpd-title {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pkpd-legend {
  display: flex;
  gap: 15px;
  font-size: 11px;
}

.pkpd-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.pkpd-legend-color {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.pkpd-canvas-container {
  width: 100%;
  height: 220px;
  background: #040711;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  position: relative;
}

/* Smart Substitutions Cards */
.smart-substitutions-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 15px;
}

.smart-substitute-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.04));
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.smart-substitute-card:hover {
  border-color: var(--emerald);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.15);
}

.substitute-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.substitute-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--emerald);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.btn-smart-swap {
  background: linear-gradient(135deg, var(--emerald), #059669);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-smart-swap:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px var(--emerald-glow);
}

/* Codex Artwork & Historical Manuscripts Gallery */
.codex-art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.codex-art-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.codex-art-card:hover {
  border-color: var(--amber);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.2);
}

.codex-art-media {
  height: 180px;
  width: 100%;
  object-fit: cover;
  background: #040711;
}

.codex-art-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.codex-art-title {
  font-family: var(--font-family-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--amber);
}

.codex-art-meta {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Modal styling improvements */
.modal {
  display: none;
}

.modal:not(.hidden) {
  display: flex !important;
}

/* Glycemic badge styling */
.badge-glycemic {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.glycemic-low { background: rgba(16, 185, 129, 0.2); color: var(--emerald); }
.glycemic-med { background: rgba(245, 158, 11, 0.2); color: var(--amber); }
.glycemic-high { background: rgba(239, 68, 68, 0.2); color: var(--red); }

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.card-title i {
  width: 20px;
  height: 20px;
}

.card-title h4 {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
}

.badge-live {
  font-size: 8px;
  text-transform: uppercase;
  background-color: var(--red);
  color: white;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  letter-spacing: 0.5px;
  animation: blink 1.5s infinite;
}

@keyframes blink {
  0% { opacity: 0.3; }
  50% { opacity: 1; }
  100% { opacity: 0.3; }
}

.mechanism-item, .codex-item {
  margin-bottom: 16px;
}

.mechanism-item:last-child, .codex-item:last-child {
  margin-bottom: 0;
}

.mechanism-item strong, .codex-item strong {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.mechanism-item p, .codex-item p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
}

.badge-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.bg-purple-x { background-color: var(--purple-light); color: var(--purple); border: 1px solid var(--purple-glow); }
.bg-emerald-x { background-color: var(--emerald-light); color: var(--emerald); border: 1px solid var(--emerald-glow); }

.codex-link {
  color: var(--amber);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.codex-link:hover {
  text-decoration: underline;
}

/* API live boxes */
.api-data-box {
  max-height: 300px;
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.fda-warning-alert {
  padding: 12px;
  background-color: var(--red-light);
  border: 1px solid var(--red-glow);
  border-radius: var(--border-radius-sm);
  color: var(--text-primary);
  margin-bottom: 12px;
}

.fda-label-section {
  margin-bottom: 14px;
}

.fda-label-section strong {
  display: block;
  color: var(--text-primary);
  font-size: 12px;
  margin-bottom: 4px;
}

.fda-label-section p {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 24px;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-md);
  text-align: center;
  max-width: 600px;
  margin: 40px auto;
}

.empty-icon {
  width: 64px;
  height: 64px;
  background-color: var(--bg-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--text-muted);
}

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

.empty-state h3 {
  font-family: var(--font-family-title);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 420px;
}

/* INTAKE CHECKER LAYOUT */
.checker-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.checker-sidebar-panel {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 24px;
  backdrop-filter: var(--blur);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.checker-sidebar-panel h3 {
  font-family: var(--font-family-title);
  font-size: 18px;
  font-weight: 600;
}

.panel-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.checker-add-form {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.checker-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checker-list-wrapper h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.intake-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
}

.intake-item {
  background-color: var(--bg-hover);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  animation: slideIn 0.2s ease-out;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

.intake-item-info {
  display: flex;
  flex-direction: column;
}

.intake-item-name {
  font-size: 13px;
  font-weight: 600;
}

.intake-item-category {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.intake-item-category.herb { color: var(--emerald); }
.intake-item-category.food { color: var(--blue); }
.intake-item-category.drug { color: var(--purple); }

.remove-intake-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.remove-intake-btn:hover {
  color: var(--red);
  background-color: var(--red-light);
}

.empty-list-msg {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  padding: 20px 0;
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
}

.checker-main-panel {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 24px;
  backdrop-filter: var(--blur);
  min-height: 480px;
  transition: var(--transition);
}

.checker-results-area {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* intake safety thermometer */
.safety-meter-wrapper {
  background-color: var(--bg-hover);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  padding: 20px;
}

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

.meter-title {
  font-size: 14px;
  font-weight: 600;
}

.meter-status-text {
  font-family: var(--font-family-title);
  font-weight: 800;
  font-size: 16px;
  text-transform: uppercase;
}

.meter-status-text.high { color: var(--red); }
.meter-status-text.med { color: var(--amber); }
.meter-status-text.safe { color: var(--emerald); }

.meter-bar-container {
  height: 8px;
  background-color: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.meter-bar {
  height: 100%;
  border-radius: 4px;
  transition: var(--transition);
}

.meter-bar.high { width: 100%; background: linear-gradient(to right, var(--amber), var(--red)); box-shadow: 0 0 10px var(--red-glow); }
.meter-bar.med { width: 60%; background: var(--amber); box-shadow: 0 0 10px var(--amber-glow); }
.meter-bar.safe { width: 20%; background: var(--emerald); box-shadow: 0 0 10px var(--emerald-glow); }

.meter-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-top: 10px;
}

.analysis-warnings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.warning-item-box {
  border-left: 4px solid var(--border-color);
  background-color: var(--bg-hover);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  padding: 16px;
}

.warning-item-box.danger { border-color: var(--red); background-color: hsla(358, 85%, 52%, 0.03); }
.warning-item-box.warning { border-color: var(--amber); background-color: hsla(38, 92%, 52%, 0.03); }
.warning-item-box.synergy { border-color: var(--emerald); background-color: hsla(150, 80%, 42%, 0.03); }

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

.warning-item-title {
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.warning-item-level {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.warning-item-desc {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.warning-item-clinical, .warning-item-codex {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-color);
  font-size: 11px;
}

.warning-item-clinical strong { color: var(--blue); }
.warning-item-codex strong { color: var(--amber); }

/* NETWORK GRAPH VIEWPORT */
.graph-viewport-wrapper {
  display: flex;
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  overflow: hidden;
  backdrop-filter: var(--blur);
  height: calc(100vh - 190px);
}

.graph-toolbar {
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.graph-search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 280px;
}

.toolbar-icon {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
}

.graph-instructions {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.graph-instructions i {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

.canvas-container {
  flex-grow: 1;
  position: relative;
  width: 100%;
  height: 100%;
}

#network-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
}

#network-canvas:active {
  cursor: grabbing;
}

/* graph legend */
.graph-legend {
  display: flex;
  gap: 16px;
  align-items: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-color.herb { background-color: var(--emerald); }
.legend-color.drug { background-color: var(--purple); }
.legend-color.compound { background-color: var(--blue); }
.legend-color.codex { background-color: var(--amber); }
.legend-color.trial { background-color: var(--green-success); }

/* Node detail overlay floating */
.node-detail-overlay {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 320px;
  background-color: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: var(--blur);
  z-index: 15;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 18px;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.close-overlay-btn {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.close-overlay-btn:hover {
  color: var(--text-primary);
}

.node-type-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 6px;
}

.node-type-badge.herb { background-color: var(--emerald-light); color: var(--emerald); }
.node-type-badge.food { background-color: var(--blue-light); color: var(--blue); }
.node-type-badge.drug { background-color: var(--purple-light); color: var(--purple); }
.node-type-badge.compound { background-color: var(--blue-light); color: var(--blue); }
.node-type-badge.codex { background-color: var(--amber-light); color: var(--amber); }
.node-type-badge.trial { background-color: var(--bg-hover); color: var(--text-secondary); }

#node-overlay-title {
  font-family: var(--font-family-title);
  font-size: 16px;
  font-weight: 600;
}

.overlay-body {
  margin-top: 12px;
}

#node-overlay-desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary);
}

.overlay-meta {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-color);
}

.overlay-meta-item {
  margin-bottom: 8px;
  font-size: 11px;
}

.overlay-meta-item:last-child {
  margin-bottom: 0;
}

.overlay-meta-item strong {
  display: block;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 9px;
  margin-bottom: 2px;
}

.overlay-meta-item p {
  color: var(--text-primary);
}

/* EXPLORER VIEW GLOSSARY */
.explorer-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-chip {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary);
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.filter-chip:hover {
  background-color: var(--bg-hover);
  color: var(--text-primary);
}

.filter-chip.active {
  background-color: var(--blue-light);
  color: var(--blue);
  border-color: var(--blue-glow);
  box-shadow: 0 2px 8px var(--blue-glow);
}

.explorer-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  align-items: start;
}

.explorer-sidebar {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 620px;
}

.explorer-search-input {
  width: 100%;
  background-color: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  padding: 10px 12px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.explorer-search-input:focus {
  border-color: var(--blue);
}

/* Dietary Suitability Sidebar Section */
.dietary-filters-panel {
  border: 1px solid rgba(255,255,255,0.08);
  background-color: var(--bg-hover);
  border-radius: var(--border-radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dietary-filters-panel h5 {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.filter-check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-check-label:hover {
  color: var(--text-primary);
}

.filter-check-label input[type="checkbox"] {
  accent-color: var(--emerald);
  cursor: pointer;
}

.explorer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  max-height: 380px;
}

.explorer-item {
  padding: 10px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.explorer-item:hover {
  background-color: var(--bg-hover);
}

.explorer-item.active {
  background-color: var(--bg-hover);
  border: 1px solid var(--border-color-glow);
}

.explorer-item-title {
  font-size: 13px;
  font-weight: 500;
}

.explorer-item-type-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.explorer-item-type-dot.hierbas { background-color: var(--emerald); }
.explorer-item-type-dot.alimentos { background-color: var(--blue); }
.explorer-item-type-dot.farmacos { background-color: var(--purple); }
.explorer-item-type-dot.codex { background-color: var(--amber); }

.explorer-detail-area {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  padding: 32px;
  min-height: 520px;
  backdrop-filter: var(--blur);
}

/* Monograph detail design */
.monograph-view {
  animation: fadeIn 0.4s ease-out;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.monograph-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.monograph-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.monograph-title-row h3 {
  font-family: var(--font-family-title);
  font-size: 24px;
  font-weight: 700;
}

.monograph-scientific {
  font-style: italic;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.monograph-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 24px;
}

.monograph-section h4 {
  font-family: var(--font-family-title);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.monograph-section p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.monograph-list-ul {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.monograph-list-ul li {
  position: relative;
  padding-left: 16px;
}

.monograph-list-ul li::before {
  content: '•';
  position: absolute;
  left: 4px;
  color: var(--blue);
  font-weight: bold;
}

.monograph-list-ul.danger-bullets li::before {
  color: var(--red);
}

.monograph-box-info {
  background-color: var(--bg-hover);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  border-left: 3px solid var(--border-color);
}

.monograph-box-info.codex-theme { border-color: var(--amber); }
.monograph-box-info.pharma-theme { border-color: var(--purple); }

/* Interactive Dose Calculator Widget */
.calculator-box-widget {
  background-color: var(--bg-hover);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calculator-box-widget h5 {
  font-family: var(--font-family-title);
  font-size: 13px;
  font-weight: 600;
  color: var(--amber);
  display: flex;
  align-items: center;
  gap: 6px;
}

.calculator-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calculator-input-row input {
  width: 80px;
  background-color: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 6px 10px;
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
}

.calculator-input-row span {
  font-size: 13px;
  color: var(--text-secondary);
}

.calculator-results {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  border-top: 1px dashed var(--border-color);
  padding-top: 10px;
}

/* Reported vigilance card */
.reported-log-card {
  background-color: var(--bg-hover);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 4px solid var(--border-color);
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: slideIn 0.3s ease-out;
}

.reported-log-card.grave { border-left-color: var(--red); }
.reported-log-card.moderada { border-left-color: var(--amber); }
.reported-log-card.leve { border-left-color: var(--emerald); }

.reported-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}

.reported-log-code {
  font-weight: 700;
  color: var(--blue);
}

.reported-log-severity {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
}

.reported-log-severity.grave { background-color: var(--red-light); color: var(--red); }
.reported-log-severity.moderada { background-color: var(--amber-light); color: var(--amber); }
.reported-log-severity.leve { background-color: var(--emerald-light); color: var(--emerald); }

.reported-log-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.reported-log-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.reported-log-meta {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  gap: 12px;
}

/* Print View Layout Hidden standard */
.print-hospital-header, .print-hospital-footer {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
  }
  .sidebar-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  .main-content {
    height: auto;
  }
  .dashboard-hero-section {
    grid-template-columns: 1fr;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .intersect-selection-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .intersect-connector {
    transform: rotate(90deg);
    margin: 8px auto;
  }
  .intersect-grid {
    grid-template-columns: 1fr;
  }
  .checker-layout {
    grid-template-columns: 1fr;
  }
  .explorer-layout {
    grid-template-columns: 1fr;
  }
  .graph-viewport-wrapper {
    height: 500px;
  }
}

/* 
  =========================================
  GLOBAL NETWORK SEARCH & NOBEL HIGHLIGHTS
  =========================================
*/
.global-network-search-panel {
  background: hsla(210, 90%, 55%, 0.03);
  border: 1px dashed var(--blue);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  margin-bottom: 20px;
  backdrop-filter: var(--blur);
  transition: var(--transition);
}
body.light-theme .global-network-search-panel {
  background: rgba(59, 130, 246, 0.05);
}
.global-network-search-panel:hover {
  border-color: var(--blue-glow);
  box-shadow: 0 0 10px var(--blue-glow);
}
.global-net-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}
.net-result-card {
  background-color: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.net-result-card:hover {
  background-color: var(--bg-hover);
  border-color: var(--blue);
  transform: translateX(2px);
}
.net-result-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
  padding-right: 10px;
}
.net-result-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}
.net-result-sub {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.net-result-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}
.badge-net-herb { background-color: var(--emerald-light); color: var(--emerald); border: 1px solid var(--emerald-glow); }
.badge-net-drug { background-color: var(--purple-light); color: var(--purple); border: 1px solid var(--purple-glow); }
.badge-net-food { background-color: var(--blue-light); color: var(--blue); border: 1px solid var(--blue-glow); }

.net-spinner {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 12px 0;
  font-size: 11px;
  color: var(--text-muted);
}
.net-spinner-icon {
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-color);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.nobel-card:hover {
  border-color: var(--amber) !important;
  box-shadow: 0 4px 15px var(--amber-glow);
  transform: translateY(-2px);
}

/* 
  =========================================
  @media print
  Advanced print styles for professional 
  clinical layout generation
  =========================================
*/
@media print {
  body {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 12pt;
    filter: none !important;
  }
  
  .glow-bg, .sidebar, .topbar, .no-print, .graph-viewport-wrapper, .view-header, .explorer-sidebar, .topbar-actions, .filter-chip {
    display: none !important;
  }
  
  .app-container {
    display: block !important;
    min-height: 0 !important;
  }
  
  .main-content {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  
  .view-container {
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .view-content {
    display: block !important;
    animation: none !important;
  }
  
  .checker-layout {
    display: block !important;
  }
  
  .checker-main-panel {
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    min-height: 0 !important;
    color: #000000 !important;
    backdrop-filter: none !important;
  }
  
  .safety-meter-wrapper {
    background: #f9fafb !important;
    border: 1px solid #ddd !important;
    color: #000000 !important;
    margin-bottom: 20px !important;
    box-shadow: none !important;
  }
  
  .meter-bar-container {
    background-color: #e5e7eb !important;
    border: 1px solid #ccc !important;
  }
  
  .meter-bar.high { background: #dc2626 !important; }
  .meter-bar.med { background: #d97706 !important; }
  .meter-bar.safe { background: #059669 !important; }

  .warning-item-box {
    background: #ffffff !important;
    border: 1px solid #cccccc !important;
    border-left-width: 6px !important;
    color: #000000 !important;
    page-break-inside: avoid;
    box-shadow: none !important;
    margin-bottom: 12px !important;
  }
  
  .warning-item-box.danger { border-left-color: #dc2626 !important; background-color: #fff5f5 !important; }
  .warning-item-box.warning { border-left-color: #d97706 !important; background-color: #fffdf5 !important; }
  .warning-item-box.synergy { border-left-color: #059669 !important; background-color: #f5fdf8 !important; }
  
  .warning-item-title {
    color: #000000 !important;
    font-size: 13pt !important;
  }
  
  .warning-item-desc, .warning-item-clinical, .warning-item-codex {
    color: #222222 !important;
    font-size: 10pt !important;
    border-top-color: #dddddd !important;
  }
  
  .warning-item-clinical strong { color: #1e40af !important; }
  .warning-item-codex strong { color: #854d0e !important; }
  
  /* Print Headers & Footers visible */
  .print-hospital-header {
    display: block !important;
  }
  
  .print-hospital-footer {
    display: block !important;
    position: running(footer);
  }
}

/* 
  =========================================
  PHASE 4: NUTRITIONAL PROGRESS RINGS,
  FITOVIGILANCIA STATS & MULTILINGUAL UI
  =========================================
*/

/* 1. Language switcher & Header updates */
.btn-lang-toggle:hover {
  background-color: var(--bg-hover) !important;
  color: var(--emerald) !important;
  box-shadow: 0 0 12px var(--emerald-glow);
  transform: scale(1.05);
}

.btn-lang-toggle:active {
  transform: scale(0.95);
}

/* 2. Nutritional Progress Rings */
.nutrition-rings-row {
  animation: slideDown 0.4s ease-out;
}

.nutrition-ring-card {
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nutrition-ring-card:hover {
  border-color: var(--blue) !important;
  box-shadow: 0 8px 25px rgba(0, 102, 204, 0.2) !important;
  transform: translateY(-3px);
}

.progress-ring-bg {
  stroke: var(--border-color);
}

.progress-ring-fill {
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1), stroke 0.5s ease;
}

/* Dynamic Ring Colors depending on severity classes */
.progress-ring-fill.sugars { stroke: var(--emerald); }
.progress-ring-fill.sodium { stroke: var(--emerald); }
.progress-ring-fill.oxalates { stroke: var(--emerald); }

.progress-ring-fill.sugars.warning { stroke: var(--amber); }
.progress-ring-fill.sodium.warning { stroke: var(--amber); }
.progress-ring-fill.oxalates.warning { stroke: var(--amber); }

.progress-ring-fill.sugars.danger { stroke: var(--red); }
.progress-ring-fill.sodium.danger { stroke: var(--red); }
.progress-ring-fill.oxalates.danger { stroke: var(--red); }

/* Ring value styles */
.ring-value-overlay {
  font-family: var(--font-family-title);
  color: var(--text-primary);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.1);
}

/* 3. Fitovigilancia Analytics Dashboard */
.vigilance-analytics-dashboard {
  transition: var(--transition);
}

.vigilance-analytics-dashboard:hover {
  border-color: var(--purple) !important;
  box-shadow: 0 8px 30px rgba(128, 90, 213, 0.15) !important;
}

.vig-chart-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--border-radius-sm);
  padding: 12px;
}

.vig-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 8px;
}

.vig-bar-row:last-child {
  margin-bottom: 0;
}

.vig-bar-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.vig-bar-label {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.vig-bar-count {
  font-weight: 700;
  color: var(--text-primary);
}

.vig-bar-container {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
}

.vig-bar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0; /* Animated dynamically by JS */
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Chart Colors */
.vig-bar-fill.severity-leve {
  background: linear-gradient(90deg, var(--emerald), var(--emerald-glow));
  box-shadow: 0 0 6px var(--emerald-glow);
}

.vig-bar-fill.severity-moderada {
  background: linear-gradient(90deg, var(--amber), var(--amber-glow));
  box-shadow: 0 0 6px var(--amber-glow);
}

.vig-bar-fill.severity-grave {
  background: linear-gradient(90deg, var(--red), var(--red-glow));
  box-shadow: 0 0 6px var(--red-glow);
}

.vig-bar-fill.item-bar {
  background: linear-gradient(90deg, var(--blue), var(--blue-glow));
  box-shadow: 0 0 6px var(--blue-glow);
}

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

/* 
  =========================================
  PHASE 5: ADVANCED CLINICAL SUITE
  =========================================
*/

/* Barcode scanner laser animation */
.laser-scanner-line {
  position: absolute;
  top: 50%;
  left: 5%;
  width: 90%;
  height: 2px;
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow), 0 0 4px var(--red);
  animation: laserScan 2s ease-in-out infinite;
  z-index: 10;
}

@keyframes laserScan {
  0% { top: 10%; }
  50% { top: 90%; }
  100% { top: 10%; }
}

/* Chronotherapy timeline styles */
.chronotherapy-timeline-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

.chronotherapy-timeline-row:last-child {
  border-bottom: none;
}

.timeline-hour {
  font-family: var(--font-family-title);
  font-weight: 700;
  font-size: 13px;
  color: var(--emerald);
  min-width: 50px;
  text-shadow: 0 0 8px var(--emerald-glow);
}

.timeline-items-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-grow: 1;
}

.timeline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-sidebar);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  transition: var(--transition);
  cursor: pointer;
}

.timeline-pill:hover {
  transform: translateY(-1px);
  border-color: var(--blue);
  box-shadow: 0 0 10px var(--blue-glow);
}

.timeline-pill.drug { border-left: 3px solid var(--purple); }
.timeline-pill.herb { border-left: 3px solid var(--emerald); }
.timeline-pill.food { border-left: 3px solid var(--blue); }

.timeline-advisory {
  font-size: 10px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 4px;
}

/* Patient manager styling tweaks */
.patient-manager-box select {
  font-weight: 600;
}

.btn-icon-small:hover {
  color: var(--emerald) !important;
  transform: scale(1.1);
}

#patient-config-detail label span {
  font-size: 10px;
  color: var(--text-secondary);
}

#patient-config-detail input[type="checkbox"] {
  accent-color: var(--emerald);
  cursor: pointer;
}

/* 
  =========================================
  PHASE 6: ADVANCED CDSS & MOLECULAR VIEW
  =========================================
*/

/* 3D Molecular Viewer */
.monograph-3d-box {
  width: 100%;
  height: 260px;
  background: #040711;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--border-radius-md);
  position: relative;
  overflow: hidden;
  margin-top: 15px;
}

.monograph-3d-canvas {
  width: 100%;
  height: 100%;
}

.monograph-3d-controls {
  position: absolute;
  bottom: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  z-index: 10;
}

.egfr-normal { color: var(--emerald) !important; }
.egfr-mild { color: var(--amber) !important; }
.egfr-moderate { color: #f97316 !important; }
.egfr-severe { color: var(--red) !important; }

/* Histamine & Allergen Badges */
.badge-histamine {
  background: rgba(249, 115, 22, 0.15);
  color: #f97316;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.badge-latex {
  background: rgba(236, 72, 153, 0.15);
  color: #ec4899;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

/* ==========================================================================
   4 DEDICATED PORTALS & 4-TIER PRICING MATRIX STYLES
   ========================================================================== */

/* Pricing Table */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.pricing-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: all 0.3s ease;
  backdrop-filter: var(--blur);
}

.pricing-card:hover {
  transform: translateY(-5px);
  border-color: var(--emerald);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}

.pricing-card.featured {
  border-color: var(--emerald);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(6, 182, 212, 0.04));
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--emerald);
  color: white;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
}

.pricing-title {
  font-family: var(--font-family-title);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.pricing-price {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  margin: 10px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.pricing-price span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 15px 0 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pricing-features li {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-features li i {
  color: var(--emerald);
  width: 14px;
  height: 14px;
}

/* Dedicated Portal Headers */
.portal-banner {
  padding: 20px 24px;
  border-radius: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,0.08);
}

.portal-banner.user-theme {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.03));
  border-color: rgba(56, 189, 248, 0.3);
}

.portal-banner.doctor-theme {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.03));
  border-color: rgba(16, 185, 129, 0.3);
}

.portal-banner.clinic-theme {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(168, 85, 247, 0.03));
  border-color: rgba(168, 85, 247, 0.3);
}

.portal-banner.root-theme {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.03));
  border-color: rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   FRAMER MOTION STYLE ANIMATIONS & UI/UX PRO MAX POLISH
   ========================================================================== */

/* Motion Easing Tokens */
:root {
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out-smooth: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Framer Motion Animation Classes */
.view-content:not(.hidden) {
  animation: framerFadeInUp 0.35s var(--ease-out-smooth) forwards;
}

@keyframes framerFadeInUp {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.99);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal:not(.hidden) .modal-content {
  animation: framerPopIn 0.3s var(--ease-spring) forwards;
}

@keyframes framerPopIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Hover Motion Choreography */
.stat-card, .pricing-card, .result-card, .smart-substitute-card {
  transition: transform 0.25s var(--ease-out-smooth), box-shadow 0.25s var(--ease-out-smooth), border-color 0.25s ease;
}

.stat-card:hover, .result-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.btn {
  transition: transform 0.15s var(--ease-out-smooth), background-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 40px; /* UI/UX Pro Max Touch Target Compliance */
}

.btn:active {
  transform: scale(0.97);
}

/* Pulse animation for active badges */
.status-dot.green {
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* Accessibility & Touch Target Polish (UI/UX Pro Max Priority #1 & #2) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--emerald) !important;
  outline-offset: 2px !important;
}

@media (max-width: 768px) {
  .app-container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .main-content {
    margin-left: 0;
    padding: 16px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}





/* =========================================
   BIOCROSS - APPLE/VERCEL MINIMALIST THEME
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;700&display=swap');

:root, body, html {
  --bg-primary: #FAFAFA !important;
  --bg-secondary: #FFFFFF !important;
  --bg-sidebar: #FFFFFF !important;
  
  --bg-card: #FFFFFF !important;
  --bg-hover: #F4F4F5 !important;
  
  --border-color: #EAEAEA !important;
  --border-color-glow: #E4E4E7 !important;
  
  --text-primary: #0A0A0A !important;
  --text-secondary: #52525B !important;
  --text-muted: #A1A1AA !important;
  
  --emerald: #10B981 !important;
  --emerald-glow: rgba(16, 185, 129, 0.15) !important;
  --emerald-light: #ECFDF5 !important;
  
  --blue: #0070F3 !important;
  
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04) !important;
  --shadow-md: 0 8px 30px rgba(0,0,0,0.08) !important;
  --radius-md: 12px !important;
  --radius-lg: 16px !important;
  --radius-full: 9999px !important;
}

html, body, .app-container {
    background: var(--bg-primary) !important;
    background-image: none !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', 'Noto Sans', -apple-system, BlinkMacSystemFont, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

/* Hide old backgrounds */
#patient-cinematic-bg, #prof-cinematic-bg, #ind-cinematic-bg, canvas.agencidev-canvas {
    display: none !important;
}

/* Base Cards */
.bento-card, .kpi-card, .ind-stat-card, .toast, .modal-content, .card-modern {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: all 0.2s ease !important;
}
.bento-card:hover, .kpi-card:hover, .ind-stat-card:hover, .card-modern:hover {
    box-shadow: var(--shadow-md) !important;
    border-color: #D4D4D8 !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
    font-family: 'Figtree', -apple-system, sans-serif !important;
    letter-spacing: -0.02em !important;
    font-weight: 600 !important;
    text-shadow: none !important;
    background: none !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}
p, span, div, label {
    color: var(--text-secondary) !important;
    text-shadow: none !important;
    background: none !important;
    -webkit-text-fill-color: inherit !important;
}

/* Specific elements */
.kpi-value, .ind-stat-value {
    color: var(--text-primary) !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
}

/* Buttons */
.btn, .btn-emerald, button, .cta-button {
    background: var(--text-primary) !important;
    color: #FFFFFF !important;
    padding: 10px 20px !important;
    border: 1px solid transparent !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
    -webkit-text-fill-color: #FFFFFF !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    cursor: pointer !important;
}
.btn:hover, .btn-emerald:hover, button:hover {
    background: #3F3F46 !important;
    transform: none !important;
}
.btn.primary, .btn-emerald {
    background: var(--emerald) !important;
    color: #FFFFFF !important;
}
.btn.primary:hover, .btn-emerald:hover {
    background: #059669 !important;
}
.btn.outline {
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}
.btn.outline:hover {
    background: var(--bg-hover) !important;
}

.btn i, .btn-emerald i, button i, .btn span, .btn-emerald span {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

/* Forms */
input, select, textarea {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
}
input:focus, select:focus {
    border-color: var(--text-muted) !important;
    box-shadow: 0 0 0 1px var(--text-muted) !important;
}
option { background: var(--bg-secondary) !important; color: var(--text-primary) !important; }
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%2352525B%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.4-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px top 50% !important;
    background-size: 12px auto !important;
    padding-right: 36px !important;
}

/* Sidebar & Topbar */
.topbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--border-color) !important;
    height: 60px !important;
}
.sidebar {
    background: var(--bg-sidebar) !important;
    border-right: 1px solid var(--border-color) !important;
    width: 250px !important;
}
.sidebar-item {
    color: var(--text-secondary) !important;
    border-radius: 8px !important;
    margin: 4px 16px !important;
    padding: 10px 14px !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: transparent !important;
}
.sidebar-item:hover {
    background: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}
.sidebar-item.active {
    background: var(--text-primary) !important;
    color: #FFFFFF !important;
    border-left: none !important;
    font-weight: 500 !important;
}
.sidebar-item.active span, .sidebar-item.active i {
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
}

/* Badges */
.specialty-badge, .api-source-chip, .ind-lab-badge, .risk-badge {
    background: var(--bg-hover) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-full) !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
}

.risk-assessment-banner {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm) !important;
    border-radius: var(--radius-md) !important;
}

/* Remove gradient hacks */
.bento-card[style*="linear-gradient"], div[style*="linear-gradient"] {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
}
#patient-hero-title h1 span { color: var(--emerald) !important; -webkit-text-fill-color: var(--emerald) !important; }
