/* R36 PMS mobile app (/pms-app, PWA, phone first) – tenants, collectors and managers. Every class of this file starts with "pa-". 360 px first,
   touch targets ≥ 44 px, logical properties for RTL (Arabic is the default), the house colour tokens (dark mode follows the theme). The app has its
   own deep "harbour" blue with a warm sand accent; amounts are shown with Ui.Money (3 decimals) in tabular digits. */

.pa-app { --pa-primary: #12466b; --pa-primary-2: #1d6a96; --pa-accent: #e2a54b; --pa-on: #fff; --pa-radius: 16px; --pa-late: #b3361f; --pa-ok: #1d7a55;
    min-height: 100vh; min-height: 100dvh; background: var(--ground); color: var(--text); font-family: var(--font);
    padding-bottom: calc(76px + env(safe-area-inset-bottom)); -webkit-tap-highlight-color: transparent; }
.pa-app a { color: var(--pa-primary); }
.pa-app :focus-visible { outline: 2px solid var(--pa-primary); outline-offset: 2px; }
.pa-app.staff { --pa-primary: #1c3d33; --pa-primary-2: #2c6152; --pa-accent: #e7b35a; }
@media (prefers-color-scheme: dark) { .pa-app { --pa-primary: #4a9bd0; --pa-primary-2: #2f6f9a; } .pa-app.staff { --pa-primary: #57a98f; --pa-primary-2: #2c6152; } }
[data-theme="dark"] .pa-app { --pa-primary: #4a9bd0; } [data-theme="dark"] .pa-app.staff { --pa-primary: #57a98f; }

/* ---------------------------------------------------------------- top bar */
.pa-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 2px; min-height: 58px; padding: env(safe-area-inset-top) 6px 0;
    background: linear-gradient(180deg, var(--pa-primary), color-mix(in srgb, var(--pa-primary) 88%, #000)); color: var(--pa-on); box-shadow: 0 2px 10px rgba(0,0,0,.1); }
.pa-top a, .pa-top button { color: var(--pa-on); }
.pa-top-title { flex: 1; min-width: 0; padding-inline: 6px; }
.pa-title { margin: 0; font-size: 1.06rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; }
.pa-title small { display: block; font-size: .76rem; font-weight: 400; opacity: .85; }
.pa-brand { display: inline-flex; align-items: center; gap: 9px; min-width: 0; text-decoration: none; }
.pa-brand img { width: 34px; height: 34px; border-radius: 10px; flex: none; background: rgba(255,255,255,.12); }
.pa-top-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%;
    text-decoration: none; border: 0; background: transparent; cursor: pointer; flex: none; font: inherit; }
.pa-top-btn:hover { background: rgba(255,255,255,.12); }
.pa-lang { font-weight: 700; font-size: .95rem; }
[dir="rtl"] .pa-back .icon { transform: scaleX(-1); }
.pa-badge { position: absolute; top: 3px; inset-inline-end: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; box-sizing: border-box;
    background: var(--pa-accent); color: #1b1b1b; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; }
.pa-badge.static { position: static; margin-inline-start: auto; }

.pa-main { max-width: 760px; margin: 0 auto; padding: 12px 14px 28px; box-sizing: border-box; }
.pa-main > * + * { margin-top: 14px; }

/* ---------------------------------------------------------------- bottom tabs & sheet */
.pa-tabs { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; justify-content: center; background: var(--surface);
    border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 16px rgba(0,0,0,.05); }
.pa-tab { position: relative; flex: 1; max-width: 150px; min-height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    text-decoration: none; color: var(--muted) !important; font-size: .72rem; border: 0; background: transparent; cursor: pointer; font-family: inherit; padding: 6px 2px; }
.pa-tab.active { color: var(--pa-primary) !important; font-weight: 600; }
.pa-tab.active::before { content: ""; position: absolute; top: 0; inset-inline: 28%; height: 3px; border-radius: 0 0 3px 3px; background: var(--pa-primary); }
.pa-tab .pa-badge { top: 4px; inset-inline-end: calc(50% - 24px); }
.pa-tab.pa-paytab .ic { width: 44px; height: 44px; margin-top: -20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--pa-accent); color: #1b1b1b; box-shadow: 0 6px 16px rgba(0,0,0,.22); border: 3px solid var(--surface); }
.pa-tab.pa-paytab.active::before { display: none; }
.pa-sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.38); }
.pa-sheet { position: fixed; inset-inline: 0; bottom: 0; z-index: 41; max-width: 760px; margin: 0 auto; max-height: 88vh; overflow-y: auto; box-sizing: border-box;
    background: var(--surface); border-radius: 20px 20px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.2);
    animation: pa-up .2s ease-out; }
@keyframes pa-up { from { transform: translateY(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.pa-sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--border); margin: 4px auto 12px; }
.pa-who { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; border-bottom: 1px solid var(--row-line); }
.pa-who > div { display: flex; flex-direction: column; min-width: 0; }
.pa-avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--pa-accent); color: #1b1b1b; font-weight: 700; }
.pa-menu { display: flex; flex-direction: column; padding: 4px 0; }
.pa-menu-head { margin: 14px 4px 2px; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.pa-menu-item { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 4px; color: var(--text) !important; text-decoration: none;
    border-bottom: 1px solid var(--row-line); background: none; border-inline: 0; border-top: 0; font: inherit; text-align: start; cursor: pointer; width: 100%; }
.pa-menu-item .icon { color: var(--pa-primary); }

/* install banner */
.pa-install { display: flex; align-items: center; gap: 10px; max-width: 760px; margin: 10px auto 0; padding: 10px 12px; box-sizing: border-box;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--pa-radius); }
@media (max-width: 788px) { .pa-install { margin: 10px 14px 0; } }
.pa-install img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.pa-install-text { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .84rem; }
.pa-install-text span { color: var(--muted); }
.pa-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent;
    color: var(--muted); cursor: pointer; flex: none; text-decoration: none; }

/* ---------------------------------------------------------------- building blocks */
.pa-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--pa-radius); padding: 14px 16px; }
.pa-card.flush { padding: 0; overflow: hidden; }
.pa-card > h2, .pa-h2 { font-size: 1rem; font-weight: 600; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.pa-sec { display: flex; align-items: center; gap: 8px; margin: 20px 2px 8px; }
.pa-sec h2 { flex: 1; margin: 0; font-size: 1.02rem; font-weight: 700; }
.pa-sec a { font-size: .84rem; font-weight: 500; text-decoration: none; }
.pa-muted { color: var(--muted); }
.pa-small { font-size: .82rem; }
.pa-num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.pa-row { display: flex; align-items: center; gap: 10px; }
.pa-row.wrap { flex-wrap: wrap; }
.pa-grow { flex: 1; min-width: 0; }
.pa-center { text-align: center; }
.pa-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 24px; border: 0;
    background: var(--pa-primary); color: var(--pa-on) !important; font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.pa-btn:disabled { opacity: .55; cursor: default; }
.pa-btn.block { width: 100%; }
.pa-btn.gold { background: var(--pa-accent); color: #1b1b1b !important; }
.pa-btn.ghost { background: transparent; color: var(--pa-primary) !important; border: 1.5px solid var(--pa-primary); }
.pa-btn.light { background: var(--gray-bg); color: var(--text) !important; }
.pa-btn.danger { background: transparent; color: var(--danger) !important; border: 1.5px solid var(--danger); }
.pa-btn.sm { min-height: 38px; padding: 0 14px; font-size: .88rem; border-radius: 19px; }
.pa-link { background: none; border: 0; color: var(--pa-primary); font: inherit; cursor: pointer; padding: 6px 0; text-decoration: underline; text-underline-offset: 3px; }
.pa-msg { padding: 10px 12px; border-radius: 12px; font-size: .9rem; line-height: 1.5; }
.pa-msg.bad { background: var(--red-bg); color: var(--red-fg); }
.pa-msg.good { background: var(--green-bg); color: var(--green-fg); }
.pa-msg.info { background: var(--blue-bg); color: var(--blue-fg); }
.pa-msg.warn { background: var(--amber-bg); color: var(--amber-fg); }
.pa-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 12px; font-size: .74rem; font-weight: 600; white-space: nowrap;
    background: var(--gray-bg); color: var(--gray-fg); }
.pa-chip.green { background: var(--green-bg); color: var(--green-fg); }
.pa-chip.amber { background: var(--amber-bg); color: var(--amber-fg); }
.pa-chip.red { background: var(--red-bg); color: var(--red-fg); }
.pa-chip.blue { background: var(--blue-bg); color: var(--blue-fg); }
.pa-empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.pa-empty .icon { color: var(--pa-primary); opacity: .6; }
.pa-empty h2 { color: var(--text); font-size: 1.05rem; margin: 10px 0 6px; }
.pa-skel { background: linear-gradient(90deg, var(--gray-bg) 25%, var(--row-line) 50%, var(--gray-bg) 75%); background-size: 200% 100%;
    animation: pa-shimmer 1.2s infinite; border-radius: 12px; }
@keyframes pa-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.pa-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; font-size: .92rem; margin: 0; }
.pa-kv dt { color: var(--muted); }
.pa-kv dd { margin: 0; text-align: end; font-weight: 500; overflow-wrap: anywhere; }
.pa-kv .total { font-weight: 700; font-size: 1.05rem; color: var(--text); }

