/* ADHERE+ MCH — modern medtech UI (offline-friendly, no web fonts, phone + desktop) */
:root{
  --brand:#0f766e; --brand-600:#0d9488; --brand-700:#115e59; --brand-800:#134e4a;
  --brand-050:#e9f8f4; --brand-100:#cdeee6;
  --accent:#f59e0b; --accent-050:#fff6e6;
  --bg:#f4f6f5; --surface:#ffffff; --surface-2:#f8faf9;
  --border:#e7e8e3; --border-strong:#d6dcd8;
  --text:#132420; --text-2:#465550; --muted:#7d8b84;
  --green-bg:#e4f7ef; --green-fg:#0b7a5b;
  --amber-bg:#fdf1dc; --amber-fg:#8a5304;
  --red-bg:#fdecec; --red-fg:#b3261e;
  --shadow-sm:0 1px 2px rgba(16,40,34,.05);
  --shadow:0 1px 2px rgba(16,40,34,.04), 0 4px 16px rgba(16,40,34,.05);
  --shadow-lg:0 12px 32px rgba(16,40,34,.10);
  --radius:15px; --radius-sm:11px; --radius-pill:999px;
  /* icon set (masked, recolour with currentColor — offline data URIs) */
  --i-userplus:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='9' cy='8' r='3.5'/><path d='M3 20c0-3.3 2.7-6 6-6s6 2.7 6 6'/><path d='M18 8v6M15 11h6'/></svg>");
  --i-calendar:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='5' width='16' height='15' rx='2'/><path d='M4 9h16M8 3v4M16 3v4'/></svg>");
  --i-activity:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12h4l2 6 4-15 2 9h6'/></svg>");
  --i-alert:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M12 4L3 20h18z'/><path d='M12 10v4M12 17h.01'/></svg>");
  --i-baby:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='8' r='4'/><path d='M6 21c0-3.3 2.7-6 6-6s6 2.7 6 6'/><circle cx='10.5' cy='8' r='.5' fill='%23000'/><circle cx='13.5' cy='8' r='.5' fill='%23000'/></svg>");
  --i-dashboard:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='4' width='7' height='7' rx='1'/><rect x='13' y='4' width='7' height='4' rx='1'/><rect x='13' y='10' width='7' height='10' rx='1'/><rect x='4' y='14' width='7' height='6' rx='1'/></svg>");
  --i-building:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 21V4l8-1v18M5 9h8M19 21V10l-6-2.5'/><path d='M8 12h.01M8 15h.01M8 18h.01'/></svg>");
  --i-users:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='8' cy='9' r='3'/><path d='M2 20c0-3 2.7-5 6-5s6 2 6 5'/><path d='M16 6.5a3 3 0 0 1 0 6M16 15c3 0 5 2 5 5'/></svg>");
  --i-bell:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 16V10a6 6 0 0 1 12 0v6l2 2H4z'/><path d='M10 20a2 2 0 0 0 4 0'/></svg>");
  --i-chart:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 4v16h16'/><circle cx='9' cy='13' r='1.3' fill='%23000'/><circle cx='13' cy='9' r='1.3' fill='%23000'/><circle cx='17' cy='11' r='1.3' fill='%23000'/></svg>");
  --i-clipboard:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='6' y='4' width='12' height='16' rx='2'/><path d='M9 4h6v3H9z'/><path d='M9 11h6M9 15h4'/></svg>");
  --i-checklist:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M11 6h9M11 12h9M11 18h9'/><path d='M4 6l1.5 1.5L8 4.5M4 12l1.5 1.5L8 10.5M4 18l1.5 1.5L8 16.5'/></svg>");
  --i-ambulance:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='8' width='13' height='8' rx='1'/><path d='M15 11h3l3 3v2h-6z'/><circle cx='7' cy='18' r='1.6'/><circle cx='17' cy='18' r='1.6'/><path d='M7 10.5v3M5.5 12h3'/></svg>");
  --i-send:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 12l16-8-6 16-3-6z'/></svg>");
  --i-handover:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 8h13l-3-3M20 16H7l3 3'/></svg>");
  --i-file:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 3h8l4 4v14H6z'/><path d='M14 3v4h4M9 13h6M9 17h5'/></svg>");
  --i-edit:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 20l4-1L19 8l-3-3L5 16z'/><path d='M14 6l3 3'/></svg>");
  --i-check:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M8.5 12.5l2.5 2.5 4.5-5'/></svg>");
  --i-alertc:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><path d='M12 8v4M12 16h.01'/></svg>");
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  color:var(--text); font-size:15px; line-height:1.5;
  background:
    radial-gradient(1100px 420px at 100% -8%, #e6f7f2 0%, rgba(230,247,242,0) 60%),
    radial-gradient(900px 380px at -10% 0%, #fdf3e3 0%, rgba(253,243,227,0) 55%),
    var(--bg);
  background-attachment:fixed;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
}

/* ---------- Header ---------- */
header#top{
  display:flex; align-items:center; gap:10px;
  background:linear-gradient(100deg, var(--brand-800) 0%, var(--brand) 55%, var(--brand-600) 100%);
  color:#fff; padding:11px 18px; font-size:15px;
  position:sticky; top:0; z-index:50;
  box-shadow:0 2px 14px rgba(15,86,78,.22);
}
header#top b{font-weight:800; letter-spacing:.2px; display:inline-flex; align-items:center; gap:9px; font-size:17px}
.brand-mark{
  width:26px; height:26px; border-radius:8px; flex:0 0 auto;
  background:rgba(255,255,255,.16); box-shadow:inset 0 0 0 1px rgba(255,255,255,.28);
  display:inline-flex; align-items:center; justify-content:center;
}
header#top #who{font-weight:500; opacity:.92; font-size:13.5px}
header#top button{
  margin-left:auto; background:rgba(255,255,255,.14); color:#fff;
  border:1px solid rgba(255,255,255,.35); border-radius:var(--radius-pill);
  padding:6px 14px; cursor:pointer; font-size:13px; font-weight:600;
  transition:background .15s ease;
}
header#top button:hover{background:rgba(255,255,255,.26)}
#net.pill{margin-left:6px; background:rgba(255,255,255,.16); color:#fff; border:1px solid rgba(255,255,255,.3)}
#net.pill::before{display:none}

