/* Femcare Patient Tracker styles.
   Desktop: white sidebar with the logo and menu. Phone: top bar and a bottom tab bar.
   One light theme in Femcare teal (#077E7A) and white. */
:root {
  --brand: #077e7a;
  --brand-700: #05615e;
  --brand-50: #e8f4f3;
  --brand-100: #cfe7e5;
  --bg: #f3f7f7;
  --surface: #ffffff;
  --surface-2: #eef4f4;
  --ink: #12302e;
  --muted: #5a6f6e;
  --line: #dce7e6;
  --good: #23704a; --good-soft: #e2f3e9;
  --warn: #965a00; --warn-soft: #fcf0dc;
  --bad: #b42a22; --bad-soft: #fce8e6;
  --info: #2b5c93; --info-soft: #e6eef9;
  --font-display: "Poppins", "Segoe UI", system-ui, sans-serif;
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(18, 48, 46, .06), 0 4px 14px rgba(18, 48, 46, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; text-wrap: balance; margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.55rem; } h2 { font-size: 1.08rem; } h3 { font-size: .98rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
svg.i { flex: none; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* Shell */
.app { display: grid; grid-template-columns: 1fr; min-height: 100%; }
.side { display: none; }
.mtop { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: var(--surface); border-bottom: 1px solid var(--line); padding-block: 8px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mtop img { height: 30px; width: auto; display: block; }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; background: var(--surface); border-top: 1px solid var(--line); display: flex; justify-content: space-around; padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.tabbar a { flex: 1; border: 0; background: none; padding: 8px 4px 7px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; position: relative; }
.tabbar a[aria-current="page"] { color: var(--brand); }
.tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
main { min-width: 0; }
.content { max-width: 1120px; margin: 0 auto; padding-block: 18px 96px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 960px) {
  .app { grid-template-columns: 248px minmax(0, 1fr); }
  .side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px 16px max(14px, env(safe-area-inset-left, 0px)); }
  .side .logo { height: 40px; width: auto; display: block; margin: 0 6px; }
  .side nav { display: flex; flex-direction: column; gap: 2px; }
  .side nav a { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-weight: 600; color: var(--muted); text-align: left; }
  .side nav a:hover { background: var(--surface-2); color: var(--ink); }
  .side nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand); }
  .side nav a .badge { margin-left: auto; }
  .side .who { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; background: var(--surface-2); }
  .mtop, .tabbar { display: none; }
  .content { padding-block: 26px 48px; padding-left: 32px; padding-right: max(32px, env(safe-area-inset-right, 0px)); }
}
.navlabel { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 12px; }
.badge { font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--bad); color: #fff; font-variant-numeric: tabular-nums; }
.badge.soft { background: var(--surface-2); color: var(--muted); }

/* Common blocks */
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.head p { color: var(--muted); margin-top: 4px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.pad { padding: 18px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 18px; align-items: start; }
.cardhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cardhead .sub { font-size: 13px; color: var(--muted); flex-basis: 100%; margin-top: -2px; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 9px 15px; border-radius: 10px; cursor: pointer; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.btn:hover { border-color: var(--brand-100); background: var(--brand-50); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-700); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { padding: 12px 20px; font-size: 15px; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--brand); }
.btn.ghost:hover { background: var(--brand-50); }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.bad { background: var(--bad-soft); color: var(--bad); } .pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.good { background: var(--good-soft); color: var(--good); } .pill.info { background: var(--info-soft); color: var(--info); }
.pill.brand { background: var(--brand-50); color: var(--brand); }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-50); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display); font-size: 14px; flex: none; }
.av.lg { width: 56px; height: 56px; font-size: 19px; }
.av.camp { background: var(--warn-soft); color: var(--warn); }
.empty { padding: 22px 18px; color: var(--muted); font-size: 14px; display: flex; gap: 10px; align-items: center; }