/* list rows */
.pa-list { display: flex; flex-direction: column; }
.pa-item { position: relative; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; text-decoration: none; color: var(--text) !important;
    border-bottom: 1px solid var(--row-line); background: transparent; border-inline: 0; border-top: 0; width: 100%; text-align: start; font: inherit; cursor: pointer; box-sizing: border-box; }
.pa-item:last-child { border-bottom: 0; }
a.pa-item:hover, button.pa-item:hover, label.pa-item:hover { background: var(--ground); }
.pa-item-icon { flex: none; width: 42px; height: 42px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--pa-primary) 11%, transparent); color: var(--pa-primary); }
.pa-item-icon.late { background: color-mix(in srgb, var(--pa-late) 12%, transparent); color: var(--pa-late); }
.pa-item-icon.ok { background: color-mix(in srgb, var(--pa-ok) 12%, transparent); color: var(--pa-ok); }
.pa-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pa-item-body strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pa-item-body > span { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pa-item-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: end; }
.pa-item-end strong { font-variant-numeric: tabular-nums; }
.pa-item > .icon:last-child { color: var(--muted); flex: none; }
[dir="rtl"] .pa-item > .icon.chev { transform: scaleX(-1); }
.pa-item input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--pa-primary); flex: none; margin: 0; }
.pa-item.on { background: color-mix(in srgb, var(--pa-primary) 6%, transparent); }