/* ---------- Layout ---------- */
main{max-width:900px; margin:0 auto; padding:20px 16px 40px}

/* ---------- Navigation ---------- */
.navbar{display:flex; flex-wrap:wrap; gap:7px; margin-bottom:18px}
a.nav{
  display:inline-flex; align-items:center; text-decoration:none; cursor:pointer;
  color:var(--brand-700); background:#fff; border:1px solid var(--border);
  padding:9px 15px; border-radius:var(--radius-pill);
  font-size:14px; font-weight:600; line-height:1;
  box-shadow:var(--shadow-sm); transition:all .15s ease; margin:0;
}
a.nav:hover{background:var(--brand-050); border-color:var(--brand-100); transform:translateY(-1px)}
a.nav.on{background:var(--brand); color:#fff; border-color:var(--brand); box-shadow:0 4px 12px rgba(15,118,110,.28)}
a.nav.on:hover{background:var(--brand-700)}
/* nav icons */
a.nav[href='#register']::before,a.nav[href='#antenatal']::before,a.nav[href='#labour']::before,
a.nav[href='#highrisk']::before,a.nav[href='#pnc']::before,a.nav[href='#dashboard']::before,
a.nav[href='#facilities']::before,a.nav[href='#users']::before,a.nav[href='#reminders']::before,
a.nav[href='#supervisor']::before{
  content:""; width:16px; height:16px; margin-right:7px; flex:0 0 auto; background-color:currentColor;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center;
  -webkit-mask-size:contain; mask-size:contain;
}
a.nav[href='#register']::before{-webkit-mask-image:var(--i-userplus);mask-image:var(--i-userplus)}
a.nav[href='#antenatal']::before{-webkit-mask-image:var(--i-calendar);mask-image:var(--i-calendar)}
a.nav[href='#labour']::before{-webkit-mask-image:var(--i-activity);mask-image:var(--i-activity)}
a.nav[href='#highrisk']::before{-webkit-mask-image:var(--i-alert);mask-image:var(--i-alert)}
a.nav[href='#pnc']::before{-webkit-mask-image:var(--i-baby);mask-image:var(--i-baby)}
a.nav[href='#dashboard']::before{-webkit-mask-image:var(--i-dashboard);mask-image:var(--i-dashboard)}
a.nav[href='#facilities']::before{-webkit-mask-image:var(--i-building);mask-image:var(--i-building)}
a.nav[href='#users']::before{-webkit-mask-image:var(--i-users);mask-image:var(--i-users)}
a.nav[href='#reminders']::before{-webkit-mask-image:var(--i-bell);mask-image:var(--i-bell)}
a.nav[href='#supervisor']::before{-webkit-mask-image:var(--i-chart);mask-image:var(--i-chart)}

/* ---------- Cards ---------- */
.card{
  background:var(--surface); border:1px solid var(--border);
  border-radius:var(--radius); padding:18px 20px; margin-bottom:16px;
  box-shadow:var(--shadow); transition:box-shadow .2s ease;
}
.card:hover{box-shadow:var(--shadow-lg)}
.card h3{
  margin:0 0 14px; font-size:16.5px; font-weight:700; color:var(--text);
  display:flex; align-items:center; gap:9px; flex-wrap:wrap;
}
.card h3::before{
  content:""; width:4px; height:18px; border-radius:3px;
  background:linear-gradient(var(--brand-600),var(--brand)); flex:0 0 auto;
}
.card h4{margin:2px 0 10px; font-size:14px; font-weight:700; color:var(--text-2)}

/* ---------- Forms ---------- */
.grid{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:14px}
label{display:block; font-size:12.5px; font-weight:600; color:var(--text-2); margin-bottom:5px}
input,select,textarea{
  width:100%; height:44px; background:#fff; color:var(--text);
  border:1px solid var(--border-strong); border-radius:var(--radius-sm);
  padding:0 12px; font-size:15px; font-family:inherit;
  transition:border-color .15s ease, box-shadow .15s ease;
}
textarea{height:auto; padding:10px 12px}
input:focus,select:focus,textarea:focus{
  outline:none; border-color:var(--brand-600);
  box-shadow:0 0 0 3px rgba(13,148,136,.16);
}
select{appearance:none; -webkit-appearance:none; cursor:pointer;
  background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%);
  background-position:calc(100% - 17px) 19px,calc(100% - 12px) 19px; background-size:5px 5px,5px 5px; background-repeat:no-repeat;
  padding-right:34px;
}

