/* ============================================================
   Propdial Owner — Design Tokens
   Signature: the "deed stamp" — a circular embossed status
   mark used across status chips, the brand mark, and empty
   states, echoing the ink-stamp on a property document.
   ============================================================ */

:root {
  /* Color */
  --ink-900: #14202e;
  --ink-800: #1b2d3f;
  --ink-700: #24384d;
  --ink-600: #35506b;
  --paper-0: #f6f5f1;
  --paper-50: #fbfaf8;
  --paper-100: #edece6;
  --line: #dcdad2;
  --line-dark: #2f4356;
  --brass-500: #b8863b;
  --brass-400: #cc9c52;
  --brass-050: #f6ead2;
  --ink-text: #1b2530;
  --muted-text: #62707c;
  --on-dark-text: #eef1f0;
  --on-dark-muted: #9fb0bd;
  --good: #2f6b4f;
  --good-bg: #e5efe8;
  --bad: #a8412f;
  --bad-bg: #f6e6e2;
  --warn: #9c6b1f;
  --warn-bg: #f5ecd8;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;

  /* Layout */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 2px rgba(20, 32, 46, 0.06), 0 8px 24px -12px rgba(20, 32, 46, 0.18);
  --shadow-pop: 0 12px 40px -8px rgba(20, 32, 46, 0.35);
  --sidebar-w: 244px;
  --topbar-h: 64px;
  --bottomnav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-text);
  background: var(--paper-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--brass-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* ---------------- Deed-stamp mark ---------------- */
.stamp {
  --stamp-color: var(--brass-500);
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--stamp-color);
  color: var(--stamp-color);
  font-family: var(--font-display);
  font-weight: 600;
}
.stamp::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1px dashed var(--stamp-color);
  opacity: .55;
}

/* ---------------- Loading shell / skeleton ---------------- */
.app-loading {
  position: fixed; inset: 0; display: grid; place-items: center;
  background: var(--ink-900); color: var(--on-dark-text); z-index: 999; gap: 14px;
}
.app-loading .stamp { width: 56px; height: 56px; --stamp-color: var(--brass-400); }
.spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
[data-loading-text] { font-family: var(--font-body); font-size: 13px; color: var(--on-dark-muted); letter-spacing: .04em; text-transform: uppercase; }

/* ================================================================
   LOGIN SCREEN
   ================================================================ */
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--ink-900);
}
@media (min-width: 900px) {
  .auth-shell { grid-template-columns: 1.05fr 1fr; }
}

.auth-side {
  display: none;
  position: relative;
  color: var(--on-dark-text);
  padding: 56px;
  overflow: hidden;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(204,156,82,.14), transparent 60%),
    linear-gradient(155deg, var(--ink-900) 0%, var(--ink-800) 55%, var(--ink-700) 100%);
}
@media (min-width: 900px) { .auth-side { display: flex; flex-direction: column; justify-content: space-between; } }

.auth-side .grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(238,241,240,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238,241,240,.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 30% 20%, black, transparent 70%);
}

.auth-brand { position: relative; display: flex; align-items: center; gap: 12px; }
.auth-brand .stamp { --stamp-color: var(--brass-400); }
.auth-brand strong { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.auth-brand span { display: block; font-size: 11px; color: var(--on-dark-muted); letter-spacing: .12em; text-transform: uppercase; }

.auth-side .headline { position: relative; max-width: 420px; }
.auth-side .headline h1 {
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 1.15;
  color: var(--on-dark-text);
}
.auth-side .headline h1 em { color: var(--brass-400); font-style: normal; }
.auth-side .headline p { margin-top: 14px; color: var(--on-dark-muted); font-size: 15px; line-height: 1.6; }

.auth-stats { position: relative; display: flex; gap: 28px; }
.auth-stats div strong { display: block; font-family: var(--font-mono); font-size: 22px; color: var(--brass-400); }
.auth-stats div span { font-size: 12px; color: var(--on-dark-muted); }

.auth-form-wrap {
  display: flex; align-items: center; justify-content: center;
  padding: 28px 20px 40px;
  background: var(--paper-0);
}
.auth-form {
  width: 100%; max-width: 380px;
}
.auth-form .mobile-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 30px;
}
@media (min-width: 900px) { .auth-form .mobile-brand { display: none; } }
.auth-form .mobile-brand strong { font-family: var(--font-display); font-size: 18px; }

