/* Posture Guard doctor page. Look approved by Omar on 18 Oct 2026 (light clinical page). */
@font-face { font-family: "PG Plex"; src: url(fonts/plex-sans.woff) format("woff"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "PG Hanken"; src: url(fonts/hanken.woff) format("woff"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "PG Plex Arabic"; src: url(fonts/plex-arabic-regular.woff) format("woff"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "PG Plex Arabic"; src: url(fonts/plex-arabic-semibold.woff) format("woff"); font-weight: 500 700; font-display: swap; unicode-range: U+0600-06FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
:root {
  --paper: #F4F7F5; --card: #FFFFFF; --ink: #14231C; --muted: #5E6F67; --line: #DCE4E0;
  --green: #1F8F52; --green-d: #187444; --green-soft: #E3F2E9; --amber: #C9821A; --amber-soft: #FBF0DD;
  --red: #B93A33; --red-soft: #F8E4E2; --dark: #12241B;
  --font: "PG Plex Arabic", "PG Plex", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[dir=ltr] body { font-family: "PG Plex", "PG Plex Arabic", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 600; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 8px; }
h3 { font-size: 15px; font-weight: 600; margin: 18px 0 4px; }
p { margin: 0 0 10px; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.ok { color: var(--green-d); }
.amber { color: var(--amber); }
.offscreen { position: fixed; left: -9999px; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; border-radius: 8px; padding: 9px 16px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, transform .1s; }
.btn:hover { background: #EEF3F0; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-d); }
.btn-danger { color: var(--red); border-color: #E7C3BF; }
.btn-danger:hover { background: var(--red-soft); }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.wide { width: 100%; padding: 11px 16px; }
.linkbtn { background: none; border: 0; padding: 4px 6px; cursor: pointer; color: var(--muted); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn.small { font-size: 13px; }
.linkbtn.danger { color: var(--red); }
.form-error { color: var(--red); font-size: 13.5px; margin: 4px 0 10px; }

/* top bar */
.top { height: 64px; display: flex; align-items: center; gap: 14px; padding: 0 32px; border-bottom: 1px solid var(--line); background: var(--card); position: sticky; top: 0; z-index: 5; }
.mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; flex: none; font-family: "PG Plex", sans-serif; }
.brand { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.brand b { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.brand small { color: var(--muted); font-size: 14px; white-space: nowrap; }
.topnav { display: flex; gap: 4px; margin-inline-start: 16px; }
.topnav a { text-decoration: none; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.topnav a.on { background: var(--paper); color: var(--ink); }
.clinicpick { border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #fff; max-width: 200px; }
.grow { flex: 1; }
.top-right { display: flex; align-items: center; gap: 12px; }
.who { color: var(--muted); font-size: 14px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page { padding: 28px 32px 48px; max-width: 1400px; margin: 0 auto; }
.pagehead { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead p { margin: 2px 0 0; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { width: 260px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: #fff; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; min-width: 0; }
.panel.narrow { max-width: 560px; margin: 40px auto; }
.panel.narrow h1 { margin-bottom: 10px; }
.panelhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.copyrow { display: flex; gap: 8px; align-items: center; margin: 4px 0 18px; }
code.mail { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; font-family: inherit; }

/* sign in */
.signin { display: grid; grid-template-columns: 52fr 48fr; min-height: 100vh; }
.signin-side { background: var(--dark); color: #fff; padding: 56px 64px; display: flex; flex-direction: column; }
.signin-side .brandrow { display: flex; align-items: center; gap: 12px; font-size: 16px; margin-bottom: 72px; }
.signin-side h1 { font-size: 42px; line-height: 1.12; max-width: 460px; margin-bottom: 18px; letter-spacing: -.02em; }
.signin-side p { color: #B9C7BF; font-size: 17px; max-width: 420px; line-height: 1.55; }
.signin-side small { margin-top: auto; color: #8FA197; font-size: 13.5px; }
.signin-box { display: grid; place-items: center; padding: 40px 24px; position: relative; }
.signin-inner { width: 100%; max-width: 380px; }
.signin-inner h2 { font-size: 24px; margin-bottom: 6px; }
.langswitch { position: absolute; top: 20px; inset-inline-end: 24px; }
.google { margin: 14px 0 6px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13.5px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .inline input, .namebox input { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; font-size: 15px; }
.signin-form .btn { margin-top: 4px; }
.signin-inner .small { margin-top: 14px; color: var(--muted); }

/* list */
.sums { display: flex; gap: 32px; margin: 0 0 18px; }
.sums b { display: block; font-size: 22px; font-weight: 600; }
.sums span { color: var(--ink); font-size: 14px; }
.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.plist th, .simple th { text-align: start; font-weight: 500; font-size: 13.5px; color: var(--muted); padding: 14px 16px; border-bottom: 1px solid var(--line); background: #FAFBFA; white-space: nowrap; }
.plist td, .simple td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14.5px; }
.plist tr:last-child td { border-bottom: 0; }
.plist tbody tr { cursor: pointer; transition: background .12s; }
.plist tbody tr:hover { background: #F7FAF8; }
.plist tbody tr.attention td:first-child { box-shadow: inset 4px 0 var(--amber); }
[dir=rtl] .plist tbody tr.attention td:first-child { box-shadow: inset -4px 0 var(--amber); }
.plist tbody tr.stopped { color: var(--muted); }
.pname { display: block; font-weight: 600; }
.pmail { display: block; color: var(--muted); font-size: 13px; }
td.score { font-weight: 600; font-size: 16px; }
.tag { display: table; margin-top: 4px; background: var(--amber-soft); color: #8A5A10; font-size: 12.5px; padding: 2px 8px; border-radius: 6px; }
.spine { display: flex; gap: 3px; align-items: center; }
.v { width: 9px; height: 18px; border-radius: 3px 3px 4px 4px; position: relative; display: inline-block; flex: none; }
.v::after { content: ""; position: absolute; left: 2px; right: 2px; bottom: -4px; height: 2px; border-radius: 2px; background: var(--line); }
.v.g { background: #2FA866; } .v.ok { background: #9BCFB0; } .v.lo { background: var(--amber); } .v.no { background: transparent; border: 1.5px dashed #B9C6BF; }
.legend { display: flex; gap: 18px; margin-top: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.empty { padding: 40px; text-align: center; color: var(--muted); }
.empty h2 { color: var(--ink); }

/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(20, 35, 28, .38); display: grid; place-items: center; z-index: 20; padding: 16px; animation: fade .15s ease-out; }
.modal { background: #fff; border-radius: 14px; padding: 24px 26px; width: 100%; max-width: 520px; box-shadow: 0 20px 60px rgba(0,0,0,.18); animation: pop .18s cubic-bezier(.2,.8,.3,1); max-height: calc(100vh - 32px); overflow: auto; }
.modal.invite { max-width: 560px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.modal-head h2 { font-size: 21px; margin: 0; }
.x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 2px 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }
.tabs { display: flex; gap: 8px; margin: 12px 0 16px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 8px 16px; font-weight: 600; font-size: 14px; cursor: pointer; }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.bigcode { font-size: 36px; letter-spacing: .14em; font-weight: 600; text-align: center; border: 1.5px dashed #B9C6BF; border-radius: 10px; padding: 14px; margin: 12px 0 16px; font-family: "PG Plex", sans-serif; }
.midcode { font-size: 24px; letter-spacing: .12em; font-weight: 600; margin: 6px 0; font-family: "PG Plex", sans-serif; }
.btnrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btnrow.end { display: flex; justify-content: flex-end; margin-top: 18px; }
.qrrow { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; }
.qrbox { border: 1px solid var(--line); border-radius: 12px; padding: 8px; line-height: 0; }
.linkbox { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px; word-break: break-all; margin: 10px 0 16px; font-size: 14px; }
.inline { display: flex; gap: 8px; align-items: center; }
.inline input { flex: 1; min-width: 0; }
.inv-foot { margin: 16px 0 0; }
.inv-body .ok { margin-top: 12px; }

/* patient */
.crumb { font-size: 14px; color: var(--muted); margin: 0 0 6px; }
.crumb a { text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.namerow { display: flex; align-items: baseline; gap: 10px; }
.namebox { display: flex; gap: 8px; align-items: center; max-width: 520px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.maincol { display: grid; gap: 16px; min-width: 0; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.periodrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.seg button { border: 0; border-inline-end: 1px solid var(--line); background: none; padding: 8px 16px; font-size: 14px; cursor: pointer; }
.seg button:last-child { border-inline-end: 0; }
.seg button.on { background: var(--ink); color: #fff; }
.pnav { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.pnav b { font-weight: 600; min-width: 150px; text-align: center; }
.arrow { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; font-size: 18px; line-height: 1; }
.arrow[disabled] { opacity: .35; cursor: default; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 18px; }
.kpi { padding: 2px 18px; border-inline-start: 1px solid var(--line); min-width: 0; }
.kpi:first-child { border: 0; padding-inline-start: 0; }
.kpi b { font-size: 27px; font-weight: 600; display: block; line-height: 1.2; }
.kpi > span { font-size: 13.5px; color: var(--muted); display: block; }
.delta { display: block; font-size: 13px; font-weight: 600; margin-top: 2px; }
.delta.down { color: var(--red); } .delta.up { color: var(--green-d); }
.chart { width: 100%; height: auto; display: block; margin-top: 6px; overflow: visible; }
.chart .axis { font-size: 11px; fill: var(--muted); }
.chart .val { font-size: 11.5px; fill: var(--ink); font-weight: 600; }
.chart .base { stroke: var(--line); }
.chart .goal { stroke: var(--amber); stroke-dasharray: 4 4; }
.chart .bar.g { fill: #2FA866; } .chart .bar.ok { fill: #9BCFB0; } .chart .bar.lo { fill: var(--amber); }
.chart .line { fill: none; stroke: var(--green); stroke-width: 2; stroke-linejoin: round; }
.chart .area { fill: var(--green-soft); opacity: .7; }
.chart .dot { fill: var(--green); }
.spinechart .slabel { font-size: 13.5px; font-weight: 600; fill: var(--ink); }
.spinechart .scount { font-size: 13px; font-weight: 600; }
.spinechart .small { font-size: 12.5px; fill: var(--muted); }
.hours { display: grid; gap: 4px; margin-top: 8px; }
.hc i { display: block; height: 46px; border-radius: 6px; }
.hc i.g { background: #2FA866; } .hc i.ok { background: #9BCFB0; } .hc i.lo { background: var(--amber); } .hc i.bad { background: #C2413A; } .hc i.no { background: transparent; border: 1.5px dashed #C9D4CE; }
.hc span { display: block; text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.words p { font-size: 15px; line-height: 1.6; }
.hourclock .hc-cap { text-transform: uppercase; letter-spacing: .04em; }
.hourclock .hc-big { font-size: 22px; font-weight: 700; fill: var(--ink); }
.hourkey { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.hk-bar { display: flex; gap: 2px; }
.hk-bar span { width: 34px; height: 10px; border-radius: 3px; position: relative; margin-bottom: 14px; }
.hk-bar small { position: absolute; top: 12px; left: -4px; right: -4px; text-align: center; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.hk-deep { margin-inline-start: 10px; }
.hk-deep i, .wlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.wrow { display: flex; gap: 22px; align-items: center; }
.wring { flex: none; }
.wring .wr-big { font-size: 22px; font-weight: 700; fill: var(--ink); }
.wtext p { margin: 0 0 6px; }
.wlegend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink); margin-top: 8px; }
@media (max-width: 560px) { .wrow { flex-direction: column; align-items: flex-start; gap: 10px; } .hk-bar span { width: 26px; } }
@media print { .hourclock, .wring, .hourkey span, .wlegend i { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.side { display: grid; gap: 16px; position: sticky; top: 82px; }
.srow { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; gap: 8px; }
.srow.col { display: block; }
.srow-top { display: flex; justify-content: space-between; align-items: center; }
.ctl { display: flex; align-items: center; gap: 6px; }
.unit { color: var(--muted); font-size: 13px; min-width: 22px; }
.numin { width: 62px; font-size: 14px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; text-align: center; background: #fff; }
.numin:disabled { background: var(--paper); color: var(--muted); }
.range { width: 100%; accent-color: var(--green); margin: 10px 0 2px; }
.range.unset { opacity: .45; }
.sw { width: 38px; height: 22px; border-radius: 11px; background: #C9D4CE; position: relative; border: 0; cursor: pointer; flex: none; transition: background .15s; }
.sw::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
.sw.on { background: var(--green); }
.sw.on::after { inset-inline-start: 19px; }
.sw.unset { background: #E4EAE7; }
.settings .btn { margin-top: 16px; }
.settings .small { margin: 10px 0 0; }
textarea { width: 100%; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; height: 84px; resize: vertical; background: #fff; }
.notes .btn { margin: 10px 0 6px; }
.note { padding: 12px 0; border-top: 1px solid var(--line); }
.note p { white-space: pre-wrap; margin: 0 0 4px; font-size: 14.5px; }
.note small { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 12.5px; }

/* clinic page */
.clinicgrid { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 16px; align-items: start; }
.clinicgrid > div { display: grid; gap: 16px; }
.lrow { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.simple tr.dim td { color: var(--muted); }
.mono-code { font-weight: 600; letter-spacing: .06em; white-space: nowrap; }

/* toast */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 12px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; opacity: 0; transition: opacity .2s, transform .2s; z-index: 30; max-width: calc(100vw - 32px); font-size: 14.5px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--red); }

.report-head, .printonly { display: none; }
.report-note { margin: 0; }

/* phone and small screens */
@media (max-width: 1100px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; grid-template-columns: 1fr 1fr; }
  .clinicgrid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .top { padding: 0 16px; gap: 10px; height: auto; min-height: 56px; flex-wrap: wrap; padding-block: 8px; }
  .brand small, .who { display: none; }
  .topnav { margin-inline-start: 0; order: 5; width: 100%; }
  .page { padding: 18px 16px 40px; }
  .search { width: 100%; }
  .actions { width: 100%; }
  .actions .btn { flex: 1; }
  .sums { gap: 20px; }
  .signin { grid-template-columns: 1fr; }
  .signin-side { padding: 28px 20px; }
  .signin-side .brandrow { margin-bottom: 24px; }
  .signin-side h1 { font-size: 28px; }
  .signin-side small { margin-top: 16px; }
  .grid2, .side { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .kpi:nth-child(odd) { border: 0; padding-inline-start: 0; }
  .plist thead { display: none; }
  .plist tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 14px; border-bottom: 1px solid var(--line); gap: 6px 12px; }
  .plist td { padding: 0; border: 0; }
  .plist td:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .plist td:nth-child(4) { display: none; }
  .plist td:nth-child(5) { grid-column: 1 / -1; order: 4; font-size: 13.5px; color: var(--muted); }
  .plist tbody tr.attention td:first-child { box-shadow: none; }
  .plist tbody tr.attention { box-shadow: inset 4px 0 var(--amber); }
  .qrrow { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .bigcode { font-size: 28px; }
  .btnrow { grid-template-columns: 1fr; }
  .modal { padding: 20px 18px; }
}

/* PDF report (Print → Save as PDF) */
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 12px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .top, .actions, .crumb, .namerow .linkbtn, .seg, .pnav .arrow, .settings, .noprint, .note .linkbtn, .toast, .modal-back { display: none !important; }
  .page { padding: 0; max-width: none; }
  .report-head { display: flex; flex-direction: column; gap: 2px; border-bottom: 2px solid var(--green); padding-bottom: 8px; margin-bottom: 12px; }
  .report-head b { font-size: 18px; color: var(--green-d); }
  .patienthead { margin-bottom: 8px; }
  .layout { grid-template-columns: 1fr; }
  .side { position: static; grid-template-columns: 1fr; }
  .panel { break-inside: avoid; border-color: #ccc; padding: 10px 12px; }
  .grid2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .maincol { gap: 10px; }
  .kpi b { font-size: 20px; }
  body.printing-card > *:not(.printonly) { display: none !important; }
  body.printing-card .printonly { display: block; }
}
.printcard { width: 150mm; border: 1px solid #ccc; border-radius: 10px; padding: 18px 22px; font-size: 13px; }
.pc-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.pc-head b { display: block; font-size: 17px; }
.pc-head small { color: var(--muted); }
.pc-body { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
.pc-body ol { margin: 0; padding-inline-start: 18px; line-height: 1.6; }
.pc-body .bigcode { font-size: 24px; padding: 8px; margin: 6px 0 0; }
.pc-qr { text-align: center; }
.pc-qr small { display: block; color: var(--muted); }
.pc-foot { display: block; margin-top: 10px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
.also { margin: 6px 0 0; padding-inline-start: 37.5%; }
@media (max-width: 760px) { .also { padding-inline-start: 0; } }
.bigcode.left { font-size: 28px; margin: 8px 0 10px; }
.btnrow.three { grid-template-columns: 1fr 1fr 1fr; margin-top: 16px; }
@media (max-width: 760px) { .btnrow.three { grid-template-columns: 1fr; } }
.block { display: block; font-size: 12.5px; }

/* ===== website 0.19.1: departments, roles, team, move patient, profile, home program, changed settings ===== */
.who { max-width: 340px; display: inline-flex; align-items: center; gap: 6px; }
.who > span:first-child { overflow: hidden; text-overflow: ellipsis; }
.rolechip { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 2px 8px; background: var(--green-soft); color: var(--green-d); white-space: nowrap; flex: none; }
.deps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 18px; }
.dep { cursor: pointer; }
.dep h2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dep h2 small { font-size: 13px; color: var(--muted); font-weight: 500; }
.nums { display: flex; gap: 22px; margin: 6px 0 12px; }
.nums b { display: block; font-size: 22px; font-weight: 600; }
.nums span { font-size: 13px; color: var(--muted); }
.doc { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; padding: 7px 0; border-top: 1px solid var(--line); }
.doc > span { color: var(--muted); white-space: nowrap; }
.doc .amber { font-weight: 600; }
.doc em { font-style: normal; font-size: 12px; color: var(--green-d); background: var(--green-soft); border-radius: 5px; padding: 1px 6px; margin-inline-start: 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tag.blue { background: #EAF1F7; color: #2C5A7A; }
.tag.dep { background: #EEF3F0; color: var(--ink); margin: 0; }
.callout { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 0 0 14px; }
.callout.info { background: #EAF1F7; }
.callout p { margin: 0; }
.callout p + p { margin-top: 4px; }
.choice { display: grid; gap: 8px; margin: 6px 0 4px; }
.opt { border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; background: #fff; text-align: start; cursor: pointer; width: 100%; }
.opt.on { border-color: var(--green); background: #F3FAF6; }
.opt i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #A8B8AF; flex: none; margin-top: 3px; }
.opt.on i { border: 5px solid var(--green); }
.opt b { display: block; }
.opt small { color: var(--muted); }
.lbl2 { font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.lbl2 small { font-weight: 400; }
.sel { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14.5px; background: #fff; width: 100%; }
.sel.small { width: auto; font-size: 13px; padding: 5px 8px; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.prof { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin: 2px 0 0; font-size: 14.5px; }
.docline { margin: 2px 0 0; }
.changeline { background: #EAF1F7; border-radius: 8px; padding: 8px 10px; margin: -4px 0 10px; font-size: 13px; }
.changeline p { margin: 0 0 6px; }
.changeline .btnrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.hpblk { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 12px; }
.hp-title { font-size: 15px; }
.hpchips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hpchip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 3px 4px 3px 12px; font-size: 14px; background: #fff; }
.hpchip b { font-weight: 600; }
.hpchip .x { border: 0; background: none; width: 22px; height: 22px; border-radius: 50%; color: var(--muted); cursor: pointer; font-size: 12px; }
.hpadd { display: inline-flex; gap: 6px; align-items: center; }
.hptime { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 14px; }
.hpnote { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; resize: vertical; min-height: 52px; }
.hpweek { background: var(--green-soft); border-radius: 8px; padding: 8px 10px; font-size: 13.5px; margin-top: 8px; }
.hpweek b { display: block; color: var(--green-d); }
.hpweek small { color: var(--muted); font-size: 12.5px; }
.teamact { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.deprow { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.deprow form { flex: 1; min-width: 220px; }
.locked { color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.lockbar { display: inline-block; width: 46px; height: 8px; border-radius: 4px; background: repeating-linear-gradient(90deg, #DCE4E0 0 6px, #EEF3F0 6px 12px); }
@media print { .changeline, .hpblk .btn, .hpadd { display: none !important; } }

/* ---------- sign-in: metro map (Omar 19 Oct 2026: concept 10; 18:09 "keep it light but give the page character, names
   change with their stops, a better phone page, no lag") ---------- */
.metro { --navy: #14213D; --sun: #FFD23F; --paper: #F4F5F0; min-height: 100vh; color: var(--navy);
  background:
    radial-gradient(900px 520px at 12% 8%, rgba(31, 143, 82, .10), transparent 70%),
    radial-gradient(800px 560px at 62% 96%, rgba(37, 99, 235, .09), transparent 70%),
    radial-gradient(700px 420px at 98% 30%, rgba(224, 138, 18, .08), transparent 70%),
    radial-gradient(rgba(20, 33, 61, .11) 1.1px, transparent 1.4px) 0 0 / 26px 26px,
    var(--paper);
  display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-rows: auto 1fr auto; gap: 18px 56px;
  padding: 24px max(40px, calc((100vw - 1720px) / 2)) 28px; align-items: center; /* option A: the map takes the room */
  font-family: "PG Hanken", "PG Plex Arabic", system-ui, sans-serif; }
[dir=rtl] .metro { font-family: "PG Plex Arabic", "PG Hanken", system-ui, sans-serif; }
.m-top { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; align-self: start; gap: 12px; }
.m-brand, .m-lang { display: inline-flex; align-items: center; gap: 10px; height: 44px; border-radius: 22px; background: #fff;
  border: 1px solid #E2E6EE; box-shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 8px 24px -14px rgba(20, 33, 61, .25); }
.m-brand { padding: 0 16px 0 6px; font-size: 16px; } .m-brand b { font-weight: 800; } .m-brand span:last-child { color: #5D6A86; font-weight: 500; }
.m-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #1F8F52; color: #fff; font-weight: 800; font-size: 17px; }
.m-lang { padding: 0 16px; color: var(--navy); font-size: 15px; font-weight: 600; cursor: pointer; font-family: "PG Plex Arabic", "PG Hanken", sans-serif;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), border-color 160ms ease; }
.m-lang:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .m-lang:hover { border-color: #C7CEDB; } }
.m-mapwrap { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.metro-map { width: 100%; height: auto; display: block; overflow: visible; }
.metro-desk { max-width: 1180px; max-height: calc(100vh - 230px); min-height: 320px; margin-inline: auto; }
.m-phonecard { display: none; }
.m-ticker { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 34px; margin: 6px 0 2px; font-size: 14.5px; color: #24314F; }
.m-ticker b { font-weight: 800; color: var(--navy); }
.m-tdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.metro-map .m-line { fill: none; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.metro-map .m-halo { fill: none; stroke-width: 26; stroke-linecap: round; stroke-linejoin: round; opacity: .10; }
.metro-phone .m-line { stroke-width: 7; } .metro-phone .m-halo { stroke-width: 15; }
.metro-map .m-stopdot { fill: #fff; stroke-width: 5; }
.metro-phone .m-stopdot { stroke-width: 3; }
.metro-map .m-stop { font-weight: 600; fill: #24314F; }
.metro-map .m-time { font-weight: 800; fill: var(--navy); }
.metro-map .m-tag { font-weight: 800; fill: #fff; }
.metro-map .m-station { fill: #fff; stroke: var(--navy); stroke-width: 5; }
.metro-phone .m-station { stroke-width: 3.5; }
.metro-map .m-ring { fill: none; stroke: var(--navy); stroke-width: 4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.metro-map .m-station-name { font-size: 18px; font-weight: 800; fill: var(--navy); }
.metro-phone .m-station-name { font-size: 14px; }
.metro-map .m-caption { font-size: 17px; font-weight: 700; fill: #3A4766; }
.metro-map text { font-family: inherit; }
.metro-map .m-tagg, .metro-map .m-stopsg { transform-box: view-box; }
.m-note { font-size: 13px; color: #6B7690; margin: 10px 0 0; text-align: center; }
.m-panel { background: var(--navy); color: #fff; border-radius: 24px; padding: 38px 32px 32px; align-self: center; display: flex; flex-direction: column;
  box-shadow: 0 30px 70px -34px rgba(20, 33, 61, .55); }
.m-panel h1 { font-size: 44px; line-height: 1.02; letter-spacing: -.03em; font-weight: 800; margin: 0 0 14px; }
[dir=rtl] .m-panel h1 { font-size: 38px; line-height: 1.25; letter-spacing: 0; font-weight: 700; }
.m-sub { font-size: 17px; line-height: 1.45; margin: 0 0 24px; color: #C9D2E8; }
.m-form { display: flex; flex-direction: column; gap: 10px; }
.m-field { display: block; }
.m-in { width: 100%; height: 52px; border: 0; border-radius: 26px; padding: 0 20px; font-size: 16px; font-weight: 600; background: #fff; color: var(--navy); font-family: "PG Hanken", "PG Plex Arabic", sans-serif; }
[dir=rtl] .m-in { text-align: right; }
.m-in::placeholder { color: #6B7690; font-weight: 500; }
[dir=rtl] .m-in::placeholder { font-family: "PG Plex Arabic", sans-serif; }
.m-go { height: 56px; border: 0; border-radius: 28px; background: var(--sun); color: var(--navy); font-weight: 800; font-size: 19px; margin-top: 6px; cursor: pointer; font-family: inherit;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), background-color 160ms ease; }
.m-go:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .m-go:hover { background: #FFDC63; } }
.m-go:disabled { opacity: .7; cursor: default; }
.m-google { display: flex; gap: 10px; align-items: center; justify-content: center; width: 100%; height: 52px; border-radius: 26px; border: 2px solid #3A4A6B;
  background: none; color: #fff; margin-top: 12px; font-weight: 700; font-size: 16px; cursor: pointer; font-family: inherit;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), border-color 160ms ease; }
.m-google:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .m-google:hover { border-color: #5B6C90; } }
.m-back { margin-top: 4px; }
.m-links { text-align: center; margin: 14px 0 0; font-size: 15px; color: rgba(255,255,255,.72); }
.m-links a { color: #fff; text-underline-offset: 3px; }
.m-error { margin: 2px 4px; color: #FFB4AB; font-size: 14.5px; }
.metro :focus-visible { outline: 3px solid #E0A800; outline-offset: 2px; }
.m-panel :focus-visible { outline-color: var(--sun); }
@media (max-width: 980px) { .metro { grid-template-columns: minmax(0, 1fr) 340px; padding: 20px 24px 32px; gap: 16px 24px; } .m-panel h1 { font-size: 36px; } }
/* option D: three steps at the bottom, drawn like stations on a dashed road */
.m-steps { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; }
.m-steps li { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid #E2E6EE; border-radius: 999px; padding: 8px 20px 8px 8px;
  box-shadow: 0 8px 22px -18px rgba(20, 33, 61, .4); }
[dir=rtl] .m-steps li { padding: 8px 8px 8px 20px; }
.m-steps li + li { margin-inline-start: 64px; position: relative; }
.m-steps li + li::before { content: ""; position: absolute; inset-inline-end: calc(100% + 6px); top: 50%; width: 52px; height: 4px; margin-top: -2px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgba(20, 33, 61, .35) 0 8px, transparent 8px 14px); }
.m-stepn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: var(--sun); font-weight: 800; font-size: 16px; flex: none; }
.m-stept { display: flex; flex-direction: column; line-height: 1.25; }
.m-stept b { font-size: 15px; font-weight: 800; } .m-stept small { font-size: 13px; color: #5D6A86; }
@media (max-width: 1100px) { .m-steps li + li { margin-inline-start: 36px; } .m-steps li + li::before { width: 26px; } }
/* phone: its own drawing in a card, names readable, then a compact form */
@media (max-width: 760px) {
  .metro { grid-template-columns: 1fr; grid-template-rows: auto auto auto; align-content: start; padding: 14px 14px 24px; gap: 14px; }
  .m-brand { height: 40px; font-size: 15px; } .m-brand span:last-child { display: none; } .m-mark { width: 28px; height: 28px; font-size: 15px; }
  .m-lang { height: 40px; }
  .m-mapwrap { order: 2; }
  .metro-desk, .m-note { display: none; }
  .m-phonecard { display: block; background: rgba(255,255,255,.75); border: 1px solid #E2E6EE; border-radius: 22px; padding: 14px 10px 8px;
    box-shadow: 0 10px 30px -20px rgba(20, 33, 61, .35); }
  .m-panel { order: 3; padding: 24px 20px 20px; border-radius: 22px; }
  .m-panel h1 { font-size: 29px; margin-bottom: 8px; }
  [dir=rtl] .m-panel h1 { font-size: 27px; }
  .m-sub { font-size: 15px; margin-bottom: 18px; }
  .m-in { height: 48px; } .m-go { height: 52px; font-size: 18px; } .m-google { height: 48px; }
  .m-steps { order: 4; flex-direction: column; align-items: stretch; gap: 0; padding: 4px 6px 0; }
  .m-steps li { background: none; border: 0; box-shadow: none; padding: 6px 0; }
  .m-steps li + li { margin: 0; }
  .m-steps li + li::before { inset-inline-start: 16px; inset-inline-end: auto; top: -12px; width: 4px; height: 18px; margin: 0;
    background: repeating-linear-gradient(180deg, rgba(20, 33, 61, .35) 0 5px, transparent 5px 9px); }
}
