/* ════════════════════════════════════════
   JARVIS — AI Digital Twin Health System
   Design System & Global Styles
════════════════════════════════════════ */

:root {
  --bg-deep:        #050811;
  --bg-mid:         #080d1a;
  --bg-card:        #0e1628;
  --bg-card-hover:  #111c35;
  --border:         rgba(0, 245, 212, 0.12);
  --border-bright:  rgba(0, 245, 212, 0.3);

  --teal:           #00f5d4;
  --teal-dim:       rgba(0, 245, 212, 0.15);
  --teal-glow:      rgba(0, 245, 212, 0.35);
  --blue:           #00b4d8;
  --purple:         #7b5ea7;
  --violet:         #a855f7;
  --pink:           #f472b6;
  --amber:          #f59e0b;
  --red:            #ef4444;
  --green:          #22c55e;
  --green-dim:      rgba(34, 197, 94, 0.15);
  --amber-dim:      rgba(245, 158, 11, 0.15);
  --red-dim:        rgba(239, 68, 68, 0.15);

  --text-primary:   #e8f4f8;
  --text-secondary: #8ba3bc;
  --text-muted:     #4d6680;

  --sidebar-w:      260px;
  --radius:         16px;
  --radius-sm:      10px;
  --transition:     0.3s cubic-bezier(.4,0,.2,1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ══ SCREENS ══ */
.screen { display: none; }
.screen.active { display: flex; }

/* ══════════════════════════════════════════
   ONBOARDING SCREEN
══════════════════════════════════════════ */
#onboarding-screen {
  min-height: 100vh;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem 4rem;
  position: relative;
  overflow: hidden;
}

.onboard-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
  animation: floatOrb 8s ease-in-out infinite alternate;
}
.orb1 { width: 500px; height: 500px; background: radial-gradient(circle, var(--teal), transparent); top: -150px; left: -100px; }
.orb2 { width: 400px; height: 400px; background: radial-gradient(circle, var(--purple), transparent); bottom: -100px; right: -80px; animation-delay: -4s; }
.orb3 { width: 300px; height: 300px; background: radial-gradient(circle, var(--blue), transparent); top: 40%; left: 50%; transform: translate(-50%,-50%); animation-delay: -2s; }

@keyframes floatOrb { from { transform: scale(1) translateY(0); } to { transform: scale(1.15) translateY(-30px); } }

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,245,212,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,212,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
}

.onboard-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 780px;
}

/* Logo */
.jarvis-logo-wrap {
  position: relative;
  width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.2rem;
}
.jarvis-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid var(--teal);
  opacity: 0.3;
  animation: spinRing 6s linear infinite;
}
.ring1 { width: 110px; height: 110px; animation-duration: 6s; }
.ring2 { width: 85px;  height: 85px;  animation-duration: 4s; animation-direction: reverse; }
.ring3 { width: 62px;  height: 62px;  opacity: 0.5; animation-duration: 3s; }
@keyframes spinRing { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.jarvis-core {
  position: absolute;
  display: flex; align-items: center; justify-content: center;
  width: 52px; height: 52px;
}

.onboard-title {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: 0.25em;
  background: linear-gradient(135deg, var(--teal), var(--blue), var(--violet));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  margin-bottom: 0.2rem;
}
.onboard-sub {
  font-size: 1rem;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.onboard-tagline {
  font-size: 0.85rem;
  color: var(--teal);
  letter-spacing: 0.2em;
  margin-bottom: 2.5rem;
  opacity: 0.8;
}

/* Onboarding Card */
.onboard-card {
  background: rgba(14, 22, 40, 0.85);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  backdrop-filter: blur(20px);
  box-shadow: 0 0 80px rgba(0, 245, 212, 0.06);
}
.form-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.3rem;
}
.form-subtitle {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 2rem;
}
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}
.form-group input,
.form-group select {
  background: rgba(0, 245, 212, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
  background: rgba(0, 245, 212, 0.07);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group select option { background: var(--bg-card); }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: var(--bg-deep);
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
  letter-spacing: 0.03em;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 245, 212, 0.4);
  filter: brightness(1.1);
}
.btn-primary:active { transform: translateY(0); }
.btn-icon { font-size: 1.1rem; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.2rem;
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--border-bright);
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.btn-secondary:hover {
  background: var(--teal-dim);
  box-shadow: 0 0 15px var(--teal-glow);
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
#dashboard-screen {
  min-height: 100vh;
  flex-direction: row;
}

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: rgba(8, 13, 26, 0.95);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem 0;
  position: fixed;
  top: 0; left: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.2rem;
}
.sidebar-logo-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--bg-deep);
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(0, 245, 212, 0.3);
}
.sidebar-logo-name { font-weight: 800; font-size: 1.1rem; color: var(--text-primary); letter-spacing: 0.05em; }
.sidebar-logo-sub  { font-size: 0.72rem; color: var(--text-muted); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0 0.8rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}
.nav-item:hover { background: var(--teal-dim); color: var(--teal); }
.nav-item.active {
  background: var(--teal-dim);
  color: var(--teal);
  border-left: 3px solid var(--teal);
}
.nav-icon { font-size: 1.15rem; width: 24px; text-align: center; }

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 1.5rem 0;
  border-top: 1px solid var(--border);
}
.profile-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
}
.profile-name   { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.profile-status { font-size: 0.72rem; color: var(--green); }

/* ══ MAIN CONTENT ══ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 1.5rem 2rem 3rem;
  min-height: 100vh;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.top-bar-left { display: flex; flex-direction: column; gap: 0.1rem; }
.top-bar-right { display: flex; align-items: center; gap: 1rem; }
.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.page-subtitle { font-size: 0.85rem; color: var(--text-muted); }

.health-score-pill {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  background: var(--teal-dim);
  border: 1px solid var(--border-bright);
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

/* ══ TAB PANELS ══ */
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ══ CARDS ══ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
}
.card:hover { border-color: var(--border-bright); box-shadow: 0 8px 40px rgba(0, 245, 212, 0.06); }
.card-header { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 1.2rem; }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-primary); }
.card-subtitle { font-size: 0.82rem; color: var(--text-muted); }

