:root {
  --blue: #12907e; --accent: #0f6f62; --navy: #0f2d4a; --ink: #111; --muted: #667; --line: #e2e6ea; --bg: #f5f7f9; --card: #fff;
  --red: #d32f2f; --orange: #ef6c00; --yellow: #f9a825; --green: #2e7d32;
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); }
main { max-width: 720px; margin: 0 auto; padding: 12px 16px 80px; }
h1, h2, h3 { margin: 12px 0 8px; } h3 { font-size: 15px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
a { color: var(--accent); }
.muted { color: var(--muted); } .center { text-align: center; padding: 40px 16px; } .pre { white-space: pre-wrap; }
.red-t { color: var(--red); } .grow { flex: 1; min-width: 0; } .ell { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row { display: flex; gap: 8px; align-items: center; justify-content: space-between; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

header { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 3px solid var(--blue); }
.bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; max-width: 720px; margin: 0 auto; }
.brand { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 18px; color: var(--navy); text-decoration: none; }
.brand img { width: 40px; height: 40px; object-fit: contain; } .brand span, h1 span { color: var(--blue); }
.pill { font-size: 13px; padding: 4px 10px; border-radius: 99px; text-decoration: none; color: #fff; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill.ok { background: var(--green); } .pill.off { background: #78838f; }
nav { display: flex; max-width: 720px; margin: 0 auto; overflow-x: auto; }
.tab { flex: 1 1 auto; text-align: center; padding: 10px 4px; font-size: 14px; text-decoration: none; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tab.on { color: var(--accent); border-color: var(--blue); font-weight: 600; }
.badge { background: var(--red); color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; margin-left: 4px; }

.btn { display: inline-flex; justify-content: center; align-items: center; gap: 6px; background: var(--blue); color: #fff; border: 0; border-radius: 10px;
  padding: 12px 16px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:not(.alt):not(.yes):not(.no) { background: var(--accent); }
.btn.big { width: 100%; padding: 14px; margin: 8px 0; } .btn.sm { padding: 8px 12px; font-size: 14px; }
.btn.alt { background: #e8eef2; color: var(--ink); } .btn:disabled { opacity: .5; cursor: default; }
.btn.icon { padding: 10px 14px; font-size: 18px; }
.link { background: none; border: 0; color: var(--accent); font: inherit; padding: 8px 0; cursor: pointer; text-decoration: underline; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.alert { background: #fdecea; border: 1px solid #f5c2bd; color: #7a1f17; border-radius: 10px; padding: 12px; margin: 10px 0; }
.f { display: block; margin: 10px 0; } .f > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.f small { display: block; color: var(--muted); margin-top: 3px; }
input, select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid #c9d1d8; border-radius: 8px; background: #fff; }
input.bad { border-color: var(--red); }
.chk { display: flex; gap: 8px; align-items: center; margin: 8px 0; white-space: nowrap; } .chk input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin: 12px 0; padding: 4px 14px 12px; }
legend { font-weight: 700; padding: 0 6px; }

.triage { display: block; border: 2px solid var(--line); border-left-width: 10px; border-radius: 10px; padding: 10px; margin: 8px 0; cursor: pointer; }
.triage input { display: none; }
fieldset.triage { padding: 4px 12px 12px; } fieldset.triage legend small { font-weight: 400; color: var(--muted); }
.dx { display: block; width: 100%; text-align: left; font: inherit; font-size: 15px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 6px 0 0; cursor: pointer; }
.dx.on { border: 2px solid var(--ink); font-weight: 600; }
.red .dx.on { background: #fdecea; } .orange .dx.on { background: #fff3e0; } .yellow .dx.on { background: #fffde7; } .green .dx.on { background: #e8f5e9; }
fieldset.triage input { display: block; margin-top: 6px; }
.tri { border: 2px solid var(--line); border-left-width: 10px; border-radius: 10px; margin: 8px 0; background: #fff; }
.tri.red { border-left-color: var(--red); } .tri.orange { border-left-color: var(--orange); } .tri.yellow { border-left-color: var(--yellow); } .tri.green { border-left-color: var(--green); }
.tri.on.red { border-color: var(--red); background: #fdecea; } .tri.on.orange { border-color: var(--orange); background: #fff3e0; }
.tri.on.yellow { border-color: var(--yellow); background: #fffde7; } .tri.on.green { border-color: var(--green); background: #e8f5e9; }
.tri-head { display: flex; width: 100%; align-items: center; gap: 8px; background: none; border: 0; padding: 10px 12px; font: inherit; text-align: left; cursor: pointer; }
.tri-head small { font-size: 13px; } .tri .common { color: var(--ink); } .tri .picked { font-weight: 600; color: var(--ink); } .chev { font-size: 18px; color: var(--muted); }
.tri-body { padding: 0 12px 12px; } .tri-body input { margin-top: 6px; }
.va { border-top: 1px solid var(--line); padding: 4px 0 10px; } .va:first-of-type { border-top: 0; }
.slot { border-top: 1px solid var(--line); padding: 10px 0; } .thumb { display: flex; flex-direction: column; align-items: flex-start; }
.thumb .att { max-width: 120px; max-height: 120px; }
.howto { background: #f0f7fb; border-radius: 8px; padding: 8px 12px; margin: 6px 0; font-size: 14px; } .howto summary { font-weight: 600; cursor: pointer; color: var(--accent); }
.howto ol { padding-left: 20px; margin: 8px 0 0; } .howto li { margin-bottom: 6px; }
.vat { position: fixed; inset: 0; z-index: 50; background: #fff; overflow-y: auto; padding: 16px; }
.vat > h3 { margin-top: 28px; } .vat ol { padding-left: 20px; } .vat li { margin-bottom: 8px; }
.vat.test { display: flex; flex-direction: column; padding: 0; user-select: none; -webkit-user-select: none; }
.vat-e { flex: 1; display: flex; align-items: center; justify-content: center; }
.vat-answer { padding: 8px 16px 16px; text-align: center; color: var(--muted); }
.vat-answer .row .btn { flex: 1; margin: 6px 0 0; } .btn.yes { background: var(--green); } .btn.no { background: var(--red); }
.vat-cap { position: absolute; top: 8px; left: 0; right: 0; text-align: center; color: #bbb; font-size: 11px; }
.vat-close { position: absolute; top: 4px; right: 12px; }
.steps { display: flex; gap: 4px; list-style: none; padding: 0; margin: 8px 0 4px; counter-reset: s; }
.steps li { flex: 1; text-align: center; font-size: 12px; color: var(--muted); border-top: 4px solid var(--line); padding-top: 4px; counter-increment: s; }
.steps li::before { content: counter(s) ". "; }
.steps li.on { color: var(--accent); border-color: var(--blue); font-weight: 600; } .steps li.done { border-color: var(--blue); cursor: pointer; }
.chk.confirm { white-space: normal; align-items: flex-start; background: #e8f5e9; border-radius: 8px; padding: 10px; font-weight: 600; }
.triage.red { border-left-color: var(--red); } .triage.orange { border-left-color: var(--orange); }
.triage.yellow { border-left-color: var(--yellow); } .triage.green { border-left-color: var(--green); }
.triage.on.red { background: #fdecea; border-color: var(--red); } .triage.on.orange { background: #fff3e0; border-color: var(--orange); }
.triage.on.yellow { background: #fffde7; border-color: var(--yellow); } .triage.on.green { background: #e8f5e9; border-color: var(--green); }

.dot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: 4px; }
.dot.red { background: var(--red); } .dot.orange { background: var(--orange); } .dot.yellow { background: var(--yellow); } .dot.green { background: var(--green); }
.item { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 8px 0; color: inherit; text-decoration: none; }
.item.esc { border: 2px solid var(--red); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { background: #fdecea; } }
/* triage colour as a thick bar down the left edge of each list card */
.item.red { border-left: 8px solid var(--red); } .item.orange { border-left: 8px solid var(--orange); }
.item.yellow { border-left: 8px solid var(--yellow); } .item.green { border-left: 8px solid var(--green); }
.search { display: flex; gap: 10px; align-items: center; }

.thread { padding-bottom: 0; display: flex; flex-direction: column; min-height: calc(100vh - 100px); }
.thead { display: flex; gap: 10px; align-items: center; }
.back { font-size: 32px; text-decoration: none; padding: 0 8px; }
dl { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 4px 12px; margin: 8px 0; } dt { color: var(--muted); } dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.atts { display: flex; flex-wrap: wrap; gap: 6px; }
.att { display: block; max-width: 220px; max-height: 220px; border-radius: 8px; margin: 4px 0; }
.msgs { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.msg { max-width: 82%; padding: 8px 10px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.msg.me { align-self: flex-end; background: #dff3fb; border-color: #bfe5f3; } .msg.them { align-self: flex-start; }
.msg.interv { border: 2px solid #6a1b9a; }
.msg .who { display: block; color: var(--accent); font-size: 10.5px; font-weight: 400; line-height: 1.2; margin-bottom: 1px; opacity: .85; } .time { display: block; text-align: right; color: var(--muted); font-size: 11px; }
.tick { letter-spacing: -3px; margin-left: 4px; } .tick.read { color: #1e88e5; }
.msg.me .who { color: var(--muted); } .msg.failed { border-color: var(--red); }
.msg { transition: transform .15s; } .msg.swiping { transition: none; }
.quote { display: block; width: 100%; text-align: left; border: 0; border-left: 3px solid var(--blue); background: rgba(0,0,0,.05); border-radius: 6px; padding: 4px 8px; margin: 2px 0 4px; font: inherit; font-size: 13px; color: inherit; cursor: pointer; }
.quote b { display: block; font-size: 12px; color: var(--accent); }
.replying { display: flex; align-items: center; gap: 8px; border-left: 3px solid var(--blue); background: var(--card); padding: 6px 8px; border-radius: 6px; margin-bottom: 6px; }
.replying small { display: block; color: var(--muted); }
.flash { box-shadow: 0 0 0 3px var(--blue); transition: box-shadow .3s; }
.errf input, .errf select, .errf textarea { border-color: var(--red) !important; box-shadow: 0 0 0 2px #f5c2bd; }
.slot.errf, .chk.errf { outline: 2px solid var(--red); outline-offset: 4px; border-radius: 8px; }
.errf, #f-triage { scroll-margin: 90px; }
.sys { align-self: center; text-align: center; background: #eef2f5; border-radius: 10px; padding: 6px 10px; font-size: 14px; max-width: 90%; }
.sys small { display: block; color: var(--muted); font-size: 11px; } .sys.staff { font-style: italic; background: #fff8e1; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.composer { position: sticky; bottom: 0; background: var(--bg); padding: 8px 0 12px; }
.composer textarea { resize: none; } .interv-note { color: #6a1b9a; display: block; }

.auth { max-width: 420px; margin: 0 auto; padding: 24px 16px; text-align: center; }
.auth form { text-align: left; } .logo { width: 300px; max-width: 90%; margin: 0 0 4px; }
.seg { display: flex; gap: 4px; background: #e8eef2; border-radius: 10px; padding: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; font: inherit; font-size: 14px; cursor: pointer; }
.seg button.on { background: #fff; font-weight: 600; }
.status.ok { border-left: 6px solid var(--green); } .status.off { border-left: 6px solid #78838f; }
.ruler { display: block; margin: 8px 0; }
.seg { margin: 8px 0; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; } .f.mini { margin: 4px 0; } .f.mini > span { font-size: 12px; color: var(--muted); }
.stats h4 { margin: 14px 0 6px; font-size: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile b { font-size: 24px; font-weight: 600; } .tile small:first-child { color: var(--muted); }
.hbar { display: grid; grid-template-columns: minmax(90px, 40%) 1fr auto; gap: 8px; align-items: center; margin: 4px 0; font-size: 13px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hb-val { min-width: 2ch; text-align: right; }
.hb-track { display: block; height: 14px; } .hb-track i { display: block; height: 100%; min-width: 2px; background: var(--blue); border-radius: 0 4px 4px 0; }
.cols { display: flex; align-items: stretch; gap: 2px; height: 150px; margin-top: 8px; padding: 0 20px; overflow: hidden; border-bottom: 1px solid var(--line); }
.col-k { display: flex; justify-content: center; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.col-bar { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.col-bar i { width: min(24px, 85%); background: var(--blue); border-radius: 4px 4px 0 0; }
.col-k { height: 16px; font-size: 10px; color: var(--muted); text-align: center; white-space: nowrap; overflow: visible; }
.segbar { display: flex; gap: 2px; height: 18px; margin: 8px 0; } .segbar i { border-radius: 4px; }
.segbar .red { background: var(--red); } .segbar .orange { background: var(--orange); } .segbar .yellow { background: var(--yellow); } .segbar .green { background: var(--green); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; } .legend span, td .dot { display: inline-flex; align-items: center; gap: 6px; } td .dot { display: inline-block; vertical-align: middle; margin: 0; }
.stats table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 8px; } .stats th { text-align: left; color: var(--muted); font-weight: 600; }
.stats th, .stats td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.stats .card { overflow-x: auto; }
.regcard { border-top: 1px solid var(--line); padding: 10px 0; } .regcard dl { font-size: 13px; margin: 6px 0 0; }
.grade { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; border-radius: 8px; font-weight: 700; color: #fff; }
.grade.good { background: var(--green); } .grade.warn { background: #b26a00; } .grade.bad { background: var(--red); }
.idok { display: block; background: #e8f5e9; color: #1b4d20; border-radius: 6px; padding: 6px 8px; margin-top: 4px; }
.me-btn { display: inline-flex; border-radius: 50%; margin-left: 8px; outline-offset: 2px; } .me-btn.on .avatar { box-shadow: 0 0 0 3px var(--blue); }
.bar { gap: 8px; } .bar .pill { margin-left: auto; }
.avatar { border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; }
.avatar.initials { align-items: center; justify-content: center; background: var(--blue); color: #fff; font-weight: 700; }
.profile { display: flex; gap: 14px; align-items: center; } .profile h2 { margin: 0 0 2px; }

.swipe { position: relative; margin: 8px 0; touch-action: pan-y; }
.swipe::before { content: attr(data-label); position: absolute; inset: 0; border-radius: 12px; background: var(--accent); color: #fff; font-weight: 600;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 18px; }
.swipe .item { position: relative; margin: 0; transition: transform .2s; }
.people .row { padding: 4px 0; } .people form { margin-top: 10px; } .people select { min-width: 0; }
.mention { color: var(--accent); }
.sug { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; overflow: hidden; }
.sug button, .kit button { text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; font: inherit; color: inherit; }
.kit { background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; padding-bottom: 6px; }
.kit button { display: flex; gap: 10px; align-items: center; width: 100%; } .kit img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.kit span { display: flex; flex-direction: column; min-width: 0; } .kit > small { display: block; padding: 6px 10px 0; }
.example { display: flex; flex-direction: column; align-items: center; text-decoration: none; } .example img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; border: 2px solid var(--green); }
.history { border-left: 4px solid var(--orange); } .hist { padding: 6px 0; color: inherit; text-decoration: none; justify-content: flex-start; }
img.att { cursor: zoom-in; } .example { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: zoom-in; }
.viewer { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; display: flex; flex-direction: column; }
.vbar { display: flex; gap: 10px; align-items: center; padding: max(10px, env(safe-area-inset-top)) 8px 8px 16px; font-size: 14px; }
.vbar button { background: none; border: 0; color: #fff; font-size: 26px; min-width: 44px; min-height: 44px; }
.vimg { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; padding-bottom: env(safe-area-inset-bottom); }
.vimg img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: zoom-in; }
.viewer.zoom .vimg { display: block; overflow: auto; } .viewer.zoom .vimg img { max-width: none; max-height: none; width: 250%; cursor: zoom-out; }
.vnav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.45); color: #fff; border: 0; font-size: 40px; width: 48px; height: 72px; border-radius: 10px; }
.vnav.prev { left: 6px; } .vnav.next { right: 6px; }
.st { font-size: 12px; font-weight: 600; white-space: nowrap; } .st.new { color: #fff; background: var(--blue); border-radius: 99px; padding: 2px 8px; }
.st.replied { color: var(--green); } .st.sent { color: var(--muted); font-weight: 400; }
.item.unread b { font-weight: 800; }
.newline { display: flex; align-items: center; gap: 8px; color: var(--blue); font-size: 12px; font-weight: 600; margin: 6px 0; }
.newline::before, .newline::after { content: ''; flex: 1; border-top: 1px solid var(--blue); }

.example.big { flex-direction: row; gap: 12px; width: 100%; text-align: left; background: #e8f5e9; border: 1px solid var(--green); border-radius: 10px; padding: 8px; margin: 4px 0 8px; }
.example.big img { width: 120px; height: 90px; flex: none; } .example.big span { display: flex; flex-direction: column; gap: 4px; }

/* referrer home */
.whoami { display: flex; flex-direction: column; align-items: flex-end; text-align: right; text-decoration: none; color: var(--ink); min-width: 0; max-width: 55%; line-height: 1.2; }
.whoami b, .whoami small { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .whoami small { color: var(--muted); }
.gsh { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 4px 0 10px; }
.gsh.ok { background: #e8f5e9; color: #1b5e20; } .gsh.off { background: #fdecea; color: #8a1c1c; }
.led { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; background: currentColor; }
.gsh.ok .led { animation: pulse-led 2s infinite; } @keyframes pulse-led { 50% { opacity: .35; } }
.list-h { margin: 18px 0 6px; font-size: 16px; } .empty { padding: 24px 0; }
.back-top { display: inline-block; margin: 4px 0 8px; text-decoration: none; font-weight: 600; }

/* suburb drop-down (one tap picks, like CapeRefer) */
.combo { position: relative; }
.drop { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin-top: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.15); max-height: 300px; overflow-y: auto; }
.drop button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; font: inherit; color: var(--ink); cursor: pointer; }
.drop button:last-child { border-bottom: 0; } .drop button:active, .drop button:hover { background: #eef6fb; }
.ok-t { color: var(--green); }

/* print a referral */
.print-btn { font-size: 12px; padding: 0; margin-left: 10px; color: var(--muted); } .print-only { display: none; }
@media print {
  header, .composer, .actions, .thead .btn, .thead .back, .print-btn, .reply, .viewer, form.card, .newline { display: none !important; }
  body, main, .card { background: #fff !important; } .print-only { display: block; font-size: 16px; }
  .card, .msg, .sys { break-inside: avoid; box-shadow: none; } .thread { min-height: 0; }
  details > summary { list-style: none; font-weight: 700; } a { color: inherit; text-decoration: none; }
}

/* appointment date: three wheels (selects spin as wheels on iPhone) */
.wheels { display: flex; gap: 6px; } .wheels select { flex: 1; min-width: 0; font-size: 16px; }
.wheels select[aria-label="Month"] { flex: 2; }

.push-banner { display: flex; gap: 10px; align-items: center; background: #fff8e1; border: 1px solid #ffe08a; border-radius: 12px; padding: 10px 12px; font-size: 14px; margin: 4px 0 10px; }

/* example referrals (to show people how EyeLink works) */
.ex-tag { background: #fff3cd; color: #6b4e00; border-radius: 4px; font-size: 10px; font-weight: 700; padding: 1px 5px; vertical-align: middle; }
.center-link { display: block; text-align: center; margin: 6px 0 2px; font-size: 14px; }
/* unassigned referrals (sent while nobody was on call): purple haze; the assigned doctor in very small text */
.item.unassigned { background: linear-gradient(90deg, #efe3ff, #f8f2ff); box-shadow: 0 0 0 2px #b48be0, 0 0 12px rgba(140, 80, 210, .35); }
.unas-tag { background: #7b3fc4; color: #fff; border-radius: 4px; font-size: 10px; font-weight: 700; padding: 1px 5px; vertical-align: middle; letter-spacing: .3px; }
.asg { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.unas-bar { display: flex; flex-direction: column; gap: 6px; background: #f3eaff; border: 1px solid #c9a8ef; border-radius: 12px; padding: 10px 12px; margin: 8px 0; }
.unas-bar b { color: #5b2a99; } .unas-bar .btn { align-self: flex-start; background: #7b3fc4; } .unas-bar .row { gap: 8px; }
@media print { .unas-bar { display: none; } }
/* nobody on call: referrals still go through and wait (amber, not red) */
.gsh.wait { background: #fff4e0; color: #7a4a00; } .gsh.wait .led { background: #e69500; }
.alert.wait { background: #fff4e0; border-color: #f0c98a; color: #6b4200; }
.alert.banner { margin: 8px 16px; font-weight: 600; }   /* Sheet > Settings > banner: shown on every screen */
.chk.wrap { white-space: normal; align-items: flex-start; } .legal { text-align: center; margin: 12px 0 0; } .legal a { color: inherit; opacity: .75; }
/* departments and the pre-op form */
.card.dept { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; color: inherit; border: 1px solid var(--line); cursor: pointer; margin: 10px 0; }
.card.dept:disabled { opacity: .55; cursor: default; } .card.dept img, .dept-head img { width: 56px; height: 56px; border-radius: 12px; flex: none; }
.card.dept .chev { font-size: 28px; color: var(--muted); } .gsh-t.ok { color: var(--green); } .gsh-t.wait { color: var(--orange); } .gsh-t.off { color: var(--red); }
.dept-head { display: flex; gap: 12px; align-items: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip { font: inherit; font-size: 14px; border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.pri { display: inline-block; border-radius: 6px; padding: 2px 8px; margin: -4px 0 8px; } .pri.orange { background: #fff3e0; } .pri.yellow { background: #fffde7; } .pri.green { background: #e8f5e9; }
.card.hint ul { margin: 6px 0; padding-left: 20px; } .preop fieldset { margin-bottom: 12px; } .preop .f > .seg { margin-top: 4px; }
.kit-t { width: 64px; height: 48px; flex: none; display: grid; place-items: center; font-size: 26px; background: #efeafb; border-radius: 6px; }

/* ---------- motion: short and calm; off when the phone asks for reduced motion ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { 0% { transform: scale(.6); } 70% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes breathe { 50% { opacity: .45; } }
.page, .auth { animation: fade-up .22s ease-out both; }
.item, .card.dept, .msg { animation: fade-up .2s ease-out both; }
.alert, .kit, .people, .sug, #outcome, .card.hint, .unas-bar { animation: fade-in .18s ease-out both; }
.viewer { animation: fade-in .15s ease-out both; }
.badge { animation: pop .3s ease-out both; display: inline-block; }
div.center.muted, main.center.muted { animation: breathe 1.4s ease-in-out infinite; }   /* loading… */
.btn, .chip, .seg button, .tab, .card.dept, .item, .dx, .kit button, .link { transition: transform .12s ease, background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease; }
.btn:active:not(:disabled), .chip:active, .card.dept:active:not(:disabled), .dx:active, .seg button:active { transform: scale(.97); }
@media (hover: hover) {
  .btn:hover:not(:disabled) { filter: brightness(1.06); }
  .card.dept:hover:not(:disabled), a.item:hover { box-shadow: 0 4px 14px rgba(15, 45, 74, .10); transform: translateY(-1px); }
}
.brand img, .auth .logo { animation: fade-in .4s ease-out both; }
input, select, textarea { transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18, 144, 126, .18); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.card.install { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; text-align: left; }
.card.install img { width: 44px; height: 44px; border-radius: 10px; flex: none; box-shadow: 0 1px 4px rgba(15, 45, 74, .15); }
.card.install .x { font-size: 22px; line-height: 1; padding: 0 4px; color: var(--muted); text-decoration: none; }
.steps-ios { flex-basis: 100%; margin: 4px 0 0; padding-left: 22px; font-size: 14px; animation: fade-in .18s ease-out both; }
.back-link { display: inline-block; margin: 0 0 4px; text-decoration: none; font-weight: 600; }
.howto.open { background: #f1f8f6; border: 1px solid #cfe7e1; border-radius: 12px; padding: 10px 14px; margin: 8px 0 12px; font-size: 14px; }
.howto.open ol { margin: 6px 0 0; padding-left: 20px; } .howto.open li { margin: 3px 0; }

/* ================= premium layer: type, surfaces, depth ================= */
:root { --ink: #142131; --muted: #687587; --line: #e4e9f0; --bg: #f3f6f9; --navy: #0f2d4a;
  --shadow-1: 0 1px 2px rgba(16, 32, 56, .05), 0 1px 1px rgba(16, 32, 56, .03);
  --shadow-2: 0 2px 4px rgba(16, 32, 56, .04), 0 8px 24px rgba(16, 32, 56, .07);
  --grad: linear-gradient(135deg, #14a08b 0%, #0f7c6c 55%, #0d6a5d 100%); }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-feature-settings: "cv11", "ss01"; letter-spacing: -.005em;
  background: radial-gradient(1200px 500px at 50% -200px, #e3f1ee 0%, rgba(227, 241, 238, 0) 70%), var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2 { color: var(--navy); letter-spacing: -.02em; font-weight: 800; } h2 { font-size: 22px; }
h3 { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: #7a8698; }

/* header: frosted glass, hairline instead of a thick bar */
header { background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15, 45, 74, .08); box-shadow: 0 1px 0 rgba(255, 255, 255, .6), 0 6px 18px rgba(16, 32, 56, .05); }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 19px; } .brand span { font-weight: 600; }
.tab { font-weight: 500; } .tab.on { font-weight: 700; color: var(--navy); }
.pill { font-weight: 600; letter-spacing: .01em; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }

/* surfaces */
.card, .item, fieldset, .tri, .sxg, .card.dept { border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-1); background: #fff; }
.card.dept, .card.install { box-shadow: var(--shadow-2); }
fieldset { padding: 6px 16px 14px; } legend { font-weight: 700; color: var(--navy); padding: 0 6px; }
.item { border-left: 4px solid var(--line); padding: 12px 14px; }
.item.red { border-left-color: var(--red); } .item.orange { border-left-color: var(--orange); } .item.yellow { border-left-color: var(--yellow); } .item.green { border-left-color: var(--green); }
.item b { color: var(--navy); }

/* buttons */
.btn { border-radius: 12px; font-weight: 600; letter-spacing: .01em; }
.btn:not(.alt):not(.yes):not(.no) { background: var(--grad); box-shadow: 0 1px 2px rgba(13, 106, 93, .25), 0 6px 16px rgba(13, 106, 93, .22); }
.btn.alt { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-1); }
.btn.big { padding: 15px; font-size: 16px; }
.link { color: #0f7c6c; font-weight: 500; }

/* fields */
input, select, textarea { border: 1px solid #d5dde7; border-radius: 12px; background: #fbfcfd; padding: 11px 13px; }
.f > span { font-weight: 600; color: #2a3a4d; font-size: 14px; }
.seg { background: #e9eef3; border-radius: 12px; } .seg button.on { box-shadow: var(--shadow-1); color: var(--navy); }
.chip { border-color: #d5dde7; font-weight: 500; } .chip.on { background: var(--grad); border-color: transparent; box-shadow: 0 2px 8px rgba(13, 106, 93, .25); }

/* alerts, status */
.alert { border-radius: 14px; } .alert.wait { background: #fffaf0; border-color: #f3dfb1; color: #6b4e10; }
.gsh { border-radius: 14px; box-shadow: var(--shadow-1); }

/* triage by symptoms */
.tri-mode { margin: 6px 0 12px; }
.tri-search { margin: 8px 0 12px; }
.tri-search-results { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 12px; margin: 8px 0 16px; }
.tri-search-results section + section { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.tri-search-group { margin-top: 8px; }
.tri-search-group > small { display: block; color: var(--muted); font-weight: 600; }
.sxg { margin: 8px 0; overflow: hidden; } .sxg.on { border-color: #b9ddd6; }
.dx.sx { display: flex; gap: 10px; align-items: flex-start; border-radius: 12px; }
.dx.sx .dot { margin-top: 3px; } .dx.sx .lvl { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.dx.sx.on.red { background: #fdecea; } .dx.sx.on.orange { background: #fff3e0; } .dx.sx.on.yellow { background: #fffde7; } .dx.sx.on.green { background: #e8f5e9; }
.dx.sx.on { border: 2px solid var(--navy); }

/* login */
.auth .card { box-shadow: var(--shadow-2); border-radius: 18px; } .auth > .muted { color: #56657a; }
.avatar { box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(16, 32, 56, .15); }
.f.why { margin: -2px 0 10px 12px; padding-left: 10px; border-left: 3px solid #cfe7e1; animation: fade-in .18s ease-out both; }
.yn-list { margin: 2px 0 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.yn-row { display: flex; gap: 10px; align-items: center; padding: 7px 10px; font-size: 14px; } .yn-row + .yn-row { border-top: 1px solid var(--line); }
.seg.mini { margin: 0; padding: 3px; flex: none; } .seg.mini button { padding: 5px 12px; font-size: 13px; }
.seg.mini button.on.yes { background: #fff3e0; color: #8a4a00; }
.link.danger { color: #b3261e; } .about .link.danger { display: block; margin: 8px auto 0; }
.link.report { display: block; margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.demo-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; max-width: 720px; margin: 10px auto 0; padding: 10px 14px; font-size: 14px;
  background: linear-gradient(135deg, #fff8e6, #fff3d6); border: 1px solid #f1d99c; border-radius: 14px; color: #5a4310; animation: fade-in .2s ease-out both; }
@media (max-width: 760px) { .demo-bar { margin: 10px 16px 0; } }
.try-demo { margin-top: 12px; }