.auth-form h2 { font-size: 24px; font-weight: 500; }
.auth-form .sub { margin-top: 6px; color: var(--muted-text); font-size: 14px; }

.field { margin-top: 20px; }
.field label {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: .03em;
  text-transform: uppercase; color: var(--muted-text); margin-bottom: 7px;
}
.field .input-wrap { position: relative; }
.field input {
  width: 100%; padding: 13px 14px; font-size: 15px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper-50); color: var(--ink-text);
  transition: border-color .15s, background .15s;
}
.field input:focus { border-color: var(--brass-500); background: #fff; }
.field .toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted-text); font-size: 12px;
  cursor: pointer; padding: 6px 8px; font-weight: 600;
}

.field-error { margin-top: 6px; font-size: 12.5px; color: var(--bad); display: none; }
.field-error.show { display: block; }

.auth-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.auth-row a { font-size: 13px; color: var(--brass-500); font-weight: 600; }
.auth-row a:hover { text-decoration: underline; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: var(--radius-md); font-weight: 600; font-size: 14.5px;
  cursor: pointer; padding: 13px 18px; transition: transform .1s, box-shadow .15s, background .15s;
}
.btn-primary { width: 100%; margin-top: 22px; background: var(--ink-900); color: var(--on-dark-text); }
.btn-primary:hover { background: var(--ink-800); }
.btn-primary:active { transform: translateY(1px); }
.btn-primary[disabled] { opacity: .65; cursor: default; }
.btn-primary .btn-spinner { display: none; width: 16px; height: 16px; }
.btn-primary.is-loading .btn-spinner { display: inline-block; }
.btn-primary.is-loading .btn-label { opacity: .75; }

.auth-banner {
  margin-top: 18px; padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; display: none; align-items: center; gap: 8px;
}
.auth-banner.show { display: flex; }
.auth-banner.error { background: var(--bad-bg); color: var(--bad); }
.auth-banner.warn { background: var(--warn-bg); color: var(--warn); }

.auth-foot { margin-top: 26px; font-size: 12.5px; color: var(--muted-text); text-align: center; }

/* ================================================================
   APP SHELL (post-login)
   ================================================================ */
.app-shell { min-height: 100dvh; background: var(--paper-0); }

/* --- Sidebar (desktop) --- */
.sidebar {
  display: none;
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--ink-900); color: var(--on-dark-text);
  flex-direction: column; z-index: 40;
}
@media (min-width: 960px) { .sidebar { display: flex; } }

.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 18px; border-bottom: 1px solid var(--line-dark); }
.sidebar .brand .stamp { --stamp-color: var(--brass-400); width: 34px; height: 34px; font-size: 14px; }
.sidebar .brand strong { font-family: var(--font-display); font-size: 17px; }
.sidebar .brand span { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--on-dark-muted); }

.nav-scroll { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-group { margin-bottom: 18px; }
.nav-group-label { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--on-dark-muted); padding: 0 10px; margin-bottom: 6px; }
.nav-link {
  display: flex; align-items: center; gap: 11px; padding: 10px 10px; border-radius: var(--radius-sm);
  font-size: 13.8px; color: var(--on-dark-muted); font-weight: 500; margin-bottom: 2px;
  transition: background .12s, color .12s;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .85; }
.nav-link:hover { background: rgba(238,241,240,.06); color: var(--on-dark-text); }
.nav-link.active { background: linear-gradient(90deg, rgba(204,156,82,.18), rgba(204,156,82,.03)); color: var(--on-dark-text); box-shadow: inset 2px 0 0 var(--brass-400); }
.nav-link.active svg { opacity: 1; color: var(--brass-400); }