/* ---------------------------------------------------------------- tenant home */
.pa-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 18px 18px 16px; color: #fff;
    background: radial-gradient(120% 140% at 100% 0%, var(--pa-primary-2) 0%, var(--pa-primary) 55%, color-mix(in srgb, var(--pa-primary) 70%, #000) 100%);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--pa-primary) 35%, transparent); }
.pa-hero::after { content: ""; position: absolute; inset-inline-end: -40px; bottom: -60px; width: 190px; height: 190px; border-radius: 50%;
    border: 26px solid rgba(255,255,255,.06); pointer-events: none; }
.pa-hero-hi { margin: 0; font-size: .9rem; opacity: .9; }
.pa-hero-label { margin: 14px 0 2px; font-size: .78rem; letter-spacing: .03em; opacity: .82; }
.pa-hero-amount { display: flex; align-items: baseline; gap: 8px; font-size: 2.2rem; font-weight: 700; line-height: 1.1; }
.pa-hero-amount small { font-size: .95rem; font-weight: 600; opacity: .85; }
.pa-hero-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .84rem; }
.pa-hero-meta span { display: inline-flex; align-items: center; gap: 5px; opacity: .95; }
.pa-hero-meta .late { color: #ffd0c4; font-weight: 600; }
.pa-hero-actions { position: relative; z-index: 1; display: flex; gap: 10px; margin-top: 16px; }
.pa-hero-actions .pa-btn { flex: 1; min-height: 46px; }
.pa-hero-actions .pa-btn.ghost { border-color: rgba(255,255,255,.6); color: #fff !important; }
.pa-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: .88rem; line-height: 1.55;
    background: color-mix(in srgb, var(--pa-accent) 16%, var(--surface)); border: 1px solid color-mix(in srgb, var(--pa-accent) 40%, transparent); }
.pa-notice .icon { flex: none; color: color-mix(in srgb, var(--pa-accent) 60%, #3a2a00); margin-top: 2px; }
.pa-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pa-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--surface);
    border: 1px solid var(--border); text-decoration: none; color: var(--text) !important; font-size: .76rem; text-align: center; line-height: 1.25; }
.pa-tile .ic { width: 40px; height: 40px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--pa-primary) 11%, transparent); color: var(--pa-primary); }
.pa-unit { display: flex; gap: 12px; align-items: center; }
.pa-unit-badge { flex: none; width: 54px; height: 54px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--pa-primary) 10%, transparent); color: var(--pa-primary); font-weight: 700; font-size: 1.05rem; line-height: 1; }
.pa-unit-badge small { font-size: .62rem; font-weight: 600; opacity: .8; margin-top: 3px; }
.pa-meter { height: 6px; border-radius: 3px; background: var(--gray-bg); overflow: hidden; margin-top: 10px; }
.pa-meter > span { display: block; height: 100%; border-radius: 3px; background: var(--pa-primary); }

