/* ============================================================================
   LUMEN EMR — a standalone, HIPAA-certified Electronic Medical Record.
   Premium glassmorphic dark UI · velvet (orchid/magenta) accent.
   © Guardian IT.
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- Design tokens — "Aurora" identity (solid surfaces, editorial serif) -- */
:root {
  --background: #0d0a17;
  --foreground: #f3f0fb;
  color-scheme: dark;

  /* Solid, warm plum-ink surfaces — no glass */
  --emr-bg: #140f22;
  --emr-surface: #1d1734;
  --emr-surface-soft: #241d40;
  --emr-surface-2: #2b234b;
  --emr-surface-3: #332957;

  --emr-border: rgba(176, 150, 255, 0.13);
  --emr-border-accent: rgba(176, 150, 255, 0.26);

  /* Accent — orchid → magenta → coral brand gradient */
  --emr-accent: #b06bff;        /* orchid */
  --emr-accent-soft: #c89bff;   /* light orchid */
  --accent-deep: #8b3df5;          /* deep violet */
  --accent-magenta: #ff5d9e;       /* coral-magenta (secondary) */
  --accent-coral: #ff8a5c;         /* warm coral (tertiary) */
  --accent-rgb: 176, 107, 255;
  --accent-glow: rgba(200, 155, 255, 0.45);
  --brand-grad: linear-gradient(120deg, #b06bff 0%, #ff5d9e 60%, #ff8a5c 100%);
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;

  --emr-success: #34d399;
  --emr-success-soft: #10b981;
  --emr-warning: #fbbf24;
  --emr-warning-soft: #f59e0b;
  --emr-error: #f87171;
  --emr-error-soft: #ef4444;
  --emr-info: #60a5fa;
  --emr-info-soft: #3b82f6;
  --emr-gold: #d97706;
  --emr-gold-soft: #f59e0b;
  --emr-purple: #a78bfa;

  --emr-text: rgba(247, 244, 255, 0.95);
  --emr-text-muted: rgba(226, 218, 250, 0.62);
  --emr-text-faint: rgba(208, 198, 238, 0.42);

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* "glass" tokens repurposed → solid surfaces (de-glassed) */
  --glass-bg: var(--emr-surface);
  --glass-blur: none;
  --glass-border: var(--emr-border);
  --glass-highlight: none;

  --sidebar-w: 248px;
  --sidebar-w-collapsed: 56px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--emr-bg);
  color: var(--emr-text);
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 14px;
  line-height: 1.45;
  overflow: hidden;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
h1 { letter-spacing: -0.02em; }
h2 { letter-spacing: -0.01em; }
/* Editorial serif for big display headings — a clear non-Warden signature */
.page-title, .lp-hero h1, .lp-h2, .lp-cta h2, .pbanner-name, .upgrade-hero h2 {
  font-family: var(--font-display); font-weight: 600; letter-spacing: -0.005em;
}
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(var(--accent-rgb), 0.3); color: #fff; }
img { display: block; }
code, .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* ---- Noise + ambient backdrop --------------------------------------------- */
.app-noise { display: none; }  /* noise overlay removed for the Aurora repaint */
.app-ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(900px circle at 12% -5%, rgba(var(--accent-rgb), 0.13), transparent 55%),
    radial-gradient(1000px circle at 100% 0%, rgba(236, 72, 153, 0.07), transparent 50%),
    radial-gradient(800px circle at 50% 120%, rgba(var(--accent-rgb), 0.05), transparent 60%);
}

/* ---- Scrollbars ----------------------------------------------------------- */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.18); }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.08) transparent; }

/* ============================================================================
   LAYOUT SHELL
   ============================================================================ */
.shell { position: relative; z-index: 1; display: flex; height: 100vh; }

/* ---- Sidebar -------------------------------------------------------------- */
.sidebar {
  position: relative; z-index: 20; flex-shrink: 0;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: #0f0b1c;
  border-right: 1px solid var(--emr-border);
  transition: width 0.2s ease;
}
.sidebar.collapsed { width: var(--sidebar-w-collapsed); }
.sidebar::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(165deg, rgba(176,107,255,0.10), transparent 42%, rgba(255,93,158,0.05));
}
.sb-header {
  position: relative; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.08);
  min-height: var(--topbar-h);
}
.sb-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sb-logo {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--brand-grad);
  border: 0; color: #fff;
  box-shadow: 0 6px 16px -4px rgba(176,107,255,0.6);
}
.sb-brand-text { display: flex; flex-direction: column; min-width: 0; }
.sb-brand-name { font-weight: 700; font-size: 14px; letter-spacing: -0.01em; color: #fff; white-space: nowrap; }
.sb-brand-pill {
  margin-top: 2px; width: fit-content;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--emr-accent-soft);
  background: rgba(var(--accent-rgb),0.15); border-radius: 4px; padding: 1px 6px;
}
.icon-btn {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px;
  background: transparent; border: 1px solid transparent; color: rgba(255,255,255,0.4);
  transition: all 0.15s ease;
}
.icon-btn:hover { color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.06); }

/* Portal switcher */
.portal-switch { position: relative; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.portal-switch-btn {
  width: 100%; display: flex; align-items: center; gap: 9px; padding: 8px 10px;
  border-radius: 9px; border: 1px solid rgba(255,255,255,0.09);
  background: rgba(255,255,255,0.03); color: var(--emr-text); transition: all 0.15s ease;
}
.portal-switch-btn:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.16); }
.portal-switch-btn .pswatch { width: 18px; height: 18px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; }
.portal-switch-meta { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.2; }
.portal-switch-meta .lbl { font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--emr-text-faint); }
.portal-switch-meta .val { font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.portal-switch-btn .chev { margin-left: auto; color: var(--emr-text-faint); }

.portal-menu {
  position: absolute; left: 12px; right: 12px; top: calc(100% - 4px); z-index: 60;
  padding: 6px; border-radius: 12px; background: rgba(12,14,20,0.98);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 48px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(24px) saturate(180%); display: none;
}
.portal-menu.open { display: block; animation: pop 0.13s cubic-bezier(0.16,1,0.3,1); }
.portal-menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 9px; border-radius: 8px; color: rgba(255,255,255,0.75); transition: background 0.1s; }
.portal-menu-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.portal-menu-item .pswatch { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; }
.portal-menu-item .pm-meta { display: flex; flex-direction: column; line-height: 1.25; }
.portal-menu-item .pm-meta small { color: var(--emr-text-faint); font-size: 11px; }
.portal-menu-item.active { background: rgba(var(--accent-rgb),0.1); }
.portal-menu-item.active .pm-meta strong { color: var(--emr-accent-soft); }