/* ══ STAT CARDS ══ */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  cursor: default;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--accent, var(--teal));
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 245, 212, 0.1);
  border-color: var(--border-bright);
}
.stat-icon { font-size: 1.8rem; margin-bottom: 0.6rem; display: block; }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
.stat-value { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); line-height: 1; margin-bottom: 0.2rem; }
.stat-sub { font-size: 0.78rem; color: var(--text-secondary); }

/* ══ TWO COL ══ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }

/* ══ VITALS ══ */
.vitals-list { display: flex; flex-direction: column; gap: 1rem; }
.vital-item { display: flex; align-items: center; gap: 1rem; }
.vital-icon { font-size: 1.4rem; width: 36px; text-align: center; flex-shrink: 0; }
.vital-info { flex: 1; }
.vital-name { font-size: 0.82rem; color: var(--text-secondary); margin-bottom: 0.2rem; }
.vital-value { font-size: 0.95rem; font-weight: 700; }
.vital-pill {
  padding: 0.2rem 0.7rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
}
.pill-good   { background: var(--green-dim);  color: var(--green); }
.pill-warn   { background: var(--amber-dim);  color: var(--amber); }
.pill-risk   { background: var(--red-dim);    color: var(--red);   }

/* ══ RISK BARS ══ */
.risk-bars { display: flex; flex-direction: column; gap: 1.2rem; }
.risk-bar-item { }
.risk-bar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.risk-bar-label { font-size: 0.88rem; font-weight: 600; }
.risk-bar-pct { font-size: 0.85rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.risk-bar-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 50px;
  overflow: hidden;
}
.risk-bar-fill {
  height: 100%;
  border-radius: 50px;
  transition: width 1.2s cubic-bezier(.4,0,.2,1);
}

/* ══ ALERTS ══ */
.alert-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.8rem;
  border: 1px solid transparent;
  animation: fadeIn 0.4s ease;
}
.alert-good   { background: var(--green-dim);  border-color: rgba(34,197,94,0.2);  }
.alert-warn   { background: var(--amber-dim);  border-color: rgba(245,158,11,0.2); }
.alert-risk   { background: var(--red-dim);    border-color: rgba(239,68,68,0.2);  }
.alert-icon   { font-size: 1.3rem; flex-shrink: 0; }
.alert-body   { flex: 1; }
.alert-title  { font-size: 0.88rem; font-weight: 700; margin-bottom: 0.2rem; }
.alert-desc   { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* ══ RISKS GRID ══ */
.risks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.risk-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}
.risk-card:hover { border-color: var(--border-bright); box-shadow: 0 8px 40px rgba(0,0,0,0.3); }
.risk-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.risk-card-title { font-size: 1.1rem; font-weight: 700; }
.risk-badge {
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.badge-low   { background: var(--green-dim);  color: var(--green); }
.badge-mod   { background: var(--amber-dim);  color: var(--amber); }
.badge-high  { background: var(--red-dim);    color: var(--red);   }

.risk-gauge-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 1.5rem; }
.risk-gauge-label {
  font-size: 2.8rem;
  font-weight: 900;
  font-family: 'JetBrains Mono', monospace;
  margin-bottom: 0.2rem;
}
.risk-gauge-sub { font-size: 0.82rem; color: var(--text-muted); }
.risk-card-factors { }
.risk-factor-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.risk-factor-item:last-child { border-bottom: none; }
.rf-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.rf-neg { background: var(--red); }
.rf-neu { background: var(--amber); }
.rf-pos { background: var(--green); }