.sidebar .foot { padding: 14px; border-top: 1px solid var(--line-dark); }
.owner-chip { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius-sm); }
.owner-chip .stamp { width: 34px; height: 34px; font-size: 13px; --stamp-color: var(--on-dark-muted); }
.owner-chip .who strong { display: block; font-size: 13px; color: var(--on-dark-text); }
.owner-chip .who span { font-size: 11px; color: var(--on-dark-muted); }
.logout-btn { margin-top: 8px; width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: var(--radius-sm); background: transparent; border: 1px solid var(--line-dark); color: var(--on-dark-muted); font-size: 12.5px; cursor: pointer; }
.logout-btn:hover { color: var(--on-dark-text); border-color: var(--on-dark-muted); }

/* --- Topbar --- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h); padding-top: var(--safe-t);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding-left: 18px; padding-right: 18px;
  background: rgba(246,245,241,.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
@media (min-width: 960px) { .topbar { left: var(--sidebar-w); } }
.topbar .greet { font-family: var(--font-display); font-size: 18px; }
.topbar .greet small { display: block; font-family: var(--font-body); font-size: 12px; color: var(--muted-text); font-weight: 500; }
.topbar .actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper-50); cursor: pointer; color: var(--ink-text);
}
.icon-btn svg { width: 18px; height: 18px; }

.main {
  padding: 22px 18px calc(var(--bottomnav-h) + 28px);
  max-width: 1180px;
}
@media (min-width: 960px) { .main { margin-left: var(--sidebar-w); padding: 28px 32px 40px; } }

/* --- Bottom tab bar (mobile, app-like) --- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; background: var(--ink-900);
  padding-bottom: var(--safe-b);
  border-top: 1px solid var(--line-dark);
}
@media (min-width: 960px) { .bottom-nav { display: none; } }
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 9px 4px 8px; color: var(--on-dark-muted); font-size: 10.5px; font-weight: 600;
}
.bottom-nav a svg { width: 21px; height: 21px; }
.bottom-nav a.active { color: var(--brass-400); }
.bottom-nav a.more { position: relative; }

/* --- Section headers / cards --- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 30px 0 14px; }
.section-head:first-child { margin-top: 0; }
.section-head h2 { font-size: 17px; font-weight: 600; }
.section-head a { font-size: 12.5px; color: var(--brass-500); font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
@media (min-width: 640px) { .stat-grid { grid-template-columns: repeat(4,1fr); gap: 14px; } }

.stat-card {
  background: var(--paper-50); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 16px; box-shadow: var(--shadow-card);
}
.stat-card .top { display: flex; justify-content: space-between; align-items: flex-start; }
.stat-card .icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--brass-050); color: var(--brass-500); }
.stat-card .icon svg { width: 16px; height: 16px; }
.stat-card .value { margin-top: 14px; font-family: var(--font-mono); font-size: 22px; font-weight: 600; }
.stat-card .label { margin-top: 3px; font-size: 12.5px; color: var(--muted-text); }
.stat-card .delta { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }
.stat-card .delta.up { color: var(--good); background: var(--good-bg); }
.stat-card .delta.down { color: var(--bad); background: var(--bad-bg); }

.panel { background: var(--paper-50); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.panel-pad { padding: 18px; }

.quick-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
@media (min-width: 640px) { .quick-grid { grid-template-columns: repeat(4,1fr); } }
.quick-card {
  display: flex; flex-direction: column; gap: 10px; padding: 15px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--paper-50); transition: border-color .12s, transform .12s;
}
.quick-card:hover { border-color: var(--brass-400); transform: translateY(-2px); }
.quick-card .icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--ink-900); color: var(--brass-400); }
.quick-card .icon svg { width: 17px; height: 17px; }
.quick-card strong { font-size: 13px; }
.quick-card span { font-size: 11.5px; color: var(--muted-text); }

.row-list { border-top: 1px solid var(--line); }
.row-item { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.row-item .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--brass-400); }
.row-item .txt { flex: 1; min-width: 0; }
.row-item .txt strong { display: block; font-size: 13.5px; }
.row-item .txt span { font-size: 12px; color: var(--muted-text); }
.row-item .amt { font-family: var(--font-mono); font-size: 13.5px; font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px; letter-spacing: .02em; }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }

.skeleton { position: relative; overflow: hidden; background: var(--paper-100); border-radius: var(--radius-sm); }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.install-banner {
  display: none; align-items: center; gap: 12px; margin-top: 22px; padding: 13px 16px;
  border-radius: var(--radius-md); background: var(--ink-900); color: var(--on-dark-text);
}
.install-banner.show { display: flex; }
.install-banner .stamp { --stamp-color: var(--brass-400); width: 30px; height: 30px; font-size: 12px; flex-shrink: 0; }
.install-banner strong { font-size: 13px; display: block; }
.install-banner span { font-size: 11.5px; color: var(--on-dark-muted); }
.install-banner button { margin-left: auto; flex-shrink: 0; }
.install-banner .btn-ghost { background: rgba(238,241,240,.1); color: var(--on-dark-text); padding: 8px 13px; font-size: 12.5px; }
.install-banner .btn-dismiss { background: none; border: none; color: var(--on-dark-muted); cursor: pointer; padding: 6px; }

.toast-wrap { position: fixed; top: calc(14px + var(--safe-t)); left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 380px); }
.toast { background: var(--ink-900); color: var(--on-dark-text); padding: 12px 15px; border-radius: var(--radius-md); font-size: 13px; box-shadow: var(--shadow-pop); }
.toast.error { background: var(--bad); }
.toast.success { background: var(--good); }

/* ================================================================
   LIST / TABLE PAGES  (invoices, bills, enquiries, visits, documents)
   ================================================================ */
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: 21px; font-weight: 600; }
.page-head p { margin-top: 5px; font-size: 13.5px; color: var(--muted-text); }