@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } to { opacity: 1; transform: none; } }

/* Nav */
.sb-nav { flex: 1; min-height: 0; overflow-y: auto; padding: 10px; }
.sb-section-label { padding: 0 10px; margin: 16px 0 6px; }
.sb-section-label span { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: rgba(255,255,255,0.25); }
.sb-nav > .sb-section-label:first-child { margin-top: 2px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 8px 11px;
  border-radius: 9px; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.52);
  transition: color 0.15s, background 0.15s; white-space: nowrap;
}
.nav-item { margin: 1px 0; }
.nav-item:hover { color: rgba(255,255,255,0.9); background: rgba(176,107,255,0.08); }
.nav-item.active { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(176,107,255,0.6); }
.nav-item .ni-icon { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item.active .ni-icon { color: #fff; }
.nav-item.active .ni-badge { background: rgba(255,255,255,0.22); color: #fff; }
.nav-item .ni-badge {
  margin-left: auto; font-size: 10.5px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(var(--accent-rgb),0.16); color: var(--emr-accent-soft);
}
.nav-item .ni-badge.warn { background: rgba(245,158,11,0.16); color: var(--emr-warning); }
.nav-item .ni-badge.crit { background: rgba(239,68,68,0.16); color: var(--emr-error); }

.sidebar.collapsed .sb-brand-text, .sidebar.collapsed .portal-switch-meta,
.sidebar.collapsed .portal-switch-btn .chev, .sidebar.collapsed .sb-section-label,
.sidebar.collapsed .nav-item span, .sidebar.collapsed .nav-item .ni-badge,
.sidebar.collapsed .sb-foot-meta { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 9px 0; }
.sidebar.collapsed .sb-header { justify-content: center; padding: 12px 0; }
.sidebar.collapsed .portal-switch-btn { justify-content: center; padding: 8px 0; }
.sidebar.collapsed .sb-foot { justify-content: center; }

/* Sidebar footer (user) */
.sb-foot {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px;
  border-top: 1px solid rgba(255,255,255,0.08); flex-shrink: 0;
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; color: #fff; letter-spacing: 0.02em;
  background: linear-gradient(135deg, #7c3aed, #c026d3); border: 1px solid rgba(255,255,255,0.14);
}
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.xl { width: 60px; height: 60px; font-size: 20px; }
.sb-foot-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sb-foot-meta .nm { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; }
.sb-foot-meta .rl { font-size: 11px; color: var(--emr-text-faint); white-space: nowrap; }

/* ---- Main + Topbar -------------------------------------------------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--topbar-h); flex-shrink: 0; display: flex; align-items: center; gap: 14px;
  padding: 0 20px; position: relative;
  background: #110c20; backdrop-filter: none;
  border-bottom: 1px solid var(--emr-border);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(var(--accent-rgb),0.25), transparent);
}
.tb-search {
  display: flex; align-items: center; gap: 9px; width: 340px; max-width: 38vw;
  padding: 7px 12px; border-radius: 9px; background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08); color: var(--emr-text-faint);
  transition: all 0.15s ease;
}
.tb-search:hover { border-color: rgba(255,255,255,0.16); background: rgba(255,255,255,0.06); }
.tb-search input {
  flex: 1; background: transparent; border: 0; outline: 0; color: var(--emr-text);
  font-family: inherit; font-size: 13px;
}
.tb-search .kbd {
  font-size: 10px; font-family: 'JetBrains Mono', monospace; color: var(--emr-text-faint);
  border: 1px solid rgba(255,255,255,0.12); border-radius: 5px; padding: 1px 5px; background: rgba(255,255,255,0.03);
}
.tb-spacer { flex: 1; }
.tb-chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1px solid rgba(255,255,255,0.09); background: rgba(255,255,255,0.03);
  color: var(--emr-text-muted);
}
.tb-chip .freshness-dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; box-shadow: 0 0 6px rgba(52,211,153,0.5); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }

.tb-icon {
  position: relative; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px;
  color: var(--emr-text-muted); border: 1px solid transparent; transition: all 0.15s;
}
.tb-icon:hover { color: #fff; background: rgba(255,255,255,0.06); }
.tb-icon .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--emr-error-soft); border: 2px solid var(--emr-bg); }

/* ---- Content area --------------------------------------------------------- */
.content { flex: 1; min-height: 0; overflow-y: auto; }
.page { padding: 22px 26px 60px; max-width: 1640px; margin: 0 auto; }
.page-wide { max-width: none; }

/* ---- Page header ---------------------------------------------------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumbs { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--emr-text-faint); margin-bottom: 8px; }
.breadcrumbs a:hover { color: var(--emr-text-muted); }
.page-title { font-size: 23px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 11px; }
.page-sub { color: var(--emr-text-muted); font-size: 13.5px; margin-top: 5px; }
.page-actions { display: flex; align-items: center; gap: 10px; }

/* ---- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 14px; border-radius: 9px; font-size: 13px; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: var(--emr-text); transition: all 0.15s ease; white-space: nowrap;
}
.btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.18); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn.primary {
  background: linear-gradient(135deg, var(--emr-accent), #7c3aed);
  border-color: rgba(var(--accent-rgb),0.5); color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 4px 16px rgba(var(--accent-rgb),0.22);
}
.btn.primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.2) inset, 0 6px 22px rgba(var(--accent-rgb),0.34); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--emr-text-muted); }
.btn.ghost:hover { background: rgba(255,255,255,0.06); color: #fff; }
.btn.danger { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.btn.danger:hover { background: rgba(239,68,68,0.2); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.sm svg { width: 14px; height: 14px; }
.btn.icon { padding: 8px; }

/* ---- Cards — solid, rounded, soft-shadowed (no glass) --------------------- */
.card {
  position: relative; border-radius: var(--radius-lg); border: 1px solid var(--emr-border);
  background: var(--emr-surface);
  box-shadow: 0 1px 2px rgba(8,4,20,0.4), 0 10px 26px -18px rgba(8,4,20,0.7);
}
.card.glass {
  background: var(--emr-surface); backdrop-filter: none;
  box-shadow: 0 1px 2px rgba(8,4,20,0.4), 0 16px 40px -24px rgba(8,4,20,0.8);
}
.card.pad { padding: 20px; }
.card.lift { transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
.card.lift:hover {
  transform: translateY(-3px); border-color: var(--emr-border-accent);
  box-shadow: 0 1px 2px rgba(8,4,20,0.4), 0 22px 48px -22px rgba(139,61,245,0.4), 0 0 0 1px rgba(var(--accent-rgb),0.14);
}
.card-emerald { border-left: 2px solid rgba(16,185,129,0.45); }
.card-teal { border-left: 2px solid rgba(var(--accent-rgb),0.5); }
.card-blue { border-left: 2px solid rgba(59,130,246,0.45); }
.card-amber { border-left: 2px solid rgba(245,158,11,0.45); }
.card-red { border-left: 2px solid rgba(239,68,68,0.45); }
.card-purple { border-left: 2px solid rgba(168,85,247,0.45); }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.card-head h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 9px; }
.card-head .ch-actions { display: flex; align-items: center; gap: 6px; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }

/* Section header (uppercase w/ icon badge) */
.section-header { display: flex; align-items: center; gap: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; color: var(--emr-text-faint); margin-bottom: 14px; }
.section-header .sh-icon { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(var(--accent-rgb),0.12); color: var(--emr-accent-soft); flex-shrink: 0; }
.section-header .sh-icon svg { width: 12px; height: 12px; }
.section-header .sh-line { flex: 1; height: 1px; background: rgba(255,255,255,0.06); }

/* ---- Grid helpers --------------------------------------------------------- */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 16px; }
.col { display: flex; flex-direction: column; gap: 16px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.vcenter { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2,1fr); } .lg-hide { display: none !important; } }
@media (max-width: 900px) { .g2,.g3 { grid-template-columns: 1fr; } }

/* ---- Metric / stat cards -------------------------------------------------- */
.metric { padding: 16px; }
.metric .m-top { display: flex; align-items: center; justify-content: space-between; }
.metric .m-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.metric .m-label { font-size: 12px; color: var(--emr-text-muted); font-weight: 500; }
.metric .m-value { font-size: 27px; font-weight: 700; letter-spacing: -0.02em; margin-top: 9px; line-height: 1; }
.metric .m-value small { font-size: 14px; color: var(--emr-text-faint); font-weight: 600; }
.metric .m-foot { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 12px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 12px; }
.delta.up { color: var(--emr-success); }
.delta.down { color: var(--emr-error); }
.delta svg { width: 13px; height: 13px; }
.m-sub { color: var(--emr-text-faint); }

.tint-teal { background: rgba(var(--accent-rgb),0.14); color: var(--emr-accent-soft); }
.tint-emerald { background: rgba(16,185,129,0.14); color: #34d399; }
.tint-blue { background: rgba(59,130,246,0.14); color: #60a5fa; }
.tint-amber { background: rgba(245,158,11,0.14); color: #fbbf24; }
.tint-red { background: rgba(239,68,68,0.14); color: #f87171; }
.tint-purple { background: rgba(168,85,247,0.14); color: #c4b5fd; }
.tint-gray { background: rgba(255,255,255,0.06); color: var(--emr-text-muted); }

/* ---- Badges --------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600; background: rgba(255,255,255,0.06); color: var(--emr-text-muted);
  white-space: nowrap; border: 1px solid transparent;
}
.badge svg { width: 12px; height: 12px; }
.badge.sq { border-radius: 6px; }
.badge.success { background: rgba(16,185,129,0.13); color: #34d399; }
.badge.danger { background: rgba(239,68,68,0.13); color: #f87171; }
.badge.warning { background: rgba(245,158,11,0.13); color: #fbbf24; }
.badge.info { background: rgba(96,165,250,0.13); color: #60a5fa; }
.badge.teal { background: rgba(var(--accent-rgb),0.14); color: var(--emr-accent-soft); }
.badge.purple { background: rgba(168,85,247,0.14); color: #c4b5fd; }
.badge.gold { background: rgba(217,119,6,0.16); color: #fbbf24; }
.badge.outline { background: transparent; border-color: rgba(255,255,255,0.14); }

/* Status dot */
.sdot { position: relative; display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sdot.green { background: #34d399; box-shadow: 0 0 7px rgba(16,185,129,0.6); }
.sdot.red { background: #f87171; box-shadow: 0 0 7px rgba(239,68,68,0.6); }
.sdot.amber { background: #fbbf24; box-shadow: 0 0 7px rgba(245,158,11,0.6); }
.sdot.blue { background: #60a5fa; box-shadow: 0 0 7px rgba(96,165,250,0.6); }
.sdot.teal { background: var(--emr-accent-soft); box-shadow: 0 0 7px var(--accent-glow); }
.sdot.gray { background: rgba(255,255,255,0.4); }
.sdot.live::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: inherit; animation: sonar 2s ease-out infinite; }
@keyframes sonar { 0% { transform: scale(1); opacity: 0.5; } 100% { transform: scale(2.6); opacity: 0; } }

/* ---- Tables --------------------------------------------------------------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl thead th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--emr-text-faint); padding: 11px 18px; background: rgba(255,255,255,0.02);
  border-bottom: 1px solid rgba(255,255,255,0.06); position: sticky; top: 0; z-index: 1;
}
.tbl tbody td { padding: 11px 18px; border-bottom: 1px solid rgba(255,255,255,0.04); }
.tbl tbody tr { border-left: 2px solid transparent; transition: background 0.12s, border-color 0.12s; }
.tbl tbody tr:hover { background: rgba(255,255,255,0.03); border-left-color: rgba(var(--accent-rgb),0.5); cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }
.t-muted { color: var(--emr-text-muted); }
.t-faint { color: var(--emr-text-faint); }
.t-mono { font-family: 'JetBrains Mono', monospace; }
.t-right { text-align: right; }
.t-center { text-align: center; }

/* ---- Chips / pills row ---------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; font-size: 12px;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); color: var(--emr-text-muted);
}
.chip.active, .chip:hover { color: #fff; border-color: rgba(var(--accent-rgb),0.4); background: rgba(var(--accent-rgb),0.1); cursor: pointer; }

/* ---- Tabs ----------------------------------------------------------------- */
.tabs { display: flex; gap: 3px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.tab {
  position: relative; padding: 10px 15px; font-size: 13px; font-weight: 600; color: var(--emr-text-muted);
  background: transparent; border: 0; transition: color 0.15s;
}
.tab:hover { color: var(--emr-text); }
.tab.active { color: #fff; }
.tab.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px 2px 0 0; background: var(--emr-accent-soft); box-shadow: 0 0 8px var(--accent-glow); }
.tab .tcount { margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,0.08); color: var(--emr-text-muted); }

/* ---- Progress / meters ---------------------------------------------------- */
.meter { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.07); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--emr-accent), var(--emr-accent-soft)); animation: grow 0.9s cubic-bezier(0.16,1,0.3,1); }
.meter.emerald > i { background: linear-gradient(90deg, #059669, #34d399); }
.meter.amber > i { background: linear-gradient(90deg, #d97706, #fbbf24); }
.meter.red > i { background: linear-gradient(90deg, #dc2626, #f87171); }
.meter.blue > i { background: linear-gradient(90deg, #2563eb, #60a5fa); }
@keyframes grow { from { width: 0 !important; } }

/* Ring gauge */
.ring { transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255,255,255,0.07); }
.ring-val { fill: none; stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(0.16,1,0.3,1); }

/* ---- List rows ------------------------------------------------------------ */
.lrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.lrow:last-child { border-bottom: none; }
.lrow .l-main { min-width: 0; flex: 1; }
.lrow .l-title { font-size: 13.5px; font-weight: 600; }
.lrow .l-sub { font-size: 12px; color: var(--emr-text-faint); margin-top: 2px; }

/* ---- Timeline (schedule / day) ------------------------------------------- */
.tl-item { position: relative; display: flex; gap: 14px; padding: 0 0 4px 0; }
.tl-time { width: 62px; flex-shrink: 0; text-align: right; font-size: 12px; color: var(--emr-text-faint); font-family: 'JetBrains Mono', monospace; padding-top: 12px; }
.tl-rail { position: relative; width: 14px; flex-shrink: 0; display: flex; justify-content: center; }
.tl-rail::before { content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,0.07); }
.tl-node { position: relative; z-index: 1; width: 11px; height: 11px; border-radius: 50%; margin-top: 15px; background: var(--emr-bg); border: 2px solid var(--emr-text-faint); }
.tl-node.teal { border-color: var(--emr-accent-soft); box-shadow: 0 0 8px var(--accent-glow); }
.tl-node.amber { border-color: var(--emr-warning); }
.tl-node.green { border-color: var(--emr-success); background: var(--emr-success); }
.tl-card { flex: 1; margin-bottom: 10px; }

/* ---- Patient banner ------------------------------------------------------- */
.pbanner {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.pbanner::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(700px circle at 0% -30%, rgba(var(--accent-rgb),0.10), transparent 60%); }
.pbanner-top { position: relative; display: flex; align-items: center; gap: 18px; padding: 16px 20px; }
.pbanner-id { display: flex; flex-direction: column; min-width: 0; }
.pbanner-name { font-size: 21px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; }
.pbanner-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 6px; font-size: 12.5px; color: var(--emr-text-muted); }
.pbanner-meta b { color: var(--emr-text); font-weight: 600; }
.pbanner-flags { display: flex; flex-wrap: wrap; gap: 7px; margin-left: auto; align-items: center; }
.pbanner-strip { display: flex; flex-wrap: wrap; gap: 0; border-top: 1px solid rgba(255,255,255,0.07); }
.pbanner-stat { flex: 1; min-width: 120px; padding: 10px 18px; border-right: 1px solid rgba(255,255,255,0.05); }
.pbanner-stat:last-child { border-right: none; }
.pbanner-stat .ps-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--emr-text-faint); }
.pbanner-stat .ps-val { font-size: 14px; font-weight: 600; margin-top: 3px; display: flex; align-items: center; gap: 6px; }

.alert-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(239,68,68,0.14); color: #fca5a5; border: 1px solid rgba(239,68,68,0.3); }
.alert-pill svg { width: 14px; height: 14px; }

/* ---- Chart-rail (left side of patient chart) ------------------------------ */
.crail-card .ch-list { display: flex; flex-direction: column; }
.ch-li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; }
.ch-li:last-child { border-bottom: none; }
.ch-li .ch-dot { margin-top: 5px; }
.ch-li .ch-main { flex: 1; min-width: 0; }
.ch-li .ch-t { font-weight: 600; }
.ch-li .ch-s { font-size: 11.5px; color: var(--emr-text-faint); margin-top: 1px; }

/* ---- Vitals tiles --------------------------------------------------------- */
.vit { padding: 12px 14px; border-radius: 11px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07); }
.vit .v-label { font-size: 11px; color: var(--emr-text-faint); text-transform: uppercase; letter-spacing: 0.06em; }
.vit .v-val { font-size: 21px; font-weight: 700; margin-top: 4px; letter-spacing: -0.01em; }
.vit .v-val small { font-size: 12px; color: var(--emr-text-faint); font-weight: 600; }
.vit .v-trend { margin-top: 6px; }

/* ---- SOAP note ------------------------------------------------------------ */
.note-block { border-radius: 11px; border: 1px solid rgba(255,255,255,0.07); background: rgba(255,255,255,0.02); overflow: hidden; margin-bottom: 12px; }
.note-block .nb-head { display: flex; align-items: center; gap: 9px; padding: 9px 14px; background: rgba(255,255,255,0.025); border-bottom: 1px solid rgba(255,255,255,0.05); }
.note-block .nb-head .nb-letter { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.note-block .nb-head h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--emr-text-muted); }
.note-block .nb-body { padding: 13px 15px; font-size: 13.5px; line-height: 1.65; color: rgba(255,255,255,0.82); }
.note-block .nb-body p + p { margin-top: 9px; }
.note-block .nb-body .ph { color: var(--emr-text-faint); }
.note-block .nb-body b { color: #fff; }

/* ---- Telehealth ----------------------------------------------------------- */
.tele-stage { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #06080c; border: 1px solid rgba(255,255,255,0.09); min-height: 460px; display: grid; place-items: center; }
.tele-stage .tele-bg { position: absolute; inset: 0; background:
   radial-gradient(60% 70% at 50% 40%, rgba(168,85,247,0.14), transparent 70%),
   linear-gradient(160deg, #150a23, #08060d); }
.tele-remote { position: relative; z-index: 1; text-align: center; }
.tele-self { position: absolute; bottom: 16px; right: 16px; z-index: 3; width: 180px; height: 116px; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.15); background: linear-gradient(160deg,#241338,#0e0a16); display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }
.tele-badge { position: absolute; top: 14px; left: 14px; z-index: 3; }
.tele-net { position: absolute; top: 14px; right: 14px; z-index: 3; }
.tele-bar { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px; }
.tele-ctrl { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.06); color: #fff; transition: all 0.15s; }
.tele-ctrl:hover { background: rgba(255,255,255,0.12); }
.tele-ctrl.end { background: var(--emr-error-soft); border-color: transparent; }
.tele-ctrl.end:hover { background: #dc2626; }
.tele-ctrl.active { background: rgba(var(--accent-rgb),0.2); border-color: rgba(var(--accent-rgb),0.5); color: var(--emr-accent-soft); }

/* ---- Misc ----------------------------------------------------------------- */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.05); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--emr-text-faint); }
.kv .v { font-weight: 600; text-align: right; }
.divider { height: 1px; background: rgba(255,255,255,0.06); margin: 14px 0; border: 0; }
.hint { font-size: 12px; color: var(--emr-text-faint); }
.dot-sep { color: var(--emr-text-faint); margin: 0 6px; }
.pill-tab { padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--emr-text-muted); background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.pill-tab.active { color: #fff; background: rgba(var(--accent-rgb),0.14); border-color: rgba(var(--accent-rgb),0.4); }

/* mini bar chart */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 56px; }
.bars > i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(to top, rgba(var(--accent-rgb),0.5), rgba(var(--accent-rgb),0.85)); animation: barup 0.8s cubic-bezier(0.16,1,0.3,1) backwards; }
@keyframes barup { from { height: 0 !important; } }

/* toast */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 9000; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 11px; font-size: 13px; font-weight: 500;
  background: rgba(16,20,28,0.96); border: 1px solid rgba(255,255,255,0.12); color: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5); backdrop-filter: blur(12px);
  border-left: 3px solid var(--emr-accent-soft); animation: toastin 0.25s cubic-bezier(0.16,1,0.3,1);
}
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

/* command palette */
.cmdk-overlay { position: fixed; inset: 0; z-index: 8000; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.cmdk-overlay.open { display: flex; animation: fade 0.15s; }
@keyframes fade { from { opacity: 0; } }
.cmdk { width: min(620px, 92vw); border-radius: 14px; overflow: hidden; background: rgba(13,16,22,0.98); border: 1px solid rgba(255,255,255,0.12); box-shadow: 0 24px 70px rgba(0,0,0,0.6); }
.cmdk-input { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.cmdk-input input { flex: 1; background: transparent; border: 0; outline: 0; color: #fff; font-size: 15px; font-family: inherit; }
.cmdk-list { max-height: 50vh; overflow-y: auto; padding: 8px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px; color: var(--emr-text-muted); }
.cmdk-item:hover, .cmdk-item.sel { background: rgba(var(--accent-rgb),0.12); color: #fff; }
.cmdk-item .ci-icon { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,0.05); flex-shrink: 0; }
.cmdk-item .ci-meta small { display: block; font-size: 11.5px; color: var(--emr-text-faint); }
.cmdk-sec { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--emr-text-faint); padding: 10px 12px 4px; font-weight: 700; }

/* responsive: hide rails on small screens via utility */
.scroll-area { overflow-y: auto; }
.nowrap { white-space: nowrap; }
.fade-in { animation: fadeUp 0.4s cubic-bezier(0.16,1,0.3,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } }
.stagger > * { animation: fadeUp 0.45s cubic-bezier(0.16,1,0.3,1) backwards; }
.stagger > *:nth-child(1){animation-delay:.02s}.stagger > *:nth-child(2){animation-delay:.06s}
.stagger > *:nth-child(3){animation-delay:.10s}.stagger > *:nth-child(4){animation-delay:.14s}
.stagger > *:nth-child(5){animation-delay:.18s}.stagger > *:nth-child(6){animation-delay:.22s}

/* small helpers */
.mt0{margin-top:0}.mt8{margin-top:8px}.mt12{margin-top:12px}.mt16{margin-top:16px}.mt20{margin-top:20px}.mt24{margin-top:24px}
.mb0{margin-bottom:0}.mb8{margin-bottom:8px}.mb12{margin-bottom:12px}.mb16{margin-bottom:16px}
.gap6{gap:6px}.gap8{gap:8px}.gap10{gap:10px}.gap12{gap:12px}.gap16{gap:16px}.gap20{gap:20px}
.fz11{font-size:11px}.fz12{font-size:12px}.fz13{font-size:13px}.fz15{font-size:15px}.fz18{font-size:18px}
.fw6{font-weight:600}.fw7{font-weight:700}
.flex1{flex:1}.minw0{min-width:0}.w100{width:100%}
.txt-teal{color:var(--emr-accent-soft)}.txt-red{color:var(--emr-error)}.txt-amber{color:var(--emr-warning)}
.txt-green{color:var(--emr-success)}.txt-blue{color:var(--emr-info)}.txt-muted{color:var(--emr-text-muted)}.txt-faint{color:var(--emr-text-faint)}
.uppercase{text-transform:uppercase;letter-spacing:0.08em}

/* ============================================================================
   LANDING PAGE — flashy velvet marketing front door
   ============================================================================ */
.lp-scroll { flex: 1; height: 100vh; overflow-y: auto; overflow-x: hidden; width: 100%; }
.lp { position: relative; }
.lp-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.lp-bg::before { content: ''; position: absolute; width: 900px; height: 900px; left: -200px; top: -300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(168,85,247,0.25), transparent 60%); filter: blur(40px); animation: float1 18s ease-in-out infinite; }
.lp-bg::after { content: ''; position: absolute; width: 760px; height: 760px; right: -200px; top: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,72,153,0.18), transparent 60%); filter: blur(40px); animation: float2 22s ease-in-out infinite; }
@keyframes float1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(60px,40px)} }
@keyframes float2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-50px,30px)} }
.lp-grid-overlay { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%); }
.lp > * { position: relative; z-index: 1; }

/* Nav */
.lp-nav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 22px; padding: 14px 32px;
  background: rgba(14,10,22,0.72); backdrop-filter: blur(16px) saturate(160%); border-bottom: 1px solid rgba(255,255,255,0.07); }