/* Rows */
.rows { display: flex; flex-direction: column; }
.prow { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; }
.prow .main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.prow .name { font-weight: 700; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--ink); }
.prow .name:hover { color: var(--brand); text-decoration: underline; }
.prow .line2 { font-size: 13px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; align-items: center; }
.prow .end { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) { .prow { flex-wrap: wrap; } .prow .end { width: 100%; justify-content: flex-start; padding-left: 52px; } }

/* Forms */
input[type=text], input[type=password], input[type=tel], input[type=date], input[type=number], input[type=search], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
input:hover, select:hover, textarea:hover { border-color: var(--brand-100); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); }
input[readonly] { background: var(--surface-2); color: var(--muted); }
textarea { min-height: 72px; resize: vertical; }
.section { padding: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.section:first-child { border-top: 0; }
.section > h3 { display: flex; align-items: center; gap: 8px; }
.section > h3 .n { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-50); color: var(--brand); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 14px 16px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .field > .lbl { font-size: 13px; font-weight: 600; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.req::after { content: " *"; color: var(--bad); }
.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.chip span { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; background: var(--surface); }
.chip:hover span { border-color: var(--brand-100); }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.chip.new span { border-style: dashed; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.filters .seg { flex-wrap: nowrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 6px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; color: var(--muted); }
.seg input:checked + span { background: var(--surface); color: var(--brand); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.seg input:focus-visible + span { outline: 2px solid var(--brand); }
.reveal { background: var(--brand-50); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.note { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.note b { color: var(--ink); }
.note.warn { background: var(--warn-soft); color: var(--ink); }
.note.good { background: var(--good-soft); color: var(--ink); }
.suggest { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 6px; }
.suggest button { text-align: left; border: 0; border-top: 1px solid var(--line); background: var(--surface); padding: 10px 12px; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.suggest button:first-child { border-top: 0; }
.suggest button:hover { background: var(--brand-50); }
.savebar { position: sticky; bottom: 0; background: rgba(255,255,255,.96); border-top: 1px solid var(--line); padding: 12px 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-radius: 0 0 var(--r) var(--r); }
@media (max-width: 959px) { .savebar { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); } }
.err { color: var(--bad); font-size: 13px; font-weight: 600; }
.bigmob { display: flex; gap: 10px; flex-wrap: wrap; }
.bigmob input { flex: 1 1 240px; font-size: 1.25rem; padding: 14px 16px; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

/* Patient page */
.ph { padding: 20px; display: flex; flex-direction: column; gap: 18px; }
.ph .top { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.ph .top .main { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ph .contact { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.ph .contact span { display: inline-flex; gap: 5px; align-items: center; }
.steps { display: flex; gap: 0; align-items: flex-start; overflow-x: auto; padding-bottom: 2px; }
.step { flex: 1 1 0; min-width: 62px; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.step::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.step:first-child::before { display: none; }
.step .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; position: relative; z-index: 1; color: #fff; }
.step.done { color: var(--ink); }
.step.done .dot { background: var(--brand); border-color: var(--brand); }
.step.done::before { background: var(--brand); }
.step.lost .dot { border-color: var(--bad); }
.callout { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--brand-50); border-radius: 12px; padding: 12px 14px; }
.callout .t { display: flex; gap: 10px; align-items: center; min-width: 0; }
.callout .ic { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.callout.none { background: var(--warn-soft); } .callout.none .ic { background: var(--warn); }
dl.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 14px 18px; }
dl.facts dt { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
dl.facts dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.tl { list-style: none; margin: 0; padding: 6px 18px 12px; }
.tl > li { display: grid; grid-template-columns: 36px 1fr; gap: 12px; position: relative; padding: 12px 0; }
.tl > li::before { content: ""; position: absolute; left: 17px; top: 46px; bottom: -12px; width: 2px; background: var(--line); }
.tl > li:last-child::before { display: none; }
.tl .ic { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--brand-50); color: var(--brand); }
.tl .ic.call { background: var(--info-soft); color: var(--info); } .tl .ic.fc { background: var(--good-soft); color: var(--good); }
.tl .ic.status { background: var(--warn-soft); color: var(--warn); } .tl .ic.convert { background: var(--brand); color: #fff; }
.tl .t { font-weight: 700; } .tl .meta { font-size: 12.5px; color: var(--muted); }
.tl ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }

/* Call list */
.progress { display: flex; flex-direction: column; gap: 8px; }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tabs .tabbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.tabs .tabbtn[aria-pressed="true"] { border-color: var(--brand); color: #fff; background: var(--brand); }
.tabs .tabbtn[aria-pressed="true"] .badge { background: rgba(255,255,255,.25); color: #fff; }
.ccard { padding: 14px 18px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; }
.ccard:first-child { border-top: 0; }
.ccard .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ccard .info { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.ccard .num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); font-size: 15px; }
@media (max-width: 640px) { .ccard { grid-template-columns: auto minmax(0, 1fr); } .ccard .acts { grid-column: 1 / -1; } .ccard .acts .btn { flex: 1; } }
.otiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.otile { position: relative; }
.otile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.otile span { display: flex; flex-direction: column; gap: 6px; border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 13.5px; font-weight: 600; background: var(--surface); min-height: 68px; }
.otile span svg { color: var(--brand); }
.otile.neg span svg { color: var(--bad); }
.otile.grey span svg { color: var(--muted); }
.otile input:checked + span { border-color: var(--brand); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand); }
.otile input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.ogroup { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-top: 4px; }

/* Camps */
.campgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.campcard { padding: 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; text-align: left; border: 1px solid var(--line); }
.campcard:hover { border-color: var(--brand); }
.campcard .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.campcard .stats b { display: block; font-family: var(--font-display); font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.campcard .stats span { font-size: 12px; color: var(--muted); }

/* Management */
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters .field { flex: 1 1 150px; max-width: 220px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.kpi { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.kpi .lbl { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .val { font-family: var(--font-display); font-size: 1.8rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .delta { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); } .delta.down { color: var(--bad); } .delta.flat { color: var(--muted); }
.chartbox { padding: 14px 18px 18px; overflow-x: auto; }
.chartbox svg text { font-family: var(--font-body); }
.hb { display: flex; flex-direction: column; gap: 9px; }
.hbrow { display: grid; grid-template-columns: minmax(90px, 34%) 1fr; gap: 10px; align-items: center; font-size: 13.5px; }
.hbrow .k { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbtrack { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hbbar { height: 18px; background: var(--brand); border-radius: 0 4px 4px 0; min-width: 2px; cursor: default; }
.hbbar:hover, .hbbar:focus { background: var(--brand-700); }
.hbval { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; font-size: 13px; }
.funnel .hbbar { height: 30px; }
.funnel .hbrow { grid-template-columns: minmax(110px, 30%) 1fr; }
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.t td { padding: 10px 18px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr:last-child td { border-bottom: 0; }
table.t .num { text-align: right; }
table.t th.num { text-align: right; }
table.t td.hl, table.t th.hl { background: var(--brand-50); }
.inbar { display: inline-flex; align-items: center; gap: 8px; justify-content: flex-end; width: 100%; }
.inbar i { display: inline-block; height: 8px; background: var(--brand); border-radius: 0 3px 3px 0; }
.builder { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: start; }
@media (min-width: 1100px) { .builder { grid-template-columns: 270px minmax(0, 1fr); } }
.presets { display: flex; flex-direction: column; }
.presets button { text-align: left; border: 0; border-top: 1px solid var(--line); background: none; padding: 11px 18px; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.presets button:first-child { border-top: 0; }
.presets button:hover { background: var(--surface-2); }
.presets button[aria-current="true"] { background: var(--brand-50); box-shadow: inset 3px 0 0 var(--brand); }
.presets b { font-size: 14px; } .presets span { font-size: 12.5px; color: var(--muted); }
.qrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 12px; }
.approval { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.approval:first-child { border-top: 0; }
.approval .main { flex: 1 1 240px; min-width: 0; }

/* Overlays */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 32, 30, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.modal { width: min(620px, 100%); max-height: calc(100% - 24px - env(safe-area-inset-top, 0px)); overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
@media (min-width: 700px) { .modal-bg { align-items: center; padding: 24px; } .modal { border-radius: 18px; max-height: calc(100% - 48px); } }
.modal .mh { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 18px 6px; }
.modal .mb { padding: 8px 18px 18px; display: flex; flex-direction: column; gap: 14px; }
.modal .mf { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 18px; display: flex; justify-content: flex-end; gap: 8px; }
.x { border: 0; background: var(--surface-2); width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex: none; }
.toast { position: fixed; left: 50%; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; z-index: 30; max-width: calc(100% - 32px); box-shadow: 0 6px 20px rgba(0,0,0,.25); display: flex; gap: 8px; align-items: center; }
@media (min-width: 960px) { .toast { bottom: 24px; } }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rise .2s ease-out; } @keyframes rise { from { opacity: 0; transform: translate(-50%, 8px); } }
  .tile { transition: transform .15s; }
}

/* Hero band on the counsellor's Today page */
.hero { background: var(--brand); color: #fff; border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; border: 36px solid rgba(255,255,255,.07); pointer-events: none; }
.hero h1 { color: #fff; font-size: 1.5rem; }
.hero p { color: rgba(255,255,255,.82); }
.hero .search { position: relative; z-index: 1; }
.hero .search input { border: 0; padding: 13px 14px 13px 42px; border-radius: 12px; font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.hero .search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr)); gap: 10px; position: relative; z-index: 1; }
.tile { background: var(--surface); color: var(--ink); border: 0; border-radius: 14px; padding: 12px 14px; text-align: left; display: flex; flex-direction: column; gap: 2px; box-shadow: 0 2px 8px rgba(0,0,0,.08); text-decoration: none; }
.tile b { font-family: var(--font-display); font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tile span { font-size: 13px; color: var(--muted); }
.tile.alert b { color: var(--bad); }

/* Things the mock-up drew with JavaScript, done with plain HTML here */
a { color: var(--brand); }
a.btn { text-decoration: none; color: inherit; }
a.btn.primary { color: #fff; }
.prow .name { text-decoration: none; }
.messages { display: flex; flex-direction: column; gap: 8px; }
.msg { border-radius: 12px; padding: 11px 14px; font-size: 14px; display: flex; gap: 8px; align-items: center; background: var(--good-soft); color: var(--ink); }
.msg.error { background: var(--bad-soft); }
.errorlist { list-style: none; margin: 2px 0 0; padding: 0; color: var(--bad); font-size: 13px; font-weight: 600; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--bad); }
.form-errors { background: var(--bad-soft); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.logout { border: 0; background: none; color: var(--muted); font-weight: 600; cursor: pointer; padding: 6px 0; font-size: 13px; }
.logout:hover { color: var(--bad); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px max(16px, env(safe-area-inset-left, 0px)); background: var(--brand-50); }
.login-card { width: min(380px, 100%); }
.login-card img { height: 46px; width: auto; display: block; margin: 0 auto; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 12px; }
[hidden] { display: none !important; }
.side nav a, .tabbar a { text-decoration: none; }
.side .who { align-items: flex-start; }
.mtop .logout { padding: 0; }
.tabs .tabbtn { text-decoration: none; }
.matchcard { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 12px; padding: 12px 14px; }
.matchcard .main { flex: 1 1 220px; min-width: 0; }
#matchBox:not(:has(.matchcard)) { display: none; }

/* Calendar for date boxes (flatpickr), in Femcare teal */
.flatpickr-calendar { font-family: inherit; border-radius: 12px; }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.selected:focus { background: var(--brand); border-color: var(--brand); }
.flatpickr-day.today { border-color: var(--brand); }
.flatpickr-day:hover { background: var(--brand-50); border-color: var(--brand-50); }
.flatpickr-months .flatpickr-month, .flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 600; }