/* ---------------------------------------------------------------- pay */
.pa-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 16px; background: var(--gray-bg); gap: 4px; }
.pa-seg a, .pa-seg button { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; border-radius: 12px;
    text-decoration: none; color: var(--text) !important; font: inherit; font-size: .88rem; border: 0; background: transparent; cursor: pointer; }
.pa-seg .on { background: var(--surface); box-shadow: 0 1px 4px rgba(0,0,0,.12); font-weight: 700; color: var(--pa-primary) !important; }
.pa-paybar { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 5; display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.pa-paybar .sum { flex: 1; display: flex; flex-direction: column; }
.pa-paybar .sum span { font-size: .78rem; color: var(--muted); }
.pa-paybar .sum strong { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.pa-secure { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.pa-methods { display: flex; gap: 8px; justify-content: center; }
.pa-methods span { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--border); font-size: .74rem; font-weight: 700; color: var(--muted); background: var(--surface); }
.pa-result { max-width: 460px; margin: 0 auto; padding: 32px 16px; display: flex; flex-direction: column; gap: 14px; text-align: center; }
.pa-result h1 { margin: 0; font-size: 1.25rem; }
.pa-result .big { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.pa-result .big.ok { background: var(--green-bg); color: var(--green-fg); }
.pa-result .big.no { background: var(--red-bg); color: var(--red-fg); }
.pa-result .big.wait { background: var(--amber-bg); color: var(--amber-fg); }
.pa-demo { border: 1px dashed var(--amber-fg); background: var(--amber-bg); color: var(--amber-fg); border-radius: 12px; padding: 8px 12px; font-size: .85rem; text-align: center; }

/* ---------------------------------------------------------------- forms */
.pa-form { display: flex; flex-direction: column; gap: 14px; }
.pa-field { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; min-width: 0; }
.pa-field > span { color: var(--muted); font-weight: 500; }
.pa-field input, .pa-field select, .pa-field textarea { min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
    color: var(--text); font: inherit; font-size: 1rem; box-sizing: border-box; width: 100%; }
.pa-field textarea { min-height: 100px; resize: vertical; line-height: 1.6; }
.pa-field input:focus, .pa-field select:focus, .pa-field textarea:focus { border-color: var(--pa-primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--pa-primary) 18%, transparent); }
.pa-field input.amount { font-size: 1.5rem; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.pa-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pa-check { display: flex; align-items: flex-start; gap: 10px; font-size: .88rem; line-height: 1.5; }
.pa-check input { width: 20px; height: 20px; accent-color: var(--pa-primary); flex: none; margin-top: 2px; }
.pa-methodpick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pa-methodpick label { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; border: 1.5px solid var(--border);
    background: var(--surface); font-size: .78rem; font-weight: 600; cursor: pointer; text-align: center; }
.pa-methodpick input { position: absolute; opacity: 0; pointer-events: none; }
.pa-methodpick label.on { border-color: var(--pa-primary); background: color-mix(in srgb, var(--pa-primary) 8%, var(--surface)); color: var(--pa-primary); }
.pa-photo { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px dashed var(--border); border-radius: 14px; cursor: pointer; }
.pa-photo input[type="file"] { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.pa-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pa-thumbs img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.pa-prio { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pa-prio button { min-height: 40px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--surface); font: inherit; font-size: .8rem; cursor: pointer; color: var(--text); }
.pa-prio button.on { border-color: var(--pa-primary); color: var(--pa-primary); font-weight: 700; background: color-mix(in srgb, var(--pa-primary) 8%, var(--surface)); }
.pa-steps { display: flex; flex-direction: column; gap: 0; padding-inline-start: 6px; }
.pa-step { position: relative; display: flex; gap: 12px; padding: 0 0 14px; }
.pa-step::before { content: ""; position: absolute; inset-inline-start: 7px; top: 18px; bottom: 0; width: 2px; background: var(--row-line); }
.pa-step:last-child::before { display: none; }
.pa-step i { flex: none; width: 16px; height: 16px; border-radius: 50%; margin-top: 2px; background: var(--gray-bg); border: 2px solid var(--border); box-sizing: border-box; }
.pa-step.done i { background: var(--pa-primary); border-color: var(--pa-primary); }
.pa-step.now i { background: var(--pa-accent); border-color: var(--pa-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pa-accent) 25%, transparent); }
.pa-step span { font-size: .9rem; }

/* ---------------------------------------------------------------- staff: collection & dashboard */
.pa-daybar { display: flex; gap: 10px; }
.pa-daybar > div { flex: 1; border-radius: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--border); }
.pa-daybar span { display: block; font-size: .74rem; color: var(--muted); }
.pa-daybar strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.pa-daybar .late strong { color: var(--pa-late); }
.pa-filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.pa-filters::-webkit-scrollbar { display: none; }
.pa-filters button, .pa-filters select { flex: none; min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--border); background: var(--surface);
    font: inherit; font-size: .82rem; color: var(--text); cursor: pointer; }
.pa-filters .on { background: var(--pa-primary); border-color: var(--pa-primary); color: #fff; }
.pa-search { position: relative; display: block; }
.pa-search input { width: 100%; min-height: 46px; padding-block: 0; padding-inline: 42px 14px; border-radius: 23px; border: 1px solid var(--border);
    background: var(--surface); font: inherit; color: var(--text); box-sizing: border-box; }
.pa-search .icon { position: absolute; inset-inline-start: 14px; top: 50%; margin-top: -9px; color: var(--muted); }
.pa-due { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--row-line); }
.pa-due:last-child { border-bottom: 0; }
.pa-due-head { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--text) !important; }
.pa-due-head .pa-item-body strong { white-space: normal; }
.pa-due-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.pa-due-acts a { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border-radius: 12px; font-size: .78rem; font-weight: 600;
    text-decoration: none; background: var(--gray-bg); color: var(--text) !important; }