.lp-brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.lp-brand .lp-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #a855f7, #ec4899); box-shadow: 0 0 18px rgba(168,85,247,0.5); }
.lp-brand small { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-magenta); margin-top: 1px; }
.lp-nav-links { display: flex; gap: 4px; margin-left: 14px; }
.lp-nav-links a { padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: rgba(255,255,255,0.62); transition: all 0.15s; }
.lp-nav-links a:hover { color: #fff; background: rgba(255,255,255,0.06); }
.lp-nav .spacer { flex: 1; }

/* Buttons (landing) */
.lpbtn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 22px; border-radius: 12px; font-size: 14.5px; font-weight: 700;
  border: 1px solid rgba(255,255,255,0.12); background: rgba(255,255,255,0.05); color: #fff; transition: all 0.18s ease; white-space: nowrap; }
.lpbtn svg { width: 18px; height: 18px; }
.lpbtn:hover { transform: translateY(-2px); background: rgba(255,255,255,0.09); border-color: rgba(255,255,255,0.2); }
.lpbtn.grad { border: 0; background: linear-gradient(135deg, #a855f7, #ec4899); box-shadow: 0 8px 30px rgba(168,85,247,0.4), inset 0 1px 0 rgba(255,255,255,0.25); }
.lpbtn.grad:hover { box-shadow: 0 12px 40px rgba(168,85,247,0.55), inset 0 1px 0 rgba(255,255,255,0.3); }
.lpbtn.sm { padding: 9px 16px; font-size: 13px; }
.lpbtn.lg { padding: 15px 28px; font-size: 15.5px; }

/* Hero */
.lp-hero { text-align: center; padding: 78px 24px 40px; max-width: 1000px; margin: 0 auto; }
.lp-eyebrow { display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px; border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.3); color: #e9d5ff; margin-bottom: 26px; }
.lp-eyebrow .sdot { width: 7px; height: 7px; }
.lp-hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; margin-bottom: 22px; }
.lp-hero h1 .grad-text { background: linear-gradient(110deg, #c084fc 10%, #f0abfc 40%, #f9a8d4 70%, #c084fc 95%); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: shine 6s linear infinite; }
@keyframes shine { to { background-position: 200% center; } }
.lp-hero p.lead { font-size: clamp(16px, 2vw, 20px); color: rgba(255,255,255,0.7); max-width: 680px; margin: 0 auto 32px; line-height: 1.55; }
.lp-hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.lp-hero-note { margin-top: 18px; font-size: 12.5px; color: var(--emr-text-faint); display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.lp-hero-note span { display: inline-flex; align-items: center; gap: 6px; }

/* Hero device cluster */
.lp-hero-art { margin: 50px auto 0; max-width: 1080px; position: relative; }

/* Trust badges band */
.lp-trust { max-width: 1100px; margin: 56px auto 0; padding: 22px 28px; border-radius: 18px;
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); }
.lp-trust-label { text-align: center; font-size: 11px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--emr-text-faint); font-weight: 700; margin-bottom: 16px; }
.lp-trust-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.lp-trust-chip { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 700;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); }
.lp-trust-chip svg { width: 17px; height: 17px; }

/* Sections */
.lp-section { max-width: 1180px; margin: 0 auto; padding: 84px 28px; }
.lp-section.tight { padding-top: 40px; }
.lp-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.lp-kicker { display: inline-block; font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--accent-magenta); margin-bottom: 14px; }
.lp-h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.02em; font-weight: 800; margin-bottom: 16px; }
.lp-h2 em { font-style: normal; background: linear-gradient(110deg, #c084fc, #f9a8d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lp-sub { font-size: 16.5px; color: rgba(255,255,255,0.65); line-height: 1.6; }

/* Feature cards */
.lp-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lp-feat { position: relative; padding: 24px; border-radius: 18px; border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035); overflow: hidden; transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease; }
.lp-feat::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 0.25s;
  background: radial-gradient(420px circle at var(--mx,50%) var(--my,0%), rgba(168,85,247,0.10), transparent 60%); }
