/* abbott.columbiapainandspine.com. The practice's look (on-prem public/style.css with the approved
   ux-preview palette): same colours, type, header and table.grid, without the staff app shell. */
:root {
  --bg: #eef2f5;
  --panel: #ffffff;
  --panel-2: #f5f7f9;
  --border: #dce3e9;
  --text: #192b39;
  --muted: #546777;
  --accent: #176c81;
  --accent-dim: #12566a;
  --accent-soft: #e9f4f6;
  --ok: #15976a;
  --warn: #c2410c;
  --err: #d92d20;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text);
  min-height: 100vh; display: flex; flex-direction: column;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dim); }
:is(button, input, a):focus-visible { outline: 3px solid #127a96; outline-offset: 3px; box-shadow: 0 0 0 5px #fff; }

/* Header: the same brand block as the staff app. */
header.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 7px 16px; background: var(--panel); border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 30, 50, .06);
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-logo { width: 36px; height: 36px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 650; font-size: 14.5px; letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .3px; }
.account { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.account form { margin: 0; }
.account-email { overflow-wrap: anywhere; }

main.page { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 24px 28px; }
.foot { text-align: center; font-size: 11px; color: var(--muted); padding: 10px 16px 16px; }

h1 { font-size: 25px; letter-spacing: -.6px; line-height: 1.15; font-weight: 680; margin: 0 0 7px; }
h2.section { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); margin: 24px 0 8px; font-weight: 650; }
.heading { margin: 0 0 14px; }
.heading p, .lead { color: var(--muted); font-size: 13px; margin: 0 0 12px; max-width: 70ch; }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 18px; text-align: center; background: var(--panel); border: 1px solid var(--border); border-radius: 9px; }
.crumbs { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }

/* Cards and forms */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 22px 24px; box-shadow: 0 2px 8px rgba(15, 30, 50, .06); }
.card.narrow { max-width: 460px; margin: 32px auto 0; }
.stack { display: flex; flex-direction: column; gap: 8px; margin: 14px 0 0; }
label { font-size: 12.5px; font-weight: 600; color: #344d5e; }
input[type=email], input[type=text] {
  font: inherit; padding: 9px 10px; min-height: 38px; border: 1px solid #ccd7df; border-radius: 7px;
  background: #fff; color: var(--text); width: 100%;
}
input#code { font-size: 20px; letter-spacing: 6px; font-variant-numeric: tabular-nums; }
button {
  font: inherit; font-size: 13px; background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 7px 14px; cursor: pointer; min-height: 33px;
}
button:hover { border-color: var(--accent-dim); }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 650; margin-top: 6px; }
button.primary:hover { background: var(--accent-dim); }
button.quiet { background: #fff; color: #395768; border-color: #d0dce4; padding: 5px 10px; min-height: 30px; font-size: 12.5px; }
.row-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; }
.row-actions form { margin: 0; }
.notice { padding: 9px 12px; border-radius: 8px; font-size: 13px; margin: 0 0 10px; }
.notice-info { background: var(--accent-soft); color: var(--accent-dim); border: 1px solid #cfe5ea; }
.notice-error { background: #fdecea; color: #8c1d18; border: 1px solid #f5c6c2; }

/* table.grid, as in the staff app */
.table-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 9px; overflow-x: auto; }
table.grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
table.grid th, table.grid td { padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid #e4eaf0; }
table.grid th { font-size: 10px; letter-spacing: .055em; text-transform: uppercase; font-weight: 700; color: #536777; background: #f3f6f8; border-bottom: 1px solid #cfd9e1; }
table.grid tbody tr:last-child td { border-bottom: 0; }
table.grid tr:nth-child(even) td { background: #fafcfd; }
table.grid tbody tr:hover > td { background: #f0f7f9; }
table.grid th.num, table.grid td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td a { font-weight: 650; text-decoration: none; }
table.grid td a:hover { text-decoration: underline; }

/* Badges */
.badge { display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; padding: 1px 7px; border-radius: 999px; border: 1px solid currentColor; vertical-align: 1px; }
.badge-open { color: #14652c; background: #eaf7ee; }
.badge-closed { color: #5b6b78; background: #f1f4f6; }

/* Patient line and requests */
.patient-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
.patient-name { font-weight: 800; font-size: 19px; }
.k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; margin-right: 4px; }
.requests { display: grid; gap: 10px; }
.request { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; }
.request.is-open { box-shadow: inset 3px 0 var(--accent); }
.request-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.request-head h3 { margin: 0; font-size: 15px; font-weight: 680; }
.request-head h1 { margin: 0; }
.request-facts { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 8px 0 10px; font-size: 13px; }
.doc-link { font-size: 12.5px; font-weight: 650; }

/* The document */
.request-doc { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 18px 20px; margin-top: 12px; }
pre.doc {
  margin: 6px 0 0; padding: 14px 16px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px;
  font: 12.5px/1.55 ui-monospace, "Cascadia Code", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  main.page { padding: 16px; }
  .card { padding: 18px 16px; }
  .card.narrow { margin-top: 12px; }
  h1 { font-size: 21px; }
  .patient-name { font-size: 17px; }
}
@media print {
  header.top .account, .foot { display: none; }
  body { background: #fff; }
}
