/* app.css — Binayati. Logical properties only (inline-start/end), so RTL needs no overrides. Mobile first. */
:root {
  --brand: #1e6a4e; --brand-bg: #f3f5f4; --accent: #9a520b; --accent-bg: #faebd8; --accent-2: #e8a35c;
  --ink: #15201c; --muted: #56665f; --line: #d8e0dc; --card: #fff; --bad: #a8231c; --bad-bg: #f8e1df;
  --good: #1e6a4e; --good-bg: #e1efe8; --info: #2d5b8a; --info-bg: #e3ecf6;
  /* the services text font: Inter for Latin, Noto Kufi Arabic for Arabic */
  --font: 'Inter', 'Noto Kufi Arabic', system-ui, sans-serif;
  --display: var(--font);
  --radius: 10px;
}
[dir="rtl"] { --font: 'Noto Kufi Arabic', 'Inter', system-ui, sans-serif; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--brand-bg); font-size: 15px; line-height: 1.5; }
[dir="rtl"] body { font-size: 16px; }
a { color: var(--brand); }
h1 { font: 600 1.35rem/1.25 var(--display); margin: 0 0 1rem; }
h2 { font: 600 1.05rem/1.3 var(--display); margin: 1.25rem 0 .5rem; }
.boot { padding: 2rem; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.right { margin-inline-start: auto; }
.num { font-variant-numeric: tabular-nums; unicode-bidi: plaintext; }
[dir="rtl"] td.num, [dir="rtl"] th.num { text-align: right; }   /* plaintext would push them to the far side */   /* amounts read left to right inside Arabic: −$20.00, never $20.00− */

/* shell — WEDPLAN / services "Relief" frame: dark sidebar in Binayati green, sticky top bar, name-chip menu */
.frame { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: #123f2f; background: color-mix(in srgb, var(--brand) 62%, #04140e); color: #e6f0eb; padding: 14px 12px; z-index: 30; }
.brand { display: flex; align-items: center; gap: .65rem; background: #fff; border-radius: 12px; padding: 9px 12px; box-shadow: 0 2px 10px rgba(0,0,0,.22); text-decoration: none; color: var(--ink); }
.brand img { flex: none; display: block; }
.brand b { display: block; font-size: 1.1rem; line-height: 1.1; color: var(--brand); }
.brand-ar { display: block; font-family: 'Noto Kufi Arabic', sans-serif; font-size: .85rem; color: var(--muted); line-height: 1.3; }
.side-tn { margin: .8rem .3rem .2rem; font-weight: 700; font-size: .95em; color: #fff; }
.side-tn span { display: block; font-weight: 400; font-size: .85em; color: rgba(255,255,255,.6); }
.nav { flex: 1; margin-block-start: .4rem; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.55); margin: 1rem .5rem .35rem; }
[dir="rtl"] .nav-group { letter-spacing: 0; font-size: 12px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: rgba(255,255,255,.84); text-decoration: none; font-size: 14px; font-weight: 500; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.on { background: var(--accent-2); color: #2a1a06; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.nav a.soon { color: rgba(255,255,255,.42); pointer-events: none; }
.vtag { margin-inline-start: auto; font-size: 10.5px; border: 1px solid rgba(255,255,255,.25); border-radius: 99px; padding: 0 6px; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.small .ic, td .ic { width: 15px; height: 15px; }
.pop-x .ic, .hamb .ic { width: 22px; height: 22px; }
.umenu .ic { color: var(--muted); }
.umenu .out .ic { color: var(--bad); }
.side-foot { font-size: 11px; color: rgba(255,255,255,.45); padding: .75rem .5rem 0; }
.body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: .75rem; height: 60px; padding: 0 1.25rem; background: var(--card); border-block-end: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.crumb { font-weight: 700; font-size: 1.05rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hamb { display: none; background: none; border: 0; cursor: pointer; color: var(--ink); padding: .2rem .4rem; }
.tsw { width: auto; max-width: 220px; }
.uwrap { position: relative; }
.uchip { display: flex; align-items: center; gap: .5rem; background: none; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px 4px 4px; cursor: pointer; font: inherit; color: var(--ink); }
[dir="rtl"] .uchip { padding: 4px 4px 4px 10px; }
.uav { position: relative; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9em; }
.udot { position: absolute; inset-block-start: -2px; inset-inline-end: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); border: 2px solid var(--card); }
.uname { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92em; }
.chev { font-size: .75em; color: var(--muted); }
.umenu { position: absolute; inset-inline-end: 0; inset-block-start: calc(100% + 6px); width: 290px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.18); padding: 6px; z-index: 40; }
.umenu-h { padding: .5rem .6rem .6rem; border-block-end: 1px solid var(--line); margin-block-end: 4px; word-break: break-all; }
.umenu > button, .umenu > a { display: flex; align-items: center; gap: .55rem; width: 100%; background: none; border: 0; padding: .55rem .6rem; border-radius: 8px; font: inherit; font-size: .92em; color: var(--ink); text-decoration: none; cursor: pointer; text-align: start; }
.umenu > button:hover, .umenu > a:hover { background: var(--brand-bg); }
.umenu .out { color: var(--bad); border-block-start: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-block-start: 4px; }
.npill { margin-inline-start: auto; background: var(--bad); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; }
.npanel { margin: 0 .4rem .4rem; border: 1px solid var(--line); border-radius: 8px; max-height: 300px; overflow-y: auto; }
.nitem { display: flex; gap: .5rem; align-items: flex-start; padding: .55rem .6rem; border-block-end: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: .88em; line-height: 1.4; }
.nitem:last-child { border-block-end: 0; }
.nitem:hover { background: var(--brand-bg); }
.nitem .ic { margin-top: 1px; }
.nitem.bad .ic { color: var(--bad); }
.nitem.warn .ic { color: var(--accent); }
.nitem.info .ic { color: var(--info); }
.nempty { margin: .6rem; }
.langs { display: flex; gap: .4rem; padding: 0 .6rem .4rem; }
.langs button { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: .35rem; font: inherit; font-size: .9em; cursor: pointer; }
.langs button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.main { flex: 1; padding: 1.25rem; min-width: 0; max-width: 1150px; }
.scrim { display: none; }
@media (max-width: 900px) {
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; transform: translateX(-104%); transition: transform .2s; box-shadow: 0 0 30px rgba(0,0,0,.3); }
  [dir="rtl"] .side { transform: translateX(104%); }
  .side.open { transform: none; }
  .scrim.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .hamb { display: block; }
  .top { padding: 0 .75rem; gap: .5rem; }
  .uname, .chev { display: none; }
  .uchip { padding: 3px; border: 0; }
  .main { padding: 1rem .75rem; }
}
@media (prefers-reduced-motion: reduce) { .side { transition: none; } }

/* parts */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-block-end: 1rem; }
.tabs { display: flex; gap: .25rem; border-block-end: 1px solid var(--line); margin-block-end: 1rem; overflow-x: auto; }
.tabs button { background: none; border: 0; border-block-end: 3px solid transparent; padding: .6rem .9rem; cursor: pointer; font: inherit; color: var(--muted); white-space: nowrap; }
.tabs button.on { color: var(--brand); border-block-end-color: var(--brand); font-weight: 600; }
.btn { display: inline-flex; align-items: center; gap: .35rem; background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: .55rem 1rem; font: inherit; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn.danger { background: var(--bad); }
.btn.warn { background: #b45309; }                       /* v0.34: "Save anyway" after a server's are-you-sure */
.btn.sm { padding: .3rem .6rem; font-size: .85em; }
.btn:focus-visible, .tabs button:focus-visible, .chip:focus-visible { outline: 3px solid #9fd1bb; outline-offset: 1px; }
button:disabled { opacity: .55; cursor: default; }
label { display: block; margin-block-end: .75rem; }
label > span:not(.cbx):not(.df-w) { display: block; font-size: .85em; color: var(--muted); margin-block-end: .2rem; }
input, select, textarea { font: inherit; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 8px; width: 100%; background: #fff; color: var(--ink); }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,106,78,.14); }
input[type=checkbox] { width: auto; }
.check { display: flex; gap: .45rem; align-items: center; margin: .2rem 0; }
.check.off { color: var(--muted); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
table.list { width: 100%; border-collapse: collapse; background: var(--card); }
table.list th, table.list td { text-align: start; padding: .55rem .6rem; border-block-end: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .8em; color: var(--muted); font-weight: 600; }
.wrap { overflow-x: auto; }
/* table.cards: on a phone every row becomes a card; the header row is dropped */
@media (max-width: 760px) {
  table.cards, table.cards tbody, table.cards tr, table.cards td { display: block; width: 100%; }
  table.cards tr:first-child { display: none; }
  table.cards tr { border-block-end: 6px solid var(--brand-bg); padding: .4rem 0; }
  table.cards td { border: 0; padding: .3rem .75rem; text-align: start; }
}
.pill { display: inline-block; padding: .1rem .5rem; border-radius: 99px; font-size: .78em; background: var(--line); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.warn { background: var(--accent-bg); color: var(--accent); }
.pill.info { background: var(--info-bg); color: var(--info); }
.err { color: var(--bad); margin: .5rem 0; }
.linkbox { font-family: ui-monospace, monospace; font-size: .8em; word-break: break-all; background: var(--brand-bg); padding: .5rem; border-radius: 8px; direction: ltr; text-align: start; }
.notice { border-inline-start: 4px solid var(--accent); background: var(--accent-bg); padding: .75rem 1rem; border-radius: 8px; margin-block-end: 1rem; }
.notice.bad { border-color: var(--bad); background: var(--bad-bg); }

/* home */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; margin-block-end: 1rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1rem; }
.kpi .v { font: 600 1.35rem var(--display); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: .82em; color: var(--muted); }
.next { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.next li { display: flex; gap: .6rem; align-items: baseline; }
.next .ver { font: 600 .75rem ui-monospace, monospace; color: var(--brand); background: var(--good-bg); padding: .1rem .45rem; border-radius: 4px; flex: none; }
.news { border-inline-start: 4px solid var(--brand); }
.news h2 { margin-block-start: 0; }

/* plan matrix */
.feat { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .25rem 1rem; }
.feat .f { display: flex; gap: .5rem; align-items: center; padding: .3rem 0; border-block-end: 1px dashed var(--line); }
.feat .f .ic { width: 1.2em; text-align: center; flex: none; }
.feat .f.no { color: var(--muted); }
table.matrix td, table.matrix th { text-align: center; }
table.matrix td:first-child, table.matrix th:first-child { text-align: start; }
table.matrix input[type=number] { width: 90px; }

/* sign-in pages */
.auth { max-width: 400px; margin: 7vh auto; }
.auth .hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); opacity: 0; pointer-events: none; }  /* sign-up honeypot (v0.21) */
.auth-brand { text-align: center; margin-block-end: 1.25rem; }
.auth-brand img { display: block; margin: 0 auto .5rem; }
.auth-brand b { display: block; font-size: 1.35rem; color: var(--brand); line-height: 1.2; }
.auth-brand h1 { margin: .9rem 0 0; font-size: 1.15rem; }
.feat .f .fi { display: inline-flex; flex: none; }
.feat .f .fi .ic { color: var(--good); }
.feat .f.no .fi .ic { color: var(--muted); }
table.matrix .yes .ic { color: var(--good); }
@media (max-width: 760px) { .auth { margin: 1rem; } }

/* popups — each its own <dialog>, stacked; Save/Cancel/Delete in a footer that stays in view */
dialog.pop { border: 0; border-radius: var(--radius); padding: 1.25rem 1.25rem 0; width: min(560px, 94vw); max-height: 90vh; overflow-y: auto; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
dialog.pop.wide { width: min(860px, 96vw); }
dialog.pop::backdrop { background: rgba(0,0,0,.35); }
dialog.pop > h2:first-of-type, dialog.pop > form > h2:first-child { margin-block-start: 0; padding-inline-end: 2rem; }
dialog.pop fieldset { min-width: 0; }
fieldset.bare { border: 0; padding: 0; margin: 0; }               /* v0.22 view-only plan dialog */
fieldset.bare[disabled] input:not([type=checkbox]) { background: var(--brand-bg); color: var(--muted); }
#hubnote { border-radius: var(--radius); }
.pop-x { position: absolute; inset-block-start: .6rem; inset-inline-end: .6rem; background: none; border: 0; font-size: 1.1rem; color: var(--muted); cursor: pointer; padding: .25rem .5rem; border-radius: 6px; }
.pop-x:hover { background: var(--brand-bg); }
.pop-f { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; position: sticky; inset-block-end: 0; background: var(--card); padding: .75rem 0 1rem; margin-block-start: .5rem; border-block-start: 1px solid var(--line); }
@media (max-width: 760px) { dialog.pop, dialog.pop.wide { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; } }
.btn.danger.armed { outline: 3px solid #f3b3ad; }

/* type-inside dropdowns (combobox.js) fill their field like the select did */
label > .cbx, .grid2 .cbx { display: block; width: 100%; }

/* sub-tabs (services sub-chips) */
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-block-end: 1rem; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: .3rem .85rem; font: inherit; font-size: .9em; color: var(--muted); cursor: pointer; }
.chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.perm-area { margin-block-end: .75rem; }
.perm-area b { display: block; margin-block-end: .25rem; }

#toast { position: fixed; inset-block-end: 1rem; inset-inline-start: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }
[dir="rtl"] #toast { transform: translateX(50%); }
#toast.show { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #toast { transition: none; } }

/* update bar — services "App auto-update", same look: dark bar along the bottom, white Reload button */
#update-bar { position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 99999; display: flex; align-items: center; justify-content: center;
  gap: 14px; flex-wrap: wrap; background: #123f2f; color: #fff; padding: 12px 16px; font-size: 14px; box-shadow: 0 -2px 12px rgba(0,0,0,.2); }
#update-bar .upd-btn { background: #fff; color: #123f2f; border: 0; border-radius: 8px; padding: .4rem 1rem; font: inherit; font-weight: 700; cursor: pointer; }
body:has(#update-bar) .main { padding-block-end: 5rem; }

/* key/value lists (building screens use lists, not cards) */
table.list.kv th { width: 34%; font-size: .85em; color: var(--muted); font-weight: 600; background: none; }
.fi { display: inline-flex; }
.fi .ic { color: var(--muted); }
.fi.on .ic { color: var(--good); }
.ver { font: 600 .75rem ui-monospace, monospace; color: var(--brand); background: var(--good-bg); padding: .1rem .45rem; border-radius: 4px; }

/* View as — red strip under the top bar, and the picker (copied from WEDPLAN) */
.strip { display: flex; align-items: center; gap: .6rem; padding: .55rem 1.25rem; font-size: .92em; flex-wrap: wrap; }
.strip .btn { margin-inline-start: auto; }
.strip.va { background: var(--bad); color: #fff; }
.strip.va .btn { background: #fff; color: var(--bad); }
.strip.demo { background: var(--accent-bg); color: var(--accent); }
.vap { display: grid; gap: .4rem; margin-block-start: .5rem; }
.vap-p { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: start; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem; font: inherit; cursor: pointer; color: var(--ink); }
.vap-p:hover { border-color: var(--brand); background: var(--brand-bg); }
.vap-p > span { display: flex; flex-direction: column; }

/* What's new pop-up (services 1569/1722): one card per new thing, icon in a soft tile */
.wn-list { display: grid; gap: .6rem; }
.wn-card { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; }
.wn-card.new { border-color: var(--accent-2); background: #fffaf3; }
.wn-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--good-bg); color: var(--brand); }
.wn-ic .ic { width: 20px; height: 20px; }
.wn-b { min-width: 0; }
.wn-b p { margin: .3rem 0; }
dialog.pop h2 .ic { width: 20px; height: 20px; vertical-align: -3px; color: var(--accent-2); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--brand-bg); }
tr.muted td { color: var(--muted); }

/* Summary — Manager.io layout: Balance Sheet | Profit and Loss, one block per section with its total on top */
.msum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.25rem; align-items: start; }
.msum-grid > section { min-width: 0; }
.msum-t { text-align: center; color: var(--muted); font-weight: 500; font-size: .95rem; margin: 0 0 .6rem; }
.msum { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-block-end: 1rem; overflow: hidden; }
.msum-h { display: flex; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; background: #fffdf3; border-block-end: 1px solid var(--line); }
.msum table.list td { border-block-end: 0; padding: .3rem 1rem; font-size: .92em; }
.msum table.list tr:first-child td { padding-block-start: .7rem; }
.msum table.list tr:last-child td { padding-block-end: .7rem; }
.msum td.num { color: var(--info); }

/* View as panel (WEDPLAN v0.23): beside the name menu, every building, search inside */
.vawrap { position: relative; }
.vawrap > button { display: flex; align-items: center; gap: .55rem; width: 100%; background: none; border: 0; padding: .55rem .6rem; border-radius: 8px; font: inherit; font-size: .92em; color: var(--ink); cursor: pointer; text-align: start; }
.vawrap > button:hover, .vawrap:hover > button { background: var(--brand-bg); }
.vafly { position: absolute; inset-inline-end: calc(100% + 10px); inset-block-start: -8px; width: 300px; max-height: 70vh; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.18); padding: 8px; z-index: 41; }
.vafly::after { content: ''; position: absolute; inset-block: 0; inset-inline-start: 100%; width: 12px; }
.vafly input { width: 100%; margin-block-end: 6px; }
.valist { overflow: auto; }
.va-row { display: flex; align-items: stretch; gap: 4px; border-radius: 8px; }
.va-row.on { background: var(--brand-bg); }
.va-c { flex: 1; display: flex; flex-direction: column; align-items: flex-start; background: none; border: 0; padding: .45rem .55rem; border-radius: 8px; font: inherit; font-size: .92em; cursor: pointer; text-align: start; color: var(--ink); }
.va-c:hover, .va-p:hover { background: var(--brand-bg); }
.va-p { background: none; border: 0; border-radius: 8px; padding: 0 .5rem; cursor: pointer; color: var(--muted); }
.strip.va.test { background: var(--accent); }
@media (max-width: 760px) { .vafly { position: static; width: auto; box-shadow: none; border: 0; padding: 4px 0 0; max-height: 50vh; } .vafly::after { display: none; } }

/* Community (v0.6): announcement text keeps its lines; vote result bars; a WhatsApp row already sent */
.ann-body { white-space: pre-wrap; line-height: 1.6; margin: .4rem 0 1rem; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.vbar { margin: .5rem 0; }
.vbar-l { display: flex; justify-content: space-between; gap: 1rem; font-size: .95em; }
.vbar-t { height: 10px; border-radius: 6px; background: var(--line); overflow: hidden; margin-top: .25rem; }
.vbar-t i { display: block; height: 100%; background: var(--brand); border-radius: 6px; }
.vopts { display: flex; flex-wrap: wrap; gap: .4rem; }
tr.sent td { opacity: .55; }

/* Private link page (v0.7): one column, big tap targets, no menu */
.lp { max-width: 720px; margin: 0 auto; padding: 16px; }
.lp-head { display: flex; align-items: center; gap: .7rem; margin-block-end: 1rem; }
.lp-head img { border-radius: 10px; }
.lp-lang { margin-inline-start: auto; }
.lp-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: .8rem 0; }
.lp-card h3 { margin: 0 0 .3rem; font-size: 1.05em; }
.lp-card h4 { margin: .8rem 0 .3rem; font-size: .95em; }
.lp-vote { padding: .5rem 0; border-top: 1px solid var(--line); }
.lp-vote .vopts .btn { min-height: 44px; }
.lp-rules li { margin-bottom: .7rem; }
.lp-foot { margin-top: 1.5rem; }
.good-t { color: var(--good); }
.lp td.nw { white-space: nowrap; }

/* Build my plan (v0.10) */
.addons { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .2rem 1rem; }
.addons .check { margin: .2rem 0; }
.addons input:disabled + span { opacity: .55; }

/* Recurring → Prepare (v0.11): an amount box per line; Months: paid / still owed */
#dt input.amt { width: 7.5rem; text-align: end; direction: ltr; }
.bad-t { color: var(--bad); }

/* v0.12: menu counts like Manager.io ("Receipts 5,230 +14") and the "ready to create" bar */
.nav a .ncnt { margin-inline-start: auto; font-size: 11px; opacity: .75; font-variant-numeric: tabular-nums; }
.nav a .ncp { margin-inline-start: 6px; font-size: 10.5px; font-weight: 700; background: var(--accent-2, #e8a35c); color: #3a2003; border-radius: 99px; padding: 0 6px; }
.nav a .ncnt + .ncp { margin-inline-start: 6px; }
.nav a .ncnt[hidden] + .ncp { margin-inline-start: auto; }
.strip.rc { background: var(--accent-bg); color: var(--accent); display: flex; align-items: center; gap: .5rem; }
.strip.rc .btn { margin-inline-start: auto; }

/* Meetings (v0.13) */
.mt-dec li { margin-bottom: .5rem; }

/* v0.14: the building logo */
.logo-box { border: 1px dashed var(--line); border-radius: 12px; padding: 16px; margin: .5rem 0 1rem; max-width: 360px; background: #fff; }
.logo-box img { max-width: 100%; max-height: 120px; display: block; }
.lp-head img.lp-logo { max-height: 48px; max-width: 120px; width: auto; height: auto; }

/* ── v0.27 easier on the phone ─────────────────────────────────────────── */
/* the eye in a password box (sign-in pages). Password boxes are dir=ltr, so the eye sits on the physical right in AR too. */
.pww { position: relative; }
.pww input { padding-right: 2.7rem; }
.pwe { position: absolute; top: 0; right: 0; height: 100%; width: 2.7rem; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--muted); border-radius: 8px; }
.pwe.on { color: var(--brand); }
.pwe:focus-visible { outline: 3px solid #9fd1bb; outline-offset: -3px; }

/* v0.28: the green line after "Forgot your password?" / a changed password */
.okmsg { color: var(--good); margin: .5rem 0; }

/* Getting started (Home) — a list, one step per row */
table.gsl td.gsn { width: 2.6rem; text-align: center; vertical-align: middle; }
table.gsl td.gsn span { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1.5px solid var(--line); font-size: .8em; font-weight: 700; color: var(--muted); }
table.gsl td.gsn .ic { color: var(--good); width: 20px; height: 20px; vertical-align: middle; }
table.gsl tr.done a { color: var(--muted); }
table.gsl a { text-decoration: none; }
#gs { margin-block-end: 1.25rem; }

/* Prepare: "Select all" label (the word shows on a phone only) */
#dt th.pc { width: 2rem; }
label.pall { display: inline-flex; align-items: center; gap: .5rem; margin: 0; }
label.pall > span { display: none; }

/* the phone bottom bar: Home · Balances · + · Menu (only where the menu is a drawer) */
.bbar, .bsheet { display: none; }
@media (max-width: 900px) {
  .bbar { display: flex; position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 22; height: calc(58px + env(safe-area-inset-bottom, 0px));
    padding-block-end: env(safe-area-inset-bottom, 0px); background: var(--card); border-block-start: 1px solid var(--line); box-shadow: 0 -2px 10px rgba(0,0,0,.06); }
  .bbar > a, .bbar > button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: none; border: 0; padding: 0 2px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .bbar span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bbar .ic { width: 22px; height: 22px; vertical-align: 0; }
  .bbar > a.on { color: var(--brand); }
  .bbar > a:focus-visible, .bbar > button:focus-visible { outline: 3px solid #9fd1bb; outline-offset: -3px; }
  .bbar .bplus i { display: grid; place-items: center; width: 42px; height: 42px; margin-block-start: -20px; border-radius: 50%; background: var(--brand); color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.28); font-style: normal; }
  .bbar .bplus[aria-expanded="true"] i { transform: rotate(45deg); }
  .bsheet:not([hidden]) { display: block; position: fixed; inset-inline: .75rem; inset-block-end: calc(58px + env(safe-area-inset-bottom, 0px) + 16px); z-index: 23;
    background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 34px rgba(0,0,0,.22); padding: 6px; }
  .bsheet button { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 48px; background: none; border: 0; padding: .6rem .8rem; border-radius: 10px;
    font: inherit; font-weight: 600; color: var(--ink); cursor: pointer; text-align: start; }
  .bsheet button:active { background: var(--brand-bg); }
  .bsheet button .ic { color: var(--brand); width: 20px; height: 20px; }
  /* nothing may hide behind the bar: the page's last button, the toast, the update bar */
  body:has(.bbar) .main { padding-block-end: calc(58px + env(safe-area-inset-bottom, 0px) + 1.5rem); }
  body:has(.bbar) #toast { inset-block-end: calc(58px + env(safe-area-inset-bottom, 0px) + .75rem); }
  body:has(.bbar) #update-bar { inset-block-end: calc(58px + env(safe-area-inset-bottom, 0px)); }
  body:has(.bbar):has(#update-bar) .main { padding-block-end: calc(58px + env(safe-area-inset-bottom, 0px) + 6rem); }
}

@media (max-width: 760px) {
  /* iPhone zooms the page when a box with text under 16 px gets the focus */
  input:not([type=checkbox]):not([type=radio]), select, textarea { font-size: 16px !important; }

  /* Recurring → Prepare: one short row per line (tick · apartment · fee · amount, the payer under it) */
  table.prep, table.prep tbody { display: block; width: 100%; }
  table.prep tr { display: grid; grid-template-columns: 1.9rem auto minmax(0, 1fr) 5.6rem; grid-template-areas: "c a f m" "c p p m";
    column-gap: .55rem; align-items: center; padding: .5rem .6rem; border-block-end: 1px solid var(--line); }
  table.prep td, table.prep th { display: block; border: 0; padding: 0; min-width: 0; }
  table.prep td:nth-child(1) { grid-area: c; }
  table.prep td:nth-child(2) { grid-area: a; }
  table.prep td:nth-child(3) { grid-area: p; font-size: .85em; color: var(--muted); }
  table.prep td:nth-child(4) { grid-area: f; }
  table.prep td:nth-child(5) { grid-area: m; }
  table.prep td.pz { display: none; }
  table.prep input[type=checkbox] { width: 1.3rem; height: 1.3rem; display: block; }
  table.prep tr:first-child { display: block; background: var(--brand-bg); }
  table.prep th:not(.pc) { display: none; }
  #dt th.pc { width: auto; }
  label.pall > span { display: inline; font-size: 1rem; color: var(--ink); margin: 0; font-weight: 600; }
  #dt input.amt { width: 100%; }
  .prep-foot { position: sticky; inset-block-end: calc(58px + env(safe-area-inset-bottom, 0px)); background: var(--brand-bg); padding: .6rem 0; margin-block-end: -.5rem; z-index: 5; }
}
/* v0.30 safe areas — index.html now has viewport-fit=cover, so the page reaches under the notch and the gesture bar
   (the Play Store app and "Add to Home Screen"). Without a notch every env() below is 0 and nothing moves. */
@supports (padding: env(safe-area-inset-top)) {
  .top { height: calc(60px + env(safe-area-inset-top)); padding-block-start: env(safe-area-inset-top);
         padding-inline: calc(1.25rem + env(safe-area-inset-left)) calc(1.25rem + env(safe-area-inset-right)); }
  .side { padding-block-start: calc(14px + env(safe-area-inset-top)); padding-block-end: calc(14px + env(safe-area-inset-bottom)); }
  .auth { padding-block-start: env(safe-area-inset-top); }
  #update-bar { padding-block-end: env(safe-area-inset-bottom); }
  @media (max-width: 900px) {
    .top { padding-inline: calc(.75rem + env(safe-area-inset-left)) calc(.75rem + env(safe-area-inset-right)); }
    body:not(:has(.bbar)) .main { padding-block-end: calc(1.5rem + env(safe-area-inset-bottom)); }
    body:not(:has(.bbar)) #toast { inset-block-end: calc(1rem + env(safe-area-inset-bottom)); }
  }
  @media (max-width: 760px) {
    dialog.pop, dialog.pop.wide { padding-block-start: calc(1.25rem + env(safe-area-inset-top)); }
    dialog.pop .pop-f { padding-block-end: calc(1rem + env(safe-area-inset-bottom)); }
    dialog.pop .pop-x { inset-block-start: calc(.6rem + env(safe-area-inset-top)); }
  }
}

/* v0.31 the Terms tick on sign-up / invite, and the small "Report" link under an announcement or a request */
.check.terms { align-items: flex-start; margin: .7rem 0; font-size: .92rem; }
.check.terms input { margin-top: .28rem; flex: none; }
.rp-l { margin: .3rem 0 0; }
.rp-l a { display: inline-flex; align-items: center; gap: .3rem; text-decoration: none; min-height: 36px; padding: .3rem .5rem .3rem 0; }
[dir=rtl] .rp-l a { padding: .3rem 0 .3rem .5rem; }
.legal a { display: inline-block; padding: .45rem 0; }
.check input[type=radio] { width: auto; flex: none; margin: 0; }
.pop .check:has(input[type=radio]) { min-height: 40px; }
.rp-l a:hover { text-decoration: underline; }

/* v0.35.0 Menu type (All modules / Favourites / Sections) + Find a module — on top of the sidebar */
.sbm { margin: .7rem 0 .2rem; display: flex; flex-direction: column; gap: 6px; }
.sbm-row { display: flex; align-items: center; gap: 6px; }
.sbm-lbl { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); font-weight: 700; flex: none; }
[dir="rtl"] .sbm-lbl { letter-spacing: 0; font-size: 12px; }
.sbm-row .cbx { flex: 1; min-width: 0; }
.sbm-row select, .sbm-row .cbx > input { width: 100%; height: 32px; min-height: 0; padding: 4px 10px; border: 1px solid rgba(255,255,255,.24) !important; border-radius: 8px; background: rgba(255,255,255,.09) !important; color: #fff !important; font: inherit; font-size: 13px; font-weight: 600; }
.sbm-row .cbx > input::placeholder { color: rgba(255,255,255,.85); }
.sbm-row .cbx::after { color: #e6f0eb; opacity: .9; }
.sbm-star { flex: none; width: 32px; height: 32px; min-height: 0; padding: 0; border-radius: 8px; border: 1px solid rgba(255,255,255,.24); background: rgba(255,255,255,.09); color: #f0c75e; cursor: pointer; font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; }
.sbm-star:hover { background: rgba(255,255,255,.17); }
#sbm-q { width: 100%; height: 34px; min-height: 0; box-sizing: border-box; padding: 5px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; background: rgba(0,0,0,.18); color: #fff; font: inherit; font-size: 16px; }
#sbm-q::placeholder { color: rgba(255,255,255,.62); }
#sbm-q:focus { outline: none; border-color: var(--accent-2); }
.nav.sbm-fav > * { display: none !important; }
.nav.sbm-fav > a.sbm-on { display: flex !important; }
.side.sbm-srch .nav > * { display: none !important; }
.side.sbm-srch .nav > .nav-group.sbm-hit { display: block !important; }
.side.sbm-srch .nav > a.sbm-hit { display: flex !important; }
.side.sbm-srch #sbm-sec { display: none !important; }
.side.sbm-secm:not(.sbm-srch) .nav { display: none; }
#sbm-sec { display: none; flex-direction: column; gap: 2px; margin-top: .6rem; }
.side.sbm-secm #sbm-sec { display: flex; }
#sbm-sec > button { text-align: start; background: transparent; border: 0; color: rgba(255,255,255,.84); padding: 10px 12px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; display: flex; align-items: center; gap: 11px; width: 100%; min-height: 0; }
#sbm-sec > button:hover, #sbm-sec > button.sbm-open { background: rgba(255,255,255,.08); color: #fff; }
#sbm-sec > button.on { background: var(--accent-2); color: #2a1a06; font-weight: 700; }
#sbm-sec .sbm-ch { margin-inline-start: auto; opacity: .6; font-size: 12px; font-weight: 400; }
#sbm-sec .sbm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); margin-inline-start: auto; }
#sbm-sec .sbm-dot + .sbm-ch { margin-inline-start: 6px; }
#sbm-sec > button.on .sbm-dot { background: #2a1a06; }
#sbm-sec svg, #sbm-fly svg, .sbm-in svg { flex-shrink: 0; }
.sbm-in { display: flex; flex-direction: column; gap: 2px; padding-inline-start: 12px; margin-bottom: 4px; }
#sbm-fly { position: fixed; z-index: 60; min-width: 230px; max-width: 300px; max-height: 80vh; overflow-y: auto; background: #123f2f; background: color-mix(in srgb, var(--brand) 62%, #04140e); border-radius: 12px; padding: 8px; box-shadow: 0 12px 34px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 2px; }
#sbm-fly[hidden] { display: none; }
#sbm-fly .sbm-ft { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.6); font-weight: 700; padding: 4px 12px 6px; }
[dir="rtl"] #sbm-fly .sbm-ft { letter-spacing: 0; font-size: 12px; }
#sbm-fly a, .sbm-in a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 9px; color: rgba(255,255,255,.84); text-decoration: none; font-size: 14px; font-weight: 500; }
#sbm-fly a:hover, .sbm-in a:hover { background: rgba(255,255,255,.08); color: #fff; }
#sbm-fly a.on, .sbm-in a.on { background: var(--accent-2); color: #2a1a06; font-weight: 700; }
#sbm-fly a.soon, .sbm-in a.soon { color: rgba(255,255,255,.42); pointer-events: none; }
#sbm-fly a .ncnt, .sbm-in a .ncnt { margin-inline-start: auto; font-size: 11px; opacity: .75; }
.sbm-fbox { max-height: 56vh; overflow-y: auto; }
.sbm-fh { font-size: .72rem; font-weight: 800; color: var(--muted); text-transform: uppercase; margin: 10px 0 2px; }
.sbm-fl { padding: 6px 2px; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 40px; }
.sbm-fl input { width: 18px; height: 18px; flex: none; margin: 0; }
.sbm-fl svg { flex: none; color: var(--brand); }
/* v0.35.0: a card list (phone) hides its header row - when the column filters are on it, the row shows as small column chips with their ▾ */
@media (max-width: 760px) {
  table.cards tr:first-child:has(.xf-b) { display: flex; flex-wrap: wrap; gap: 5px 6px; padding: .45rem .5rem; border-block-end: 1px solid var(--line); }
  table.cards tr:first-child:has(.xf-b) th { display: inline-flex; align-items: center; width: auto; padding: 2px 2px 2px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: 12px; white-space: nowrap; }
  [dir="rtl"] table.cards tr:first-child:has(.xf-b) th { padding: 2px 10px 2px 2px; }
  table.cards tr:first-child:has(.xf-b) th:not(:has(.xf-b)) { display: none; }
  table.cards tr:first-child:has(.xf-b) .xf-b { width: 28px; height: 28px; opacity: .65; }
}
/* v0.39.0 datefmt.js wraps every date box in span.df-w; inside a field label it stays full width like the other boxes */
label > .df-w { display: block; width: 100%; }
/* v0.41: a payment voided from the EGF portal stays listed, struck through, never counted */
tr.voided td, li.voided { text-decoration: line-through; color: var(--muted); }
tr.voided .pill, li.voided .pill { text-decoration: none; display: inline-block; }