.lp-feat:hover { transform: translateY(-4px); border-color: rgba(168,85,247,0.32); background: rgba(255,255,255,0.05); }
.lp-feat:hover::after { opacity: 1; }
.lp-feat-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 16px; color: #fff;
  background: linear-gradient(135deg, rgba(168,85,247,0.9), rgba(236,72,153,0.7)); box-shadow: 0 6px 18px rgba(168,85,247,0.3); }
.lp-feat-icon svg { width: 22px; height: 22px; }
.lp-feat h3 { font-size: 16.5px; font-weight: 700; margin-bottom: 7px; }
.lp-feat p { font-size: 13.5px; color: rgba(255,255,255,0.6); line-height: 1.55; }

/* Device showcase */
.lp-devices { position: relative; }
.device-stage { display: flex; align-items: flex-end; justify-content: center; gap: 0; min-height: 380px; margin-top: 20px; flex-wrap: wrap; }
.dev-caption { text-align: center; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: rgba(255,255,255,0.55); }
.dev-caption b { color: #fff; }

/* mini UI (shared) */
.mini { width: 100%; height: 100%; background: #0e0a16; display: flex; overflow: hidden; }
.mini-sb { background: rgba(0,0,0,0.35); border-right: 1px solid rgba(255,255,255,0.06); padding: 8px 6px; display: flex; flex-direction: column; gap: 7px; }
.mini-sb i { display: block; height: 7px; border-radius: 3px; background: rgba(255,255,255,0.12); }
.mini-sb i.on { background: linear-gradient(90deg, #a855f7, #ec4899); box-shadow: 0 0 8px rgba(168,85,247,0.6); }
.mini-main { flex: 1; padding: 9px; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.mini-bar { height: 9px; border-radius: 4px; background: rgba(255,255,255,0.08); }
.mini-bar.w40 { width: 40%; } .mini-bar.w60 { width: 60%; } .mini-bar.grad { background: linear-gradient(90deg, rgba(168,85,247,0.7), rgba(236,72,153,0.5)); }
.mini-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.mini-card { height: 34px; border-radius: 7px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.06); padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.mini-card i { height: 5px; border-radius: 3px; background: rgba(255,255,255,0.14); }
.mini-card i.b { width: 60%; background: var(--accent-soft, #c084fc); }
.mini-chart { flex: 1; min-height: 40px; border-radius: 8px; background: rgba(168,85,247,0.06); border: 1px solid rgba(255,255,255,0.06); position: relative; overflow: hidden; }
.mini-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* Laptop */
.laptop { width: 540px; max-width: 92vw; z-index: 1; }
.laptop-screen { position: relative; border: 10px solid #1a1326; border-bottom: 0; border-radius: 16px 16px 0 0; background: #1a1326;
  box-shadow: 0 30px 70px rgba(0,0,0,0.5), 0 0 0 1px rgba(168,85,247,0.18), 0 0 60px rgba(168,85,247,0.12); }
.laptop-screen .mini { aspect-ratio: 16/10; border-radius: 7px; }
.laptop-base { height: 14px; background: linear-gradient(180deg, #221a32, #140e1f); border-radius: 0 0 14px 14px; position: relative;
  box-shadow: 0 14px 24px rgba(0,0,0,0.5); width: 116%; margin-left: -8%; }
.laptop-base::after { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 80px; height: 5px; border-radius: 0 0 7px 7px; background: rgba(0,0,0,0.4); }

/* Tablet */
.tablet { width: 224px; margin: 0 -34px 24px; z-index: 2; }
.tablet-body { border: 11px solid #1a1326; border-radius: 26px; background: #1a1326; position: relative;
  box-shadow: 0 26px 50px rgba(0,0,0,0.5), 0 0 0 1px rgba(236,72,153,0.18), 0 0 50px rgba(236,72,153,0.10); }
.tablet-body .mini { aspect-ratio: 3/4; border-radius: 12px; }
.tablet-body::before { content: ''; position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,0.18); z-index: 3; }

/* Phone */
.phone { width: 150px; margin: 0 -28px 12px; z-index: 3; }
.phone-body { border: 9px solid #1a1326; border-radius: 30px; background: #1a1326; position: relative;
  box-shadow: 0 22px 44px rgba(0,0,0,0.55), 0 0 0 1px rgba(168,85,247,0.22), 0 0 44px rgba(168,85,247,0.12); }
.phone-body .mini { aspect-ratio: 9/19.5; border-radius: 21px; flex-direction: column; }
.phone-body::before { content: ''; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 46px; height: 14px; border-radius: 0 0 10px 10px; background: #1a1326; z-index: 4; }
.phone .mini-top { height: 26px; background: rgba(0,0,0,0.3); border-bottom: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.phone .mini-pmain { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 7px; }
.phone .mini-prow { height: 30px; border-radius: 8px; background: rgba(255,255,255,0.045); border: 1px solid rgba(255,255,255,0.06); }
.phone .mini-prow.grad { background: linear-gradient(120deg, rgba(168,85,247,0.25), rgba(236,72,153,0.12)); border-color: rgba(168,85,247,0.3); }
.phone .mini-nav { height: 30px; background: rgba(0,0,0,0.35); border-top: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: space-around; padding: 0 10px; flex-shrink: 0; }
.phone .mini-nav i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.18); }
.phone .mini-nav i.on { background: #c084fc; box-shadow: 0 0 7px rgba(168,85,247,0.7); }

/* Integrations */
.lp-int-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.lp-int { display: flex; align-items: center; gap: 13px; padding: 16px 18px; border-radius: 14px;
  background: rgba(255,255,255,0.035); border: 1px solid rgba(255,255,255,0.08); transition: all 0.18s ease; }
.lp-int:hover { transform: translateY(-3px); border-color: rgba(168,85,247,0.3); background: rgba(255,255,255,0.05); }
.lp-int-ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(168,85,247,0.14); color: #d8b4fe; }
.lp-int-ic svg { width: 20px; height: 20px; }
.lp-int b { font-size: 14px; display: block; }
.lp-int span { font-size: 12px; color: var(--emr-text-faint); }

/* Security / HIPAA */
.lp-sec { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; align-items: center; }
.lp-sec-list { display: flex; flex-direction: column; gap: 14px; margin-top: 24px; }
.lp-sec-item { display: flex; gap: 13px; }
.lp-sec-item .ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0;
  background: rgba(52,211,153,0.14); color: #34d399; }
.lp-sec-item .ic svg { width: 18px; height: 18px; }
.lp-sec-item b { font-size: 15px; }
.lp-sec-item p { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 2px; line-height: 1.5; }
.lp-shield { position: relative; display: grid; place-items: center; padding: 30px; }
.lp-shield-glow { position: absolute; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(circle, rgba(168,85,247,0.3), transparent 65%); filter: blur(20px); }
.lp-shield-badge { position: relative; width: 200px; height: 200px; border-radius: 36px; display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(168,85,247,0.22), rgba(236,72,153,0.14)); border: 1px solid rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 20px 50px rgba(0,0,0,0.4); }
.lp-shield-badge svg { width: 92px; height: 92px; color: #e9d5ff; filter: drop-shadow(0 4px 14px rgba(168,85,247,0.5)); }
.lp-shield-ring { position: absolute; inset: 8px; border-radius: 30px; border: 1px dashed rgba(255,255,255,0.16); animation: spin 28s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.lp-sec-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; justify-content: center; }

/* Stats band */
.lp-stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; max-width: 1000px; margin: 0 auto; }
.lp-stat { text-align: center; }
.lp-stat .n { font-size: clamp(30px, 4vw, 44px); font-weight: 800; letter-spacing: -0.02em;
  background: linear-gradient(120deg, #c084fc, #f9a8d4); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.lp-stat .l { font-size: 13px; color: rgba(255,255,255,0.6); margin-top: 4px; }

/* CTA */
.lp-cta { max-width: 1080px; margin: 40px auto 0; padding: 60px 40px; border-radius: 28px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(168,85,247,0.18), rgba(236,72,153,0.12)); border: 1px solid rgba(255,255,255,0.12); }
.lp-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(600px circle at 50% -20%, rgba(192,132,252,0.25), transparent 60%); pointer-events: none; }
.lp-cta h2 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.lp-cta p { font-size: 16px; color: rgba(255,255,255,0.72); max-width: 560px; margin: 0 auto 28px; }

/* Footer */
.lp-foot { border-top: 1px solid rgba(255,255,255,0.07); margin-top: 70px; padding: 36px 32px; }
.lp-foot-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.lp-foot .spacer { flex: 1; }
.lp-foot-tag { font-size: 13px; color: var(--emr-text-faint); font-style: italic; }
.lp-demo-banner { text-align: center; font-size: 12px; color: var(--emr-text-faint); padding: 14px; }

@media (max-width: 980px) {
  .lp-feature-grid { grid-template-columns: repeat(2,1fr); }
  .lp-int-grid { grid-template-columns: repeat(2,1fr); }
  .lp-sec { grid-template-columns: 1fr; gap: 28px; }
  .lp-stats { grid-template-columns: repeat(2,1fr); gap: 28px; }
  .lp-nav-links { display: none; }
  .tablet, .phone { display: none; }
  .laptop { width: 100%; }
}
@media (max-width: 560px) {
  .lp-feature-grid, .lp-int-grid { grid-template-columns: 1fr; }
  .lp-section { padding: 56px 20px; }
  .lp-hero { padding-top: 52px; }
  .lp-nav { padding: 12px 15px; gap: 10px; }
  .lp-nav .lpbtn:not(.grad) { display: none; }
  .lp-brand small { display: none; }
  .lp-trust, .lp-cta { border-radius: 16px; }
}

/* ============================================================================
   RESPONSIVE — stack rails, collapse sidebar, scroll wide tables.
   This is a desktop-first clinical app; these rules keep it from ever breaking.
   ============================================================================ */
@media (max-width: 1180px) {
  .row { flex-direction: column; align-items: stretch !important; }
  .row > * { width: 100% !important; flex-shrink: 1 !important; }
  .page { padding: 20px 18px 52px; }
}
@media (max-width: 1080px) {
  .card:has(.tbl) { overflow-x: auto; }
  .tbl { min-width: 660px; }
}
@media (max-width: 860px) {
  .sidebar { width: var(--sidebar-w-collapsed); }
  .sidebar .sb-brand-text, .sidebar .portal-switch-meta, .sidebar .portal-switch-btn .chev,
  .sidebar .sb-section-label, .sidebar .nav-item > span, .sidebar .nav-item .ni-badge,
  .sidebar .sb-foot-meta { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 9px 0; }
  .sidebar .sb-header { justify-content: center; padding: 12px 0; }
  .sidebar .sb-header .icon-btn { display: none; }
  .sidebar .portal-switch-btn { justify-content: center; padding: 8px 0; }
  .sidebar .sb-foot { justify-content: center; }
  .tb-chip { display: none; }
  .tb-search { width: auto; max-width: none; flex: 1; }
  .page-head { gap: 12px; }
  .page-title { font-size: 19px; }
}
@media (max-width: 560px) {
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
  .pbanner-top { flex-wrap: wrap; }
  .pbanner-flags { margin-left: 0; }
  .page-actions { flex-wrap: wrap; }
}

/* ---- Topbar dropdowns (notifications / avatar) ---------------------------- */
.tb-pop-wrap { position: relative; }
.tb-pop {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 200; width: 344px;
  padding: 12px; border-radius: 14px; background: rgba(16,12,24,0.98);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 18px 50px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(24px) saturate(160%);
  opacity: 0; transform: translateY(-6px) scale(0.98); pointer-events: none;
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.tb-pop.open { opacity: 1; transform: none; pointer-events: auto; }
.tb-pop-sm { width: 248px; }
.tb-pop-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; color: var(--emr-text-muted); padding: 4px 6px 10px; }
.tb-pop-item { display: flex; align-items: center; gap: 11px; padding: 9px 8px; border-radius: 10px; transition: background 0.12s; cursor: pointer; }
.tb-pop-item:hover { background: rgba(255,255,255,0.05); }
.tb-pop-user { display: flex; align-items: center; gap: 11px; padding: 6px; }
.tb-menu-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: var(--emr-text-muted); cursor: pointer; transition: all 0.12s; }
.tb-menu-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.tb-menu-item.danger { color: #f87171; }
.tb-menu-item.danger:hover { background: rgba(239,68,68,0.1); }
.tb-menu-item svg { color: var(--emr-text-faint); }
.tb-menu-item:hover svg { color: inherit; }

/* ---- Clickable affordances ------------------------------------------------ */
.metric.clickable { cursor: pointer; }
.metric .m-go { color: var(--emr-text-faint); opacity: 0; transform: translate(-3px,3px); transition: opacity 0.18s, transform 0.18s; }
.metric.clickable:hover .m-go { opacity: 1; transform: none; color: var(--emr-accent-soft); }
.lp-feat-go { display: inline-flex; align-items: center; gap: 5px; margin-top: 13px; font-size: 12.5px; font-weight: 700; color: var(--emr-accent-soft); opacity: 0; transform: translateY(4px); transition: opacity 0.2s, transform 0.2s; }
.lp-feat:hover .lp-feat-go { opacity: 1; transform: none; }
.count { font-variant-numeric: tabular-nums; }

/* ---- EHR upgrade tier ----------------------------------------------------- */
.tb-edition {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; color: #fff; cursor: pointer; white-space: nowrap;
  background: linear-gradient(135deg, #a855f7, #ec4899); border: 0;
  box-shadow: 0 4px 14px rgba(168,85,247,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.15s, box-shadow 0.15s;
}
.tb-edition:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(168,85,247,0.5); }
.tb-edition svg { width: 14px; height: 14px; }
.tb-edition.on { background: rgba(168,85,247,0.14); color: var(--emr-accent-soft); border: 1px solid rgba(168,85,247,0.4); box-shadow: none; }

.sb-section-label { display: flex; align-items: center; justify-content: space-between; }
.ehr-tag { font-size: 8.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 1px 6px; border-radius: 5px;
  background: linear-gradient(135deg, rgba(168,85,247,0.95), rgba(236,72,153,0.75)); color: #fff; }
.ehr-tag.on { background: rgba(168,85,247,0.18); color: var(--emr-accent-soft); }
.ni-lock { margin-left: auto; color: var(--emr-text-faint); display: inline-flex; }

.upgrade-hero { position: relative; overflow: hidden; }
.upgrade-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px circle at 85% -20%, rgba(236,72,153,0.16), transparent 60%), radial-gradient(500px circle at 8% 130%, rgba(168,85,247,0.16), transparent 60%); }
.edition-card { position: relative; padding: 22px; border-radius: 16px; border: 1px solid rgba(255,255,255,0.09); background: rgba(255,255,255,0.03); }
.edition-card.accent { border-color: rgba(168,85,247,0.4); background: linear-gradient(160deg, rgba(168,85,247,0.08), rgba(236,72,153,0.04));
  box-shadow: 0 12px 40px rgba(168,85,247,0.12), inset 0 1px 0 rgba(255,255,255,0.06); }
.edition-badge { position: absolute; top: -11px; right: 18px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(135deg, #a855f7, #ec4899); box-shadow: 0 4px 14px rgba(168,85,247,0.4); }
.edition-badge svg { width: 12px; height: 12px; }
.lp-editions { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; max-width: 900px; margin: 0 auto; }
@media (max-width: 760px) { .lp-editions { grid-template-columns: 1fr; } }

/* ---- Proposal landing ----------------------------------------------------- */
.pr-emr-card { position: relative; overflow: hidden; padding: 38px; border-radius: 26px; border: 1px solid var(--emr-border-accent); background: var(--emr-surface); }
.pr-emr-glow { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px circle at 90% 0%, rgba(255,93,158,0.14), transparent 55%), radial-gradient(520px circle at 0% 120%, rgba(176,107,255,0.16), transparent 55%); }
.pr-emr-card > .row { position: relative; }
.pr-timeline { display: flex; flex-direction: column; gap: 14px; max-width: 920px; margin: 0 auto; }
.pr-phase { display: flex; gap: 22px; align-items: flex-start; padding: 22px 24px; border-radius: 20px; border: 1px solid var(--emr-border); background: var(--emr-surface);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.pr-phase:hover { border-color: var(--emr-border-accent); transform: translateX(5px); box-shadow: 0 16px 40px -24px rgba(176,107,255,0.5); }
.pr-phase-n { font-family: var(--font-display); font-size: 32px; font-weight: 600; line-height: 1; width: 58px; flex-shrink: 0;
  background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pr-phase-body { flex: 1; min-width: 0; }
@media (max-width: 760px) { .pr-emr-card { padding: 24px; } .pr-phase { gap: 14px; padding: 18px; } }