.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; align-items: center;
}
.search-input {
  flex: 1 1 220px; position: relative;
}
.search-input svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-text); }
.search-input input {
  width: 100%; padding: 10px 12px 10px 34px; font-size: 13.5px; font-family: inherit;
  border: 1.5px solid var(--line); border-radius: var(--radius-md); background: var(--paper-50);
}
.search-input input:focus { border-color: var(--brass-500); background: #fff; }
.select-filter {
  padding: 10px 30px 10px 12px; font-size: 13.5px; font-family: inherit; border: 1.5px solid var(--line);
  border-radius: var(--radius-md); background: var(--paper-50) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2362707c" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 10px center / 14px;
  appearance: none; color: var(--ink-text); cursor: pointer;
}
.select-filter:focus { border-color: var(--brass-500); }

.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.data-table th {
  text-align: left; padding: 11px 14px; font-size: 11px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted-text); border-bottom: 1.5px solid var(--line); white-space: nowrap;
}
table.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data-table tbody tr:hover { background: var(--paper-100); }
table.data-table td.num, table.data-table th.num { text-align: right; font-family: var(--font-mono); }
table.data-table .cell-title { font-weight: 600; }
table.data-table .cell-sub { display: block; font-size: 11.5px; color: var(--muted-text); font-weight: 400; margin-top: 2px; }

/* Card list — the mobile-friendly alternative rendering for tables */
.record-list { display: flex; flex-direction: column; gap: 10px; }
.record-card {
  background: var(--paper-50); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 14px; display: flex; flex-direction: column; gap: 8px;
}
.record-card .rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.record-card .rc-title { font-size: 13.5px; font-weight: 600; }
.record-card .rc-sub { font-size: 12px; color: var(--muted-text); margin-top: 2px; }
.record-card .rc-amt { font-family: var(--font-mono); font-weight: 600; font-size: 14px; white-space: nowrap; }
.record-card .rc-meta { display: flex; gap: 14px; font-size: 12px; color: var(--muted-text); }
.record-card .rc-actions { display: flex; gap: 8px; margin-top: 2px; }

