:root {
  /* OpenDoorwayz — colors after doorloop.com: navy, core blue, neon lime accent */
  --navy: #162050;        /* headings, sidebar */
  --ink: #2b2f3a;
  --ink-2: #545454;
  --ink-3: #727494;
  --line: #e3e6ee;
  --line-2: #eceef5;
  --bg: #f5f6fa;
  --card: #ffffff;
  --blue: #3185fc;        /* primary: core blue */
  --blue-d: #1665d8;      /* primary, hover/pressed */
  --blue-50: #f3f8ff;     /* primary tint */
  --teal: #01cc74;        /* green accent */
  --lime: #01cc74;        /* sea green highlight (DoorLoop green) */
  --lime-d: #00a25b;
  --good: #01a35d;  --good-bg: #e3f8ee;
  --warn: #b26b00;  --warn-bg: #fff3dc;
  --bad: #d92d5f;   --bad-bg: #ffedf4;
  --info: #1665d8;  --info-bg: #e7f1ff;
  --muted: #5a5d78; --muted-bg: #eceef5;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(22, 32, 80, .05), 0 2px 8px rgba(22, 32, 80, .04);
  --sidebar: 244px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 14px; color: var(--ink); background: var(--bg); line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: "Inter", system-ui, sans-serif; color: var(--navy); margin: 0; letter-spacing: -.015em; }
h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
.ic { flex: none; vertical-align: middle; }
.num, td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--card); border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 18px 12px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; color: var(--navy); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; background: var(--blue);
  color: #fff; display: grid; place-items: center;
}
.brand b { font-family: "Inter", sans-serif; font-size: 17px; letter-spacing: -.2px; display: block; }
.brand small { color: var(--ink-3); font-size: 11px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: var(--ink-2);
  font-weight: 600; margin-bottom: 2px; position: relative;
}
.nav a:hover { background: var(--line-2); text-decoration: none; color: var(--navy); }
.nav a.on { background: var(--blue-50); color: var(--blue-d); }
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--blue); }
.side-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12px; }

