/* OmniHealth clinical theme — navy + teal, IBM Plex. Loaded on every signed-in page. */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --oh-navy: #0B2545; --oh-navy-2: #13315C; --oh-navy-3: #1F4476;
  --oh-teal: #0E7C7B; --oh-teal-d: #0B5E5D; --oh-teal-l: #E6F4F3;
  --oh-bg: #F3F5F7; --oh-surface: #FFFFFF; --oh-border: #D9E0E7; --oh-text: #0F1B2D; --oh-muted: #4A5A6A;
  --oh-red: #B42318; --oh-red-l: #FEF3F2; --oh-amber: #93370D; --oh-amber-l: #FFFAEB; --oh-green: #067647; --oh-green-l: #ECFDF3;
  --oh-side: 232px;
  /* legacy page variables, re-pointed to the clinical palette */
  --pu: #0E7C7B; --pk: #0E7C7B; --bl: #175CD3; --pl: #E6F4F3; --pb: #B7E0DD;
  --grad: #0E7C7B; --tx: #0F1B2D; --mu: #4A5A6A; --ht: #7B8794; --bd: #D9E0E7; --gr: #F3F5F7; --wh: #FFFFFF;
  --gn: #067647; --gl: #ECFDF3; --gb: #ABEFC6; --am: #B54708; --al: #FFFAEB; --rd: #B42318; --rl: #FEF3F2;
}

html body, html body *:not(i):not(.ti):not(svg):not(path) { font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; }
html body { background: var(--oh-bg); color: var(--oh-text); }
code, kbd, .oh-mono { font-family: 'IBM Plex Mono', ui-monospace, Menlo, monospace !important; }

