/* ============================================================
   Vitaloop Platform — Design Tokens
   Lifted from the Bholane HIMS design system (glassmorphism).
   Three themes: "dim" (default), light, dark.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Default — OBGY "liquid glass": light, frosted white, indigo accent */
  --bg-primary: #eef0f5;
  --bg-secondary: #ffffff;
  --bg-sidebar: rgba(255, 255, 255, 0.72);
  --card-bg: rgba(255, 255, 255, 0.66);
  --card-hover: rgba(255, 255, 255, 0.88);
  --border-color: rgba(15, 23, 42, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-main: #1e2030;
  --text-muted: #5c6478;
  --text-inverse: #f0f2f5;
  --soft: #94a3b8;

  --input-bg: rgba(15, 23, 42, 0.03);
  --input-focus-bg: rgba(99, 102, 241, 0.05);
  --input-placeholder: rgba(30, 41, 59, 0.42);
  --dropdown-bg: rgba(255, 255, 255, 0.98);

  /* App accent (indigo) — drives every var(--accent…) in shell.css + app.css.
     Matches the standalone OBGY app; specialty pages may override on their scope. */
  --accent: #6366f1;
  --accent-d: #4f46e5;
  --accent-soft: #eceefe;
  --accent-glow: rgba(99, 102, 241, 0.14);
  --accent2: #10b981;

  /* Clinical section tints (from the OBGY app's colour-coded capsules) */
  --cc: #f43f5e;   --cc-soft: #fff0f2;    /* chief complaints */
  --hx: #06b6d4;   --hx-soft: #e6fafe;    /* history */
  --med: #10b981;  --med-soft: #e7f8f1;   /* medications */
  --lab: #8b5cf6;  --lab-soft: #f1ecfe;   /* investigations */
  --warn-soft: #fef3e2;
  --border2: rgba(15, 23, 42, 0.05);

  /* Specialty / domain accents (workflows pick one) */
  --obgy-primary: #f43f5e;   --obgy-secondary: #fda4af;   --obgy-glow: rgba(244, 63, 94, 0.2);
  --peds-primary: #10b981;   --peds-secondary: #6ee7b7;   --peds-glow: rgba(16, 185, 129, 0.2);
  --diag-primary: #6366f1;   --diag-secondary: #a5b4fc;   --diag-glow: rgba(99, 102, 241, 0.2);
  --bill-primary: #f59e0b;   --bill-secondary: #fde047;   --bill-glow: rgba(245, 158, 11, 0.2);
  --surg-primary: #0ea5e9;   --surg-secondary: #7dd3fc;   --surg-glow: rgba(14, 165, 233, 0.2);
  --rad-primary:  #a855f7;   --rad-secondary:  #d8b4fe;   --rad-glow:  rgba(168, 85, 247, 0.2);

  --danger: #ef4444;
  --success: #10b981;
  --warning: #f59e0b;
  --info: #06b6d4;

  --sidebar-width: 264px;
  --sidebar-rail: 78px;
  --header-height: 70px;
  --transition-speed: 0.25s;
  --glass-blur: 14px;
  --card-shadow: 0 8px 24px 0 rgba(16, 24, 40, 0.08);
  --shadow-sm: 0 2px 8px rgba(16, 24, 40, 0.06);
  --radius: 16px;
}

[data-theme="light"] {
  --bg-primary: #f1f5f9;
  --bg-secondary: #ffffff;
  --bg-sidebar: rgba(255, 255, 255, 0.9);
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-hover: rgba(255, 255, 255, 0.95);
  --border-color: rgba(15, 23, 42, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-inverse: #f8fafc;
  --card-shadow: 0 8px 24px 0 rgba(148, 163, 184, 0.15);
  --input-bg: rgba(0, 0, 0, 0.03);
  --input-focus-bg: rgba(0, 0, 0, 0.05);
  --input-placeholder: rgba(15, 23, 42, 0.35);
  --dropdown-bg: rgba(241, 245, 249, 0.98);
}

[data-theme="dark"] {
  --bg-primary: #0a0e27;
  --bg-secondary: #131842;
  --bg-sidebar: rgba(10, 14, 39, 0.95);
  --card-bg: rgba(19, 24, 66, 0.6);
  --card-hover: rgba(19, 24, 66, 0.8);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.6);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;
  --card-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.3);
  --input-bg: rgba(255, 255, 255, 0.04);
  --input-focus-bg: rgba(255, 255, 255, 0.07);
  --input-placeholder: rgba(255, 255, 255, 0.35);
  --dropdown-bg: rgba(30, 41, 59, 0.98);
}

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

body {
  font-family: var(--font-body);
  /* OBGY liquid-glass signature: twin indigo + emerald radial glows over the page */
  background:
    radial-gradient(1100px 560px at 12% -8%, color-mix(in srgb, var(--accent) 16%, transparent), transparent),
    radial-gradient(900px 520px at 102% 4%, color-mix(in srgb, var(--accent2) 14%, transparent), transparent),
    var(--bg-primary);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
a { text-decoration: none; color: inherit; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
