/* opdb.css — OPD board (lane 7; mod_l7_opdb.json "css"). Dr Shah 21-Nov-2026: "a workstation for OPD patients". Two panes from 900 px (list 40 %,
   patient 60 %), one pane at a time below (list -> tap -> patient, "Back to list"); no sideways scroll. Tap targets 44 px (UX-M1). Kind and flags are
   words, H / L are letters beside the value (never colour alone). Server load: none (styles only). */
.opdbapp { max-width: 1600px; color: var(--ink); color-scheme: light; }
/* 21-Nov-2026 (Dr Shah: "the fonts are invisible"): <button> does not inherit colour, so on a dark-mode phone every row/chip/tab text was white on white. */
.opdbapp button, .opdbapp input, .opdbapp a { color: var(--ink); }
.opdbapp .ob-backbtn, .opdbapp .ob-tab[aria-selected=true] { color: var(--accent); }
.opdbapp .ob-chip[aria-pressed=true] { color: #fff; }
.opdbapp .ob-links a, .opdbapp .ob-days a { color: var(--accent); }
.opdbapp .ob-nm, .opdbapp .ob-nm small { color: var(--ink); }
.opdbapp .ob-pick small, .opdbapp .ob-nm small { color: var(--muted); }
.ob-papers a { font-weight: 600; } .ob-papers .ob-nil { padding: 0; font-size: 13px; }
.opdbapp .uifresh { margin: 2px 0 10px; }
.ob-wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 16px; align-items: start; }
.ob-left { position: sticky; top: 8px; max-height: calc(100vh - 24px); overflow-y: auto; }
.ob-right { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; min-height: 300px; }
.ob-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 8px; }
.ob-days a, .ob-chip, .ob-row, .ob-act, .ob-task, .ob-pick, .ob-tab, .ob-backbtn, .ob-links a { min-height: 44px; min-width: 44px; }
.ob-days a { display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; }
.ob-days a[aria-current] { background: var(--accent-2); }
.ob-search { position: relative; margin: 0 0 8px; }
.ob-search input { width: 100%; min-height: 44px; font-size: 15px; box-sizing: border-box; }
.ob-found { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ob-pick { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line2); padding: 6px 10px; font: inherit; cursor: pointer; }
.ob-pick small, .ob-nm small, .ob-ph h2 small, .ob-rep small { color: var(--muted); font-weight: 400; }
.ob-none { padding: 10px; color: var(--muted); }
.ob-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.ob-chip { border: 1px solid var(--line); background: #fff; border-radius: 22px; padding: 0 12px; font: inherit; font-size: 14px; cursor: pointer; }
.ob-chip span { color: var(--muted); margin-left: 2px; }
.ob-chip[aria-pressed=true] { background: var(--accent); color: #fff; border-color: var(--accent); } .ob-chip[aria-pressed=true] span { color: #fff; }
.ob-list { list-style: none; margin: 0; padding: 0; }
.ob-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 0 0 6px; font: inherit; cursor: pointer; }
.ob-row:hover { background: #f6f9fb; } .ob-row.sel { background: var(--accent-2); border-color: var(--accent); }
.ob-nm { font-weight: 600; } .ob-dx { grid-column: 1 / -1; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ob-kind { font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; align-self: start; }
.ob-k-due { border-style: dashed; }
.ob-fl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--accent); }
.ob-empty, .ob-nil { color: var(--muted); padding: 10px 0; }
.ob-back { display: none; margin: 0 0 6px; }
.ob-backbtn { background: none; border: 0; color: var(--accent); font: inherit; padding: 0 4px; cursor: pointer; }
.ob-ph h2 { margin: 0; font-size: 20px; }
.ob-id { margin: 2px 0; color: var(--muted); font-size: 14px; }
.ob-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 4px 0; }
.ob-links a { display: inline-flex; align-items: center; }
.ob-needs { margin: 6px 0; padding: 6px 10px; border-left: 4px solid #b45309; background: #fdf6ec; font-size: 14px; }
.ob-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--line); margin: 10px 0 8px; }
.ob-tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: 0 10px; font: inherit; cursor: pointer; }
.ob-tab small { color: var(--muted); font-size: 11px; }
.ob-tab[aria-selected=true] { border-bottom-color: var(--accent); font-weight: 600; }
.ob-tabbody p { margin: 4px 0; }
.ob-visit { border-bottom: 1px solid var(--line2); padding: 6px 0 10px; }
.ob-visit h3, .ob-tabbody h3 { font-size: 15px; margin: 8px 0 4px; color: var(--accent); }
.ob-meds { margin: 4px 0; padding-left: 22px; }
.ob-medline { font-size: 14px; color: var(--muted); }
.ob-reps { list-style: none; margin: 4px 0; padding: 0; }
.ob-rep { padding: 4px 0; border-bottom: 1px solid var(--line2); } .ob-rep > a, .ob-rep > span { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-height: 44px; }
.ob-chipt { font-size: 11px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; color: var(--muted); }
.ob-sumline { font-size: 13px; color: var(--muted); }
.ob-cap { font-size: 13px; color: var(--muted); }
.ob-err { color: #b42318; }
.ob-ltwrap { overflow-x: auto; }
.ob-lt { border-collapse: collapse; font-size: 14px; }
.ob-lt th, .ob-lt td { padding: 4px 8px; border-bottom: 1px solid var(--line2); text-align: left; white-space: nowrap; }
.ob-lt thead th { font-size: 12px; color: var(--muted); }
.ob-lt .ob-h { color: #b42318; } .ob-lt .ob-l { color: #1d4ed8; }
.ob-due { margin: 2px 0 8px; padding-left: 20px; }
.ob-note { border-bottom: 1px solid var(--line2); }
@media (max-width: 1024px) {
  .ob-wrap { grid-template-columns: minmax(0, 1fr); }
  .ob-left { position: static; max-height: none; overflow: visible; }
  .ob-wrap[data-pane=list] .ob-right { display: none; }
  .ob-wrap[data-pane=pt] .ob-left { display: none; }
  .ob-back { display: block; }
}
@media (max-width: 600px) {
  .ob-right { padding: 10px; border: 0; }
  .ob-lt thead { display: none; }
  .ob-lt, .ob-lt tbody, .ob-lt tr { display: block; }
  .ob-lt tr { border-bottom: 1px solid var(--line); padding: 4px 0; }
  .ob-lt th[scope=row] { display: block; white-space: normal; }
  .ob-lt td { display: inline-block; border: 0; }
  .ob-lt td::before { content: attr(data-l); display: block; font-size: 11px; color: var(--muted); }
  .ob-ltwrap { overflow-x: visible; }
  .ob-days b { width: 100%; }
}

/* phase 1 (22-Nov-2026): Booked / Seen today / Watch list, a button row on each card. Words, not colour alone; 44 px targets; wraps at 375 px. */
.ob-h { font-size: 16px; margin: 14px 0 4px; } .ob-h span { font-size: 13px; font-weight: 400; color: var(--muted); }
.ob-card { margin: 0 0 8px; } .ob-card .ob-row { margin-bottom: 8px; }
.ob-sum, .ob-why { grid-column: 1 / -1; font-size: 13px; color: var(--ink); } .ob-why span { display: block; }
.opdbapp .ob-act, .opdbapp .ob-task { display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; }
.ob-acts, .ob-tasks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; } .ob-tasks { flex-direction: column; align-items: stretch; }
.opdbapp .ob-task { justify-content: flex-start; text-align: left; border-style: dashed; }
/* 30-Nov-2026 the Patient Chart (chart.js / chart.css) at the top of the Summary tab, in place of "Course so far" */
.ob-chart { margin: 0 0 14px; }