.main { flex: 1; min-width: 0; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--line); height: 64px; display: flex; align-items: center;
  gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 5;
}
.topbar .grow { flex: 1; }
.menu-btn { display: none; background: none; border: 0; color: var(--navy); padding: 6px; cursor: pointer; }
.content { padding: 28px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid transparent; border-radius: 8px;
  padding: 9px 14px; font: 600 13px/1.2 "Inter", system-ui, sans-serif; letter-spacing: 0;
  cursor: pointer; background: var(--blue); color: #fff; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--blue-d); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--blue); border-color: #bedcff; }
.btn.ghost:hover { background: var(--blue-50); }
.btn.danger { background: #fff; color: var(--bad); border-color: #f2c4bf; }
.btn.danger:hover { background: var(--bad-bg); }
.btn.sm { padding: 6px 10px; font-size: 12px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; }

.dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(22, 32, 80,.14); min-width: 230px; padding: 6px; z-index: 20;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 6px; color: var(--ink); font-weight: 600; }
.dropdown-menu a:hover { background: var(--line-2); text-decoration: none; }
.dropdown-menu .ic { color: var(--blue); }

/* ---------- cards & grid ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line-2); gap: 12px; }
.card-b { padding: 18px 20px; }
.card-b.flush { padding: 0; }
.grid { display: grid; gap: 18px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mt { margin-top: 18px; }

.stat { padding: 18px 20px; }
.stat .k { color: var(--ink-2); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; display: flex; gap: 8px; align-items: center; }
.stat .k .ic { color: var(--blue); }
.stat .v { font-family: "Inter", sans-serif; font-size: 26px; font-weight: 700; color: var(--navy); margin: 8px 0 2px; font-variant-numeric: tabular-nums; }
.stat .s { color: var(--ink-3); font-size: 12px; }
.meter { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); font-weight: 700; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #f8f9fc; white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #f8f9fc; }
.tbl .strong { font-weight: 700; color: var(--navy); }
.tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line); background: #f8f9fc; }
.owed { color: var(--bad); font-weight: 700; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.good { color: var(--good); background: var(--good-bg); }
.badge.warn { color: var(--warn); background: var(--warn-bg); }
.badge.bad { color: var(--bad); background: var(--bad-bg); }
.badge.info { color: var(--info); background: var(--info-bg); }
.badge.muted { color: var(--muted); background: var(--muted-bg); }

/* ---------- tabs / filters ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-2); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { text-decoration: none; color: var(--navy); }
.tabs a.on { color: var(--blue-d); border-color: var(--blue); }
.tabs .count { background: var(--line-2); color: var(--ink-2); border-radius: 99px; padding: 1px 7px; font-size: 11px; margin-left: 4px; }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.filters select, .filters input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; }

/* ---------- property cards ---------- */
.prop-card { display: block; color: inherit; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.prop-card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(22, 32, 80,.1); transform: translateY(-1px); }
.prop-hero { height: 92px; background: linear-gradient(135deg, #dbeaff, #f3f8ff); display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 16px; color: var(--blue-d); }
.prop-hero .tag { background: rgba(255,255,255,.85); color: var(--navy); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 99px; }
.prop-body { padding: 14px 16px 16px; }
.prop-body h3 { font-size: 15px; margin-bottom: 2px; }
.prop-stats { display: flex; gap: 18px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.prop-stats div { font-size: 11px; color: var(--ink-3); text-transform: uppercase; font-weight: 700; letter-spacing: .4px; }
.prop-stats b { display: block; font-size: 15px; color: var(--navy); text-transform: none; letter-spacing: 0; font-variant-numeric: tabular-nums; }

/* ---------- kanban ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 16px; overflow-x: auto; }
.col { background: #eceef5; border-radius: var(--radius); padding: 12px; min-height: 200px; }
.col-h { display: flex; justify-content: space-between; align-items: center; font-weight: 700; color: var(--navy); margin: 2px 4px 12px; }
.ticket { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.ticket h3 { font-size: 14px; margin: 6px 0 4px; }
.ticket .meta { color: var(--ink-3); font-size: 12px; }
.ticket form { display: flex; gap: 6px; margin-top: 10px; align-items: center; }
.ticket select { flex: 1; padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 12px; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .t { font-weight: 700; color: var(--navy); }
.empty { padding: 28px 20px; text-align: center; color: var(--ink-3); }
.empty .ic { color: #c3c8d6; margin-bottom: 6px; }

/* ---------- chart ---------- */
.chart { position: relative; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart .axis-t { fill: var(--ink-3); font-size: 12px; font-family: "Inter", sans-serif; }
.chart .val-t { fill: var(--ink); font-size: 12px; font-weight: 700; font-family: "Inter", sans-serif; }
.chart .bar { fill: var(--blue); pointer-events: none; }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .hit:hover + .bar, .chart .bar.hl { fill: var(--blue-d); }
.tip { position: absolute; pointer-events: none; background: var(--navy); color: #fff; padding: 8px 10px; border-radius: 6px; font-size: 12px; line-height: 1.4; transform: translate(-50%, -100%); white-space: nowrap; opacity: 0; transition: opacity .1s; }
.tip.show { opacity: 1; }
details.tbl-view summary { cursor: pointer; color: var(--blue); font-weight: 600; font-size: 12px; margin-top: 8px; }

/* ---------- forms ---------- */
.form { max-width: 760px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.field { grid-column: span 2; display: flex; flex-direction: column; gap: 6px; }
.field.half { grid-column: span 1; }
.field label { font-weight: 700; color: var(--navy); font-size: 13px; }
.field label .req { color: var(--bad); }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 6px; font: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #bedcff; border-color: var(--blue); }
.field textarea { min-height: 90px; resize: vertical; }
.field select[multiple] { min-height: 120px; }
.field .hint { color: var(--ink-3); font-size: 12px; }
.form-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.errors { background: var(--bad-bg); color: var(--bad); border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; }
.flash { background: var(--good-bg); color: var(--good); border-radius: 8px; padding: 10px 14px; margin-bottom: 18px; font-weight: 600; display: flex; gap: 8px; align-items: center; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; }
.kv dt { color: var(--ink-3); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); }
.crumbs { color: var(--ink-3); font-size: 13px; margin-bottom: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 30; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.nav-open .sidebar { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .content { padding: 18px 16px; }
  .g-4, .g-3, .g-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .field.half { grid-column: span 2; }
  .topbar .btn span { display: none; }
}

/* ---------- auth & account ---------- */
.flash.error { background: var(--bad-bg); color: var(--bad); }
.who { display: flex; gap: 10px; align-items: center; color: var(--ink); padding: 6px; margin: 0 -6px 6px; border-radius: 8px; }
.who:hover, .who.on { background: var(--line-2); text-decoration: none; }
.who b { display: block; font-size: 13px; color: var(--navy); }
.who small { color: var(--ink-3); font-size: 11px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-50); color: var(--blue-d); display: grid; place-items: center; font-weight: 700; flex: none; }
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #f3f8ff 0%, var(--bg) 45%, #f3f8ff 100%); }
.auth-card { width: 100%; max-width: 400px; padding: 32px; }
.auth-card .brand { justify-content: center; padding: 0 0 18px; }
.auth-card h1 { text-align: center; font-size: 20px; margin-bottom: 6px; }
.auth-card p.lead { text-align: center; color: var(--ink-2); margin: 0 0 22px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 12px; margin-top: 6px; }
.check { display: flex; gap: 8px; align-items: center; color: var(--ink-2); margin: 4px 0 8px; }

/* ---------- roles ---------- */
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain:disabled input, fieldset.plain:disabled select, fieldset.plain:disabled textarea { background: #f7f8fb; color: var(--ink); opacity: 1; }
.ro a[href*="/new"], .ro a.btn[href*="/edit"], .ro td a.small[href*="/edit"], .ro .card-h a[href*="/new"], .ro .ticket form { display: none !important; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: var(--line-2); color: var(--ink-2); border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 6px; }
.checks label { font-weight: 600; color: var(--ink); display: flex; gap: 6px; align-items: center; font-size: 13px; }

/* ---------- messages ---------- */
.thread { display: flex; flex-direction: column; gap: 12px; padding: 20px; max-height: 60vh; overflow-y: auto; background: #f8f9fc; }
.msg { max-width: 78%; align-self: flex-start; }
.msg.mine { align-self: flex-end; }
.msg .bubble { background: #fff; border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 10px 14px; white-space: pre-wrap; word-wrap: break-word; }
.msg.staff .bubble { background: var(--blue-50); border-color: #b9d8ff; }
.msg.mine .bubble { border-radius: 12px 12px 4px 12px; }
.msg .meta { font-size: 11px; color: var(--ink-3); margin: 4px 4px 0; }
.msg.mine .meta { text-align: right; }
.composer { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); align-items: flex-end; }
.composer textarea { flex: 1; min-height: 46px; max-height: 200px; padding: 10px 12px; border: 1px solid #d0d5dd; border-radius: 8px; font: inherit; resize: vertical; }
.thread-list a { display: flex; justify-content: space-between; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--line-2); color: inherit; }
.thread-list a:hover { background: #f8f9fc; text-decoration: none; }
.thread-list .preview { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.notice { background: var(--info-bg); color: var(--info); border-radius: 8px; padding: 10px 14px; font-size: 13px; }

/* ---------- filters: search box, checkbox ---------- */
.filters .search { display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: #fff; flex: 1 1 240px; max-width: 360px; color: var(--ink-3); }
.filters .search input { border: 0; padding: 8px 0; outline: none; flex: 1; min-width: 0; background: transparent; }
.filters .search:focus-within { border-color: var(--blue); outline: 2px solid #bedcff; }
.filters .check { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }

/* ---------- Download CSV menu ---------- */
details.dl { position: relative; }
details.dl > summary { list-style: none; cursor: pointer; }
details.dl > summary::-webkit-details-marker { display: none; }
.dl-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(22, 32, 80, .14); padding: 14px; min-width: 250px; display: flex; flex-direction: column; gap: 12px; }
.dl-pop fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.dl-pop legend { font-weight: 800; color: var(--navy); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.dl-pop label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.dl-pop .btn { justify-content: center; }

/* ---------- export page ---------- */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--blue); background: var(--blue-50); }
.radio-card input { margin-top: 3px; }
.radio-card > span { display: flex; flex-direction: column; gap: 2px; }
@media print { details.dl, .filters { display: none !important; } }

/* ---------- settings & invoices ---------- */
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.head-actions form { display: inline-flex; }
h3.sub { font-size: 14px; margin: 0 0 10px; color: var(--navy); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip-btn { border: 1px dashed #bedcff; background: #fff; color: var(--blue); border-radius: 99px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.chip-btn:hover { background: var(--blue-50); }
tr.sel td { background: var(--blue-50); }
.invoice-doc .card-b { padding: 28px 32px; }
.inv-top { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.inv-from { font-family: "Inter", sans-serif; font-weight: 700; font-size: 20px; color: var(--navy); }
.inv-title { font-family: "Inter", sans-serif; font-weight: 700; font-size: 22px; color: var(--blue); letter-spacing: .08em; text-align: right; }
.inv-meta table { border-collapse: collapse; margin-left: auto; }
.inv-meta td { padding: 2px 0 2px 16px; font-size: 13px; }
.inv-meta td:first-child { color: var(--ink-3); }
.inv-bill { margin-bottom: 20px; line-height: 1.5; }
.inv-lines tfoot td { border-top: 2px solid var(--line); padding-top: 12px; }
.inv-total { font-size: 18px; color: var(--navy); }
@media print {
  .sidebar, .topbar, .no-print, .flash { display: none !important; }
  .main, .content { margin: 0 !important; padding: 0 !important; }
  .invoice-doc { border: 0; box-shadow: none; }
}

/* ---------- spreadsheet import ---------- */
.drop { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 20px; border: 2px dashed #bedcff;
  border-radius: 10px; background: var(--blue-50); color: var(--navy); text-align: center; cursor: pointer; }
.drop.over { border-color: var(--blue); background: #dbeaff; }
.drop input[type=file] { margin-top: 8px; max-width: 100%; }
.drop .ic { color: var(--blue); }
.upload .form-actions { margin-top: 16px; }
.check-row { display: flex !important; gap: 8px; align-items: center; font-weight: 600 !important; color: var(--ink-2) !important; }
tr.row-bad td { background: #fdf4f3; }
tr.row-dup td { opacity: .55; }
.inv-lines tr.subtotal td { font-weight: 700; color: var(--ink-2); border-top: 1px solid var(--line); }
.inv-lines thead + tbody + thead th { padding-top: 22px; }
.input-suffix { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.input-suffix input { border: 0 !important; flex: 1; min-width: 0; padding: 9px 10px; font: inherit; outline: none; }
.input-suffix span { padding: 0 10px; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.input-suffix.sm { max-width: 170px; }
.input-suffix.sm input { padding: 6px 8px; }

/* ---------- expense dashboard ---------- */
svg.chart { width: 100%; height: auto; display: block; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -6px 0 14px; }
.active-filters:empty { display: none; }
.chip.x { background: var(--blue-50); color: var(--blue-d); text-decoration: none; }
.chip.x:hover { background: #dbeaff; }
.tbl.roll td { padding-top: 9px; padding-bottom: 9px; vertical-align: top; }
.tbl.roll td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.roll-scroll { max-height: 420px; overflow-y: auto; }
a.drill { font-weight: 600; color: var(--navy); }
a.drill:hover { color: var(--blue); }
.hbar { display: block; height: 4px; background: var(--line-2); border-radius: 4px; margin-top: 6px; overflow: hidden; }
.hbar i { display: block; height: 100%; background: var(--blue); border-radius: 4px; }
.custom-dates { display: inline-flex; gap: 6px; align-items: center; }
.custom-dates[hidden] { display: none; }
.roll-scroll.short { max-height: 312px; }


/* ---------- OpenDoorwayz polish (DoorLoop-style palette) ---------- */
body { font-feature-settings: "cv11", "ss01"; }
.brand b { font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.card { box-shadow: var(--shadow); }
.card-h h2 { font-size: 15px; font-weight: 600; }
.stat .k { font-weight: 600; letter-spacing: .04em; }
.stat .v { font-weight: 700; letter-spacing: -.02em; }
.tbl th { font-weight: 600; letter-spacing: .04em; }
.topbar { background: rgba(255, 255, 255, .9); backdrop-filter: saturate(1.4) blur(8px); }
h1 { font-size: 26px; font-weight: 700; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.btn.ghost { color: var(--navy); border-color: var(--line); }
.btn.ghost:hover { border-color: #bedcff; color: var(--blue-d); }
/* navy sidebar */
.sidebar { background: var(--navy); border-right: 0; }
.brand { color: #fff; }
.brand small { color: #a6acd0; }
.brand-mark { background: var(--lime); color: var(--navy); }
.nav a { color: #c9cde6; font-weight: 500; border-radius: 8px; }
.nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav a.on { background: rgba(49, 133, 252, .22); color: #fff; font-weight: 600; }
.nav a.on::before { background: var(--lime); }
.nav a .ic { opacity: .9; }
.side-foot { border-top-color: rgba(255, 255, 255, .1); color: #a6acd0; }
.side-foot .muted { color: #8d93ba; }
.side-foot .link-btn { color: #c9cde6; }
.who { color: #fff; }
.who:hover, .who.on { background: rgba(255, 255, 255, .07); }
.who b { color: #fff; }
.who small { color: #a6acd0; }
.avatar { background: var(--lime); color: var(--navy); }
/* the main "Add new" button gets DoorLoop's lime call-to-action look */
#newMenu > .btn { background: var(--lime); color: var(--navy); }
#newMenu > .btn:hover { background: var(--lime-d); }
.inv-title { color: var(--navy); }
.auth-card .brand, .error-card .brand, .card .brand { color: var(--navy); }
.auth-card .brand small, .card .brand small { color: var(--ink-3); }
.auth-page { background: linear-gradient(160deg, var(--navy) 0%, #1b2c74 55%, #2f3e83 100%); }

/* ---------- HOA ---------- */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.hoa-stats b { font-size: 20px; color: var(--navy); }
.mb { margin-bottom: 18px; }
.statement { page-break-after: always; break-after: page; margin-bottom: 24px; }
.statement:last-child { page-break-after: auto; break-after: auto; }

/* ---------- leasing ---------- */
.link-card { color: inherit; text-decoration: none !important; transition: border-color .15s; }
.link-card:hover { border-color: #bedcff; }
.steps { display: inline-flex; gap: 3px; vertical-align: middle; }
.steps i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.steps i.on { background: var(--teal); }
.steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-weight: 600; font-size: 13px; }
.step span { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); font-size: 12px; flex: none; }
.step.on { color: var(--navy); }
.step.on span { background: var(--teal); color: #fff; }
.copy-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.copy-row input { flex: 1 1 260px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 12px; background: var(--bg); }
@media (max-width: 720px) { .steps-row { grid-template-columns: 1fr 1fr; } }
/* public pages */
body.public { background: var(--bg); }
.pub-wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.pub-head { background: var(--navy); }
.pub-head .pub-wrap { height: 60px; display: flex; align-items: center; }
.pub-head .brand { padding: 0; color: #fff; }
.pub-head .brand small { color: #a6acd0; }
.pub-main { padding-top: 28px; padding-bottom: 28px; }
.pub-foot { color: var(--ink-3); font-size: 12px; padding-bottom: 28px; }
.prop-hero.big { height: 200px; border-radius: var(--radius) var(--radius) 0 0; }
.listing-hero h1 { margin-bottom: 4px; }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0; }
.facts div { background: var(--blue-50); border-radius: 10px; padding: 10px 14px; min-width: 96px; }
.facts b { display: block; font-size: 18px; color: var(--navy); }
.facts span { font-size: 12px; color: var(--ink-2); }
.desc { white-space: pre-line; line-height: 1.6; }
.btn.wide { width: 100%; justify-content: center; margin-top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--bad); font-size: 12px; font-weight: 600; }
.req { color: var(--bad); }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.file-list li > span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.reveal { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 15px; letter-spacing: .04em; background: var(--warn-bg); padding: 2px 8px; border-radius: 6px; }
.access-log { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }

/* ---------- documents & templates ---------- */
.doc-body { white-space: pre-wrap; line-height: 1.65; font-size: 14.5px; max-width: 72ch; }
.field-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.field-chips button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 3px 8px; font: 12px ui-monospace, Menlo, monospace; color: var(--blue-d); cursor: pointer; }
.field-chips button:hover { border-color: #bedcff; background: var(--blue-50); }
textarea.tmpl-body { min-height: 320px; font: 13.5px/1.55 ui-monospace, Menlo, monospace; }
.preview-box { white-space: pre-wrap; line-height: 1.6; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 16px; font-size: 13.5px; max-height: 420px; overflow: auto; }
.g-edit { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); } @media (max-width: 1000px) { .g-edit { grid-template-columns: 1fr; } }

/* ---- operations: announcements, tasks, vendors ---- */
.flash.warn { background: var(--warn-bg); color: var(--warn); }
.announce { display: flex; gap: 12px; align-items: flex-start; background: var(--blue-50); border: 1px solid #b9d8ff; border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
.announce-ic { color: var(--blue); padding-top: 2px; }
.announce-b { flex: 1; min-width: 0; }
.announce-b b { color: var(--navy); }
.announce-body { white-space: pre-wrap; word-wrap: break-word; margin: 4px 0; }
.announce-x { background: none; border: 0; cursor: pointer; color: var(--ink-3); padding: 2px; border-radius: 6px; }
.announce-x:hover { background: #fff; color: var(--navy); }
.task-done .t, .task-done a.t { text-decoration: line-through; color: var(--ink-3); }
.inline-status select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 12px; background: #fff; }
.prewrap { white-space: pre-wrap; word-wrap: break-word; }

/* role switcher (one login, several memberships) */
.role-switch { margin: 0 0 8px; }
.role-switch label { display: block; font-size: 11px; color: #a6acd0; margin-bottom: 4px; }
.role-switch select { width: 100%; font-size: 12px; padding: 6px 8px; border-radius: 8px; background: rgba(255, 255, 255, .07);
  color: #fff; border: 1px solid rgba(255, 255, 255, .15); }
.role-switch select option { color: #111; }
.portal-accounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.portal-accounts a { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: #fff; }
.portal-accounts a.on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.portal-accounts a small { display: block; color: var(--ink-3); }

/* ---------- dashboard pivot ---------- */
.pivot-presets, .pivot-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); }
.pivot-controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; border-bottom: 1px solid var(--line-2); }
.pivot-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.pivot-controls select, .pivot-controls input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink); background: #fff; min-width: 120px; }
.pivot-controls .pv-custom { display: inline-flex; gap: 6px; align-items: center; }
.pivot-controls .pv-custom[hidden] { display: none; }
.pivot-wrap { overflow: auto; max-height: 620px; }
table.pv { border-collapse: separate; border-spacing: 0; }
table.pv th, table.pv td { white-space: nowrap; }
table.pv thead th { position: sticky; top: 0; z-index: 2; background: #f8f9fc; }
table.pv .pv-rowhead { position: sticky; left: 0; z-index: 1; background: #fff; text-align: left; font-weight: 600; color: var(--navy); min-width: 200px; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
table.pv thead .pv-rowhead { z-index: 3; background: #f8f9fc; }
table.pv .pv-cell { background: rgba(49, 133, 252, var(--heat, 0)); }
table.pv td a, table.pv th a { color: inherit; }
table.pv td a:hover, table.pv th a:hover { color: var(--blue-d); text-decoration: underline; }
table.pv .pv-total { font-weight: 700; background: #f8f9fc; }
table.pv tfoot td, table.pv tfoot th { font-weight: 700; border-top: 2px solid var(--line); background: #f8f9fc; position: sticky; bottom: 0; }
table.pv tr.pv-r2 .pv-rowhead { font-weight: 500; padding-left: 38px; color: var(--ink-2); }
table.pv tr.pv-r2 td { font-size: 12.5px; }
.pv-toggle { border: 0; background: none; cursor: pointer; color: var(--blue); width: 18px; padding: 0; font-size: 12px; }
.pivot-detail-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); }
.pivot-help { border-top: 1px solid var(--line-2); }

/* ---------------------------------------------------------------- e-signatures */
:root { --sc0: #3185fc; --sc1: #01a868; --sc2: #c2410c; --sc3: #7c3aed; --sc4: #be185d; --sc5: #0e7490; }
.sign-meter { display: inline-block; width: 54px; height: 6px; border-radius: 99px; background: var(--line-2); vertical-align: middle; overflow: hidden; }
.sign-meter i { display: block; height: 100%; width: var(--p); background: var(--lime); }
.es-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.es-side { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow: auto; }
.es-signer { border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.es-signer-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.es-signer-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.es-signer .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; }
.es-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.es-grid input, .es-grid select { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; min-width: 0; }
.es-grid label { display: flex; flex-direction: column; gap: 3px; font-weight: 600; color: var(--ink-2); }
.es-order { flex-direction: row !important; align-items: center; gap: 6px !important; }
.es-order input { width: 56px; }
.es-add { margin-top: 6px; } .es-add summary { cursor: pointer; color: var(--blue-d); margin-bottom: 8px; }
.es-add .btn { margin-top: 8px; }
.es-actions .card-b { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.es-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 14px; position: sticky; top: 72px; z-index: 5; }
.es-toolbar select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }
.es-kinds { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.es-kinds button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 5px 9px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.es-kinds button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.es-pages { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 14px; }
.es-pno { font-size: 11px; color: var(--ink-3); font-weight: 600; margin-top: 8px; }
.es-page { position: relative; width: 100%; max-width: 860px; background: #fff; box-shadow: 0 1px 3px rgba(22, 32, 80, .18); cursor: crosshair; user-select: none; }
.es-page canvas { display: block; width: 100%; height: 100%; }
.es-field { position: absolute; border: 1.5px solid var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border-radius: 4px;
  cursor: move; display: flex; align-items: center; padding: 0 4px; overflow: hidden; touch-action: none; }
.es-field span { font-size: 11px; font-weight: 700; color: var(--c); line-height: 1.1; white-space: nowrap; overflow: hidden; }
.es-field small { display: block; font-weight: 500; opacity: .85; }
.es-field .x { position: absolute; top: 0; right: 0; border: 0; background: var(--c); color: #fff; width: 16px; height: 16px; line-height: 14px; font-size: 13px; padding: 0; cursor: pointer; border-radius: 0 0 0 4px; }
.es-field .grip { position: absolute; right: 0; bottom: 0; width: 10px; height: 10px; background: var(--c); cursor: nwse-resize; }
.es-field.k-checkbox span small, .es-field.k-checkbox span { font-size: 0; }
.link-box { display: block; width: 100%; margin-top: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font: 12px ui-monospace, Menlo, monospace; color: var(--ink-2); background: #f8f9fc; }
.sign-links { border-color: #bedcff; }
code.hash { font: 11px ui-monospace, Menlo, monospace; word-break: break-all; color: var(--ink-2); }
.audit-detail { word-break: break-all; }
.good-text { color: var(--lime-d); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
/* signer's page */
.sign-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin: 6px 0 16px; flex-wrap: wrap; }
.sign-head h1 { margin: 2px 0 4px; font-size: 24px; color: var(--navy); }
.sign-card { max-width: 860px; margin: 0 auto 0; }
.sign-msg p { margin: 4px 0 0; white-space: pre-wrap; }
.consent-text { background: #f8f9fc; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 16px; margin: 10px 0 14px; }
.consent-text li { margin: 6px 0; }
.consent-form { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.sign-decline summary { cursor: pointer; color: var(--ink-3); }
.sign-decline .form-grid { margin-top: 10px; }
.sign-bar { position: sticky; top: 0; z-index: 10; display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap;
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; max-width: 860px; margin: 0 auto 12px; }
.sign-bar span { margin-right: auto; }
.sign-bar .btn.ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.sign-pages .es-page { cursor: default; }
.sign-field { position: absolute; display: flex; align-items: center; border-radius: 4px; font-size: clamp(9px, 1.4vw, 14px); color: #14215a; }
.sign-field.k-signature, .sign-field.k-initials, .sign-field.k-text { background: rgba(255, 214, 10, .28); outline: 2px solid #f5b400; }
.sign-field.done { background: transparent; outline: 1px dashed rgba(1, 168, 104, .6); }
.sign-field button { width: 100%; height: 100%; border: 0; background: transparent; font: inherit; font-weight: 700; color: #7a5600; cursor: pointer; }
.sign-field img { max-width: 100%; max-height: 100%; object-fit: contain; object-position: left center; }
.sign-field input[type=text], .sign-field input:not([type]) { width: 100%; height: 100%; border: 0; background: transparent; font: inherit; padding: 0 3px; }
.sign-field input[type=checkbox] { width: 100%; height: 100%; margin: 0; }
.sign-field.pulse { animation: pulse 1.2s ease-out; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(49, 133, 252, .6); } 100% { box-shadow: 0 0 0 14px rgba(49, 133, 252, 0); } }
.adopt { border: 0; border-radius: 14px; padding: 22px; width: min(720px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(22, 32, 80, .3); }
.adopt::backdrop { background: rgba(22, 32, 80, .45); }
.adopt h2 { margin: 0 0 12px; color: var(--navy); }
.adopt-tabs { margin: 14px 0 10px; }
.adopt-preview { display: flex; gap: 10px; flex-wrap: wrap; }
.adopt-preview canvas { border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 100%; height: auto; }
.adopt-preview canvas#t-sig, .adopt-preview canvas#d-sig { flex: 1 1 320px; width: 0; min-width: 240px; }
.adopt-preview canvas#t-ini, .adopt-preview canvas#d-ini { flex: 0 1 140px; width: 140px; }
.adopt-preview canvas.pad { touch-action: none; cursor: crosshair; background: repeating-linear-gradient(transparent 0 70%, #eceef5 70% 71%, transparent 71% 100%), #fff; }
.adopt-actions { display: flex; justify-content: flex-end; gap: 8px; }
.sign-done h2 { color: var(--navy); }
.sign-done .ic { color: var(--lime); }
.sign-waiting { border-color: #f5b400; }
@media (max-width: 960px) {
  .es-layout { grid-template-columns: 1fr; }
  .es-side { position: static; max-height: none; }
  .es-toolbar { top: 64px; }
}
.es-side { overflow-x: hidden; }
.es-side .form-grid { grid-template-columns: minmax(0, 1fr); }
.es-side .form-grid > .field, .es-side .form-grid > .field.half { grid-column: 1 / -1; }
.es-side .form-grid input, .es-side .form-grid select, .es-side .form-grid textarea { max-width: 100%; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; }
.sign-head { max-width: 860px; margin-left: auto; margin-right: auto; }
.pub-main > .flash { max-width: 860px; margin-left: auto; margin-right: auto; }
.adopt-tabs { overflow: visible; }

/* dashboard filters */
.dash-filters { padding: 10px 14px; gap: 14px; }
.dash-filters label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .4px; }
.dash-filters label select { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ink); min-width: 150px; }
.dash-custom { display: inline-flex; align-items: center; gap: 6px; }
.dash-custom[hidden] { display: none; }
.dash-showing { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--navy); }
.stat .stat-scope { margin-top: 6px; font-size: 11px; color: var(--ink-3); text-transform: none; }
.chart .bar.out { opacity: .3; }
@media (max-width: 700px) { .dash-showing { margin-left: 0; width: 100%; } .dash-filters label select { min-width: 0; } }

.nav-backdrop { display: none; }
/* side menu scrolls when it is taller than the screen (phones, short laptop windows) */
.sidebar { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .28) transparent; }
.sidebar .nav, .sidebar .brand, .sidebar .side-foot { flex: none; }
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .28); border-radius: 8px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
@media (max-width: 820px) {
  .sidebar { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .nav-backdrop { display: none; position: fixed; inset: 0; z-index: 29; background: rgba(22, 32, 80, .45); border: 0; padding: 0; }
  body.nav-open .nav-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
}

/* invoice: income collected and owner summary */
.inv-sec { margin: 26px 0 8px; font-size: 14px; color: var(--navy); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.inv-sec .small { font-weight: 500; }
.inv-income .sub-type td { color: var(--ink-3); font-weight: 500; border-top: 0; padding-top: 4px; padding-bottom: 4px; }
.inv-summary { margin: 20px 0 8px auto; max-width: 420px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: #f8f9fc; }
.inv-summary table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.inv-summary td { padding: 4px 0; }
.inv-summary tr.net td { border-top: 2px solid var(--navy); font-weight: 700; color: var(--navy); padding-top: 8px; font-size: 15px; }
.inv-summary p { margin: 8px 0 0; }
@media print { .inv-summary { background: none; break-inside: avoid; } .inv-income { break-inside: auto; } }

/* accounting help */
.help-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-toc { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.help-toc b { color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; font-size: 11px; margin: 0 0 6px 8px; }
.help-toc a { padding: 6px 8px; border-radius: 6px; color: var(--ink-2); font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.help-toc a:hover { background: var(--line-2); text-decoration: none; color: var(--navy); }
.help-toc .count { background: #fdecec; color: var(--bad); border-radius: 99px; padding: 0 7px; font-size: 11px; }
.help-sec h3 { margin: 0 0 6px; font-size: 14px; color: var(--navy); display: flex; gap: 6px; align-items: center; }
.help-sec p { margin: 0 0 10px; line-height: 1.55; }
.help-points { margin: 14px 0 0; padding-left: 20px; line-height: 1.55; } .help-points li { margin: 6px 0; }
.help-cards > div { border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; background: #f8f9fc; }
.help-tbl td { vertical-align: top; }
.flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; gap: 12px; align-items: center; margin: 14px 0 6px; }
.flow-col { display: flex; flex-direction: column; gap: 8px; }
.flow-box { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; background: #fff; font-weight: 600; color: var(--navy); font-size: 13px; }
.flow-box small { display: block; font-weight: 500; color: var(--ink-3); font-size: 11px; }
.flow-box.main { background: var(--navy); color: #fff; border-color: var(--navy); padding: 16px 12px; text-align: center; }
.flow-box.main small { color: #c9cde6; }
.flow-box.quiet { border-style: dashed; text-align: center; }
.flow-arrow { font-size: 24px; color: var(--blue); text-align: center; line-height: 1; }
.flow-arrow small { display: block; font-size: 10px; color: var(--ink-3); max-width: 70px; }
.help-reports { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.help-reports a { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; color: var(--ink); display: flex; flex-direction: column; gap: 4px; }
.help-reports a:hover { border-color: #bedcff; background: var(--blue-50); text-decoration: none; }
.help-reports b { color: var(--navy); } .help-reports span { font-size: 13px; color: var(--ink-2); line-height: 1.45; }
.steps-list { margin: 0; padding-left: 22px; line-height: 1.6; } .steps-list li { margin: 8px 0; }
.help-faq details { border-bottom: 1px solid var(--line-2); padding: 10px 0; }
.help-faq details:last-child { border-bottom: 0; }
.help-faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.help-faq p { margin: 8px 0 0; line-height: 1.6; }
.glossary { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; }
.glossary dt { font-weight: 700; color: var(--navy); } .glossary dd { margin: 0; color: var(--ink-2); }
.setup-list { list-style: none; margin: 0; padding: 0; }
.setup-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.setup-item:last-child { border-bottom: 0; }
.setup-mark { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.st-done .setup-mark { background: #e3f8ef; color: var(--lime-d); }
.st-todo .setup-mark { background: #fdecec; color: var(--bad); }
.st-optional .setup-mark, .st-info .setup-mark { background: var(--line-2); color: var(--ink-3); }
.setup-title { font-weight: 700; color: var(--navy); margin-bottom: 2px; }
.setup-state { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-left: 6px; color: var(--ink-3); }
.st-todo .setup-state { color: var(--bad); } .st-done .setup-state { color: var(--lime-d); }
.st-todo { background: #fffafa; }
@media (max-width: 960px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .help-toc b { width: 100%; }
  .flow { grid-template-columns: 1fr; } .flow-arrow { transform: rotate(90deg); } .flow-arrow small { display: none; }
  .setup-item { grid-template-columns: 28px minmax(0, 1fr); } .setup-item .btn { grid-column: 2; justify-self: start; }
  .glossary { grid-template-columns: 1fr; } .glossary dd { margin-bottom: 8px; }
}
@media print { .help-layout { display: block; } .help-faq details { break-inside: avoid; } .help-faq details:not([open]) > *:not(summary) { display: block; } }

/* trial balance layout switch and owner columns */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 12px; background: var(--card); }
.seg a { padding: 7px 14px; font-weight: 600; font-size: 13px; color: var(--ink-2); }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--navy); color: #fff; }
.seg a:hover { text-decoration: none; }
.tb-owners td.num, .tb-owners th.num { white-space: nowrap; }
.tb-owners td.cr { color: var(--ink-2); }
.tb-owners td:nth-child(2), .tb-owners th:nth-child(2) { min-width: 230px; }
.emailed-ok { display: inline-flex; gap: 4px; align-items: center; color: var(--lime-d); font-weight: 600; margin-left: 6px; }
.invoice-steps { margin: 14px 0 0; padding-left: 18px; line-height: 1.6; }
.invoice-send .inline-form input[type=email] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }

/* rent roll import */
ul.tight { margin: 6px 0 10px; padding-left: 18px; }
ul.tight li { margin: 3px 0; }
.getting-started { margin-bottom: 16px; border-left: 4px solid var(--lime, #b7e34c); }
.getting-started p { margin: 0 0 12px; }

/* photos (2026-11-25) */
.prop-hero.photo { background-size: cover; background-position: center; background-color: #dbeaff; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.photo-tile { border: 1px solid var(--line, #e3e8f0); border-radius: 10px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.photo-tile a.img { display: block; aspect-ratio: 4 / 3; background: #eef3fb center / cover no-repeat; }
.photo-tile .cover-tag { font-size: 11px; font-weight: 700; color: var(--navy, #162050); }
.photo-tile .ph-b { padding: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.photo-tile .ph-b input[type=text] { width: 100%; font-size: 12px; padding: 4px 6px; }
.photo-tile .ph-actions { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.photo-tile .ph-actions form { display: inline; }
.photo-pick { position: relative; display: block; cursor: pointer; }
.photo-pick input { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; }
.gallery { display: grid; grid-template-columns: 2fr 1fr; gap: 6px; border-radius: var(--radius) var(--radius) 0 0; overflow: hidden; }
.gallery a { display: block; background: #eef3fb center / cover no-repeat; min-height: 120px; }
.gallery a.main { grid-row: span 2; min-height: 300px; }
.gallery.one { grid-template-columns: 1fr; }
.gallery.one a.main { grid-row: auto; }
.gallery-strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px 16px 0; }
.gallery-strip a { flex: 0 0 auto; width: 96px; height: 72px; border-radius: 6px; background: #eef3fb center / cover no-repeat; }
@media (max-width: 640px) { .gallery { grid-template-columns: 1fr; } .gallery a:not(.main) { display: none; } .gallery a.main { min-height: 220px; } }
.lease-pick { max-height: 360px; overflow-y: auto; border: 1px solid var(--line, #e3e8f0); border-radius: 10px; }
.lease-pick .grp { padding: 8px 12px; background: #f5f8fd; font-weight: 600; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; }
.lease-pick label { display: flex; gap: 10px; padding: 7px 12px; border-top: 1px solid var(--line, #eef1f6); align-items: baseline; font-weight: 400; }
.mode-toggle { display: inline-flex; border: 1px solid var(--line, #d7deea); border-radius: 99px; padding: 3px; gap: 2px; }
.mode-toggle label { padding: 6px 14px; border-radius: 99px; cursor: pointer; margin: 0; font-weight: 600; }
.mode-toggle input { display: none; }
.mode-toggle label:has(input:checked) { background: var(--blue, #3185fc); color: #fff; }

/* Home Guide (2026-11-25) */
.guide .sub { margin: 18px 0 8px; }
.guide .sub:first-child { margin-top: 0; }
.guide-welcome { display: flex; gap: 12px; align-items: flex-start; background: #f2f7ff; border: 1px solid #dbe8ff; border-radius: 10px; padding: 12px 14px; color: var(--navy); }
.guide-welcome p { margin: 0; white-space: pre-wrap; }
.guide-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.guide-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.guide-edit input, .guide-edit select { width: 100%; min-width: 110px; font-size: 13px; padding: 6px 8px; }
.lease-tabs { margin-top: 4px; }
.sv-preview { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #eef3fb; display: block; margin-bottom: 8px; }
.prop-body .addr { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
