/* Patient portal: large text and tap targets, one column on phones. */
:root {
  --brand: #1f5fbf; --brand-dark: #174a96; --ink: #1b2233; --muted: #5c657d; --line: #dfe3ec; --bg: #f3f5fa; --card: #fff;
  --good: #16743a; --good-bg: #e6f5eb; --warn: #8a5300; --warn-bg: #fff5dd; --bad: #a8231b; --bad-bg: #fdeceb; --teal: #0f8f7e;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--brand); }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 6px; } h2 { font-size: 20px; margin: 0 0 10px; } h3 { font-size: 17px; margin: 14px 0 6px; }
p { margin: 0 0 10px; }
small, .muted { color: var(--muted); font-size: 15px; }
[hidden] { display: none !important; }

.top { background: var(--brand); color: #fff; padding: 14px 16px; padding-top: max(14px, env(safe-area-inset-top)); display: flex; align-items: center; gap: 12px; }
.top .logo { background: #fff; color: var(--brand); font-weight: 800; border-radius: 8px; padding: 4px 8px; font-size: 14px; letter-spacing: .03em; }
.top b { font-size: 18px; } .top small { display: block; color: #d9e4ff; font-size: 13px; }
.top .out { margin-left: auto; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px; padding-bottom: 110px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(20, 30, 60, .06); }
.tabs a { display: grid; justify-items: center; gap: 2px; padding: 8px 2px 10px; text-decoration: none; color: var(--muted); font-size: 12.5px; font-weight: 600; min-height: 60px; }
.tabs a span { font-size: 22px; line-height: 1.1; } .tabs a.on { color: var(--brand); } .tabs a.on span { transform: scale(1.08); }
.tabs a .dot { position: relative; } .tabs a .dot::after { content: ''; position: absolute; top: 0; right: -6px; width: 9px; height: 9px; border-radius: 50%; background: #e0602a; }
@media (min-width: 900px) {
  .tabs { position: static; max-width: 760px; margin: 16px auto 0; border: 1px solid var(--line); border-radius: 12px; box-shadow: none; }
  .wrap { padding-bottom: 40px; }
}

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.card.hl { border-color: #b9cdf5; background: #f5f8ff; }
.card.warn { border-color: #f0d58a; background: var(--warn-bg); }
.card.good { border-color: #a9dcbb; background: var(--good-bg); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 17px/1.2 inherit; min-height: 52px; padding: 12px 20px; border-radius: 12px;
  border: 2px solid var(--brand); background: #fff; color: var(--brand); cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-dark); }
.btn.block { width: 100%; } .btn.small { min-height: 40px; padding: 8px 14px; font-size: 15px; }
.btn.ghost { border-color: transparent; background: transparent; color: #fff; min-height: 40px; padding: 6px 10px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn:focus-visible, .tick:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .tabs a:focus-visible { outline: 3px solid #8fb0ff; outline-offset: 2px; }

label.f { display: grid; gap: 4px; margin-bottom: 12px; font-weight: 600; font-size: 15.5px; }
label.f small { font-weight: 400; }
input, select, textarea { font: inherit; font-size: 17px; width: 100%; min-height: 50px; padding: 10px 12px; border: 1.5px solid #c5ccdb; border-radius: 10px; background: #fff; color: var(--ink); }
textarea { min-height: 90px; }
input.code { font: 700 24px/1 ui-monospace, Consolas, monospace; letter-spacing: .12em; text-transform: uppercase; text-align: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; } @media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.err { color: var(--bad); font-weight: 600; margin: 8px 0; } .err:empty { display: none; }

.item { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.item:first-of-type { border-top: 0; padding-top: 2px; }
.item .ico { width: 44px; height: 44px; border-radius: 12px; background: #eef3ff; display: grid; place-items: center; font-size: 22px; }
.item b { display: block; font-size: 17.5px; } .item .when { font-weight: 700; color: var(--brand-dark); }
.item.late .ico { background: var(--bad-bg); }
.badge { display: inline-block; border-radius: 20px; padding: 2px 10px; font-size: 13.5px; font-weight: 700; background: #eef1f7; color: var(--muted); margin-top: 4px; }
.badge.todo { background: var(--warn-bg); color: var(--warn); } .badge.scheduled { background: #e5edff; color: var(--brand-dark); }
.badge.done { background: var(--good-bg); color: var(--good); } .badge.late { background: var(--bad-bg); color: var(--bad); }
.empty { color: var(--muted); padding: 6px 0; }

.ticks { display: grid; gap: 10px; margin: 10px 0 14px; }
.tick { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; font-size: 16.5px; min-height: 60px; padding: 12px 14px;
  border: 2px solid #c5ccdb; border-radius: 12px; background: #fff; color: var(--ink); cursor: pointer; }
.tick b { flex: none; width: 30px; height: 30px; border-radius: 8px; border: 2px solid #9aa3bd; display: grid; place-items: center; color: #fff; font-size: 18px; }
.tick.on { border-color: var(--good); background: var(--good-bg); } .tick.on b { background: var(--good); border-color: var(--good); }
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.choice .tick { justify-content: center; }
ul.plain { margin: 6px 0 12px; padding-left: 22px; } ul.plain li { margin: 4px 0; }

.upload { display: grid; gap: 10px; }
.upload .pick { border: 2px dashed #a9b7d6; border-radius: 14px; padding: 18px; text-align: center; background: #f8faff; }
.preview-img { max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); display: block; margin: 0 auto; }

dl.info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; } dl.info dt { color: var(--muted); } dl.info dd { margin: 0; font-weight: 600; }
.change-list { margin: 6px 0 0; padding-left: 20px; }

#toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%) translateY(20px); opacity: 0; transition: .2s; background: #1b2233; color: #fff;
  padding: 12px 18px; border-radius: 12px; font-size: 16px; max-width: calc(100% - 32px); z-index: 10; pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%); } #toast.bad { background: var(--bad); }
.center { text-align: center; } .mt { margin-top: 14px; }
.welcome { max-width: 520px; margin: 0 auto; }
.switch { text-align: center; margin: 6px 0 0; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 8px; min-height: 44px; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }
/* Smart Prime Care logo */
.top .logo { padding: 4px 6px; display: grid; place-items: center; } .top .logo img { display: block; width: 54px; height: auto; }
.welcome-logo { display: block; width: 220px; max-width: 70%; height: auto; margin: 8px auto 14px; }
/* On the blue bar the logo is white, with no tile behind it. */
.top .logo { background: none; padding: 0; } .top .logo img { width: 62px; }
.cal-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
