/* LabInsight AI — Primary Stylesheet */

:root {
  --primary-teal: #0e7490;
  --primary-teal-hover: #155e75;
  --accent-cyan: #0284c7;
  --accent-light: #e0f2fe;
  --dark-slate: #0f172a;
  --text-main: #334155;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --border-color: #e2e8f0;
  --success-color: #059669;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 23, 42, 0.12);
}

body {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Typography Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  color: var(--dark-slate);
  font-weight: 700;
}

/* Header & Navbar */
.navbar-custom {
  background-color: #ffffff;
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  padding: 0.85rem 1rem;
}

.navbar-brand-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.45rem;
  color: var(--dark-slate);
  letter-spacing: -0.02em;
}

.brand-icon {
  color: var(--primary-teal);
}

.badge-hackathon {
  background-color: var(--accent-light);
  color: var(--primary-teal);
  font-weight: 600;
  font-size: 0.75rem;
  padding: 0.35em 0.65em;
  border-radius: 20px;
  border: 1px solid rgba(14, 116, 144, 0.2);
}

.nav-link {
  font-weight: 500;
  color: var(--text-main);
  transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-teal);
}

/* Buttons */
.btn-teal {
  background-color: var(--primary-teal);
  color: #ffffff;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.4rem;
  border: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.btn-teal:hover, .btn-teal:focus {
  background-color: var(--primary-teal-hover);
  color: #ffffff;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-outline-teal {
  border: 2px solid var(--primary-teal);
  color: var(--primary-teal);
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 0.55rem 1.3rem;
  background: transparent;
  transition: all 0.2s ease;
}

.btn-outline-teal:hover {
  background-color: var(--primary-teal);
  color: #ffffff;
}

/* Cards */
.custom-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

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

.card-header-custom {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
  border-bottom: 1px solid var(--border-color);
  padding: 4rem 0 3.5rem;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(2, 132, 199, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-title {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.hero-tagline {
  color: var(--primary-teal);
  font-weight: 600;
  font-size: 1.25rem;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
}

/* Architecture Workflow Cards */
.workflow-step-card {
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  position: relative;
}

.step-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--primary-teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

/* Form Customizations */
.form-label-custom {
  font-weight: 600;
  color: var(--dark-slate);
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.form-control-custom, .form-select-custom {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-custom:focus, .form-select-custom:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
  outline: none;
}

.unit-badge {
  background-color: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.range-badge {
  background-color: #f1f5f9;
  color: #475569;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
}

/* Medical Disclaimer Alert */
.disclaimer-alert {
  background-color: #fffbeb;
  border: 1px solid #fef3c7;
  border-left: 4px solid var(--warning-color);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  color: #92400e;
}

.disclaimer-alert h6 {
  color: #78350f;
  font-weight: 700;
}

.disclaimer-info {
  background-color: #f0f9ff;
  border: 1px solid #bae6fd;
  border-left: 4px solid var(--accent-cyan);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  color: #0369a1;
  font-size: 0.9rem;
}

/* Placeholder Validation Banner */
.placeholder-result-card {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 5px solid var(--success-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

/* Footer */
footer {
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.1rem;
  }
  
  .hero-section {
    padding: 2.5rem 0;
  }
  
  .cbc-test-card {
    margin-bottom: 1rem;
  }
}

/* Step 2 — Parameter Classification Badges */
.badge-status-normal {
  background-color: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-status-low {
  background-color: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.badge-status-high {
  background-color: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Step 2 — Metric Cards */
.metric-summary-card {
  padding: 1.15rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
  text-center: center;
}

.metric-number {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.1;
}

.metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Step 3 — Pattern Detection Cards & Connected Finding Chips */
.pattern-item-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 5px solid var(--primary-teal);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  transition: all 0.2s ease;
}

.pattern-item-card:hover {
  box-shadow: var(--shadow-md);
}

.pattern-item-card.pattern-warning {
  border-left-color: var(--warning-color);
}

.pattern-item-card.pattern-danger {
  border-left-color: var(--danger-color);
}

.pattern-item-card.pattern-success {
  border-left-color: var(--success-color);
}

.finding-chip {
  background-color: #f1f5f9;
  color: var(--dark-slate);
  border: 1px solid #cbd5e1;
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.3rem 0.65rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.pattern-logic-code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  background: #f8fafc;
  color: #0f172a;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

/* Step 4 — Evidence Layer & Gemini AI Explanation UI */
.evidence-citation-box {
  background-color: #f8fafc;
  border: 1px dashed var(--accent-cyan);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
}

.ai-explanation-card {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  position: relative;
}

.badge-gemini-ai {
  background: linear-gradient(135deg, #0284c7 0%, #0e7490 100%);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: var(--shadow-sm);
}

.doctor-questions-list {
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
}

.doctor-questions-list ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.doctor-questions-list li {
  margin-bottom: 0.5rem;
  color: var(--dark-slate);
  font-weight: 500;
}

.doctor-questions-list li:last-child {
  margin-bottom: 0;
}

.api-key-collapse {
  background-color: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 1rem;
}



