/* ---------- welcome & auth ---------- */
.welcome { min-height: 100%; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); background: linear-gradient(180deg, #0B3A2F 0%, #0F4D3F 55%, var(--canvas) 55.1%); }
.welcome-top { padding: 22px 22px 0; color: #FFFFFF; display: grid; gap: 14px; }
.welcome-top .logo { width: 58px; height: 58px; border-radius: 18px; background: rgba(255,255,255,.12); color: #FFFFFF; }
.welcome-top .logo svg { width: 34px; height: 34px; }
.welcome-top h1 { margin: 6px 0 0; font-size: 31px; line-height: 1.12; font-weight: 700; letter-spacing: -.01em; }
.welcome-top p { margin: 0; font-size: 15.5px; line-height: 1.45; opacity: .82; }
.welcome-langs { display: flex; flex-wrap: wrap; gap: 6px; }
.welcome-langs button { border: 1px solid rgba(255,255,255,.35); background: transparent; color: #FFFFFF; border-radius: 999px; padding: 6px 12px; min-height: 44px; font-size: 14.5px; }
.welcome-langs button[aria-pressed="true"] { background: #FFFFFF; color: #0B3A2F; border-color: #FFFFFF; }
.welcome-art { padding: 18px 18px 0; display: grid; align-content: end; }
.welcome-art .list { box-shadow: 0 20px 40px -18px rgba(0,0,0,.35); }
.welcome-actions { padding: 18px 18px 26px; display: grid; gap: 10px; }
.demo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.demo-row .btn { font-size: 15px; padding: 11px 10px; }
.steps-bar { display: flex; gap: 5px; }
.steps-bar i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); transition: background-color .25s; }
.steps-bar i.on { background: var(--brand-2); }
.auth-h { margin: 6px 0 0; font-size: 26px; font-weight: 700; line-height: 1.2; }
.auth-s { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }
.found { background: var(--card); border: 2px solid var(--brand-2); border-radius: 20px; padding: 14px; display: flex; gap: 12px; align-items: flex-start; }
.note-box { background: var(--info-soft); color: var(--ink); border-radius: 16px; padding: 12px 14px; font-size: 14.5px; line-height: 1.45; display: flex; gap: 10px; }
.note-box svg { width: 20px; height: 20px; color: var(--info); flex: none; }
.note-box.warn { background: var(--due-soft); }
.note-box.warn svg { color: var(--due); }

/* ---------- home ---------- */
.home-head { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.home-head .who { flex: 1; min-width: 0; min-height: 44px; border: 0; background: none; text-align: start; padding: 0; color: var(--ink); }
.home-head .who b { display: block; font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-head .who span { font-size: 14px; color: var(--muted); display: inline-flex; gap: 3px; align-items: center; }
.home-head .who span svg { width: 14px; height: 14px; }
.hero { border-radius: 26px; padding: 18px; color: #FFFFFF; background: radial-gradient(120% 120% at 100% 0%, var(--hero-from) 0%, var(--hero-to) 60%); box-shadow: inset 0 0 0 1px var(--hero-edge); display: grid; gap: 14px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; background: rgba(76, 195, 160, .14); top: -60px; inset-inline-end: -50px; }
.hero > * { position: relative; z-index: 1; }
.hero .label { font-size: 14px; color: #FFFFFF; opacity: .82; font-weight: 400; }
.hero .big { font-size: 40px; font-weight: 700; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.hero .meta { font-size: 14.5px; opacity: .9; }
.hero .mini { display: flex; flex-wrap: wrap; gap: 6px; }
.hero .mini span { font-size: 13px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 4px 10px; }
.hero .row .btn { flex: 1; white-space: nowrap; padding: 13px 10px; font-size: 15px; min-width: 0; }
.hero .row .btn:first-child { flex: 1.25; }
.quick { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.quick::-webkit-scrollbar { display: none; }
.qa { border: 0; background: none; display: grid; justify-items: center; gap: 7px; width: 76px; flex: none; padding: 0; font-size: 13px; line-height: 1.2; text-align: center; color: var(--ink); }
.qa .ico { width: 54px; height: 54px; border-radius: 50%; transition: transform .12s ease; }
.qa .ico svg { width: 25px; height: 25px; }
.widget { background: var(--card); color: var(--ink); border-radius: 20px; padding: 14px; display: grid; gap: 6px; border: 0; text-align: start; transition: transform .12s ease, background-color .25s; }
.widget .l { font-size: 14px; color: var(--muted); }
.widget .v { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.spark i { flex: 1; background: var(--brand-soft); border-radius: 3px 3px 1px 1px; }
.spark i:last-child { background: var(--brand-2); }
.alert-card { display: flex; gap: 12px; align-items: flex-start; background: var(--card); color: var(--ink); border-radius: 20px; padding: 14px; border: 0; width: 100%; text-align: start; transition: transform .12s ease, background-color .25s; }
.alert-card .t { font-size: 15.5px; font-weight: 500; line-height: 1.35; }
.alert-card .s { font-size: 14px; color: var(--ink-2); margin-top: 3px; line-height: 1.4; }
.alert-card .ico { width: 38px; height: 38px; border-radius: 12px; }
.chat-peek { display: flex; flex-direction: column; gap: 8px; background: var(--chat-bg) !important; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.chat-peek .msg { max-width: 100%; }
.chat-peek .bubble { max-width: 100%; }
/* auto-translation row: fixed sizes and line-heights so it renders the same in Safari, Chrome and Android */
.tr-row { display: flex; align-items: center; gap: 10px; background: var(--card); border-radius: 14px; padding: 10px 12px; }
.tr-ico { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; justify-content: center; flex: none; }
.tr-ico svg { width: 19px; height: 19px; }
.tr-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-text b { font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--ink); }
.tr-text small { font-size: 13.5px; line-height: 1.25; color: var(--muted); }

/* ---------- payments ---------- */
.cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cat { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; line-height: 1.25; }
.cat { border: 0; background: var(--card); color: var(--ink); border-radius: 20px; padding: 14px 10px; display: grid; justify-items: start; gap: 10px; font-size: 13.5px; font-weight: 500; text-align: start; transition: transform .12s ease, background-color .25s; }
.cat .ico { width: 40px; height: 40px; border-radius: 13px; }
.cat small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.bill-hero { background: var(--card); border-radius: 26px; padding: 22px 18px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.bill-hero .ico { width: 64px; height: 64px; border-radius: 22px; }
.bill-hero .ico svg { width: 32px; height: 32px; }
.bill-hero .amount { font-size: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; font-size: 15px; }
.kv + .kv { border-top: 1px solid var(--line); }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { text-align: end; font-weight: 500; }
.inbox { background: linear-gradient(135deg, var(--brand-soft), var(--inbox-to)); border-radius: 22px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.inbox .addr { background: var(--card); border-radius: 13px; padding: 11px 12px; display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 14px; font-weight: 500; direction: ltr; }
.inbox .addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.inbox .addr .btn { flex: none; }
.inbox .ico { background: var(--card); }
.family-card { min-width: 230px; flex: none; background: var(--card); color: var(--ink); border-radius: 20px; padding: 14px; display: grid; gap: 10px; border: 0; text-align: start; transition: transform .12s ease; }
.hscroll { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.hscroll::-webkit-scrollbar { display: none; }

/* ---------- chat ---------- */
.chat-room { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); height: 100%; background: var(--chat-bg); }
.chat-room > * { min-width: 0; }
.chat-head { background: var(--card); display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.chat-head .grow { flex: 1; min-width: 0; }
.chat-head b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-head small { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; white-space: nowrap; min-width: 0; }
.chat-head small > span:first-child { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tr-inline { display: inline-flex; gap: 3px; align-items: center; flex: none; color: var(--brand-text); font-weight: 600; }
.tr-inline svg { width: 13px; height: 13px; flex: none; }
.chat-head .iconbtn { background: var(--field); }
.tr-flag { display: inline-flex; gap: 5px; align-items: center; height: 28px; font-size: 13px; line-height: 1; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); border-radius: 999px; padding: 0 11px; white-space: nowrap; }
.tr-flag svg { width: 15px; height: 15px; flex: none; }
.msgs { overflow-y: auto; padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; overscroll-behavior: contain; }
.msgs::-webkit-scrollbar { display: none; }
.day { align-self: center; font-size: 13px; color: var(--ink-2); background: var(--day-bg); padding: 3px 10px; border-radius: 999px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.bubble { background: var(--card); border-radius: 18px; border-end-start-radius: 6px; padding: 8px 12px 6px; display: grid; gap: 3px; min-width: 0; }
.msg.me .bubble { background: var(--bubble-me); border-end-start-radius: 18px; border-end-end-radius: 6px; }
.bubble .who { font-size: 13px; font-weight: 600; color: var(--c-vaad); }
.bubble .txt { font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.bubble .meta { display: flex; gap: 8px; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.bubble .trn { border: 0; background: none; padding: 2px 0; margin: 0; font-size: 12.5px; line-height: 1.2; font-weight: 500; color: var(--brand-text); display: inline-flex; gap: 4px; align-items: center; text-align: start; min-height: 20px; }
.bubble .trn svg { width: 13px; height: 13px; flex: none; }
/* bigger touch area for the small translate link, without changing the layout */
.bubble .trn { position: relative; }
.bubble .trn::after { content: ""; position: absolute; inset: -10px -8px; }
.composer { background: var(--card); padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); }
.composer .input { min-height: 44px; padding: 11px 14px; border-radius: 22px; font-size: 16px; }
.composer .iconbtn { width: 44px; height: 44px; background: var(--field); }
.composer .send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; flex: none; transition: transform .12s ease; }
.composer .send svg { width: 20px; height: 20px; }
[dir="rtl"] .composer .send svg { transform: scaleX(-1); }
.composer.locked { justify-content: center; color: var(--muted); font-size: 14.5px; padding: 16px; text-align: center; }
.chat-item .ico { border-radius: 50%; width: 48px; height: 48px; }
/* chat list: messenger-style rows, every row the same height */
.chat-tip { display: flex; align-items: center; background: var(--card); border-radius: 16px; }
.chat-tip .tr-row { flex: 1; min-width: 0; border: 0; text-align: start; color: var(--ink); background: none; }
.chat-tip .tip-x { width: 44px; height: 44px; flex: none; border: 0; background: none; color: var(--muted); display: grid; place-items: center; margin-inline-end: 2px; }
.chat-tip .tip-x svg { width: 18px; height: 18px; }
.chat-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 74px; padding: 10px 14px; border: 0; background: none; text-align: start; color: var(--ink); position: relative; transition: background-color .15s; -webkit-tap-highlight-color: transparent; }
.chat-row:active { background: var(--card-press); }
.chat-row + .chat-row::before { content: ""; position: absolute; top: 0; inset-inline-start: 78px; inset-inline-end: 0; height: 1px; background: var(--line); }
.chat-row .ico { width: 52px; height: 52px; }
.chat-row .ico svg { width: 24px; height: 24px; }
.cr-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.cr-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cr-name { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-time { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-prev { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.35; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-tag { display: inline-block; vertical-align: 1px; font-size: 12px; font-weight: 600; line-height: 1.5; padding: 0 7px; margin-inline-end: 6px; border-radius: 6px; background: var(--field); color: var(--ink-2); }
.chat-row.has-unread .cr-time { color: var(--brand-2); font-weight: 600; }
.chat-row.has-unread .cr-prev { color: var(--ink-2); }
.chat-row .unread { flex: none; }
.unread { min-width: 22px; height: 22px; border-radius: 11px; background: var(--brand-2); color: #FFFFFF; font-size: 12.5px; font-weight: 600; display: grid; place-items: center; padding: 0 6px; }
@media (prefers-reduced-motion: no-preference) { .msg.new { animation: msgin .22s ease-out; } @keyframes msgin { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } } }

/* ---------- building map ---------- */
.bmap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bmap .ent { display: grid; gap: 5px; }
.bmap .eh { font-size: 13px; color: var(--muted); font-weight: 600; text-align: center; }
.bmap .fl { display: grid; grid-template-columns: 16px 1fr 1fr; gap: 5px; align-items: center; }
.bmap .fl > span { font-size: 12.5px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.apt { border: 0; height: 44px; border-radius: 10px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; transition: transform .12s ease; }
.apt.paid { background: var(--ok-soft); color: var(--ok); }
.apt.due { background: var(--due-soft); color: var(--due); }
.apt.overdue { background: var(--bad); color: #FFFFFF; }
.apt.mine { outline: 2px solid var(--ink); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.vote-bar { display: flex; height: 9px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--line); }
.vote-bar i { display: block; height: 100%; transition: width .3s ease; }
.bld-cover { border-radius: 24px; padding: 18px; color: #FFFFFF; background: linear-gradient(135deg, #2F6FE4 0%, #12936F 100%); display: grid; gap: 4px; position: relative; overflow: hidden; min-height: 120px; align-content: end; }
.bld-cover svg.bg { position: absolute; inset-inline-end: -10px; bottom: -14px; width: 150px; height: 150px; opacity: .18; }
.bld-cover b { font-size: 24px; }
.bld-cover span { font-size: 14.5px; opacity: .9; }

/* ---------- services ---------- */
.svc { display: flex; gap: 12px; align-items: center; background: var(--card); color: var(--ink); border-radius: 18px; padding: 12px 14px; border: 0; width: 100%; text-align: start; transition: transform .12s ease; }
.svc .body { flex: 1; min-width: 0; }
.svc .t { font-weight: 500; font-size: 16px; }
.svc .s { font-size: 14px; color: var(--muted); margin-top: 2px; }
.upload { border: 2px dashed var(--upload-border); border-radius: 18px; padding: 16px; display: flex; gap: 12px; align-items: center; background: var(--card); color: var(--ink); width: 100%; text-align: start; transition: transform .12s ease; }
.upload.done { border-style: solid; border-color: var(--brand-2); background: var(--choice-on); }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; position: absolute; top: 30px; bottom: -10px; inset-inline-start: 12px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--field); color: var(--muted); }
.timeline .dot.ok { background: var(--ok); color: #FFFFFF; }
.timeline .dot.due { background: var(--due-soft); color: var(--due); }
.timeline .dot svg { width: 14px; height: 14px; }
.success { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 24px 6px 6px; }
.success .ring { width: 92px; height: 92px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.success .ring svg { width: 46px; height: 46px; }
.success h1 { margin: 0; font-size: 25px; }
.success p { margin: 0; color: var(--ink-2); line-height: 1.45; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 18px; }
.bars .b { flex: 1; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 5px; height: 100%; border: 0; background: none; padding: 0; }
.bars .b i { align-self: end; width: 100%; border-radius: 6px 6px 3px 3px; background: var(--brand-soft); display: block; transition: background-color .15s; }
.bars .b[aria-pressed="true"] i { background: var(--brand-2); }
.bars .b small { font-size: 12px; color: var(--muted); }
.catbar { height: 8px; background: var(--field); border-radius: 999px; overflow: hidden; }
.catbar i { display: block; height: 100%; border-radius: 999px; }
.qr { width: 172px; height: 172px; background: #FFFFFF; padding: 12px; border-radius: 18px; margin: 0 auto; }
.profile-head { display: grid; justify-items: center; gap: 6px; text-align: center; padding: 6px 0 4px; }
.profile-head b { font-size: 21px; }
.lang-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.theme-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.theme-opt { min-width: 0; }
.theme-opt { border: 2px solid transparent; background: var(--card); color: var(--ink); border-radius: 18px; padding: 10px 8px 12px; display: grid; justify-items: center; gap: 8px; font-size: 14.5px; font-weight: 500; transition: transform .12s ease, border-color .15s; }
.theme-opt[aria-pressed="true"] { border-color: var(--brand-2); }
.theme-opt .pv { width: 100%; aspect-ratio: 3 / 4; max-width: 100%; border-radius: 12px; padding: 8px; display: grid; gap: 5px; align-content: start; border: 1px solid var(--line); }
.theme-opt .pv i { display: block; height: 8px; border-radius: 4px; }
.theme-opt .pv i:first-child { height: 22px; border-radius: 6px; }
.theme-opt .pv.light { background: #F1F4F2; }
.theme-opt .pv.light i { background: #FFFFFF; }
.theme-opt .pv.light i:first-child { background: #0D6A55; }
.theme-opt .pv.dark { background: #0B110F; }
.theme-opt .pv.dark i { background: #1C2622; }
.theme-opt .pv.dark i:first-child { background: #12936F; }
.theme-opt .pv.system { background: linear-gradient(135deg, #F1F4F2 50%, #0B110F 50%); }
.theme-opt .pv.system i { background: rgba(127,140,134,.45); }
.theme-opt .pv.system i:first-child { background: #12936F; }
.theme-opt .lbl { display: inline-flex; gap: 5px; align-items: center; }
.theme-opt .lbl svg { width: 16px; height: 16px; }

/* ---------- connect all bills ---------- */
.cn-h { margin: 4px 0 0; font-size: 22px; font-weight: 700; line-height: 1.25; }
.stepper { display: flex; align-items: center; justify-content: space-between; background: var(--field); border-radius: 14px; padding: 4px; min-height: 52px; }
.stepper button { width: 44px; height: 44px; border: 0; border-radius: 11px; background: var(--card); color: var(--ink); font-size: 22px; line-height: 1; display: grid; place-items: center; }
.stepper b { font-size: 18px; font-variant-numeric: tabular-nums; }
.bank-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bank { display: flex; align-items: center; gap: 10px; background: var(--card); color: var(--ink); border: 2px solid transparent; border-radius: 16px; padding: 10px; min-height: 56px; font-size: 15px; font-weight: 500; text-align: start; line-height: 1.25; min-width: 0; transition: transform .12s ease, border-color .15s; }
.bank > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.bank[aria-pressed="true"] { border-color: var(--brand-2); }
.bank:active { transform: scale(.97); }
.bank-logo { width: 36px; height: 36px; border-radius: 11px; color: #FFFFFF; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; letter-spacing: -.02em; }
.bank-logo.lg { width: 56px; height: 56px; border-radius: 17px; font-size: 18px; }
.bank-logo.beiti { background: var(--brand); color: var(--on-brand); }
.bank-logo.beiti svg { width: 30px; height: 30px; }
.consent-head { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 6px 0 2px; }
.consent-head .chev { width: 22px; height: 22px; }
.cn-loading { display: grid; justify-items: center; gap: 10px; padding: 70px 0 40px; text-align: center; }
.cn-loading b { font-size: 18px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand-2); }
@media (prefers-reduced-motion: no-preference) { .spinner { animation: spin .8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } }
.howto { margin: 0; padding: 0; list-style: none; counter-reset: howto; display: grid; gap: 10px; }
.howto li { counter-increment: howto; background: var(--card); border-radius: 16px; padding: 12px 14px 12px 12px; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 8px 10px; align-items: start; font-size: 14.5px; line-height: 1.4; }
.howto li::before { content: counter(howto); width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); font-weight: 700; font-size: 14px; display: grid; place-items: center; grid-row: span 2; }
.howto li > .btn, .howto li > .copybox { grid-column: 2; justify-self: start; }
.copybox { display: flex; align-items: center; gap: 8px; background: var(--field); border-radius: 12px; padding: 6px 6px 6px 12px; direction: ltr; max-width: 100%; width: 100%; }
.copybox > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; font-weight: 500; }
.copybox .btn { flex: none; }
.link-btn { border: 0; background: none; padding: 14px 2px; margin: -14px -2px; color: var(--brand-text); font-weight: 600; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.conn-card .ico { background: var(--ok-soft); }

/* ---------- money card lines (home) ---------- */
.hero-lines { display: grid; gap: 2px; border-top: 1px solid rgba(255,255,255,.16); padding-top: 6px; }
.hero-line { display: flex; align-items: center; gap: 10px; min-height: 44px; border: 0; background: none; color: #FFFFFF; padding: 4px 0; text-align: start; font-size: 15px; }
.hero-line > svg:first-child { width: 20px; height: 20px; opacity: .85; }
.hero-line span { flex: 1; min-width: 0; opacity: .92; }
.hero-line b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-line .chev { color: rgba(255,255,255,.6); }
.sec-sum { font-size: 16px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- simple view: one card per bill with its own big Pay button ---------- */
.sbill { background: var(--card); border-radius: var(--r-card); padding: 14px; display: grid; gap: 12px; }
.sbill-top { display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; color: var(--ink); text-align: start; width: 100%; }
.sbill-top .body { flex: 1; min-width: 0; display: grid; gap: 3px; }
.sbill-top b { font-size: 18px; font-weight: 600; }
.sbill-top .body span { font-size: 15px; color: var(--ink-2); line-height: 1.35; }
.sbill-top .amt { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sbill-now { box-shadow: inset 0 0 0 2px var(--due-soft); }
.sbill-now .sbill-top .body span { color: var(--due); font-weight: 500; }

/* ---------- clear Yes / No answers ---------- */
.yn { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.yn button { min-height: 48px; border: 2px solid var(--input-border); background: var(--card); color: var(--ink); border-radius: 14px; font-size: 16px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; transition: border-color .15s, background-color .15s; }
.yn button svg { width: 18px; height: 18px; }
.yn button[aria-pressed="true"] { border-color: var(--brand-2); background: var(--choice-on); color: var(--brand-text); }

/* ---------- Simple mode: everything about 15% bigger, layout reflows to fit ---------- */
html[data-simple] .screen, html[data-simple] .tabbar, html[data-simple] .sheet, html[data-simple] .modal, html[data-simple] .toast { zoom: 1.15; }
html[data-simple] .tabbar svg { width: 26px; height: 26px; }
html[data-simple] .tabbar button { font-size: 13px; }

/* ---------- account bar: the address the whole app shows now (like an account in a bank app) ---------- */
.acct { --acc: var(--ok); --acc-soft: var(--ok-soft); display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; text-align: start; color: var(--ink);
  background: var(--card); border: 0; border-inline-start: 5px solid var(--acc); border-radius: 18px; padding: 10px 14px; transition: transform .12s ease; }
.acct:active { transform: scale(.98); }
.acct-prop { --acc: var(--c-power); --acc-soft: var(--c-power-soft); }
.acct-fam { --acc: var(--c-net); --acc-soft: var(--c-net-soft); }
.acct-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--acc-soft); color: var(--acc); }
.acct-ico svg { width: 22px; height: 22px; }
.acct-body { flex: 1; min-width: 0; display: grid; gap: 1px; }
.acct-body b { font-size: 16px; line-height: 1.25; }
.acct-body small { font-size: 13px; color: var(--muted); line-height: 1.3; }
.acct-body small:first-child { color: var(--acc); font-weight: 600; }
.acct-sw { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: 14px; font-weight: 600; color: var(--brand-text); }
.acct-sw svg { width: 16px; height: 16px; }

/* ---------- Payments: three views (now / soon / paid) ---------- */
.pay-seg .seg-n { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--field); font-size: 13px; font-weight: 600; margin-inline-start: 4px; }
.pay-seg button[aria-pressed="true"] .seg-n { background: var(--brand-soft); color: var(--brand-text); }
.item .s .pill { margin-top: 2px; }
.empty-ok { display: grid; justify-items: center; gap: 8px; padding: 22px 16px; background: var(--card); border-radius: 22px; text-align: center; }
.empty-ok svg { width: 32px; height: 32px; color: var(--ok); }
.pay-hint { margin: -4px 6px 0; }
.pay-tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.pay-tools button { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border: 0; border-radius: 18px; background: var(--card); color: var(--ink); text-align: start; font-size: 14.5px; font-weight: 500; line-height: 1.25; overflow-wrap: anywhere; min-width: 0; }
.pay-tools button:active { transform: scale(.97); }
.pay-tools .ico { width: 38px; height: 38px; border-radius: 12px; flex: none; }
.pay-tools small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; margin-top: 2px; }

/* ---------- private messages to neighbors ---------- */
.chat-row .dm-av { width: 52px; height: 52px; font-size: 17px; }
button.avatar { cursor: pointer; padding: 0; }
.nb-act { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); }
.nb-act.muted { background: var(--field); color: var(--muted); }
.nb-act svg { width: 18px; height: 18px; }

/* ---------- WhatsApp ---------- */
.k-wa { background: #DDF6E7; color: #128C4A; }
html[data-theme="dark"] .k-wa { background: #0F3321; color: #4ADE80; }
@media (prefers-color-scheme: dark) { html[data-theme="system"] .k-wa { background: #0F3321; color: #4ADE80; } }
.wa-btn { background: #1FA855 !important; color: #FFFFFF !important; }
.wa-card { display: flex; align-items: center; gap: 12px; }
.wa-intro { display: flex; gap: 12px; align-items: flex-start; }
.wa-intro .ico, .wa-card .ico { flex: none; }
.wa-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; font-size: 14.5px; }
.wa-list li { display: flex; align-items: center; gap: 8px; }
.wa-list svg { width: 18px; height: 18px; color: #1FA855; flex: none; }
.wa-wait { display: grid; justify-items: center; text-align: center; gap: 10px; }
.wa-wait .ico { width: 56px; height: 56px; border-radius: 50%; }
.wa-preview { display: grid; gap: 8px; }
.wa-preview p { margin: 0 4px; }
.wa-bubble { background: #E7F8DC; color: #111B21; border-radius: 14px; border-start-start-radius: 4px; padding: 10px 12px; display: grid; gap: 4px; font-size: 14.5px; max-width: 92%; }
.wa-bubble b { color: #128C4A; font-size: 13.5px; }
.wa-link { color: #0B6BCB; font-size: 14px; }
.wa-time { justify-self: end; font-size: 12px; color: #667781; }
html[data-theme="dark"] .wa-bubble { background: #144D37; color: #E9EDEF; }
html[data-theme="dark"] .wa-bubble b { color: #4ADE80; }
html[data-theme="dark"] .wa-link { color: #53BDEB; }
html[data-theme="dark"] .wa-time { color: #A6B3BA; }
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] .wa-bubble { background: #144D37; color: #E9EDEF; }
  html[data-theme="system"] .wa-bubble b { color: #4ADE80; }
  html[data-theme="system"] .wa-link { color: #53BDEB; }
  html[data-theme="system"] .wa-time { color: #A6B3BA; }
}
.wa-ok { width: 26px; height: 26px; color: #1FA855; flex: none; }

/* ---------- spending card (Home, Payments > Paid) ---------- */
.spend-card { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: var(--card); color: var(--ink); border-radius: 22px; padding: 14px 12px 14px 16px; text-align: start; min-height: 96px; }
.spend-card:active { transform: scale(.98); }
.sp-body { flex: 1; min-width: 0; display: grid; gap: 4px; }
.sp-t { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.sp-t svg { width: 18px; height: 18px; color: var(--c-water); flex: none; }
.spend-card b { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.sp-d { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.sp-bars { display: flex; align-items: flex-end; gap: 4px; width: 78px; height: 52px; flex: none; }
.sp-bars i { flex: 1; border-radius: 4px 4px 2px 2px; background: var(--brand-soft); min-height: 6px; }
.sp-bars i.on { background: var(--brand-2); }

/* ---------- Chats: write to a neighbor / create a chat ---------- */
.compose-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.compose-row button { display: grid; justify-items: start; gap: 10px; padding: 14px; min-height: 112px; border: 0; border-radius: 20px; background: var(--card); color: var(--ink); text-align: start; min-width: 0; overflow-wrap: anywhere; }
.compose-row button:active { transform: scale(.97); }
.compose-row .ico { width: 42px; height: 42px; border-radius: 14px; }
.compose-row b { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.25; }
.compose-row small { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.3; }
.pick-item .avatar { width: 40px; height: 40px; font-size: 14px; }
.pick-box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-strong, var(--muted)); display: grid; place-items: center; color: transparent; flex: none; transition: background-color .15s, border-color .15s; }
.pick-box svg { width: 16px; height: 16px; stroke-width: 3; }
.pick-item[aria-pressed="true"] .pick-box { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }
.pick-item[aria-pressed="true"] { background: var(--choice-on, var(--card)); }
.gn-bar { position: sticky; bottom: 0; padding: 10px 0 4px; background: linear-gradient(to bottom, transparent, var(--bg) 30%); z-index: 2; }

/* ---------- accessibility fixes after the UX review (contrast, overflow) ---------- */
.item .s { overflow-wrap: anywhere; }
.toast.warn svg { color: var(--due); }
.unread { background: var(--brand); }
.chat-row.has-unread .cr-time { color: var(--brand-text); }
.iconbtn .badge, .tabbar .tb-badge { background: #D23434; }
.wa-btn { background: #0F7A40 !important; }
.grid2 .input[type="date"] { min-width: 0; width: 100%; max-width: 100%; }
.av-tap { min-width: 44px; min-height: 44px; width: 44px; height: 44px; margin: -5px; border: 5px solid transparent; background-clip: padding-box; }
.av-tap { box-sizing: border-box; }

/* ---------- polls, rent, relatives ---------- */
.poll { gap: 10px; }
.poll-opts { display: grid; gap: 6px; }
.poll-opt { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--field); overflow: hidden; font-size: 15px; }
.poll-opt > span { position: relative; z-index: 1; }
.poll-opt i { position: absolute; inset-block: 0; inset-inline-start: 0; background: var(--brand-soft); }
.poll-opt.win { font-weight: 600; box-shadow: inset 0 0 0 2px var(--brand-2); }
.po-n { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.poll-btns { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.pill-btn { border: 0; background: none; padding: 0; min-height: 44px; display: inline-flex; align-items: center; cursor: pointer; flex: none; }
.rent-card { gap: 10px; }
.empty-ok .small { max-width: 300px; }

.kpi .l { overflow-wrap: normal; word-break: normal; hyphens: manual; }

.item-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; border: 0; background: none; padding: 0; color: inherit; text-align: start; min-height: 44px; }