/* shell */
body.oh-shell { padding-left: var(--oh-side); box-sizing: border-box; }
body.oh-shell .topbar .logo, body.oh-shell .back-btn, body.oh-shell #theme-toggle { display: none !important; }
body.oh-shell .topbar { background: #fff; box-shadow: none; border-bottom: 1px solid var(--oh-border); }
body.oh-shell .practice-pill { background: var(--oh-teal-l); color: var(--oh-teal-d); }
#oh-side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--oh-side); background: var(--oh-navy); color: #C9D6E3; z-index: 800; display: flex; flex-direction: column; padding: 18px 12px; box-sizing: border-box; gap: 2px; overflow-y: auto; }
#oh-side .oh-brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 16px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.01em; text-decoration: none; }
#oh-side .oh-brand i { width: 30px; height: 30px; border-radius: 8px; background: var(--oh-teal); display: flex; align-items: center; justify-content: center; flex: none; }
#oh-side .oh-prac { background: var(--oh-navy-2); border: 1px solid var(--oh-navy-3); border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; }
#oh-side .oh-prac small { display: block; font-size: 10.5px; color: #9FB3C8; text-transform: uppercase; letter-spacing: .06em; }
#oh-side .oh-prac b { display: block; font-size: 13.5px; color: #fff; font-weight: 600; line-height: 1.3; }
#oh-side .oh-search { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; border-radius: 8px; border: 1px solid var(--oh-navy-3); background: transparent; color: #C9D6E3; padding: 0 10px; font-size: 13px; cursor: pointer; margin-bottom: 10px; text-align: left; }
#oh-side .oh-search:hover { background: var(--oh-navy-2); }
#oh-side .oh-search kbd { margin-left: auto; font-size: 10.5px; border: 1px solid var(--oh-navy-3); border-radius: 4px; padding: 1px 5px; color: #9FB3C8; }
#oh-side a.oh-nav { font-weight: 400; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #C9D6E3; font-size: 14px; text-decoration: none; line-height: 1.2; }
#oh-side a.oh-nav:hover { background: var(--oh-navy-2); color: #fff; }
#oh-side a.oh-nav.on { background: var(--oh-navy-2); color: #fff; font-weight: 600; box-shadow: inset 3px 0 0 var(--oh-teal); }
#oh-side a.oh-nav svg { flex: none; }
#oh-side a.oh-nav .oh-count { margin-left: auto; font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; background: var(--oh-teal); color: #fff; border-radius: 6px; padding: 1px 7px; }
#oh-side .oh-sep { height: 1px; background: var(--oh-navy-3); margin: 8px 6px; }
#oh-side .oh-me { margin-top: auto; border-top: 1px solid var(--oh-navy-3); padding: 12px 6px 0; display: flex; flex-direction: column; gap: 8px; }
#oh-side .oh-me-row { display: flex; align-items: center; gap: 10px; }
#oh-side .oh-av { width: 34px; height: 34px; border-radius: 50%; background: var(--oh-teal-l); color: var(--oh-teal-d); font-weight: 700; font-size: 12.5px; display: flex; align-items: center; justify-content: center; flex: none; }
#oh-side .oh-me b { display: block; color: #fff; font-size: 13px; font-weight: 600; }
#oh-side .oh-me small { display: block; color: #9FB3C8; font-size: 12px; }
#oh-side .oh-lockline { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9FB3C8; }
#oh-side .oh-lockline button { margin-left: auto; background: none; border: 1px solid var(--oh-navy-3); color: #C9D6E3; border-radius: 6px; font-size: 11.5px; padding: 3px 8px; cursor: pointer; }
#oh-side .oh-lockline button:hover { background: var(--oh-navy-2); }
@media (max-width: 1100px) {
  :root { --oh-side: 64px; }
  #oh-side { padding: 14px 8px; }
  #oh-side .oh-brand span, #oh-side .oh-prac, #oh-side .oh-search span, #oh-side .oh-search kbd, #oh-side a.oh-nav span, #oh-side .oh-me b, #oh-side .oh-me small, #oh-side .oh-lockline span, #oh-side a.oh-nav .oh-count { display: none; }
  #oh-side .oh-search, #oh-side a.oh-nav { justify-content: center; padding: 9px 0; }
  #oh-side .oh-lockline { justify-content: center; }
  #oh-side .oh-lockline button { margin: 0; }
}
@media print { #oh-side, .oh-pal, .oh-lock { display: none !important; } body.oh-shell { padding-left: 0; } }

/* legacy pages: calm the purple/pink gradients, glows and pills */
body.oh-shell .new-btn, body.oh-shell .save-btn, body.oh-shell .btn-primary, body.oh-shell .pr { background: var(--oh-teal) !important; border-color: var(--oh-teal) !important; color: #fff !important; box-shadow: none !important; }
body.oh-shell .save-btn:hover, body.oh-shell .new-btn:hover { transform: none !important; background: var(--oh-teal-d) !important; }
body.oh-shell .nav-tab.active { color: var(--oh-teal-d); border-color: var(--oh-teal); }
body.oh-shell .card, body.oh-shell .section, body.oh-shell .stat { border-color: var(--oh-border); box-shadow: none; }
body.oh-shell a { color: var(--oh-teal-d); }
body.oh-shell #oh-side a { color: inherit; }

/* shared components */
.oh-kbd { font-family: 'IBM Plex Mono', monospace; font-size: 11px; border: 1px solid var(--oh-border); border-radius: 4px; padding: 1px 6px; background: #fff; color: var(--oh-muted); }
.oh-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; border-radius: 5px; padding: 2px 7px; line-height: 1.4; white-space: nowrap; }
.oh-chip.red { color: var(--oh-red); background: var(--oh-red-l); border: 1px solid #FECDCA; }
.oh-chip.amber { color: var(--oh-amber); background: var(--oh-amber-l); border: 1px solid #FEDF89; }
.oh-chip.green { color: var(--oh-green); background: var(--oh-green-l); border: 1px solid #ABEFC6; }
.oh-chip.grey { color: #344054; background: #F2F4F7; border: 1px solid #EAECF0; font-weight: 600; }
.oh-chip.blue { color: #175CD3; background: #EFF8FF; border: 1px solid #B2DDFF; font-weight: 600; }
.oh-chip.teal { color: var(--oh-teal-d); background: var(--oh-teal-l); border: 1px solid #B7E0DD; }
.oh-btn { height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--oh-border); background: #fff; color: var(--oh-text); font-size: 13.5px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.oh-btn:hover { border-color: #B8C4D0; }
.oh-btn.pri { background: var(--oh-teal); border-color: var(--oh-teal); color: #fff; }
.oh-btn.pri:hover { background: var(--oh-teal-d); }
.oh-btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.oh-btn:disabled { opacity: .55; cursor: default; }

/* Ctrl K palette */
.oh-pal { position: fixed; inset: 0; background: rgba(11, 37, 69, .45); z-index: 100001; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.oh-pal-box { background: #fff; width: 100%; max-width: 620px; border-radius: 14px; box-shadow: 0 24px 60px rgba(0,0,0,.28); overflow: hidden; }
.oh-pal-in { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--oh-border); }
.oh-pal-in input { flex: 1; border: 0; outline: none; height: 56px; font-size: 16px; background: transparent; color: var(--oh-text); }
.oh-pal-list { max-height: 50vh; overflow: auto; }
.oh-pal-it { display: flex; align-items: center; gap: 12px; padding: 11px 16px; cursor: pointer; border-bottom: 1px solid #F0F3F6; }
.oh-pal-it.on, .oh-pal-it:hover { background: #F5FBFB; }
.oh-pal-it b { font-weight: 600; }
.oh-pal-it small { color: var(--oh-muted); font-size: 12.5px; }
.oh-pal-foot { display: flex; gap: 14px; padding: 9px 16px; font-size: 12px; color: var(--oh-muted); background: #F8FAFB; flex-wrap: wrap; }
.oh-pal-empty { padding: 18px 16px; color: var(--oh-muted); font-size: 14px; }

/* lock screen */
.oh-lock { position: fixed; inset: 0; z-index: 100002; background: rgba(11, 37, 69, .92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.oh-lock-box { background: #fff; border-radius: 16px; padding: 28px; width: 100%; max-width: 380px; box-sizing: border-box; text-align: center; }
.oh-lock-box h2 { margin: 12px 0 4px; font-size: 20px; }
.oh-lock-box p { margin: 0 0 16px; color: var(--oh-muted); font-size: 14px; }
.oh-lock-box input { width: 100%; box-sizing: border-box; height: 44px; border: 1px solid var(--oh-border); border-radius: 8px; padding: 0 12px; font-size: 15px; margin-bottom: 10px; }
.oh-lock-box .oh-btn { width: 100%; justify-content: center; height: 44px; }
.oh-lock-err { color: var(--oh-red); font-size: 13px; min-height: 18px; margin-bottom: 6px; }