/* ══ INSIGHTS ══ */
.insight-item {
  padding: 1.2rem;
  border-left: 3px solid var(--teal);
  background: rgba(0, 245, 212, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 1rem;
}
.insight-issue { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.4rem; }
.insight-why   { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 0.4rem; }
.insight-effect { font-size: 0.82rem; color: var(--amber); }

.action-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(0,245,212,0.04);
  border: 1px solid var(--border);
  margin-bottom: 0.8rem;
  transition: var(--transition);
}
.action-step:hover { border-color: var(--border-bright); background: rgba(0,245,212,0.07); }
.action-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700;
  color: var(--bg-deep);
  flex-shrink: 0;
}
.action-body  { flex: 1; }
.action-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.2rem; }
.action-desc  { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* ══ SIMULATION ══ */
.sim-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}
@media (max-width: 700px) { .sim-controls { grid-template-columns: 1fr; } }

.sim-control { }
.sim-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}
.sim-val { color: var(--teal); font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.sim-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  background: rgba(0,245,212,0.15);
  border-radius: 50px;
  outline: none;
}
.sim-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  cursor: pointer;
  box-shadow: 0 0 8px var(--teal-glow);
}

.sim-result-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.2rem;
  background: rgba(0,245,212,0.04);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.sim-arrow { font-size: 1.5rem; }
.sim-before, .sim-after { flex: 1; }
.sim-risk-name { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.sim-pct-before { font-size: 1.6rem; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: var(--red); }
.sim-pct-after  { font-size: 1.6rem; font-weight: 900; font-family: 'JetBrains Mono', monospace; color: var(--green); }
.sim-change { font-size: 0.78rem; font-weight: 600; margin-top: 0.2rem; }
.sim-improve { color: var(--green); }
.sim-worsen  { color: var(--red); }

/* ══ REPORT ══ */
.report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.report-title-block h2 { font-size: 1.6rem; font-weight: 800; }
.report-title-block p  { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }
.report-section { margin-bottom: 2rem; }
.report-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.report-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.report-metric {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
}
.report-metric-label { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.report-metric-val   { font-size: 1.3rem; font-weight: 800; }
.report-text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
  background: rgba(0,245,212,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
}

/* ══ CHAT ══ */
.chat-card { display: flex; flex-direction: column; min-height: calc(100vh - 200px); }
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.2rem;
  max-height: 55vh;
}
.chat-message {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  animation: fadeIn 0.3s ease;
}
.chat-message.user { flex-direction: row-reverse; }
.chat-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  color: var(--bg-deep);
  flex-shrink: 0;
}
.chat-message.user .chat-avatar {
  background: linear-gradient(135deg, var(--purple), var(--violet));
  color: white;
}
.chat-bubble {
  max-width: 75%;
  padding: 0.9rem 1.2rem;
  border-radius: 18px;
  font-size: 0.9rem;
  line-height: 1.6;
  border: 1px solid var(--border);
}
.chat-message.jarvis .chat-bubble {
  background: rgba(0,245,212,0.05);
  border-color: rgba(0,245,212,0.15);
  color: var(--text-primary);
  border-top-left-radius: 4px;
}
.chat-message.user .chat-bubble {
  background: rgba(123, 94, 167, 0.15);
  border-color: rgba(123, 94, 167, 0.25);
  color: var(--text-primary);
  border-top-right-radius: 4px;
  text-align: right;
}

.chat-input-wrap {
  display: flex;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}
.chat-input {
  flex: 1;
  background: rgba(0,245,212,0.04);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.7rem 1.3rem;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  outline: none;
  transition: var(--transition);
}
.chat-input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-glow); }
.chat-input::placeholder { color: var(--text-muted); }
.chat-send { width: auto; padding: 0.7rem 1.5rem; border-radius: 50px; }

.quick-prompts { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.qp-label { font-size: 0.78rem; color: var(--text-muted); }
.qp-btn {
  background: rgba(0,245,212,0.07);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  font-family: 'Outfit', sans-serif;
}
.qp-btn:hover { background: var(--teal-dim); color: var(--teal); border-color: var(--border-bright); }

/* ══ LOADING ══ */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 8, 17, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.loading-content { text-align: center; }
.load-rings {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 2rem;
  display: flex; align-items: center; justify-content: center;
}
.lr {
  position: absolute;
  border-radius: 50%;
  border: 2px solid transparent;
  animation: spinRing 1.5s linear infinite;
}
.lr1 { width: 80px; height: 80px; border-top-color: var(--teal); }
.lr2 { width: 56px; height: 56px; border-top-color: var(--purple); animation-duration: 1s; animation-direction: reverse; }
.lr3 { width: 32px; height: 32px; border-top-color: var(--blue); animation-duration: 0.7s; }
.load-text { font-size: 1.1rem; font-weight: 700; color: var(--teal); margin-bottom: 0.4rem; }
.load-sub  { font-size: 0.85rem; color: var(--text-muted); }

/* ══ SCROLLBAR ══ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,245,212,0.2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,245,212,0.4); }