/* ---------- Buttons ---------- */
button{font-family:inherit}
button.act{
  min-height:44px; border:none; cursor:pointer;
  background:linear-gradient(180deg,var(--brand-600),var(--brand));
  color:#fff; border-radius:var(--radius-sm); padding:0 20px;
  font-size:14.5px; font-weight:700; letter-spacing:.2px;
  box-shadow:0 4px 12px rgba(15,118,110,.24); transition:all .15s ease;
}
button.act:hover{filter:brightness(1.05); transform:translateY(-1px); box-shadow:0 6px 16px rgba(15,118,110,.30)}
button.act:active{transform:translateY(0); filter:brightness(.97)}
button.sec{
  min-height:38px; cursor:pointer; background:#fff; color:var(--brand-700);
  border:1px solid var(--border-strong); border-radius:var(--radius-sm);
  padding:0 14px; font-size:13.5px; font-weight:600; margin:3px 3px 0 0;
  transition:all .15s ease;
}
button.sec:hover{background:var(--brand-050); border-color:var(--brand-100)}

/* ---------- Tables ---------- */
table{width:100%; border-collapse:separate; border-spacing:0; font-size:14px; margin-top:4px;
  border:1px solid var(--border); border-radius:12px; overflow:hidden}
th,td{text-align:left; padding:11px 13px; border-bottom:1px solid var(--border)}
th{background:#eef4f2; color:var(--text-2); font-weight:700; font-size:12px; letter-spacing:.03em; text-transform:uppercase}
tr:last-child td{border-bottom:none}
tbody tr:hover td, table tr:hover td{background:#f7faf9}

/* ---------- Pills / status (colour + icon = colour-blind safe) ---------- */
.pill{display:inline-flex; align-items:center; font-size:12px; font-weight:700;
  padding:4px 11px; border-radius:var(--radius-pill); margin-left:8px; letter-spacing:.2px}
.green{background:var(--green-bg); color:var(--green-fg)}
.amber{background:var(--amber-bg); color:var(--amber-fg)}
.red{background:var(--red-bg); color:var(--red-fg)}
.pill.green::before,.pill.amber::before,.pill.red::before{
  content:""; width:13px; height:13px; margin-right:5px; flex:0 0 auto; background-color:currentColor;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center;
  -webkit-mask-size:contain; mask-size:contain;
}
.pill.green::before{-webkit-mask-image:var(--i-check);mask-image:var(--i-check)}
.pill.amber::before{-webkit-mask-image:var(--i-alert);mask-image:var(--i-alert)}
.pill.red::before{-webkit-mask-image:var(--i-alertc);mask-image:var(--i-alertc)}

/* ---------- Tabs ---------- */
.tabs{display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:14px; flex-wrap:wrap}
.tabs button{background:none; border:none; border-bottom:2.5px solid transparent;
  padding:10px 14px; cursor:pointer; font-size:14px; font-weight:600; color:var(--text-2); transition:all .15s ease}
.tabs button:hover{color:var(--brand-700)}
.tabs button.on{border-bottom-color:var(--brand); color:var(--brand-700); font-weight:700}

/* ---------- Misc ---------- */
.muted{color:var(--muted); font-size:13px}
a{color:var(--brand-700)}
hr{border:none; border-top:1px solid var(--border); margin:14px 0}
svg{max-width:100%}
main > .card:only-child{box-shadow:var(--shadow-lg)}

/* empty state + skeleton (progressive; used where markup provides them) */
.empty{text-align:center; color:var(--muted); padding:28px 16px}
.skeleton{background:linear-gradient(90deg,#eef1ef 25%,#f6f8f7 37%,#eef1ef 63%);
  background-size:400% 100%; animation:sk 1.3s ease infinite; border-radius:8px; min-height:14px}
@keyframes sk{0%{background-position:100% 0}100%{background-position:0 0}}

/* ---------- Patient hub action tiles (icon + label) ---------- */
.hubgrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(148px,1fr)); gap:10px; margin-top:8px}
.hubx{display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center;
  min-height:82px; padding:12px 10px; gap:5px;
  background:#fff; border:1px solid var(--border); border-radius:14px; color:var(--brand-700); font-weight:600;
  font-size:13.5px; line-height:1.25; text-decoration:none; box-shadow:var(--shadow-sm); transition:all .15s ease}
.hubx:hover{background:var(--brand-050); border-color:var(--brand-100); transform:translateY(-2px); box-shadow:var(--shadow)}
.hubx:active{transform:translateY(0)}
.hubx[href*='#anc/']::before,.hubx[href*='#ancvisit/']::before,.hubx[href*='#vitals/']::before,
.hubx[href*='#partograph/']::before,.hubx[href*='#checklist/']::before,.hubx[href*='#danger/']::before,
.hubx[href*='#delivery/']::before,.hubx[href*='#baby/']::before,.hubx[href*='#bemonc/']::before,
.hubx[href*='#handover/']::before,.hubx[href*='#referral/']::before,.hubx[href*='#report/']::before,
.hubx[href*='#editwoman/']::before,.hubx[href*='#pncvisit/']::before{
  content:""; width:26px; height:26px; flex:0 0 auto; background-color:currentColor;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center;
  -webkit-mask-size:contain; mask-size:contain;
}
.hubx[href*='#anc/']::before{-webkit-mask-image:var(--i-clipboard);mask-image:var(--i-clipboard)}
.hubx[href*='#ancvisit/']::before,.hubx[href*='#pncvisit/']::before{-webkit-mask-image:var(--i-calendar);mask-image:var(--i-calendar)}
.hubx[href*='#vitals/']::before{-webkit-mask-image:var(--i-activity);mask-image:var(--i-activity)}
.hubx[href*='#partograph/']::before{-webkit-mask-image:var(--i-chart);mask-image:var(--i-chart)}
.hubx[href*='#checklist/']::before{-webkit-mask-image:var(--i-checklist);mask-image:var(--i-checklist)}
.hubx[href*='#danger/']::before{-webkit-mask-image:var(--i-alert);mask-image:var(--i-alert)}
.hubx[href*='#delivery/']::before,.hubx[href*='#baby/']::before{-webkit-mask-image:var(--i-baby);mask-image:var(--i-baby)}
.hubx[href*='#bemonc/']::before{-webkit-mask-image:var(--i-ambulance);mask-image:var(--i-ambulance)}
.hubx[href*='#handover/']::before{-webkit-mask-image:var(--i-handover);mask-image:var(--i-handover)}
.hubx[href*='#referral/']::before{-webkit-mask-image:var(--i-send);mask-image:var(--i-send)}
.hubx[href*='#report/']::before{-webkit-mask-image:var(--i-file);mask-image:var(--i-file)}
.hubx[href*='#editwoman/']::before{-webkit-mask-image:var(--i-edit);mask-image:var(--i-edit)}

/* ---------- Responsive: phone-first ---------- */
@media (max-width:560px){
  main{padding:14px 12px 40px}
  .card{padding:16px}
  /* nav: single scrollable row instead of stacking into 3 lines */
  .navbar{flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; gap:8px;
    padding-bottom:4px; margin:0 -12px 16px; padding-left:12px; padding-right:12px; scrollbar-width:none}
  .navbar::-webkit-scrollbar{display:none}
  a.nav{flex:0 0 auto; padding:10px 14px; font-size:13.5px}
  header#top{padding:10px 12px; gap:8px}
  header#top b{font-size:16px}
  header#top #who{flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12px}
  header#top button{padding:6px 12px; font-size:12px; flex:0 0 auto}
  #net.pill{display:none}
  .card table{display:block; width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; white-space:nowrap}
  th,td{padding:10px 11px}
  .grid{grid-template-columns:1fr}
  .hubgrid{grid-template-columns:1fr 1fr; gap:9px}
  /* larger touch targets on phones */
  input,select,textarea{height:48px; font-size:16px}
  button.act{min-height:48px; width:100%}
}

/* ---------- Sticky patient context bar ---------- */
:root{--i-home:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 11l8-7 8 7'/><path d='M6 10v9h12v-9'/></svg>")}
.pbar{display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--border);
  border-radius:14px; padding:9px 12px; margin-bottom:14px; box-shadow:var(--shadow-sm);
  position:sticky; top:52px; z-index:30}
.pav{width:34px; height:34px; border-radius:50%; background:var(--brand-050); color:var(--brand-700);
  display:flex; align-items:center; justify-content:center; font-weight:800; font-size:13px; letter-spacing:.3px; flex:0 0 auto}
.pinfo{min-width:0; flex:1}
.pnm{font-weight:700; font-size:14.5px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis}
.pmeta{font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; margin-top:1px}
.pback{flex:0 0 auto; font-size:12.5px; font-weight:600; color:var(--brand-700); text-decoration:none;
  border:1px solid var(--border-strong); border-radius:var(--radius-pill); padding:6px 13px}
.pback:hover{background:var(--brand-050); border-color:var(--brand-100)}

/* ---------- Bottom navigation (phones) ---------- */
.botnav{display:none; position:fixed; left:0; right:0; bottom:0; z-index:60; background:#fff;
  border-top:1px solid var(--border); box-shadow:0 -2px 12px rgba(16,40,34,.07);
  padding-bottom:env(safe-area-inset-bottom,0)}
.bn{flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:8px 2px 7px;
  text-decoration:none; color:var(--muted); font-size:10.5px; font-weight:600}
.bn.on{color:var(--brand-700)}
.bn::before{content:""; width:22px; height:22px; background-color:currentColor;
  -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-position:center; mask-position:center;
  -webkit-mask-size:contain; mask-size:contain}
.bn[href='#home']::before{-webkit-mask-image:var(--i-home);mask-image:var(--i-home)}
.bn[href='#antenatal']::before{-webkit-mask-image:var(--i-calendar);mask-image:var(--i-calendar)}
.bn[href='#labour']::before{-webkit-mask-image:var(--i-activity);mask-image:var(--i-activity)}
.bn[href='#pnc']::before{-webkit-mask-image:var(--i-baby);mask-image:var(--i-baby)}
.bn[href='#dashboard']::before,.bn[href='#supervisor']::before{-webkit-mask-image:var(--i-dashboard);mask-image:var(--i-dashboard)}
.bn[href='#reminders']::before{-webkit-mask-image:var(--i-bell);mask-image:var(--i-bell)}

@media (max-width:560px){
  .botnav{display:flex}
  main{padding-bottom:76px}
  .pbar{top:46px}
  .pbar + .navbar{display:none}   /* on a patient screen, the bar + bottom nav replace the top row */
}