.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn-outline { background: transparent; border: 1.5px solid var(--line); color: var(--ink-text); }
.btn-outline:hover { border-color: var(--brass-500); color: var(--brass-500); }
.btn-brass { background: var(--brass-500); color: #fff; }
.btn-brass:hover { background: var(--brass-400); }

.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 12.5px; color: var(--muted-text); }
.pagination .pg-btns { display: flex; gap: 6px; }
.pagination button { width: 30px; height: 30px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--paper-50); cursor: pointer; }
.pagination button[disabled] { opacity: .4; cursor: default; }
.pagination button.current { background: var(--ink-900); color: var(--on-dark-text); border-color: var(--ink-900); }

.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 20px; color: var(--muted-text); }
.empty-state .stamp { --stamp-color: var(--line); width: 52px; height: 52px; color: var(--line); margin-bottom: 14px; }
.empty-state strong { font-size: 14.5px; color: var(--ink-text); display: block; margin-bottom: 4px; }
.empty-state span { font-size: 13px; }

/* ================================================================
   FORM PAGES (profile, change password, make payment)
   ================================================================ */
.form-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 1fr; } }
.form-field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--muted-text); margin-bottom: 7px; }
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 11px 13px; font-size: 14px; font-family: inherit; border: 1.5px solid var(--line);
  border-radius: var(--radius-md); background: var(--paper-0); color: var(--ink-text);
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--brass-500); background: #fff; }
.form-field input[readonly] { background: var(--paper-100); color: var(--muted-text); }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }

.two-col { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 960px) { .two-col.main-aside { grid-template-columns: 1.6fr 1fr; } }

.summary-line { display: flex; justify-content: space-between; padding: 10px 0; font-size: 13.5px; border-bottom: 1px solid var(--line); }
.summary-line.total { border-bottom: none; padding-top: 14px; font-weight: 700; font-size: 15px; }
.summary-line span:first-child { color: var(--muted-text); }
.summary-line.total span:first-child { color: var(--ink-text); }
.summary-line .amt { font-family: var(--font-mono); }

.copy-field { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: var(--radius-md); background: var(--paper-0); }
.copy-field code { flex: 1; font-family: var(--font-mono); font-size: 13px; overflow-x: auto; white-space: nowrap; }
.share-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-top: 14px; }
.share-grid a { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--muted-text); }
.share-grid .icon { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--paper-100); color: var(--ink-text); }
.share-grid .icon svg { width: 18px; height: 18px; }

/* ================================================================
   MY BILLING (dashboard) — 4 payment categories
   ================================================================ */
