/* Shared look for Veyra app pages (sign-in, account, admin, messages). */
:root { --paper: #F3F6F5; --ink: #15201D; --muted: #56645F; --accent: #1E5C53; --accent-ink: #FFFFFF; --surface: #FFFFFF; --line: #D6DEDB; --warn: #B4461B; --warn-bg: #FBE9E2; --ok-bg: #E4F1EC; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #0E1514; --ink: #E4EDEA; --muted: #9AABA5; --accent: #72C3B3; --accent-ink: #0E1514; --surface: #16201E; --line: #2A3633; --warn: #F08A5D; --warn-bg: #3A2118; --ok-bg: #16302A; } }
:root[data-theme="dark"] { --paper: #0E1514; --ink: #E4EDEA; --muted: #9AABA5; --accent: #72C3B3; --accent-ink: #0E1514; --surface: #16201E; --line: #2A3633; --warn: #F08A5D; --warn-bg: #3A2118; --ok-bg: #16302A; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.5 "Public Sans", "Segoe UI", system-ui, sans-serif; }
.wrap { max-width: 440px; margin: 0 auto; padding: 40px 16px 64px; }
.wrap.wide { max-width: 880px; }
.brand { font-family: Literata, Georgia, serif; font-weight: 600; font-size: 20px; color: var(--accent); margin: 0 0 28px; letter-spacing: .2px; }
h1 { font-family: Literata, Georgia, serif; font-size: 26px; line-height: 1.25; margin: 0 0 8px; font-weight: 600; }
h2 { font-size: 17px; margin: 28px 0 10px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input, select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--paper); color: inherit; }
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input.code { font-size: 26px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
button { font: inherit; cursor: pointer; }
.btn { display: block; width: 100%; margin-top: 16px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; text-align: center; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.inline { display: inline-block; width: auto; margin-top: 0; padding: 8px 12px; font-size: 14px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.row { display: flex; gap: 10px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
.err { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 14px; }
.note { background: var(--ok-bg); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-top: 14px; }
.choice { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-top: 10px; color: inherit; }
.choice:hover { border-color: var(--accent); }
.choice b { display: block; }
.choice span { color: var(--muted); font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--ok-bg); color: var(--accent); margin-left: 6px; vertical-align: 2px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 16px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin: 12px 0; }
.qr { display: flex; justify-content: center; background: #fff; border-radius: 12px; padding: 10px; margin: 12px 0; }
.qr svg { width: 200px; height: 200px; }
.key { font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 14px; word-break: break-all; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin-top: 14px; }
.check input { width: auto; margin-top: 4px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.top .brand { margin: 0; }
.top .grow { flex: 1; }
.hidden { display: none !important; }
@media (max-width: 600px) { .wrap { padding-top: 24px; } .codes { grid-template-columns: 1fr; } .hide-sm { display: none; } }

/* ---------------- app shell (patient app, pharmacy and clinic portals) ---------------- */
:root { --soon: #9A6B00; --soon-bg: #FBF1D9; --attn: #B4461B; --attn-bg: #FBE9E2; --okc: #1E5C53; --okc-bg: #E4F1EC; --info-bg: #E6EEF6; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --soon: #E8B64C; --soon-bg: #33290F; --attn: #F08A5D; --attn-bg: #3A2118; --okc: #72C3B3; --okc-bg: #16302A; --info-bg: #17242F; } }
:root[data-theme="dark"] { --soon: #E8B64C; --soon-bg: #33290F; --attn: #F08A5D; --attn-bg: #3A2118; --okc: #72C3B3; --okc-bg: #16302A; --info-bg: #17242F; }
.shell { max-width: 1100px; margin: 0 auto; padding: 16px 16px 96px; }
.shell.narrow { max-width: 640px; }
.bar { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.bar .brand { margin: 0; font-size: 18px; }
.bar .who { color: var(--muted); font-size: 14px; }
.bar .grow { flex: 1; min-width: 0; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs button { background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; }
.tabbar { display: none; }
@media (max-width: 700px) {
  .tabs.mobile-bottom { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 20; }
  .tabbar button { flex: 1; background: none; border: 0; padding: 6px 2px; color: var(--muted); font-size: 11px; font-weight: 600; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
  .tabbar button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar button[aria-selected="true"] { color: var(--accent); }
  .tabbar .dot { position: absolute; top: 2px; right: calc(50% - 16px); min-width: 16px; height: 16px; border-radius: 8px; background: var(--attn); color: #fff; font-size: 10px; line-height: 16px; padding: 0 4px; }
}
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card h3 { margin: 0 0 6px; font-size: 16px; }
.card .lead { font-size: 18px; font-weight: 600; margin: 2px 0 6px; }
.card + .card { margin-top: 12px; }
.grid .card + .card { margin-top: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--line); color: var(--ink); white-space: nowrap; }
.chip.ok { background: var(--okc-bg); color: var(--okc); }
.chip.soon { background: var(--soon-bg); color: var(--soon); }
.chip.attn { background: var(--attn-bg); color: var(--attn); }
.chip.info { background: var(--info-bg); color: var(--ink); }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 15px; margin: 12px 0; }
.notice.attn { background: var(--attn-bg); color: var(--attn); }
.notice.attn b, .notice.attn a { color: inherit; }
.notice.soon { background: var(--soon-bg); }
.notice.ok { background: var(--okc-bg); }
.notice.info { background: var(--info-bg); }
.btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.btns .btn { width: auto; margin-top: 0; }
.btn.small { padding: 7px 12px; font-size: 14px; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .meta { color: var(--muted); font-size: 13px; }
.form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-top: 12px; }
.form .r { display: flex; flex-wrap: wrap; gap: 10px; }
.form .r > label { flex: 1; min-width: 140px; margin-top: 10px; }
.form label { font-size: 14px; }
.form label > input, .form label > select, .form label > textarea { margin-top: 6px; font-weight: 400; }
textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; background: var(--paper); color: inherit; min-height: 70px; resize: vertical; }
.checks { display: grid; gap: 6px; margin-top: 8px; }
.checks label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; margin: 0; }
.checks input { width: auto; margin-top: 4px; }
.steps { display: flex; gap: 4px; margin: 10px 0; flex-wrap: wrap; }
.steps span { flex: 1; min-width: 56px; text-align: center; font-size: 12px; padding: 6px 4px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.steps span.done { background: var(--okc-bg); color: var(--okc); border-color: transparent; }
.steps span.now { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: left; color: inherit; }
.tile b { display: block; font-size: 26px; line-height: 1.1; }
.tile span { color: var(--muted); font-size: 13px; }
.tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.split { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }
.rowbtn { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; color: inherit; }
.rowbtn:hover, .rowbtn[aria-current="true"] { border-color: var(--accent); }
.rowbtn .top { margin: 0; display: flex; gap: 8px; align-items: center; }
.rowbtn .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid-l { stroke: var(--line); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.chart text { fill: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 6px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.chatbox { height: 70vh; min-height: 460px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
@media (max-width: 700px) { .chatbox { height: calc(100vh - 170px); border-radius: 12px; } }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }
.tel { color: var(--accent); font-weight: 600; text-decoration: none; }
.kv.answers { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
@media (max-width: 600px) { .kv.answers { grid-template-columns: 1fr; gap: 0 0; } .kv.answers dd { margin-bottom: 8px; font-weight: 600; } }
