/* Medial — organisation model, shared interface pieces (prefix og-). Loaded by every app next to org.js.
   Uses the theme tokens every app defines (--surface, --line, --ink, --muted, --deep, --accent, --ok, --warn, --danger, --info)
   and the shared building blocks (.btn, .card, .tbl, .badge, .seg, .input, .select, .check, .hint, .search).
   Everything else it needs (dialog, switch, menu, bar) is styled here, so it does not depend on one app's stylesheet. */

.og-ltr{direction:ltr;unicode-bidi:isolate;display:inline-block}
.og-sp{flex:1}
.og-mt{margin-top:10px}
.og-nw{white-space:nowrap}
.og-na{color:var(--faint)}

/* ---------- a unit: type icon + name ---------- */
.og-ti{display:inline-grid;place-items:center;width:20px;height:20px;flex:none;color:var(--muted)}
.og-ti svg{width:16px;height:16px}
.og-ti.og-t-pharmacy{color:var(--accent)}
.og-ti.og-t-clinic{color:var(--info)}
.og-ti.og-t-lab{color:var(--violet,#6d3bd1)}
.og-u{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:100%;vertical-align:middle}
.og-u-n{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;color:var(--ink)}
.og-ext,.og-own,.og-here{flex:none;font-size:.7rem;font-weight:500;line-height:1.7;padding:0 6px;border-radius:5px;border:1px dashed var(--line);color:var(--muted);white-space:nowrap}
.og-ext{border-color:color-mix(in srgb,var(--warn) 45%,var(--line));color:var(--warn)}
.og-here{border-style:solid}
.og-m-t{flex:1;min-width:0;display:block;text-align:start}
.og-m-t>b{display:block;font-weight:500;font-size:.9rem;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.og-m-t>b i{font-style:normal;font-weight:400;color:var(--muted)}
.og-m-t>small{display:block;font-size:.76rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.og-cnt{flex:none;min-width:20px;padding:0 6px;border-radius:999px;background:var(--surface-2);border:1px solid var(--line);font-size:.74rem;font-weight:600;line-height:1.55;text-align:center;color:var(--ink-2)}

/* link status and what a link shares */
.og-st{display:inline-flex;align-items:center;gap:5px;font-size:.76rem;font-weight:500;white-space:nowrap;color:var(--ink-2)}
.og-st::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--faint);flex:none}
.og-st-active::before{background:var(--ok)}
.og-st-pending{color:var(--warn)}.og-st-pending::before{background:var(--warn)}
.og-st-paused{color:var(--muted)}.og-st-paused::before{background:none;border:1.5px solid var(--muted);width:6px;height:6px}
.og-sh{display:inline-flex;gap:5px;align-items:center}
.og-sh>span{display:grid;place-items:center;color:var(--faint);opacity:.55}
.og-sh>span.on{color:var(--ink);opacity:1}
.og-sh svg{width:14px;height:14px}

/* switch */
.og-sw{width:36px;height:20px;border-radius:99px;border:0;background:color-mix(in srgb,var(--ink) 24%,var(--surface));position:relative;flex:none;transition:.15s;padding:0;cursor:pointer;vertical-align:middle}
.og-sw::after{content:"";position:absolute;top:3px;inset-inline-start:3px;width:14px;height:14px;border-radius:50%;background:#fff;transition:.15s}
.og-sw[aria-checked="true"]{background:var(--deep)}
.og-sw[aria-checked="true"]::after{inset-inline-start:19px}
.og-sw:disabled{opacity:.45;cursor:not-allowed}
.og-sw:focus-visible,.og-more:focus-visible,.og-cell:focus-visible,.og-lc:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- the chip in the top bar and the perspective menu ---------- */
.og-chip>svg:first-child{flex:none}
.og-chip>span{color:var(--ink);font-weight:600;overflow:hidden;text-overflow:ellipsis}
.og-chip .og-chev{display:grid;flex:none;color:var(--muted);transition:transform .15s}
.og-chip .og-chev svg{width:14px;height:14px}
.og-chip .og-c-as{display:grid;flex:none;color:var(--warn)}
.og-chip .og-c-as svg{width:14px;height:14px}
.og-chip[aria-expanded="true"]{background:var(--surface-2)}
.og-chip[aria-expanded="true"] .og-chev{transform:rotate(180deg)}
.og-c-short{display:none}
@media(max-width:1280px){.og-c-full{display:none}.og-c-short{display:inline}}

.og-menu{position:fixed;z-index:60;width:384px;max-width:calc(100vw - 16px);max-height:calc(100dvh - 64px);display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 14px 40px rgba(8,20,18,.2);font-size:.88rem}
.og-menu[hidden]{display:none}
.og-m-s{display:flex;align-items:center;gap:8px;margin:8px 8px 4px;padding:0 10px;height:34px;border:1px solid var(--line);border-radius:9px;color:var(--muted);flex:none}
.og-m-s svg{width:15px;height:15px;flex:none}
.og-m-s input{flex:1;min-width:0;border:0;outline:0;background:none;color:var(--ink);font:inherit}
.og-m-s:focus-within{border-color:var(--accent)}
.og-m-b{flex:1;min-height:0;overflow-y:auto;padding:0 6px 6px;scrollbar-width:thin}
.og-m-h{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px 3px;font-size:.74rem;font-weight:500;color:var(--muted)}
.og-m-back{border:0;background:none;color:var(--accent-ink,var(--accent));font:inherit;font-weight:600;padding:0;cursor:pointer}
.og-m-i{display:flex;align-items:center;gap:8px;width:100%;min-height:38px;padding:5px 10px;border:0;border-radius:8px;background:none;color:var(--ink-2);text-align:start;position:relative;font:inherit;cursor:pointer}
.og-m-i:hover{background:var(--surface-2)}
.og-m-i:focus-visible,.og-m-x:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.og-m-i.active{background:color-mix(in srgb,var(--ink) 6%,transparent)}
.og-m-i.active .og-m-t>b{font-weight:600}
.og-m-i.active::before{content:"";position:absolute;inset-inline-start:0;top:8px;bottom:8px;width:3px;border-radius:3px;background:var(--deep)}
.og-m-ro{cursor:default}.og-m-ro:hover{background:none}
.og-m-u{min-height:30px;padding-block:3px}
.og-m-u .og-m-t>b{font-size:.86rem;font-weight:400}
.og-m-v{flex:none;font-weight:600;font-size:.84rem;color:var(--ink);white-space:nowrap;font-variant-numeric:tabular-nums}
.og-m-u .og-m-v{font-weight:500;color:var(--ink-2)}
.og-m-g{display:flex;align-items:center}
.og-m-g>.og-m-i{flex:1;min-width:0;padding-inline-start:4px}
.og-m-x{flex:none;width:24px;height:30px;display:grid;place-items:center;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer}
.og-m-x:hover{background:var(--surface-2)}
.og-m-x svg{width:14px;height:14px;transition:transform .15s}
.og-m-x[aria-expanded="false"] svg{transform:rotate(90deg)}
html[dir="ltr"] .og-m-x[aria-expanded="false"] svg{transform:rotate(-90deg)}
.og-m-us{margin-inline-start:11px;padding-inline-start:12px;border-inline-start:1px solid var(--line)}
.og-m-none{padding:18px 10px;text-align:center;color:var(--muted)}
.og-m-f{display:flex;align-items:center;gap:8px;padding:8px 12px;border-top:1px solid var(--line-2,var(--line));flex:none;background:var(--surface-2);border-radius:0 0 12px 12px}
.og-m-f .og-m-t>small{font-size:.72rem}
.og-m-f .og-m-t>b{font-size:.84rem}

/* the "previewing as" strip */
.og-as{position:fixed;inset:0 0 auto 0;height:30px;z-index:70;display:flex;align-items:center;justify-content:center;gap:10px;padding:0 12px;background:var(--warn-soft,#fdf1dc);border-bottom:1px solid color-mix(in srgb,var(--warn) 40%,transparent);color:var(--ink);font-size:.84rem;white-space:nowrap}
.og-as>svg{width:15px;height:15px;flex:none;color:var(--warn)}
.og-as>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
.og-as-x{display:inline-flex;align-items:center;gap:5px;height:22px;padding:0 9px;border:1px solid color-mix(in srgb,var(--warn) 50%,transparent);border-radius:6px;background:var(--surface);color:var(--ink);font:inherit;font-size:.8rem;font-weight:600;cursor:pointer;flex:none}
.og-as-x svg{width:13px;height:13px}

/* small menu under a button */
.og-pop{position:fixed;z-index:80;min-width:210px;max-width:320px;padding:5px;background:var(--surface);border:1px solid var(--line);border-radius:10px;box-shadow:0 12px 32px rgba(8,20,18,.2);font-size:.86rem}
.og-pop-h{padding:6px 9px 3px;font-size:.74rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.og-pop-i{display:flex;align-items:center;gap:9px;width:100%;padding:6px 9px;border:0;border-radius:7px;background:none;color:var(--ink);text-align:start;font:inherit;cursor:pointer}
.og-pop-i:hover,.og-pop-i:focus-visible{background:var(--surface-2);outline:0}
.og-pop-i svg{width:15px;height:15px;color:var(--muted);flex:none}
.og-pop-i.danger,.og-pop-i.danger svg{color:var(--danger)}
.og-pop-i:disabled{opacity:.45;cursor:default}
.og-pop-sp{width:15px;flex:none}
.og-pop-sep{height:1px;margin:5px 4px;background:var(--line-2,var(--line))}

/* ---------- dialog ---------- */
dialog.og-dlg{border:1px solid var(--line);border-radius:16px;padding:0;background:var(--surface);color:var(--ink);width:min(540px,calc(100vw - 32px));max-height:calc(100dvh - 48px);box-shadow:0 24px 60px rgba(8,20,18,.35);overflow:hidden}
dialog.og-dlg[open]{display:flex;flex-direction:column}
dialog.og-dlg.wide{width:min(680px,calc(100vw - 32px))}
dialog.og-dlg::backdrop{background:rgba(8,12,11,.5)}
.og-dlg-h{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1px solid var(--line-2,var(--line));flex:none}
.og-dlg-h h3{margin:0;font-size:1.02rem;font-weight:600;flex:1}
.og-dlg-h>svg{width:18px;height:18px;color:var(--muted)}
.og-x{width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:7px;background:none;color:var(--muted);cursor:pointer}
.og-x:hover{background:var(--surface-2)}
.og-x svg{width:16px;height:16px}
.og-dlg-b{padding:16px 18px;overflow-y:auto;scrollbar-width:thin}
.og-dlg-f{padding:12px 18px;border-top:1px solid var(--line-2,var(--line));display:flex;gap:8px;align-items:center;flex-wrap:wrap;flex:none}
.og-danger{color:var(--danger)}
.og-danger svg{color:var(--danger)}
.og-form{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.og-f{display:block;min-width:0}
.og-f.full{grid-column:1/-1}
.og-f+.og-f.full,.og-form+.og-f,.og-pair+.og-f,.og-f+.og-form{margin-top:12px}
.og-form .og-f.full{margin-top:0}
.og-f>span:first-child{display:block;margin-bottom:5px;font-size:.82rem;font-weight:500;color:var(--ink-2)}
.og-f .input,.og-f .select{width:100%}
.og-req{font-style:normal;color:var(--danger)}
.og-sec{margin:16px 0 6px;font-size:.82rem;font-weight:600;color:var(--ink-2)}
.og-pair{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.og-pair-x{display:grid;color:var(--muted)}
.og-pair-x svg,.og-arrow svg{width:15px;height:15px}
.og-arrow{display:inline-grid;vertical-align:middle;color:var(--muted)}
.og-meta{display:flex;flex-wrap:wrap;gap:4px 16px;margin:8px 2px 12px;font-size:.8rem;color:var(--muted)}
.og-note{display:flex;gap:8px;align-items:flex-start;padding:9px 12px;border:1px solid color-mix(in srgb,var(--warn) 35%,var(--line));border-radius:10px;background:var(--warn-soft,#fdf1dc);font-size:.86rem;color:var(--ink)}
.og-note svg{width:16px;height:16px;flex:none;margin-top:3px;color:var(--warn)}
.og-rows{border:1px solid var(--line);border-radius:10px}
.og-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line-2,var(--line))}
.og-row:last-child{border-bottom:0}
.og-seg{display:inline-flex;flex-wrap:wrap;max-width:100%}
.og-seg button{display:inline-flex;align-items:center;gap:6px}
.og-seg button svg{width:15px;height:15px}
.og-search{height:36px;max-width:none;width:100%}
.og-res{margin-top:6px;border:1px solid var(--line);border-radius:10px;max-height:216px;overflow-y:auto}
.og-res>.hint{padding:12px;margin:0}
.og-res-i{display:flex;align-items:center;gap:9px;width:100%;padding:7px 10px;border:0;border-bottom:1px solid var(--line-2,var(--line));background:none;color:var(--ink);text-align:start;font:inherit;cursor:pointer}
.og-res-i:last-child{border-bottom:0}
.og-res-i:hover,.og-res-i:focus-visible{background:var(--surface-2);outline:0}
.og-res-i>.og-ltr{font-size:.76rem;color:var(--muted)}
.og-picked{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 12px;border:1px solid var(--line);border-radius:10px}
.og-picked small{color:var(--muted);font-size:.8rem}
.og-checks{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:4px 12px;padding:8px 12px;border:1px solid var(--line);border-radius:10px}
.og-checks .check{min-width:0}
.og-checks .check>span{min-width:0;display:inline-flex;align-items:center;gap:6px}
.og-quick{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px}
.og-quick .chip{height:26px;padding:0 9px;font-size:.78rem}

/* ---------- panels ---------- */
.og-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--surface);margin-bottom:14px;font-size:.88rem;color:var(--ink-2)}
.og-bar .og-search{flex:1 1 130px;width:auto;height:34px;min-width:130px}
.og-bar .og-sp{flex:0 0 0}
.og-bar .seg button{padding-block:4px}
.og-bar .seg button .n{font-size:.74rem;font-weight:600;color:var(--muted);background:var(--surface-2);border-radius:999px;padding:0 6px;min-width:20px;text-align:center;line-height:1.5;margin-inline-start:6px}
.og-sel{height:34px;width:auto;max-width:150px;font-size:.86rem;flex:none}
.og-sel-w{max-width:260px}
.og-lbl{font-size:.82rem;color:var(--muted);white-space:nowrap}
.og-empty{padding:28px 12px;text-align:center}

/* structure: one column per group */
.og-cols{display:grid;grid-template-columns:repeat(auto-fill,minmax(292px,1fr));gap:14px;align-items:start}
.og-g{display:flex;flex-direction:column;min-width:0}
.og-g-h{padding:11px 14px 10px;border-bottom:1px solid var(--line-2,var(--line))}
.og-g-t{display:flex;align-items:center;gap:6px}
.og-g-n{flex:1;min-width:0;padding:0;border:0;background:none;color:var(--ink);font:inherit;font-size:.98rem;font-weight:600;text-align:start;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
button.og-g-n{cursor:pointer}button.og-g-n:hover{text-decoration:underline;text-underline-offset:3px}
.og-g-m{display:flex;align-items:center;gap:6px;margin-top:3px;font-size:.82rem;color:var(--muted);min-width:0}
.og-g-m svg{width:14px;height:14px;flex:none}
.og-g-m span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.og-g-m b{font-weight:500;color:var(--ink)}
.og-g-c{display:flex;flex-wrap:wrap;gap:2px 12px;margin-top:5px;font-size:.78rem;color:var(--muted)}
.og-g-s{margin-inline-start:auto}
.og-g-s b{font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.og-ov{color:var(--warn)}
.og-ul{list-style:none;margin:0;padding:4px 6px}
.og-ur{position:relative;border-bottom:1px solid var(--line-2,var(--line))}
.og-ur-a{position:absolute;top:6px;inset-inline-end:2px;display:flex;align-items:center;gap:4px}
.og-ur:last-child{border-bottom:0}
.og-ur-m{width:100%;display:flex;align-items:flex-start;gap:8px;padding:7px 8px;border:0;border-radius:8px;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}
.og-ur-m:hover{background:var(--surface-2)}
.og-ur-m:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.og-two{font-style:normal;color:var(--warn)}
.og-ur .og-m-t>b{padding-inline-end:70px;line-height:1.6;white-space:normal}
.tbl .og-m-t>b,.tbl .og-m-t>small{white-space:normal}
.og-ur .og-ti{margin-top:2px}
.og-ur-2{display:flex!important;align-items:baseline;gap:10px}
.og-ur-2>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.og-stat{flex:none;white-space:nowrap;font-size:.74rem}
.og-stat b{font-size:.84rem;font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.og-lc{flex:none;display:inline-flex;align-items:center;gap:4px;height:24px;padding:0 6px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink-2);font:inherit;font-size:.78rem;font-weight:600;cursor:pointer}
.og-lc:hover{background:var(--surface-2)}
.og-lc svg{width:12px;height:12px;color:var(--muted)}
.og-more{flex:none;width:24px;height:26px;display:grid;place-items:center;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer}
.og-more:hover{background:var(--surface-2);color:var(--ink)}
.og-more svg{width:15px;height:15px}
.og-none{padding:14px 8px;text-align:center;font-size:.84rem;color:var(--muted)}
.og-g-f{padding:8px 12px;border-top:1px solid var(--line-2,var(--line))}
.og-loose,.og-extc{border-style:dashed}

/* links: pending requests, matrix, list */
.og-pend{margin-bottom:14px;border-color:color-mix(in srgb,var(--warn) 40%,var(--line))}
.og-pend-h{display:flex;align-items:center;gap:8px;padding:9px 14px;border-bottom:1px solid var(--line-2,var(--line));font-size:.9rem}
.og-pend-h svg{width:16px;height:16px;color:var(--warn)}
.og-pend-h b{font-weight:600}
.og-pend-r{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:9px 14px;border-bottom:1px solid var(--line-2,var(--line))}
.og-pend-r:last-child{border-bottom:0}
.og-pend-r .og-m-t{flex:1 1 300px}
.og-pend-r .og-m-t>b{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.og-yes{border-color:var(--deep);color:var(--deep);font-weight:600}
.og-mx th,.og-mx td{vertical-align:middle}
.og-mx thead th{white-space:nowrap}
.og-mx .og-c,.og-lt .og-c,.og-pm .og-c{text-align:center}
.og-mx-u{text-align:start;min-width:230px;font-weight:400}
.og-mx-n{display:flex;align-items:center;gap:8px;min-width:0}
.og-mx-h{display:inline-flex;align-items:center;gap:6px;justify-content:center}
.og-lt-h{display:inline-flex;flex-direction:column;align-items:center;gap:2px;font-size:.7rem;line-height:1.25;white-space:normal;width:54px}
.og-lt-h svg{width:14px;height:14px;color:var(--muted)}
.og-lt th.og-lt-c,.og-lt td.og-c{padding-inline:4px;width:62px}
.og-lt-u{width:100%;padding:3px 6px;margin-inline:-6px;border:0;border-radius:8px;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer}
.og-lt-u:hover{background:var(--surface-2)}
.og-lt td:first-child{min-width:190px}
.og-mx-g th{padding-block:5px;background:var(--surface-2);font-size:.76rem;font-weight:600;color:var(--muted);text-align:start}
.og-mx-a{text-align:end;white-space:nowrap}
.og-mx-a .btn+.btn{margin-inline-start:6px}
.og-mx td.og-c{padding:5px 6px}
.og-cell{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:112px;min-height:44px;padding:4px 8px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.og-cell:hover:not(:disabled){border-color:var(--deep)}
.og-cell.paused{background:var(--surface-2)}
.og-cell.paused .og-sh>span.on{color:var(--muted)}
.og-cell.pending{border-color:color-mix(in srgb,var(--warn) 55%,var(--line));border-style:dashed}
.og-cell.none{border-style:dashed;color:var(--faint);min-height:44px}
.og-cell.none svg{width:15px;height:15px}
.og-cell.none:hover:not(:disabled){color:var(--deep)}
.og-cell:disabled{cursor:default}
.og-legend{flex-wrap:wrap;gap:6px 14px}
.og-lg{display:inline-flex;align-items:center;gap:5px;font-size:.78rem;color:var(--muted);white-space:nowrap}
.og-lg svg{width:14px;height:14px;color:var(--ink-2)}
.og-split{display:grid;grid-template-columns:250px minmax(0,1fr);gap:14px;align-items:start}
.og-l-list{padding:6px;max-height:calc(100dvh - 250px);overflow-y:auto;scrollbar-width:thin}
.og-l-h{padding:7px 9px 3px;font-size:.74rem;font-weight:600;color:var(--muted)}
.og-l-i{display:flex;align-items:center;gap:8px;width:100%;padding:6px 9px;border:0;border-radius:8px;background:none;color:inherit;font:inherit;text-align:start;cursor:pointer;position:relative}
.og-l-i:hover{background:var(--surface-2)}
.og-l-i.active{background:color-mix(in srgb,var(--ink) 6%,transparent)}
.og-l-i.active::before{content:"";position:absolute;inset-inline-start:0;top:8px;bottom:8px;width:3px;border-radius:3px;background:var(--deep)}
.og-l-dh{flex-wrap:wrap;gap:6px 12px}
.og-l-dh .og-u-n{font-size:.98rem;font-weight:600}
.og-st-sel{height:30px;min-width:118px}
.og-lt td{vertical-align:middle}

/* roles */
.og-role{display:inline-block;padding:0 8px;border:1px solid var(--line);border-radius:6px;background:var(--surface-2);font-size:.78rem;font-weight:500;line-height:1.75;white-space:nowrap;color:var(--ink-2)}
.og-r-owner{border-color:var(--deep);color:var(--deep);font-weight:600}
.og-r-gmgr{border-color:color-mix(in srgb,var(--info) 45%,var(--line));color:var(--info)}
.og-pm td:first-child{min-width:200px}
.og-ck{display:inline-flex;flex-direction:column;align-items:center;gap:2px;cursor:pointer}
.og-ck input{width:17px;height:17px;accent-color:var(--deep);cursor:pointer}
.og-ck input:disabled{cursor:default}
.og-ovm{display:inline-flex;align-items:center;gap:3px;font-size:.68rem;color:var(--warn);white-space:nowrap}
.og-ovm svg{width:11px;height:11px}
.og-diff{background:color-mix(in srgb,var(--warn) 9%,transparent)}

/* narrow: a pane beside another one, a small window (the panel is measured, not the window) */
.og-panel{container:ogp/inline-size}
@container ogp (max-width:760px){
  .og-split{grid-template-columns:1fr}
  .og-l-list{max-height:210px}
  .og-cell{min-width:74px;padding-inline:4px}
  .og-mx-u{min-width:170px}
  .og-cell .og-st{font-size:.7rem}
  .og-sel{max-width:150px}
}
@container ogp (max-width:520px){
  .og-form{grid-template-columns:1fr}
  .og-mx-u{min-width:140px}
  .og-cell .og-sh{gap:3px}.og-cell .og-sh svg{width:12px;height:12px}
}
@media(max-width:560px){.og-form{grid-template-columns:1fr}}

/* roles: one row per person, one line per assignment */
.og-rt td{vertical-align:top}
.og-asl{display:flex;align-items:center;gap:8px;min-height:30px}
.og-asl+.og-asl{margin-top:4px}
.og-asx{border:0;background:none;color:var(--muted);padding:2px;border-radius:6px;display:inline-flex;cursor:pointer}
.og-asx:hover{color:var(--danger);background:var(--danger-soft)}
.og-asx svg{width:14px;height:14px}

/* the links filter row stays on one line down to a 1024 window */
@container content (max-width:940px){.og-bar{gap:6px;padding-inline:8px}.og-bar .og-sel{max-width:122px;font-size:.82rem;padding-inline:8px}.og-bar .og-search{min-width:110px;flex-basis:110px}.og-bar .seg button{padding-inline:8px;font-size:.82rem}}

/* ---------- the account's organisations: the chip's first line, the picker in the menu ---------- */
.og-chip>.og-c-t{display:grid;min-width:0;line-height:1.15;text-align:start}
.og-c-t>span{overflow:hidden;text-overflow:ellipsis;font-weight:600;color:var(--ink)}
.og-c-org{display:block;width:0;min-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.64rem;font-weight:500;color:var(--muted)}
@media(max-width:1099px){.og-c-org{display:none}}
.og-m-org{display:flex;align-items:center;gap:8px;width:calc(100% - 4px);margin:4px 2px 2px;padding:6px 10px;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--ink);font:inherit;text-align:start;cursor:pointer}
.og-m-org:hover{border-color:var(--deep)}
.og-m-org .og-m-t>b{font-weight:600}
.og-m-org .og-chev{display:grid;color:var(--muted)}
.og-m-org .og-chev svg{width:15px;height:15px}
.og-m-sep{height:1px;margin:5px 4px;background:var(--line-2,var(--line))}
.og-ext.og-sis{border-color:color-mix(in srgb,var(--info) 45%,var(--line));color:var(--info)}
.og-note.og-note-w{align-items:center;flex-wrap:wrap}
.og-note.og-note-w>span{flex:1 1 240px}

/* ---------- secretaries x doctors ---------- */
.og-sx th,.og-sx td{vertical-align:middle}
.og-sx-s{text-align:start;min-width:210px;font-weight:400}
.og-sx thead .og-sx-s{font-weight:600;vertical-align:bottom}
.og-sx-u{text-align:center;border-inline-start:1px solid var(--line);font-weight:500}
.og-sx-u .og-u{justify-content:center}
.og-sx-d{min-width:118px;font-weight:400;line-height:1.3;white-space:normal}
.og-sx-d>b{display:block;font-size:.84rem;font-weight:600;color:var(--ink);white-space:nowrap}
.og-sx-d>small{display:flex;align-items:center;justify-content:center;gap:4px;font-size:.74rem;color:var(--muted);white-space:nowrap}
.og-sx-d>small svg{width:13px;height:13px}
.og-sx-f{border-inline-start:1px solid var(--line)}
.og-sx-warn>small,.og-sx-w{color:var(--warn)}
.og-sx-w{display:inline-flex;align-items:center;gap:5px;font-weight:500}
.og-sx-w svg{width:14px;height:14px}
.og-sx-none{color:var(--warn)}
.og-sxc{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:104px;height:34px;padding:0 8px;border:1px dashed var(--line);border-radius:8px;background:var(--surface);color:var(--faint);font:inherit;cursor:pointer}
.og-sxc>svg{width:15px;height:15px}
.og-sxc:hover:not(:disabled){border-color:var(--deep);color:var(--deep)}
.og-sxc:disabled{cursor:default}
.og-sxc.on{border-style:solid;color:var(--ok)}
.og-sxc.on .og-sh{gap:4px}
.og-sxc.on .og-sh svg{width:13px;height:13px}
.og-sxc:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- devices ---------- */
.og-dv-g th{padding-block:6px}
.og-dv-h{display:flex;align-items:center;gap:10px;font-weight:400}
.og-dv-h .og-u-n{font-size:.88rem;font-weight:600}
.og-dv-n{font-size:.8rem;font-weight:600;color:var(--ink-2)}
.og-dv-n.full{color:var(--warn)}
.og-dv-full{font-size:.74rem;font-weight:500;color:var(--warn)}
.og-dv-h .btn.sm{font-weight:500}
.og-dst{display:inline-flex;align-items:center;gap:6px;font-size:.82rem;font-weight:500;white-space:nowrap;color:var(--ink-2)}
.og-dst::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--ok);flex:none}
.og-dst-sync::before{background:var(--info)}
.og-dst-off{color:var(--danger)}.og-dst-off::before{background:var(--danger)}
.og-dst-pair{color:var(--warn)}.og-dst-pair::before{background:none;border:1.5px dashed var(--warn);width:6px;height:6px}
.og-dst-s{display:block;font-size:.74rem;color:var(--muted);white-space:nowrap}
.og-dvr{display:flex;align-items:center;gap:9px;padding:7px 2px;border-bottom:1px solid var(--line-2,var(--line))}
.og-dvr:last-child{border-bottom:0}
.og-dvr-s{flex:none;text-align:end}
.og-code{display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;padding:10px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2)}
.og-code>b{font-size:1.7rem;font-weight:600;letter-spacing:.12em;color:var(--ink);font-variant-numeric:tabular-nums}
.og-code>small{font-size:.8rem;color:var(--muted)}
.og-steps{margin:10px 0 8px;padding-inline-start:20px;font-size:.88rem;color:var(--ink-2);line-height:1.8}

/* ---------- my account ---------- */
.og-acc-me{display:flex;align-items:center;gap:10px;padding:12px 16px}
.og-acc-me .og-m-t>b{font-size:1rem;font-weight:600}
.og-acc-n{flex:none;font-size:.86rem;color:var(--muted)}
.og-acc-n b{color:var(--ink)}
.og-at td{vertical-align:middle}
.og-at-s{display:block;font-size:.76rem;color:var(--muted)}
.og-at-a{display:flex;gap:6px;justify-content:flex-end;flex-wrap:nowrap}
.og-at-cur>td:first-child{box-shadow:inset 3px 0 0 var(--deep)}
[dir=rtl] .og-at-cur>td:first-child{box-shadow:inset -3px 0 0 var(--deep)}
.og-at .btn:disabled{opacity:.45;cursor:not-allowed}

@media(min-width:1100px){.og-chip>.og-c-t{min-width:92px}}
.og-at td:not(:first-child){white-space:nowrap}
.og-at .og-mx-n>.og-here{margin-inline-start:4px}

/* tighter grids: English names are longer; a pane can be half a window */
.og-sx-s{min-width:176px}
.og-sx th,.og-sx td{padding-inline:8px}
.og-sx-d{min-width:112px}
.og-sx-d>small{display:block;max-width:150px;margin-inline:auto;overflow:hidden;text-overflow:ellipsis;text-align:center}
.og-sx-d>small svg{display:inline-block;vertical-align:-2px;margin-inline-end:3px}
.og-sxc{min-width:96px}
.og-dv td:first-child{min-width:200px}
.og-dv .og-m-t>b{white-space:nowrap}
.og-dv .og-dv-r{color:var(--accent-ink,inherit);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.og-dvr-r{flex:none;font-size:.8rem;white-space:nowrap}
@container content (max-width:1060px){.og-dv .og-dv-v{display:none}}
@container content (max-width:940px){.og-dv .og-dv-t{display:none}}
@container content (max-width:860px){.og-dv .og-dv-t,.og-dv .og-dv-i{display:none}.og-dv td:first-child{min-width:170px}.og-sx-s{min-width:150px}.og-sxc{min-width:84px}}
.og-at td:first-child{min-width:250px}
.og-at .og-m-t>b{white-space:nowrap}
@container content (max-width:1000px){.og-at td:first-child{min-width:180px}.og-at td:nth-child(3){white-space:normal;min-width:120px}.og-at td:nth-child(5) .og-at-s{display:none}.og-at .og-m-t>b{white-space:normal}}

/* what a link shares: short words for the shares that are on, nothing for those that are off */
.og-shx{display:inline;font-size:.76rem;font-weight:400;line-height:1.5;color:var(--ink-2)}
.og-shx>span{display:inline-block;white-space:nowrap}
.og-shx>span:not(:last-child)::after{content:"·";margin-inline:5px;color:var(--faint)}
.og-shx .og-shx0{color:var(--muted)}
.og-cell .og-shx{white-space:nowrap}
.og-cell.paused .og-shx{color:var(--muted)}
.og-ur.og-ur-w .og-m-t>b{padding-inline-end:150px}

/* ---------- fix round 7 ---------- */
/* the chip's two lines are cut sideways only (ellipsis), never from below: the dots of a final ي sit under the line box.
   (overflow-x:clip keeps text-overflow working and, unlike hidden, leaves the other axis visible) */
.og-chip>.og-c-t{overflow:visible!important}
.og-c-t>span,.og-c-t>.og-c-org{overflow-x:clip;overflow-y:visible}
.og-c-t>span{min-width:0}
/* roles: the role is plain text; a tag only for the owner and for exceptions */
.og-rtx{flex:none;min-width:86px;font-size:.88rem;color:var(--ink)}
.og-rt .og-role{min-width:86px;text-align:center;box-sizing:border-box}
.og-ovt{flex:none;height:22px;padding:0 7px;border:1px solid color-mix(in srgb,var(--warn) 45%,var(--line));border-radius:6px;background:none;color:var(--warn);font:inherit;font-size:.74rem;white-space:nowrap;cursor:pointer}
.og-ovt:hover{background:color-mix(in srgb,var(--warn) 10%,transparent)}
.og-rt-a{display:flex;align-items:center;justify-content:flex-end;gap:6px}
.og-rt td{vertical-align:top}
.og-rt td:first-child{padding-top:13px}
@container content (max-width:760px){.og-rt .btn.sm>span{display:none}.og-rtx,.og-rt .og-role{min-width:70px}}
/* secretaries grid: a cell says in words what the pair allows (or "4 of 5"); the editor is a popover */
.og-sxc.on{color:var(--ink);font-size:.8rem;white-space:nowrap;min-width:118px}
.og-sxc.on .og-sxn{display:none}
@container content (max-width:1060px){.og-sx-d>b{white-space:normal}.og-sxc,.og-sxc.on{min-width:80px}.og-sx-d{min-width:96px}.og-sx th,.og-sx td{padding-inline:6px}.og-sxc.on .og-sxt{display:none}.og-sxc.on .og-sxn{display:inline}}
.og-sxw{font-size:.8rem;color:var(--ink-2);white-space:nowrap}
.og-pop-ck[aria-checked="true"] svg{color:var(--deep)}
.og-pop-ck[aria-checked="false"]>span:last-child{color:var(--ink-2)}
.og-sxp{min-width:250px}
/* devices: the till's shift state under its user; "assigned to" for a device that does not sell */
.og-dv-x{display:block;font-size:.76rem;color:var(--muted);white-space:nowrap}
.og-dv-x.og-dv-lk{color:var(--warn)}
.og-dv .hint{white-space:nowrap}
.og-dv td:nth-child(3){white-space:nowrap}
.og-rt td:first-child{white-space:nowrap}
@container content (max-width:760px){.og-dv .og-dv-s{display:none}.og-dv th,.og-dv td{padding-inline:8px}.og-dv td:first-child{min-width:150px}.og-dv-h{flex-wrap:wrap;row-gap:6px}}
@container content (max-width:760px){.og-dv td:nth-child(3) .hint{display:block}.og-dv td .og-dst,.og-dv td .og-dst-s{white-space:normal}.og-dv td:nth-last-child(2){max-width:128px}.og-dv .og-dv-h .btn.sm{padding-inline:8px}}
@container content (max-width:1060px){.og-dv td:nth-child(3) .hint{display:block}.og-dv th,.og-dv td{padding-inline:10px}}
@container content (max-width:1000px){.og-dv .og-dv-t{display:none}}

/* fix 8: the structure's group cards flow down columns (one tall group no longer leaves holes beside it in a wide pane) */
.og-cols{display:block;columns:340px;column-gap:14px}
.og-cols>*{break-inside:avoid;margin:0 0 14px!important}
.og-cols>.og-g{display:flex}
/* fix 9: a very wide pane (rail at 1920, any 2560 window): the groups spread over the width instead of leaving empty columns at the end */
@container content (min-width:1800px){.og-cols{display:grid;columns:auto;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));column-gap:14px;align-items:start}}