.billing-card {
  display: flex; flex-direction: column; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-card); background: var(--paper-50);
}
.billing-card .bc-body { padding: 18px 16px; color: #fff; position: relative; overflow: hidden; }
.billing-card .bc-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.18); margin-bottom: 12px; }
.billing-card .bc-icon svg { width: 18px; height: 18px; }
.billing-card .bc-title { font-size: 14px; font-weight: 600; }
.billing-card .bc-due { margin-top: 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; opacity: .85; }
.billing-card .bc-amt { font-family: var(--font-mono); font-size: 20px; font-weight: 700; margin-top: 2px; }
.billing-card .bc-pay { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; color: #fff; }
.billing-card .bc-foot { padding: 11px 16px; font-size: 12px; font-weight: 600; text-align: center; background: rgba(0,0,0,.14); color: #fff; }
.billing-card .bc-foot:hover { background: rgba(0,0,0,.22); }

.billing-card.tone-pms .bc-body { background: linear-gradient(155deg, #c0693f, #a8552f); }
.billing-card.tone-brokerage .bc-body { background: linear-gradient(155deg, #2b8fb0, #1f6f8b); }
.billing-card.tone-maintenance .bc-body { background: linear-gradient(155deg, #9a4fae, #7c3b8e); }
.billing-card.tone-advance .bc-body { background: linear-gradient(155deg, #3f9d66, #2d7a4c); }

/* ================================================================
   TABS  (dashboard Work History)
   ================================================================ */
.tabs { display: flex; gap: 4px; border-bottom: 1.5px solid var(--line); margin-bottom: 4px; }
.tab-btn {
  padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--muted-text);
  background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; margin-bottom: -1.5px;
}
.tab-btn.active { color: var(--ink-text); border-bottom-color: var(--brass-500); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ================================================================
   MY PROPERTIES (dashboard)
   ================================================================ */
.property-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .property-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .property-grid { grid-template-columns: repeat(3, 1fr); } }

.property-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper-50); box-shadow: var(--shadow-card); overflow: hidden; }
.property-card .pc-media {
  height: 88px; background: linear-gradient(155deg, var(--ink-800), var(--ink-700));
  display: flex; align-items: center; padding: 0 16px; color: var(--brass-400);
}
.property-card .pc-media svg { width: 26px; height: 26px; }
.property-card .pc-body { padding: 14px 16px; }
.property-card .pc-title { font-size: 14px; font-weight: 600; }
.property-card .pc-sub { font-size: 12px; color: var(--muted-text); margin-top: 3px; }
.property-card .pc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ================================================================
   MODAL  (Tenant / Executive details)
   ================================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300; display: none; align-items: center; justify-content: center;
  background: rgba(20,32,46,.55); padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box { width: 100%; max-width: 380px; background: var(--paper-50); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal-head strong { font-size: 15px; font-weight: 600; }
.modal-close { background: none; border: none; font-size: 18px; color: var(--muted-text); cursor: pointer; padding: 4px; line-height: 1; }
.modal-body { padding: 16px 18px; max-height: 60vh; overflow-y: auto; }
.detail-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: none; }
.detail-row .stamp { width: 32px; height: 32px; font-size: 12px; flex-shrink: 0; --stamp-color: var(--brass-500); }
.detail-row .who strong { display: block; font-size: 13.5px; }
.detail-row .who span { display: block; font-size: 12px; color: var(--muted-text); margin-top: 1px; }

/* ================================================================
   PROPERTY EDIT FORM
   ================================================================ */
.form-section { margin-bottom: 30px; }
.form-section:last-of-type { margin-bottom: 0; }
.form-section-title {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em; color: var(--ink-text);
  padding: 10px 14px; background: var(--paper-100); border-left: 3px solid var(--brass-500);
  border-radius: var(--radius-sm); margin-bottom: 18px;
}
@media (min-width: 720px) { .form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.amount-hint { font-size: 11.5px; font-weight: 700; color: var(--brass-500); margin-top: 6px; }
.unit-pair { display: flex; gap: 8px; }
.unit-pair select { max-width: 96px; flex-shrink: 0; }

.check-chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.check-chip label {
  display: inline-block; padding: 7px 14px; border: 1.5px solid var(--line); border-radius: 20px;
  font-size: 12.5px; cursor: pointer; color: var(--ink-text); background: var(--paper-50); user-select: none;
  transition: background .12s, border-color .12s, color .12s;
}
.check-chip input:checked + label { background: var(--ink-900); color: var(--on-dark-text); border-color: var(--ink-900); }
.check-chip input:focus-visible + label { outline: 2px solid var(--brass-500); outline-offset: 2px; }

.sticky-save-bar {
  position: sticky; bottom: 0; margin: 30px -18px -22px; padding: 14px 18px calc(14px + var(--safe-b));
  background: rgba(246,245,241,.9); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; gap: 10px; z-index: 10;
}
@media (min-width: 960px) { .sticky-save-bar { margin-left: 0; margin-right: 0; } }