.pa-due-acts a.wa { background: #e5f6ec; color: #136c3a !important; }
.pa-due-acts a.go { background: var(--pa-primary); color: #fff !important; }
.pa-late { color: var(--pa-late); font-weight: 700; }
.pa-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pa-kpi { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
    text-decoration: none; color: var(--text) !important; min-width: 0; }
.pa-kpi span { font-size: .76rem; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pa-kpi span .icon { color: var(--pa-primary); }
.pa-kpi strong { font-size: 1.35rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.pa-kpi small { font-size: .74rem; color: var(--muted); }
.pa-kpi.wide { grid-column: span 2; }
.pa-kpi.late strong { color: var(--pa-late); }
.pa-ring { --v: 0; width: 76px; height: 76px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: conic-gradient(var(--pa-primary) calc(var(--v) * 1%), var(--gray-bg) 0); }
.pa-ring b { width: 58px; height: 58px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: .95rem; font-variant-numeric: tabular-nums; }
.pa-bars { display: flex; flex-direction: column; gap: 8px; }
.pa-bar { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: .8rem; }
.pa-bar i { display: block; height: 10px; border-radius: 5px; background: var(--gray-bg); overflow: hidden; }
.pa-bar i b { display: block; height: 100%; border-radius: 5px; background: var(--pa-primary); }
.pa-bar i b.due { background: color-mix(in srgb, var(--pa-primary) 35%, var(--gray-bg)); }
.pa-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.pa-board a, .pa-board span { min-height: 52px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .8rem;
    font-weight: 700; text-decoration: none; color: var(--text) !important; border: 1.5px solid transparent; }
.pa-board small { font-size: .62rem; font-weight: 500; opacity: .75; }
.pa-board .occupied { background: var(--green-bg); color: var(--green-fg) !important; }
.pa-board .vacant { background: var(--gray-bg); }
.pa-board .reserved { background: var(--blue-bg); color: var(--blue-fg) !important; }
.pa-board .maintenance { background: var(--amber-bg); color: var(--amber-fg) !important; }
.pa-board .ending { border-style: dashed; border-color: currentColor; }
.pa-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .74rem; color: var(--muted); }
.pa-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 4px; vertical-align: -1px; }
.pa-total { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-weight: 700; background: var(--ground); }

/* ---------------------------------------------------------------- receipt / lease document */
.pa-doc { background: #fff; color: #1b1b1b; border-radius: 18px; padding: 18px; border: 1px solid var(--border); position: relative; overflow: hidden; }
.pa-doc::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 6px; background: linear-gradient(90deg, var(--pa-primary), var(--pa-accent)); }
.pa-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed #c9c3b6; }
.pa-doc-head h2 { margin: 0; font-size: 1.05rem; }
.pa-doc-head p { margin: 2px 0 0; font-size: .78rem; color: #6a665d; }
.pa-doc-no { text-align: end; }
.pa-doc-no b { display: block; font-size: .72rem; color: #6a665d; font-weight: 500; }
.pa-doc-amount { text-align: center; padding: 16px 0 10px; }
.pa-doc-amount strong { display: block; font-size: 2rem; font-variant-numeric: tabular-nums; }
.pa-doc-amount span { font-size: .8rem; color: #6a665d; }
.pa-doc dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; margin: 0; font-size: .86rem; }
.pa-doc dt { color: #6a665d; }
.pa-doc dd { margin: 0; text-align: end; font-weight: 600; overflow-wrap: anywhere; }
.pa-doc table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .82rem; }
.pa-doc th, .pa-doc td { padding: 7px 4px; border-bottom: 1px solid #ece7dc; text-align: start; }
.pa-doc th { color: #6a665d; font-weight: 600; font-size: .74rem; }
.pa-doc td.n, .pa-doc th.n { text-align: end; font-variant-numeric: tabular-nums; }
.pa-doc .words { margin-top: 12px; background: #f6f3ec; border-radius: 10px; padding: 10px 12px; font-size: .78rem; line-height: 1.6; }
.pa-doc .stamp { display: inline-block; margin-top: 14px; padding: 6px 14px; border: 2px solid #1d7a55; color: #1d7a55; border-radius: 10px; font-weight: 800;
    letter-spacing: .06em; transform: rotate(-4deg); }
.pa-doc .stamp.void { border-color: #b3361f; color: #b3361f; }
.pa-doc ol { padding-inline-start: 18px; font-size: .78rem; line-height: 1.6; color: #3c3a35; }
.pa-doc-actions { display: flex; gap: 10px; }
.pa-doc-actions > * { flex: 1; }

/* ---------------------------------------------------------------- sign-in */
.pa-auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--ground); padding-bottom: 0; }
.pa-auth-hero { position: relative; padding: calc(30px + env(safe-area-inset-top)) 20px 70px; color: #fff; text-align: center; overflow: hidden;
    background: radial-gradient(110% 120% at 85% 0%, var(--pa-primary-2), var(--pa-primary) 60%, color-mix(in srgb, var(--pa-primary) 70%, #000)); }
.pa-auth-hero::after { content: ""; position: absolute; inset: auto -30% -55% auto; width: 300px; height: 300px; border-radius: 50%; border: 40px solid rgba(255,255,255,.05); }
.pa-auth-hero img { width: 76px; height: 76px; border-radius: 22px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.pa-auth-hero h1 { margin: 12px 0 4px; font-size: 1.35rem; }
.pa-auth-hero p { margin: 0; opacity: .88; font-size: .9rem; }
.pa-auth-lang { position: absolute; z-index: 1; top: calc(10px + env(safe-area-inset-top)); inset-inline-end: 10px; color: #fff !important; font-weight: 700; text-decoration: none;
    width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.pa-auth-card { position: relative; z-index: 1; width: min(460px, calc(100% - 28px)); margin: -44px auto 18px; background: var(--surface); border-radius: 22px; padding: 20px 18px;
    box-sizing: border-box; box-shadow: 0 12px 34px rgba(0,0,0,.1); display: flex; flex-direction: column; gap: 14px; }
.pa-auth-card h2 { margin: 0; font-size: 1.1rem; }
.pa-pwd { position: relative; }
.pa-pwd input { padding-inline-end: 52px; }
.pa-staff { width: min(460px, calc(100% - 28px)); margin: 0 auto 26px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px;
    border: 1px solid var(--border); background: var(--surface); text-decoration: none; color: var(--text) !important; box-sizing: border-box; }
.pa-staff .icon { color: var(--pa-primary); }
.pa-auth-foot { text-align: center; color: var(--muted); font-size: .8rem; padding: 0 20px 24px; }

@media (min-width: 560px) { .pa-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } .pa-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media print {
    .pa-app { padding: 0; background: #fff; }
    .pa-top, .pa-tabs, .pa-install, .pa-doc-actions, .pa-sheet, .pa-sheet-backdrop, .pa-noprint { display: none !important; }
    .pa-main { max-width: none; padding: 0; }
    .pa-doc { border: 0; padding: 0; }
}
.pa-date { white-space: nowrap; }
/* "forward" chevrons point to the reading direction */
[dir="rtl"] .pa-staff > svg:last-child, [dir="rtl"] .pa-unit .pa-icon-btn svg, [dir="rtl"] .pa-card.pa-row > svg:last-child, [dir="rtl"] .pa-item > svg:last-child { transform: scaleX(-1); }
.pa-amt { font-variant-numeric: tabular-nums; white-space: nowrap; }
