/* TenaCore — interface styles. No framework; one file. */
:root {
  --paper: #f6f7f9;
  --surface: #ffffff;
  --ink: #13233f;
  --ink-2: #4a5872;
  --ink-3: #7b879c;
  --line: #dfe3ea;
  --line-2: #eceff3;
  --accent: #0e7c6b;
  --accent-ink: #ffffff;
  --accent-soft: #e3f2ef;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --s-occupied: #2f7d4f;
  --s-vacant: #c2620e;
  --s-reserved: #6a4fc3;
  --s-maint: #5c6b80;
  --s-owner: #1f6fb2;
  --s-none: #c9cfd8;
  --side: #13233f;
  --side-ink: #c9d3e3;
  --side-active: #ffffff;
  --radius: 6px;
  --font: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1726; --surface: #16203a; --ink: #e8edf5; --ink-2: #b3bfd2; --ink-3: #8592a8;
    --line: #2a3654; --line-2: #212c45; --accent: #34b39c; --accent-ink: #062a24; --accent-soft: #163a3a;
    --danger: #f2877d; --danger-soft: #3a1f22; --side: #0a1120; --side-ink: #9fb0c8;
    --s-none: #3a4664; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1726; --surface: #16203a; --ink: #e8edf5; --ink-2: #b3bfd2; --ink-3: #8592a8;
  --line: #2a3654; --line-2: #212c45; --accent: #34b39c; --accent-ink: #062a24; --accent-soft: #163a3a;
  --danger: #f2877d; --danger-soft: #3a1f22; --side: #0a1120; --side-ink: #9fb0c8;
  --s-none: #3a4664; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--paper); color: var(--ink); font: 14px/1.45 var(--font);
  font-feature-settings: "tnum" 1; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 224px 1fr; min-height: 100vh; }
.side {
  background: var(--side); color: var(--side-ink); padding: 20px 12px; position: sticky; top: 0;
  height: 100vh; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 2px 8px 20px; text-decoration: none; }
.brand > span { display: grid; gap: 3px; }
.brand small { display: block; color: var(--side-ink); font-weight: 400; font-size: 10.5px; letter-spacing: .02em; white-space: nowrap; }
.brand .wordmark { --brand-core: #3cc7ad; display: block; }
.brandmark { flex: none; display: block; }
.wordmark .wm-core { stroke: var(--brand-core, var(--accent)); }
.wordmark .wm-dot { fill: #f59f00; }
.brand-tag { font-size: 12.5px; color: var(--ink-3); font-weight: 400; margin-top: 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; color: var(--side-ink); padding: 8px 10px;
  border-radius: var(--radius); font-weight: 500;
}
.nav a:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: var(--side-active); }
.nav .group { font-size: 12px; color: #7f8ea8; padding: 16px 10px 6px; }
.nav svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.side-foot { margin-top: auto; padding: 10px; font-size: 12px; display: flex; flex-direction: column; gap: 8px; }
.side-foot button {
  background: transparent; border: 1px solid rgba(255,255,255,.18); color: var(--side-ink);
  border-radius: var(--radius); padding: 6px 10px; cursor: pointer; text-align: start;
}
.side-foot button:hover { color: #fff; border-color: rgba(255,255,255,.35); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; gap: 12px; align-items: center; padding: 12px 28px; border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
}
.topbar .search { flex: 1; max-width: 420px; }
.topbar .spacer { flex: 1; }
.demo-flag {
  font-size: 12px; color: var(--ink-2); background: var(--accent-soft); padding: 4px 10px; border-radius: 99px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; min-width: 0; flex: 0 1 auto;
}
.page { padding: 24px 28px 64px; max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.page-head .sub { color: var(--ink-2); margin-top: 4px; }
.page-head .actions { margin-inline-start: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); padding: 7px 14px; border-radius: var(--radius); cursor: pointer; font-weight: 500;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .55; cursor: default; }
input[type=text], input[type=search], input[type=number], input[type=date], input[type=month], input[type=email], input[type=password], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius);
  padding: 7px 10px; min-height: 34px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters > * { width: auto; }
.filters input[type=search] { width: 240px; }
.filters .count { margin-inline-start: auto; color: var(--ink-3); font-size: 13px; }

/* ---------- panels and tables ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.panel-head { display: flex; align-items: baseline; gap: 4px 12px; padding: 14px 18px 10px; flex-wrap: wrap; }
.panel-head h2 { white-space: nowrap; }
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-head .note { color: var(--ink-3); font-size: 13px; }
.panel-head .actions { margin-inline-start: auto; display: flex; gap: 8px; }
.panel-body { padding: 0 18px 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: start; font-weight: 500; color: var(--ink-3); padding: 8px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; font-size: 12.5px;
}
table.data th button { all: unset; cursor: pointer; }
table.data th button:hover { color: var(--ink); }
table.data td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr.click { cursor: pointer; }
table.data tbody tr.click:hover td { background: var(--paper); }
table.data .num { text-align: end; white-space: nowrap; }
table.data .muted, .muted { color: var(--ink-3); }
.code { font-weight: 500; }
.local { font-family: "IBM Plex Sans Arabic", var(--font); color: var(--ink-3); font-size: 12.5px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 12px 18px; border-top: 1px solid var(--line-2); color: var(--ink-3); font-size: 13px; }

/* status */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--s-none); }
.status.occupied::before, .status.active::before { background: var(--s-occupied); }
.status.vacant::before { background: var(--s-vacant); }
.status.reserved::before { background: var(--s-reserved); }
.status.under_maintenance::before, .status.not_lettable::before { background: var(--s-maint); }
.status.owner_occupied::before { background: var(--s-owner); }
.tag { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--line-2); color: var(--ink-2); margin-inline-end: 4px; }

/* occupancy bar */
.occ { display: flex; align-items: center; gap: 8px; min-width: 140px; }
.occ .bar { flex: 1; height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.occ .bar i { display: block; height: 100%; background: var(--s-occupied); }
.occ b { font-weight: 500; min-width: 44px; text-align: end; }

/* ---------- figures ---------- */
.figures { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 16px; }
.figure { padding: 16px 18px; border-inline-start: 1px solid var(--line-2); }
.figure:first-child { border-inline-start: 0; }
.figure .label { color: var(--ink-3); font-size: 13px; }
.figure .value { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; margin-top: 2px; }
.figure .hint { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }

dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; font-size: 13.5px; }
dl.facts dt { color: var(--ink-3); }
dl.facts dd { margin: 0; }

/* breakdown rows */
.breakdown { list-style: none; margin: 0; padding: 0; }
.breakdown li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.breakdown li:last-child { border-bottom: 0; }

/* ---------- stacking plan: the signature view ---------- */
.stacking { padding: 4px 18px 18px; overflow-x: auto; }
.stack-building + .stack-building { margin-top: 24px; }
.stack-building h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.stack-grid { display: grid; grid-template-columns: 88px minmax(0, 1fr); row-gap: 3px; }
.stack-floor { color: var(--ink-3); font-size: 12px; display: flex; align-items: center; padding-inline-end: 10px; justify-content: flex-end; white-space: nowrap; }
.stack-row { display: flex; gap: 3px; flex-wrap: wrap; }
.stack-row.none { color: var(--ink-3); font-size: 12px; align-items: center; height: 30px; }
.cell {
  min-width: 56px; height: 30px; border-radius: 3px; border: 0; cursor: pointer; font-size: 12px; font-weight: 500;
  color: #fff; padding: 0 6px; background: var(--s-none);
}
.cell.occupied { background: var(--s-occupied); }
.cell.vacant { background: var(--s-vacant); }
.cell.reserved { background: var(--s-reserved); }
.cell.under_maintenance, .cell.not_lettable { background: var(--s-maint); }
.cell.owner_occupied { background: var(--s-owner); }
.cell.sublet { box-shadow: inset 0 -3px 0 rgba(255,255,255,.55); }
.cell:hover { filter: brightness(1.12); }
.cell:focus-visible { outline-offset: 1px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 0 18px 14px; font-size: 12.5px; color: var(--ink-2); }
.legend .status { font-size: 12.5px; }
.villas { display: flex; flex-wrap: wrap; gap: 4px; }

/* ---------- drawer and forms ---------- */
.scrim { position: fixed; inset: 0; background: rgba(10, 18, 35, .35); z-index: 20; }
.drawer {
  position: fixed; inset-block: 0; inset-inline-end: 0; width: min(560px, 100vw); background: var(--surface); z-index: 21;
  display: flex; flex-direction: column; border-inline-start: 1px solid var(--line);
  animation: slide .18s ease-out;
}
@keyframes slide { from { transform: translateX(24px); opacity: .4; } }
[dir="rtl"] .drawer { animation-name: slide-rtl; }
@keyframes slide-rtl { from { transform: translateX(-24px); opacity: .4; } }
@media (prefers-reduced-motion: reduce) { .drawer { animation: none; } }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.drawer-head .sub { color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.drawer-head .x { margin-inline-start: auto; }
.drawer-body { padding: 18px 22px; overflow-y: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.drawer-foot .error-summary { margin-inline-end: auto; color: var(--danger); font-size: 13px; }
.drawer section + section { margin-top: 22px; }
.drawer h3 { font-size: 13.5px; font-weight: 600; margin: 0 0 10px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 22px; }
.tabs button { all: unset; cursor: pointer; padding: 10px 10px; color: var(--ink-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-color: var(--accent); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field .help { font-size: 12px; color: var(--ink-3); }
.field .err { font-size: 12px; color: var(--danger); }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; color: var(--ink); }
.form-note { grid-column: 1 / -1; font-size: 13px; color: var(--ink-2); background: var(--paper); border-radius: var(--radius); padding: 10px 12px; }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.timeline .when { color: var(--ink-3); font-size: 12px; }
.change { color: var(--ink-2); }
.change del { color: var(--ink-3); }

.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.room { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; }
.room .beds { display: flex; gap: 3px; margin-top: 6px; flex-wrap: wrap; }
.room .beds i { width: 14px; height: 14px; border-radius: 2px; background: var(--s-none); }
.room .beds i.occupied { background: var(--s-occupied); }
.room .beds i.vacant { background: var(--s-vacant); }

.empty { padding: 40px 18px; text-align: center; color: var(--ink-2); }
.empty p { margin: 0 0 12px; }
.toast {
  position: fixed; bottom: 24px; inset-inline-start: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface);
  padding: 10px 16px; border-radius: var(--radius); z-index: 40; font-size: 13.5px;
}
[dir="rtl"] .toast { transform: translateX(50%); }
.loading { padding: 40px; color: var(--ink-3); }
.error-box { background: var(--danger-soft); color: var(--danger); padding: 12px 14px; border-radius: var(--radius); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .figures { grid-template-columns: repeat(3, 1fr); }
  .figure:nth-child(4) { border-inline-start: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px 12px; align-items: center; }
  .brand { padding: 4px 8px; }
  .brand small, .nav .group, .side-foot { display: none; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .nav a { padding: 6px 8px; }
  .nav svg { display: none; }
  .topbar, .page { padding-inline: 16px; }
  .topbar { flex-wrap: wrap; }
  .topbar .search { flex: 1 1 100%; max-width: none; }
  .topbar #entity-filter { flex: 1 1 auto; }
  .figures { grid-template-columns: 1fr 1fr; }
  .figure { border-inline-start: 0; border-top: 1px solid var(--line-2); }
  .form { grid-template-columns: 1fr; }
  .filters input[type=search] { width: 100%; }
  .hide-sm { display: none; }
}

/* ---------- reports ---------- */
.report-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.report-group { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px 6px; }
.report-group h2 { font-size: 13px; font-weight: 600; color: var(--ink-3); margin: 0 0 4px; }
.report-list { list-style: none; margin: 0; padding: 0; }
.report-list li + li { border-top: 1px solid var(--line-2); }
.report-list a, .report-list div { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; color: var(--ink); }
.report-list a:hover { text-decoration: none; }
.report-list a:hover b { color: var(--accent); }
.report-list b { font-weight: 600; }
.report-list span { color: var(--ink-3); font-size: 13px; }
.report-group.coming { background: transparent; border-style: dashed; }
.report-group.coming b { color: var(--ink-2); }
.report-note { color: var(--ink-2); font-size: 13px; margin: -4px 0 12px; }
.filters label.inline { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; }
.filters label.inline select { width: auto; }
table.report td, table.report th { white-space: nowrap; }
table.report tfoot td { border-top: 1px solid var(--line); background: var(--paper); }
table.report td.flag { color: var(--s-vacant); font-weight: 600; }
table.report td.neg { color: var(--danger); }
table.report td.soon { color: var(--s-vacant); }
.print-only { display: none; }
.report-meta { color: var(--ink-3); font-size: 12px; margin-top: 4px; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; color: #000; font-size: 10px; }
  .side, .topbar, .filters, .page-head .actions, .crumbs, .report-note, #toast { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; max-width: none; }
  .panel { border: 0; }
  .print-only { display: block; }
  table.data { font-size: 9.5px; }
  table.data th, table.data td { padding: 4px 6px; }
  table.data th button { color: #000; }
}
.scope-banner { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.scope-banner a { margin-inline-start: auto; }
.level-label { color: var(--ink-3); font-size: 13px; }

/* ---------- property setup explorer ---------- */
.ex-crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: -8px 0 14px; font-size: 13px; color: var(--ink-2); }
.ex-crumbs .sep { color: var(--ink-3); }
.ex-edits { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: -8px 0 12px; font-size: 13px; }
.ex-edits .btn { padding: 2px 10px; font-size: 12.5px; min-height: 0; }
.explorer {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; min-height: 520px; overflow: hidden;
}
.ex-col { display: flex; flex-direction: column; min-width: 0; border-inline-start: 1px solid var(--line); }
.ex-col:first-child { border-inline-start: 0; }
.ex-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--line-2); }
.ex-head h2 { font-size: 13.5px; font-weight: 600; margin: 0; }
.ex-head .ex-add { margin-inline-start: auto; padding: 3px 10px; font-size: 13px; }
.ex-body { overflow-y: auto; max-height: 68vh; padding: 6px; display: flex; flex-direction: column; gap: 2px; }
.ex-hint { color: var(--ink-3); font-size: 13px; padding: 8px 6px; margin: 0; }
.ex-item {
  display: grid; grid-template-columns: 1fr auto; gap: 1px 8px; padding: 8px 8px; border-radius: var(--radius);
  color: var(--ink); text-align: start; background: none; border: 0; cursor: pointer; width: 100%; font: inherit;
}
.ex-item:hover { background: var(--paper); text-decoration: none; }
.ex-item.selected { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .ex-item.selected { box-shadow: inset -3px 0 0 var(--accent); }
.ex-main { font-weight: 500; display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.ex-sub { grid-column: 1; color: var(--ink-3); font-size: 12.5px; min-width: 0; }
.ex-right { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.ex-lease { grid-column: 1 / -1; font-size: 12.5px; }
.ex-unit .status { font-size: 0; }
.ex-unit .status::before { width: 9px; height: 9px; }
@media (max-width: 1100px) {
  .explorer { grid-template-columns: 1fr 1fr; }
  .ex-col { display: none; }
  .explorer[data-depth="0"] .ex-col:nth-child(1), .explorer[data-depth="0"] .ex-col:nth-child(2),
  .explorer[data-depth="1"] .ex-col:nth-child(1), .explorer[data-depth="1"] .ex-col:nth-child(2),
  .explorer[data-depth="2"] .ex-col:nth-child(2), .explorer[data-depth="2"] .ex-col:nth-child(3),
  .explorer[data-depth="3"] .ex-col:nth-child(3), .explorer[data-depth="3"] .ex-col:nth-child(4),
  .explorer[data-depth="4"] .ex-col:nth-child(4), .explorer[data-depth="4"] .ex-col:nth-child(5) { display: flex; }
  .ex-col { border-inline-start: 1px solid var(--line); }
}
@media (max-width: 760px) {
  .explorer { grid-template-columns: 1fr; }
  .explorer .ex-col { display: none !important; }
  .explorer .ex-col.current { display: flex !important; }
}
.plain-list { margin: 0 0 10px; padding-inline-start: 18px; color: var(--ink-2); font-size: 13.5px; }
.plain-list li { margin: 3px 0; }

/* ---------- sign-in ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--side); }
.login-card { background: var(--surface); width: min(400px, 100%); border-radius: 10px; padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { margin: 0; font-size: 22px; font-weight: 600; }
.brand-mark { color: var(--ink); margin-bottom: 6px; }
.login-msg { margin: 0; color: var(--ink-2); }
.login-err { margin: 0; color: var(--danger); background: var(--danger-soft); padding: 8px 10px; border-radius: var(--radius); }
.login-card .btn.primary { justify-content: center; padding: 9px 14px; }
.demo-users { font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 12px; }
.demo-users ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.demo-users code { background: var(--paper); padding: 1px 6px; border-radius: 4px; }
.linklike { all: unset; color: var(--accent); cursor: pointer; font-weight: 500; }
.linklike:hover { text-decoration: underline; }
.linklike:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.side-foot .who { display: flex; flex-direction: column; color: #fff; padding: 0 2px 6px; border-bottom: 1px solid rgba(255,255,255,.12); margin-bottom: 4px; }
.side-foot .who span { color: var(--side-ink); font-size: 12px; }

/* ---------- leasing ---------- */
.seg { display: inline-flex; gap: 2px; background: var(--line-2); padding: 3px; border-radius: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.seg button { all: unset; cursor: pointer; padding: 6px 12px; border-radius: 6px; color: var(--ink-2); font-weight: 500; font-size: 13.5px; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(19,35,63,.12); }
.seg button:focus-visible { outline: 2px solid var(--accent); }
.seg.small { margin-bottom: 10px; }
.soon { color: var(--s-vacant); }
.status.lease-active::before { background: var(--s-occupied); }
.status.lease-draft::before { background: var(--s-reserved); }
.status.lease-expired::before, .status.lease-cancelled::before { background: var(--s-none); }
.status.lease-terminated::before { background: var(--danger); }
.status.lease-renewed::before { background: var(--s-owner); }
.page-head h1 .status { font-size: 14px; font-weight: 500; vertical-align: middle; margin-inline-start: 8px; }
.lease-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-bottom: 16px; }
.lease-strip a { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; color: var(--ink); display: flex; flex-direction: column; }
.lease-strip a:hover { border-color: var(--accent); text-decoration: none; }
.lease-strip b { font-size: 18px; font-weight: 600; }
.lease-strip span { color: var(--ink-3); font-size: 12.5px; }
table.schedule .inst-head td { background: var(--paper); border-top: 1px solid var(--line); }
table.schedule tr.cancelled td { color: var(--ink-3); text-decoration: line-through; }
table.schedule tfoot td { border-top: 1px solid var(--line); }
.mini-chart { width: 100%; height: auto; max-height: 140px; margin: 6px 0 12px; }
.mini-chart .axis { stroke: var(--line); }
.mini-chart .line { fill: none; stroke: var(--accent); stroke-width: 2; }
.mini-chart .dot { fill: var(--accent); }
.mini-chart .lbl { fill: var(--ink-3); font-size: 11px; }

/* lease form: wide drawer with the live schedule beside the form */
.drawer.wide { width: min(1080px, 100vw); }
.lease-form { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; align-items: start; }
.lf-main section + section { margin-top: 22px; }
.lf-preview { position: sticky; top: 0; background: var(--paper); border-radius: 8px; padding: 14px; font-size: 13px; max-height: calc(100vh - 190px); overflow-y: auto; }
.lp-empty p { color: var(--ink-3); margin: 6px 0 0; }
.lp-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.lp-figs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; margin: 0 0 12px; }
.lp-figs dt { color: var(--ink-3); font-size: 12px; }
.lp-figs dd { margin: 0; font-weight: 600; }
.lp-alloc { margin-bottom: 10px; font-size: 12.5px; }
.lp-alloc ul { list-style: none; margin: 4px 0 0; padding: 0; }
.lp-alloc li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; padding: 2px 0; border-bottom: 1px solid var(--line); }
.lp-alloc .note-banner { margin: 4px 0; }
table.alloc { max-width: 320px; } table.alloc input { width: 90px; text-align: right; } table.alloc tr.total td { font-weight: 600; }
.lp-steps { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; color: var(--ink-2); font-size: 12.5px; }
.lp-list { list-style: none; margin: 0; padding: 0; counter-reset: pay; }
.lp-list li { border-top: 1px solid var(--line); padding: 7px 0; }
.lp-row { display: flex; justify-content: space-between; }
.lp-detail { color: var(--ink-3); font-size: 12px; margin-top: 2px; }
.pick-search { margin: 4px 0 8px; }
.picker { max-height: 280px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; display: flex; flex-direction: column; gap: 8px; }
.pick-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px; }
.pick-group-h { grid-column: 1 / -1; font-size: 12px; color: var(--ink-3); font-weight: 500; padding: 4px 2px 0; }
.pick { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; align-items: start; padding: 6px 8px; border-radius: var(--radius); border: 1px solid var(--line-2); cursor: pointer; }
.pick input { grid-row: span 2; margin-top: 3px; }
.pick.on { border-color: var(--accent); background: var(--accent-soft); }
.pick.busy { opacity: .7; }
.pick-main { font-weight: 500; }
.pick-sub { font-size: 12px; color: var(--ink-3); }
.pick-sub .status { font-size: 12px; }
.chosen { margin: 8px 0 0; font-size: 13px; color: var(--ink-2); }
p.err[data-field-msg] { color: var(--danger); font-size: 12.5px; margin: 6px 0 0; }
table.charges td { vertical-align: top; }
table.charges select, table.charges input { min-height: 30px; padding: 4px 6px; }
table.charges input[type=number] { width: 110px; text-align: end; }
@media (max-width: 1100px) { .lease-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) {
  .lease-form { grid-template-columns: 1fr; }
  .lf-preview { position: static; max-height: none; }
}
@media (max-width: 760px) { .lease-strip { grid-template-columns: 1fr 1fr; } table.charges { display: block; overflow-x: auto; } }
.note-banner { background: var(--accent-soft); border-radius: var(--radius); padding: 10px 14px; margin: 0 0 16px; }
.note-banner.warn { background: var(--danger-soft); color: var(--danger); }
.navigate { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 4px; font-size: 12.5px; }
.navigate .btn { padding: 2px 9px; min-width: 0; }
.menu-wrap { position: relative; display: inline-block; }
.menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 4px; }
.menu button { display: block; width: 100%; text-align: start; background: none; border: 0; padding: 8px 10px; border-radius: 6px; font: inherit; color: var(--ink); cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--accent-soft); }
.note-banner.action-pending { border-color: var(--warn, #b7791f); }
.status.action-pending { background: #fff4d6; color: #7a5200; } .status.action-approved { background: var(--accent-soft); color: var(--accent); }
.status.action-rejected { background: var(--danger-soft); color: var(--danger); } .status.action-withdrawn { background: var(--line); color: var(--ink-2); }
.lease-strip a.attn b { color: #b45309; }
.lp-block { margin: 10px 0; } .lp-block p { margin: 4px 0; }
.lp-lines { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12.5px; }
.lp-lines li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.lp-lines .neg, td.neg { color: #b42318; }
table.data.compact td, table.data.compact th { padding: 5px 8px; }
.lf-preview.static { position: static; max-height: none; margin-top: 12px; }
.btn.danger { color: #b42318; border-color: #f1b8b3; }

/* ------------------------------------------------------------------ help and user manual */
.help-btn { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 15px; cursor: pointer; flex: none; }
.help-btn:hover, .help-btn:focus-visible { border-color: var(--accent); color: var(--accent); }
.help h3, .manual h2 { margin: 0 0 6px; }
.help h4, .manual h3 { margin: 18px 0 6px; font-size: 14px; color: var(--ink); }
.help-intro { color: var(--ink-2); margin: 0 0 12px; line-height: 1.5; }
.help-shot { margin: 12px 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--paper); }
.help-shot img { display: block; width: 100%; height: auto; }
.help-steps { padding-inline-start: 22px; margin: 0; line-height: 1.55; }
.help-steps li { margin-bottom: 8px; }
.help-fields { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: 6px 14px; margin: 0; }
.help-fields dt { font-weight: 600; }
.help-fields dd { margin: 0; color: var(--ink-2); }
.help-rules { padding-inline-start: 20px; margin: 0; line-height: 1.5; color: var(--ink-2); }
.help-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.manual { max-width: 920px; }
.manual-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 24px; }
.manual-toc ol { margin: 8px 0 0; padding-inline-start: 22px; columns: 2; column-gap: 32px; line-height: 1.7; }
.manual-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 20px; position: relative; }
.manual-no { color: var(--accent); }
.manual-cover { padding: 30mm 0 10mm; }
.manual-cover h1 { font-size: 30px; margin: 8px 0 12px; }
@media (max-width: 700px) { .manual-toc ol { columns: 1; } .manual-sec { padding: 16px; } .help-fields { grid-template-columns: 1fr; } }
@page manual { size: A4 portrait; margin: 14mm; }
@media print {
  .manual { page: manual; max-width: none; font-size: 11px; }
  .manual-page { page: manual; }
  .manual-cover { display: block; break-after: avoid; }
  .manual-sec { border: 0; padding: 0; break-before: page; }
  .manual-toc { border: 0; break-after: page; }
  .help-shot { break-inside: avoid; }
  .no-print, .help-btn { display: none !important; }
}

/* ------------------------------------------------------------------ main menu (modules + panels) and record menus */
.menu-find { padding: 0 2px 10px; }
.menu-find input { width: 100%; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); color: #fff; border-radius: var(--radius); padding: 7px 10px; font: inherit; font-size: 13px; }
.menu-find input::placeholder { color: #8d9bb3; }
.menu-find input:focus { outline: 2px solid var(--accent); outline-offset: 1px; background: rgba(255,255,255,.12); }
.nav.modules { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.module { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius);
  color: var(--side-ink); cursor: pointer; font-size: 14px; }
.module svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.module .chev { margin-inline-start: auto; font-style: normal; opacity: .5; transition: transform .15s; }
.module:hover, .module:focus-visible, .module[aria-expanded="true"] { background: rgba(255,255,255,.08); color: #fff; }
.module:focus-visible { outline: 2px solid var(--accent); }
.module[aria-current] { background: rgba(255,255,255,.12); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
[dir="rtl"] .module[aria-current] { box-shadow: inset -3px 0 0 var(--accent); }
[dir="rtl"] .module .chev { transform: scaleX(-1); }
.module.later { color: #8d9bb3; }
.module .soon, .mi em, .rm-items em { font-style: normal; font-size: 10.5px; padding: 1px 6px; border-radius: 9px; background: rgba(127,142,168,.2); color: inherit; letter-spacing: .02em; }
.module .soon { margin-inline-start: auto; }
.module .soon + .chev { margin-inline-start: 6px; }
.menu-fly { position: fixed; z-index: 60; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(19,35,63,.18); max-height: calc(100vh - 16px); overflow: auto; min-width: 260px; max-width: min(900px, calc(100vw - 240px)); }
.fly-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 4px; }
.fly-head b { font-size: 15px; }
.fly-cols { display: grid; grid-template-columns: repeat(var(--cols, 1), minmax(200px, 240px)); gap: 6px 22px; padding: 4px 14px 14px; align-items: start; }
.fly-cols section { min-width: 200px; }
.fly-cols h4, .rm-items h4 { margin: 10px 0 4px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; }
.mi { all: unset; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 6px 8px;
  border-radius: 5px; cursor: pointer; font-size: 13.5px; color: var(--ink); }
.mi small { display: block; color: var(--ink-3); font-size: 11.5px; }
.mi:hover, .mi:focus-visible { background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.mi:focus-visible { outline: 2px solid var(--accent); }
.mi.coming { color: var(--ink-3); cursor: default; }
.mi.coming:hover { background: none; }
.menu-fly.find { width: 380px; }
.find-list { padding: 2px 8px 10px; }
.head-actions { display: flex; align-items: center; gap: 6px; }
.rm-pop { position: fixed; z-index: 70; display: grid; grid-template-columns: 180px 1fr; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(19,35,63,.18); max-height: min(480px, calc(100vh - 80px)); overflow: hidden; }
.rm-groups { background: var(--paper); border-inline-end: 1px solid var(--line); padding: 8px; overflow-y: auto; }
.rm-groups button { all: unset; box-sizing: border-box; display: flex; justify-content: space-between; width: 100%; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); }
.rm-groups button i { font-style: normal; opacity: .5; }
.rm-groups button[aria-selected="true"] { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.rm-groups button:focus-visible { outline: 2px solid var(--accent); }
.rm-items { padding: 4px 10px 12px; overflow-y: auto; }
.rm-items .mi { align-items: flex-start; flex-direction: column; gap: 0; }
.rm-items .mi.coming { flex-direction: row; align-items: center; }
@media (max-width: 760px) {
  .menu-find { width: 100%; }
  .nav.modules { flex-direction: row; flex-wrap: wrap; }
  .module { width: auto; padding: 6px 8px; font-size: 13px; }
  .module .chev, .module .soon { display: none; }
  .menu-fly { border-radius: 0 0 10px 10px; max-width: none; }
  .fly-cols { width: auto; grid-template-columns: 1fr; }
  .rm-pop { grid-template-columns: 1fr; }
  .rm-groups { display: flex; flex-wrap: wrap; gap: 4px; border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .rm-groups button { width: auto; }
}
@media print { .menu-fly, .rm-pop, .rm-wrap { display: none !important; } }
/* keep wide content inside its panel on narrow screens */
.grid-3 > *, .grid-2 > *, .stack > * { min-width: 0; }
.tabs { overflow-x: auto; scrollbar-width: thin; }
.panel-head { flex-wrap: wrap; }
@media (max-width: 760px) { .panel-body table.data, .drawer-body table.data { display: block; overflow-x: auto; } }
.nav.modules { min-height: 0; flex: 0 1 auto; } .side-foot { flex: none; }

.side-foot { flex-direction: row; flex-wrap: wrap; gap: 6px; }
.side-foot .who { flex: 1 1 100%; }
.side-foot button { flex: 1 1 calc(50% - 6px); padding: 5px 6px; font-size: 11.5px; }

/* ------------------------------------------------------------------ jump to: record to record */
.jump { display: flex; align-items: center; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; font-size: 12.5px; }
.jump .btn { padding: 2px 10px; min-width: 0; font-size: 15px; line-height: 1.2; }
.jump-pos { min-width: 64px; text-align: center; }
.jump-find { position: relative; margin-inline-start: 6px; }
.jump-find input { width: 200px; padding: 4px 9px; font-size: 12.5px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.jump-find input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.jump-list { position: absolute; z-index: 80; top: calc(100% + 4px); inset-inline-start: 0; width: 300px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 10px 28px rgba(19,35,63,.16); padding: 4px; }
.jump-list button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 6px 8px; border-radius: 5px; cursor: pointer; font-size: 13px; }
.jump-list button small { display: block; color: var(--ink-3); font-size: 11.5px; }
.jump-list button[aria-selected="true"], .jump-list button:hover { background: var(--accent-soft); }
.jump-list p { margin: 6px 8px; }
@media print { .jump { display: none !important; } }

/* move-out and refunds */
.status.mo-open::before { background: var(--s-reserved); } .status.mo-submitted::before { background: #b7791f; }
.status.mo-approved::before { background: var(--accent); } .status.mo-paid::before, .status.mo-closed::before { background: var(--s-occupied); }
.status.mo-cancelled::before { background: var(--s-none); }
ol.stepper { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0 0 16px; flex-wrap: wrap; counter-reset: none; }
ol.stepper li { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 20px; background: var(--line-2); color: var(--ink-3); font-size: 13px; }
ol.stepper li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); font-weight: 600; font-size: 12px; }
ol.stepper li.done { background: var(--accent-soft); color: var(--accent); } ol.stepper li.done span { background: var(--accent); color: #fff; }
ol.stepper li.now { background: var(--accent); color: #fff; font-weight: 600; } ol.stepper li.now span { color: var(--accent); }
ul.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
ul.checklist li { display: grid; gap: 4px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
ul.checklist label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; font-size: 13.5px; }
ul.checklist .req { color: var(--danger); }
ul.checklist .check-ref { font-size: 12.5px; padding: 4px 8px; margin-inline-start: 24px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); max-width: calc(100% - 24px); }
table.statement tr.subtotal td { border-top: 1px solid var(--line); font-weight: 500; }
table.statement tfoot td { font-weight: 700; font-size: 15px; border-top: 2px solid var(--ink-2); }
table.statement thead + tbody + thead th { padding-top: 18px; }

/* report column groups and the audit roll-forward */
table.report tr.group-head th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); border-bottom: 0; padding-bottom: 0; }
table.report tr.group-head th.grp { color: var(--accent); border-bottom: 2px solid var(--accent-soft); text-align: center; }
.recon { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 14px; }
.recon > div { flex: 1 1 150px; padding: 10px 14px; border-inline-end: 1px solid var(--line-2); display: grid; gap: 2px; }
.recon > div:last-child { border-inline-end: 0; }
.recon span { font-size: 12px; color: var(--ink-3); } .recon b { font-size: 15px; font-variant-numeric: tabular-nums; }
.recon .eq b { color: var(--accent); } .recon .ok b { color: var(--s-occupied); } .recon .bad b { color: var(--danger); }

.filters label.inline { white-space: nowrap; }
table.report.sticky1 th:first-child, table.report.sticky1 td:first-child { position: sticky; inset-inline-start: 0; background: var(--surface); z-index: 1; box-shadow: 1px 0 0 var(--line-2); }
table.report.sticky1 tfoot td:first-child { background: var(--surface); }

/* general ledger */
.status.gb-open::before { background: var(--s-reserved); } .status.gb-submitted::before { background: #b7791f; } .status.gb-posted::before { background: var(--s-occupied); } .status.gb-cancelled::before { background: var(--s-none); }
.status.gj-draft::before { background: var(--s-reserved); } .status.gj-posted::before { background: var(--s-occupied); } .status.gj-cancelled::before { background: var(--s-none); }
table.coa tr.head td { background: var(--paper); } table.coa tr.lvl1 td { font-size: 14.5px; } table.coa tr.closed td, table.data tr.closed td { color: var(--ink-3); text-decoration: line-through; }
table.coa code, table.report code, table.data code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }
table.jlines input, table.jlines select { width: 100%; min-width: 0; padding: 5px 7px; font-size: 13px; }
table.jlines td { vertical-align: top; } table.jlines td:nth-child(2) { min-width: 150px; } table.jlines td:nth-child(3), table.jlines td:nth-child(4) { width: 115px; }
table.jlines td:nth-child(7) { min-width: 130px; } table.jlines td:nth-child(7) > * + * { margin-top: 4px; }
table.jlines .acc-name { font-size: 11.5px; margin-top: 2px; } table.jlines tfoot td { font-weight: 600; }
.err-list { color: var(--danger); margin: 10px 0 0; padding-inline-start: 18px; font-size: 13px; }
.ok { color: var(--s-occupied); }
.figure .value.small { font-size: 16px; }
p.lead { font-size: 15px; margin: -4px 0 14px; }
.section-title { font-size: 15px; margin: 18px 0 10px; }
table.statement-fs td { padding-top: 7px; padding-bottom: 7px; } table.statement-fs tr.lvl1 td { border-top: 2px solid var(--line); font-size: 15px; }
table.statement-fs tr.lvl1 td, table.statement-fs tr.lvl2 td { background: var(--paper); }

/* receivables: printable documents, receipts */
.status.rc-in_hand::before { background: var(--s-reserved); } .status.rc-deposited::before { background: #b7791f; }
.status.rc-cleared::before { background: var(--s-occupied); } .status.rc-bounced::before { background: var(--danger); } .status.rc-void::before { background: var(--s-none); }
.doc { padding: 22px 26px; margin-bottom: 16px; }
.doc-head { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; border-bottom: 2px solid var(--accent-soft); padding-bottom: 14px; margin-bottom: 14px; }
.doc-head .wordmark { color: var(--ink); display: block; margin-bottom: 8px; }
.doc-entity { font-size: 13px; color: var(--ink-2); display: grid; gap: 2px; }
.doc-title { text-align: end; } .doc-title h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: .02em; text-transform: uppercase; color: var(--accent); }
.doc-title dl.facts { justify-content: end; }
.doc-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 14px; font-size: 13.5px; }
.doc-parties > div { display: grid; gap: 2px; } .doc-parties .muted { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
table.doc-lines tfoot td { font-weight: 600; border-top: 2px solid var(--ink-2); }
table.doc-lines tfoot tr.sub td, table.doc-lines tr.sub td { font-weight: 400; border-top: 0; color: var(--ink-2); }
.doc-foot { margin-top: 14px; font-size: 12.5px; }
.figure .value.small { font-size: 16px; }
.pick-list { display: grid; gap: 2px; margin-top: 4px; max-height: 220px; overflow: auto; }
.pick-list button { all: unset; cursor: pointer; padding: 7px 10px; border-radius: 6px; font-size: 13.5px; }
.pick-list button:hover, .pick-list button:focus-visible { background: var(--accent-soft); }
table.data.compact td, table.data.compact th { padding: 5px 6px; font-size: 13px; }
input.alloc { width: 110px; text-align: end; } input.cheque-no { width: 110px; }
@media print { .doc { border: 0; box-shadow: none; padding: 0; } }
[hidden] { display: none !important; }

/* document inbox */
.drop { border: 2px dashed var(--line); background: var(--surface); padding: 18px 20px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 20px; align-items: center; cursor: pointer; margin-bottom: 16px; }
.drop:hover, .drop.over, .drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.drop-main { display: flex; gap: 14px; align-items: center; color: var(--ink); } .drop-main svg { color: var(--accent); flex: none; }
.drop-side { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.drop-progress { grid-column: 1 / -1; display: grid; gap: 4px; font-size: 13px; border-top: 1px solid var(--line-2); padding-top: 10px; cursor: default; }
.dp-row { display: flex; justify-content: space-between; gap: 12px; } .dp-row.ok a { color: var(--s-occupied); } .dp-row.warn a, .dp-row.warn span:last-child { color: #b7791f; }
.auto-badge { font-size: 10.5px; padding: 1px 7px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); font-weight: 600; letter-spacing: .02em; }
.status.imp-needs_review::before { background: #b7791f; } .status.imp-completed::before { background: var(--s-occupied); } .status.imp-rejected::before { background: var(--s-none); }
.status.si-posted::before { background: var(--s-occupied); } .status.si-awaiting_approval::before { background: #b7791f; } .status.si-cancelled::before { background: var(--s-none); }
.imp-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.imp-doc .panel-body { padding: 0; } .imp-doc iframe { width: 100%; height: 860px; border: 0; display: block; background: #fff; } .imp-doc img { width: 100%; display: block; }
.imp-form h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 14px 0 6px; } .imp-form h3:first-child { margin-top: 0; }
.imp-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.imp-fields .field label { font-size: 12px; } .imp-fields input, .imp-fields select { width: 100%; }
#imp-lines input { width: 100%; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
#imp-lines input.num { text-align: end; }
ul.issues { margin: 0; padding-inline-start: 18px; display: grid; gap: 6px; font-size: 13.5px; } ul.issues li.bad { color: var(--danger); }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
@media (max-width: 900px) { .imp-grid { grid-template-columns: 1fr; } .imp-doc iframe { height: 520px; } .drop { grid-template-columns: 1fr; } .drop-side { justify-content: flex-start; } .imp-fields { grid-template-columns: 1fr; } }
form.imp-form { display: block; }
table.doc-lines td a { color: var(--accent); text-decoration: none; } table.doc-lines td a:hover { text-decoration: underline; }
table.st-leases { margin-bottom: 18px; }
@media print { table.doc-lines td a { color: inherit; } }

/* tax invoice and its checks */
.inv-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.inv-checks .panel-head h2 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
ul.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
ul.checks li { display: flex; gap: 8px; align-items: baseline; } ul.checks li::before { content: "✓"; color: var(--s-occupied); font-weight: 700; flex: none; }
ul.checks li.bad::before { content: "✕"; color: var(--danger); } ul.checks li.bad > span:last-child { color: var(--danger); }
ul.checks .ref { color: var(--ink-3); font-size: 11.5px; min-width: 78px; flex: none; } ul.checks em { display: block; font-style: normal; color: var(--ink-3); font-size: 12px; }
ul.checks.compact { font-size: 12px; gap: 2px; }
.doc-title-ar { font-size: 15px; color: var(--accent); text-align: end; margin: -4px 0 8px; font-family: "IBM Plex Sans Arabic", sans-serif; }
.doc-note { background: var(--paper); border-radius: 6px; padding: 10px 14px; margin: 0 0 14px; font-size: 13.5px; }
.doc-sums { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr); gap: 24px; align-items: start; margin-top: 12px; }
dl.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px 16px; margin: 0; font-size: 14px; } dl.totals dt { color: var(--ink-2); } dl.totals dd { margin: 0; text-align: end; font-variant-numeric: tabular-nums; }
dl.totals .grand { font-weight: 700; font-size: 15.5px; border-top: 2px solid var(--ink-2); padding-top: 6px; color: var(--ink); }
pre.xml { font-size: 11.5px; line-height: 1.45; white-space: pre-wrap; word-break: break-all; background: var(--paper); padding: 12px; border-radius: 6px; margin: 0; }
@media (max-width: 900px) { .inv-checks, .doc-sums { grid-template-columns: 1fr; } }
@media print { .doc-title-ar { color: #000; } }

/* back to the previous screen */
.back-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); cursor: pointer; font: inherit; font-size: 13.5px; flex: none; }
.back-btn:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.back-btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 700px) { .back-btn span { display: none; } .back-btn { padding: 0 9px; } }
@media print { .back-btn { display: none; } }

/* ------------------------------------------------------------------ financial reports */
.fr-composer { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
.fr-kinds { border: 0; margin: 0; padding: 10px; background: var(--paper); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.fr-kinds legend { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 4px 8px 8px; float: left; width: 100%; }
.fr-kind { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.fr-kind input { margin-top: 3px; accent-color: var(--accent); }
.fr-kind span { display: flex; flex-direction: column; min-width: 0; }
.fr-kind b { font-weight: 600; font-size: 13.5px; }
.fr-kind small { color: var(--ink-3); font-size: 12px; line-height: 1.35; }
.fr-kind:hover { background: var(--surface); }
.fr-kind:has(input:checked) { background: var(--surface); border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.fr-kind.fr-pack { margin-bottom: 6px; }
.fr-kind.fr-pack b::after { content: "Recommended for audit"; margin-inline-start: 8px; font-size: 10.5px; font-weight: 500; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 99px; }
.fr-side { padding: 18px 20px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; }
.fr-grid .field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 4px; font-weight: 500; }
.fr-static { padding: 7px 0; font-size: 13.5px; }
.fr-opts { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 13.5px; }
.fr-opts label { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; }
.fr-opts input { accent-color: var(--accent); width: auto; }
.fr-opts .dim { opacity: .45; }
.fr-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line-2, var(--line)); margin-top: auto; }
.fr-actions .btn { min-width: 92px; justify-content: center; }
.fr-hint { color: var(--ink-3); font-size: 12.5px; margin-inline-start: 6px; }
.fr-empty { border: 1px dashed var(--line); border-radius: 10px; padding: 28px; text-align: center; color: var(--ink-3); }
.fr-loading { padding: 24px; color: var(--ink-3); }
.fr-report { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px 18px; }
.fr-title { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: flex-start; padding-bottom: 16px; border-bottom: 2px solid var(--ink); }
.fr-eyebrow { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.fr-title h2 { margin: 2px 0 4px; font-size: 22px; letter-spacing: -.01em; }
.fr-meta { color: var(--ink-2); font-size: 13px; }
.fr-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 12.5px; max-width: 460px; }
.fr-checks li { display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.fr-checks li span { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.fr-checks li.ok span { background: var(--accent-soft); color: var(--accent); }
.fr-checks li.bad span { background: #fde8e7; color: #b42318; }
.fr-checks li.bad { color: #b42318; font-weight: 600; }
.fr-toc { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0 4px; position: sticky; top: 52px; background: var(--surface); z-index: 2; }
.fr-toc a { font-size: 12.5px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-2); }
.fr-toc a:hover { border-color: var(--accent); color: var(--accent); }
.fr-sheet { margin-top: 26px; scroll-margin-top: 110px; }
.fr-sheet-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 8px; }
.fr-sheet-head h3 { margin: 0; font-size: 16px; }
.fr-sheet-head span { color: var(--ink-3); font-size: 12.5px; }
table.fr-table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
table.fr-table th { text-align: start; font-weight: 600; font-size: 12px; color: var(--ink-2); padding: 6px 10px; border-bottom: 1px solid var(--ink-3); vertical-align: bottom; white-space: nowrap; }
table.fr-table th small { display: block; font-weight: 400; color: var(--ink-3); }
table.fr-table th.num, table.fr-table td.num { text-align: end; }
table.fr-table tr.fr-grouprow th { border-bottom: 0; text-align: center; padding-bottom: 0; }
table.fr-table tr.fr-grouprow th.fr-group { color: var(--accent); border-bottom: 1px solid var(--accent); }
table.fr-table td { padding: 4px 10px; vertical-align: top; }
table.fr-table td:first-child { min-width: 240px; }
table.fr-list td:first-child { min-width: 0; white-space: nowrap; font-family: var(--mono, ui-monospace, monospace); font-size: 12px; }
table.fr-list td:nth-child(2) { min-width: 220px; }
.fr-note, table.fr-table th.fr-note { text-align: center; color: var(--ink-3); width: 44px; }
tr.fr-h1 td { padding-top: 16px; font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
tr.fr-h2 td { padding-top: 10px; font-weight: 600; }
tr.fr-h3 td { font-style: italic; color: var(--ink-2); padding-top: 6px; }
tr.fr-sub td { color: var(--ink-2); font-size: 12.5px; }
tr.fr-sub td:first-child { padding-inline-start: 26px; }
tr.fr-total td { font-weight: 600; }
tr.fr-total td.num { border-top: 1px solid var(--ink-3); }
tr.fr-grand td { font-weight: 700; padding-top: 6px; }
tr.fr-grand td.num { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
tr.fr-check td { font-size: 12px; color: var(--ink-3); font-style: italic; }
tr.fr-colhead td { font-size: 11.5px; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--line); }
tr.fr-blank td { height: 10px; }
tr.fr-count td { color: var(--ink-2); }
table.fr-table tr.click { cursor: pointer; }
table.fr-table tr.click:hover td { background: var(--accent-soft); }
.fr-ok { color: var(--accent); font-weight: 700; font-style: normal; }
.fr-bad { color: #b42318; font-weight: 700; font-style: normal; }
.fr-foot { margin-top: 18px; font-size: 12px; }
@media (max-width: 860px) { .fr-composer { grid-template-columns: 1fr; } .fr-kinds { border-inline-end: 0; border-bottom: 1px solid var(--line); } }
@media print {
  .fr-composer, .fr-toc, .no-print { display: none !important; }
  .fr-report { border: 0; padding: 0; }
  .fr-title { border-bottom-color: #000; }
  .fr-sheet { break-before: page; margin-top: 0; }
  .fr-sheet:first-of-type { break-before: auto; margin-top: 14px; }
  table.fr-table { font-size: 9.5px; }
  table.fr-table td, table.fr-table th { padding: 2px 6px; }
  table.fr-table tr { break-inside: avoid; }
  table.fr-table thead { display: table-header-group; }
  tr.fr-h1 td, tr.fr-group th { color: #000 !important; }
  .table-wrap { overflow: visible !important; }
}
.fr-kind small { display: none; }
.fr-kind:has(input:checked) small { display: block; margin-top: 2px; }
.fr-kind { padding: 7px 10px; }
.help-video { margin: 12px 0 16px; }
.help-video video { width: 100%; border-radius: 8px; border: 1px solid var(--line); background: #0f1726; display: block; }
.help-video figcaption { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
/* report buttons: Display, Excel, PDF, Clear */
.rb-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-inline-start: 12px; }
.filters .count + .rb-actions { margin-inline-start: 12px; }
.rb-actions .btn { min-width: 74px; justify-content: center; padding: 6px 12px; }
.rb-hint { font-size: 12px; color: var(--ink-3); }
.rb-hint:empty { display: none; }
.btn.rb-due { box-shadow: 0 0 0 3px var(--accent-soft); }
@media print { .rb-actions { display: none !important; } }
.help-media { margin: 4px 0 10px; }
.help-topic.media-video .help-shot { display: none; }
.help-topic.media-pictures .help-video { display: none; }
@media print { .help-topic .help-shot { display: block !important; } .help-topic .help-video, .help-media { display: none !important; } }
/* payables */
.status.ap-draft::before, .status.ap-returned::before { background: var(--s-none); }
.status.ap-awaiting_approval::before, .status.ap-in_payment_run::before { background: #d08a00; }
.status.ap-approved::before { background: var(--s-owner); }
.status.ap-part_paid::before { background: var(--s-reserved); }
.status.ap-paid::before { background: var(--s-occupied); }
.status.ap-cancelled::before { background: var(--danger); }
.seg-n { font-size: 11px; color: var(--ink-3); margin-inline-start: 4px; }
table.bill-lines input, table.bill-lines select { min-height: 30px; padding: 4px 6px; }
table.bill-lines td:nth-child(1) { min-width: 200px; } table.bill-lines td:nth-child(2) { min-width: 210px; } table.bill-lines td:nth-child(3) { min-width: 150px; }
table.bill-lines input.num { width: 110px; text-align: end; }
.run-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 16px; margin-bottom: 16px; }
.run-form .field.wide { grid-column: 1 / -1; }
table.run-bills input.num { width: 120px; text-align: end; min-height: 30px; padding: 4px 6px; }
table.run-bills tr.grp-row td { background: var(--paper); padding-top: 10px; }
table.run-bills tr.dim td { opacity: .5; }
.grid-2.wide-left { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 900px) { .grid-2.wide-left { grid-template-columns: 1fr; } }
.figures.ap-figs { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.figures.ap-figs .figure .value { font-size: 20px; }
table.bill-lines td:nth-child(1) { min-width: 170px; } table.bill-lines td:nth-child(2) { min-width: 190px; } table.bill-lines td:nth-child(3) { min-width: 130px; }
table.bill-lines input.num { width: 100px; } table.bill-lines td:nth-child(5) select { width: 110px; }
td.nw { white-space: nowrap; }
/* procurement and work orders */
.status.po-draft::before, .status.wo-open::before { background: var(--s-none); }
.status.po-submitted::before, .status.wo-on_hold::before { background: #d08a00; }
.status.po-approved::before, .status.wo-assigned::before { background: var(--s-owner); }
.status.po-part_received::before, .status.wo-in_progress::before { background: var(--s-reserved); }
.status.po-received::before, .status.wo-completed::before, .status.po-closed::before, .status.wo-closed::before { background: var(--s-occupied); }
.status.po-cancelled::before, .status.wo-cancelled::before { background: var(--danger); }
.prio { font-size: 12px; padding: 1px 8px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); white-space: nowrap; }
.prio-urgent { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 600; }
.prio-high { background: #fff4d6; color: #7a5200; border-color: transparent; }
.figure .value.small-v { font-size: 15px; letter-spacing: 0; }

/* invoice batches */
.status.ib-open::before { background: var(--s-none); }
.status.ib-returned::before { background: #d08a00; }
.status.ib-submitted::before { background: var(--s-owner); }
.status.ib-posted::before { background: var(--s-occupied); }
.status.ib-cancelled::before { background: var(--danger); }
td.wrap { white-space: normal; max-width: 340px; }
.note-banner.ok { border-color: var(--s-occupied); }

.page-tabs { padding: 0; margin: 0 0 16px; }
.tab-body.narrow { max-width: 920px; }

/* side bar groups (Finance → Invoicing, Receivables, Payables, General ledger) */
.module-group-btn { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--radius); color: var(--side-ink); cursor: pointer; font-size: 14px; font-weight: 500; }
.module-group-btn svg { width: 16px; height: 16px; flex: none; opacity: .85; }
.module-group-btn:hover, .module-group-btn:focus-visible { background: rgba(255,255,255,.08); color: #fff; }
.module-group-btn:focus-visible { outline: 2px solid var(--accent); }
.module-group-btn[data-current] { color: #fff; }
.module-group-btn .gchev { margin-inline-start: auto; font-style: normal; opacity: .6; transition: transform .15s; }
.module-group-btn[aria-expanded="false"] .gchev { transform: rotate(-90deg); }
.module-group { margin: 0 0 4px; padding-inline-start: 14px; border-inline-start: 1px solid rgba(255,255,255,.12); margin-inline-start: 18px; }
.module-group .module { padding: 6px 10px; }

/* My dashboard */
.module .mcount { margin-inline-start: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; min-width: 18px; padding: 1px 6px; border-radius: 9px; text-align: center; }
.module .mcount + .chev { margin-inline-start: 6px; }
a.figure { color: inherit; text-decoration: none; }
a.figure:hover { background: var(--accent-soft); }
.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li + li { border-top: 1px solid var(--line); }
.task-list a { display: flex; align-items: center; gap: 12px; padding: 11px 16px; color: inherit; text-decoration: none; }
.task-list a:hover { background: var(--accent-soft); }
.task-list span { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.task-list small { color: var(--ink-3); font-size: 12.5px; }
.task-list small.warn-t { color: var(--danger); }
.task-list em { font-style: normal; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }
.task-list .tcount { min-width: 36px; text-align: center; font-size: 17px; color: var(--accent); }
.task-list .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--s-occupied); }
.task-list .dot.returned { background: #d08a00; }
.task-list .dot.changed { background: #3b6fd0; }
.seg.small button { font-size: 12.5px; padding: 4px 9px; }
.tag.warn { background: var(--danger-soft); color: var(--danger); }

/* approval rules */
.ar-level { display: flex; gap: 10px; align-items: baseline; padding: 2px 0; flex-wrap: wrap; }
.ar-range { min-width: 170px; color: var(--ink-3); font-size: 13px; }
.ar-edit { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; margin: 0 0 10px; }
.ar-edit legend { font-weight: 600; padding: 0 4px; }
.ar-roles { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 0; }
.ar-roles .pick { display: inline-flex; gap: 6px; align-items: center; }

/* renewals and notices */
.status.rn-not_started::before { background: var(--s-none); }
.status.rn-offered::before { background: var(--s-owner); }
.status.rn-negotiating::before { background: #d08a00; }
.status.rn-accepted::before, .status.rn-renewed::before { background: var(--s-occupied); }
.status.rn-vacating::before, .status.rn-holding_over::before { background: var(--danger); }
.notice-dates { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin: 0 0 12px; }
.notice-dates .btn { margin-inline-start: auto; }
.ok-text { color: var(--s-occupied); }

/* intercompany */
.status.ic-mirrored::before, .status.ic-matched::before { background: var(--s-occupied); }
.status.ic-unmatched::before { background: #d08a00; }
.ic-pair .figures { margin: 0 18px 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 12px 0; }
/* banking */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.btn.small { padding: 3px 9px; font-size: 12.5px; }
.rec-sheet table.rec td { padding: 9px 14px; }
.rec-sheet table.rec td:nth-child(2), .rec-sheet table.rec td:nth-child(3) { width: 160px; }
@media print { .rec-sheet { break-inside: avoid; } }
table.report tr.rhead td { background: var(--paper); font-weight: 600; padding-top: 14px; border-top: 1px solid var(--line); }
table.report tr.rsub td { border-top: 1px solid var(--line); background: var(--surface); }
/* credit control */
.letter-body { line-height: 1.6; font-size: 14px; max-width: 760px; }

/* VAT return */
.tabs a.tab { padding: 10px 10px; color: var(--ink-3); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs a.tab.active { color: var(--ink); border-color: var(--accent); }
.page > .tabs { margin: 0 0 16px; padding: 0; }
.vat-boxes td.code { width: 3.2em; font-weight: 600; }
.vat-boxes tr.sub td { font-weight: 600; background: var(--surface-2, transparent); }
.vat-checks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 6px; }
.vat-checks li.ok { color: var(--ink-2); }
.vat-checks li.warn { color: var(--warn, #9a5b00); font-weight: 500; }
.vat-boxes td:nth-child(2) { min-width: 13em; }
@media (max-width: 700px) { #vatf { flex-wrap: wrap; } #vatf select { max-width: 100%; } .tabs { flex-wrap: nowrap; } }
@media (max-width: 700px) { dl.facts { grid-template-columns: fit-content(60%) minmax(0, 1fr); } dl.facts dt { overflow-wrap: anywhere; } }
.ct-lines td.sign { width: 1.5em; text-align: center; color: var(--ink-3); }
.ct-lines tr.sub td { font-weight: 600; }
.grid-2 > *, .stack > * { min-width: 0; }
@media (max-width: 700px) { .vat-boxes td:nth-child(2) { min-width: 9em; } }
.note-banner.approver-edits ul { margin: 6px 0 0; padding-left: 18px; }
.note-banner.approver-edits li { margin: 2px 0; }
/* ---------- period close ---------- */
.close-list { list-style: none; margin: 0; padding: 0; }
.close-list li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 12px 18px; border-top: 1px solid var(--line); }
.close-list li i { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 13px; color: #fff; background: var(--ink-3); }
.close-list li.cl-ok i { background: #1f8a5b; } .close-list li.cl-block i { background: #c0392b; } .close-list li.cl-warn i { background: #d08a00; } .close-list li.cl-na i { background: #b8bfc8; }
.close-list .muted { margin-top: 2px; }
tr.selected td { background: var(--surface-2, rgba(0,0,0,.03)); font-weight: 600; }
/* ---------- budgets ---------- */
.budget-grid td, .budget-grid th { white-space: nowrap; }
.budget-grid tr.total td { border-top: 2px solid var(--ink-3); }
.month-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.month-grid label { display: grid; gap: 2px; font-size: 12.5px; color: var(--ink-2); }
.inline-row { display: flex; gap: 8px; align-items: center; } .inline-row input { flex: 1; }
@media (max-width: 700px) { .month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cf-grid td, .cf-grid th { white-space: nowrap; }
.cf-grid tr.total td { border-top: 2px solid var(--ink-3); }
/* service charge */
ul.checks-list { list-style: none; margin: 0; padding: 14px 18px; display: grid; gap: 8px; font-size: 13px; }
ul.checks-list li { padding-left: 22px; position: relative; } ul.checks-list li::before { position: absolute; left: 0; font-weight: 700; }
ul.checks-list li.warn::before { content: "!"; color: var(--danger); } ul.checks-list li.info::before { content: "i"; color: var(--muted, #888); }
.panel-head { flex-wrap: wrap; gap: 8px; } .panel-head .actions { display: flex; flex-wrap: wrap; gap: 6px; }
/* shopping malls: who has each casual space, day by day */
.cgrid th, .cgrid td { padding: 4px 2px; min-width: 18px; font-size: 11px; text-align: center; }
.cgrid td:first-child, .cgrid th:first-child { text-align: start; padding-inline: 8px; min-width: 60px; }
.cgrid td.on { background: var(--s-occupied); }
.cgrid td.on.tentative { background: var(--s-reserved); }
/* documents: merged letters */
.doc-sheet { font-size: 14px; line-height: 1.55; }
.doc-sheet h1 { font-size: 20px; margin: 4px 0 12px; }
.doc-sheet table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.doc-sheet td, .doc-sheet th { border: 1px solid var(--line); padding: 4px 8px; text-align: start; }
.doc-preview { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 12px 18px; background: var(--surface); }
/* workspace: favourites, recently viewed, star and new window */
.ws-favs { padding: 0 8px 4px; }
.ws-list { padding: 2px 0 6px; }
.ws-item { display: flex; align-items: center; gap: 4px; }
.ws-item a { flex: 1; min-width: 0; color: var(--side-ink); text-decoration: none; font-size: 13px; padding: 5px 10px 5px 34px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-item a:hover { background: var(--side-active); }
.ws-item.recent a { opacity: .75; }
.ws-x { all: unset; cursor: pointer; color: var(--side-ink); opacity: .5; font-size: 11px; padding: 2px 6px; }
.ws-x:hover { opacity: 1; }
.ws-sub { color: var(--side-ink); opacity: .55; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px 2px 34px; }
.ws-empty { color: var(--side-ink); opacity: .6; font-size: 12px; padding: 2px 10px 6px 34px; margin: 0; }
.ws-tools { display: inline-flex; gap: 2px; vertical-align: middle; margin-inline-start: 8px; }
.ws-star, .ws-win { all: unset; cursor: pointer; color: var(--ink-3); padding: 3px; border-radius: 6px; line-height: 0; }
.ws-star:hover, .ws-win:hover { background: var(--line-2); color: var(--ink); }
.ws-star.on { color: #d9a400; }
.mi-row { display: flex; align-items: center; }
.mi-row .mi { flex: 1; }
.mi-star { all: unset; cursor: pointer; color: var(--ink-3); opacity: 0; font-size: 13px; padding: 2px 6px; }
.mi-row:hover .mi-star, .mi-star:focus-visible, .mi-star.on { opacity: 1; }
.mi-star.on { color: #d9a400; }
/* dashboards */
.db-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.db-tile { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); text-decoration: none; }
a.db-tile[href]:hover { border-color: var(--accent); }
.db-tile.warn { border-left: 4px solid #d9a400; } .db-tile.bad { border-left: 4px solid var(--danger); }
.db-label { color: var(--ink-3); font-size: 12.5px; } .db-value { font-size: 22px; font-weight: 650; } .db-sub { color: var(--ink-3); font-size: 12px; }
.db-pbody { padding: 6px 16px 14px; }
.db-bars { display: flex; flex-direction: column; gap: 6px; }
.db-bar { display: grid; grid-template-columns: minmax(90px, 34%) 1fr auto; gap: 10px; align-items: center; color: var(--ink); text-decoration: none; font-size: 13px; }
.db-bl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .db-bv { text-align: end; font-variant-numeric: tabular-nums; } .db-bv small { color: var(--ink-3); }
.db-track { height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; } .db-fill { display: block; height: 100%; background: var(--accent); border-radius: 5px; } .db-fill.neg { background: var(--danger); }
.db-cols { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; height: 170px; align-items: end; }
.db-col { display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; font-size: 11px; }
.db-cbar { width: 70%; background: var(--accent); border-radius: 4px 4px 0 0; position: relative; display: flex; align-items: flex-end; min-height: 1px; }
.db-cbar2 { width: 100%; background: #d9a400; border-radius: 4px 4px 0 0; }
.db-cv { color: var(--ink-3); margin-bottom: 2px; } .db-cl { color: var(--ink-3); margin-top: 4px; }
.db-legend { font-size: 12px; color: var(--ink-3); margin-top: 6px; } .db-legend span { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin: 0 4px 0 10px; } .db-legend .k1 { background: var(--accent); } .db-legend .k2 { background: #d9a400; }
.db-cols { overflow-x: auto; } .db-col { min-width: 30px; }
.panel code { overflow-wrap: anywhere; }
@media (max-width: 760px) { .db-cv { display: none; } .db-bar { grid-template-columns: minmax(70px, 38%) 1fr auto; } }
/* inventory: item lines in stock forms */
.iv-lines { display: grid; gap: 6px; margin-bottom: 6px; }
.iv-line { display: grid; grid-template-columns: minmax(0, 1fr) 96px auto auto; gap: 6px; align-items: center; }
.iv-line:has(input[name=unit_cost]) { grid-template-columns: minmax(0, 1fr) 90px 100px auto; }
.iv-line select, .iv-line input { width: 100%; min-width: 0; }
@media (max-width: 560px) { .iv-line, .iv-line:has(input[name=unit_cost]) { grid-template-columns: 1fr 1fr auto; } .iv-line select { grid-column: 1 / -1; } }
@media (max-width: 560px) { .filters > select, .filters > input { max-width: 100%; min-width: 0; } }
#iv-wo > .panel { margin: 16px 0; }
/* correspondence */
.cr-dir { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.cr-dir.in { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.cr-dir.out { background: color-mix(in srgb, var(--ink-3) 14%, transparent); color: var(--ink-2, var(--ink)); }
.cr-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; text-align: center; background: var(--line); color: var(--ink); }
.cr-count.late { background: #c0392b; color: #fff; }
tr.cr-here td { font-weight: 600; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.cr-panel, #docs-panel { margin-top: 16px; }
.cr-tabs { flex-wrap: wrap; row-gap: 0; }
/* leasing CRM */
.crm-pipe { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin: 0 0 16px; }
.crm-stage { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); text-decoration: none; }
.crm-stage .label { font-size: 12px; color: var(--ink-3); } .crm-stage b { font-size: 20px; } .crm-stage .muted { font-size: 11px; }
.crm-stage.active { border-color: var(--accent); box-shadow: inset 0 -3px 0 var(--accent); }
.crm-stage.s-won b { color: var(--accent); } .crm-stage.s-lost b { color: var(--ink-3); }
.cr-late { color: #c0392b; font-weight: 600; } .cr-due { color: #b9770e; font-weight: 600; }
/* interfaces */
.if-group { font-size: 15px; margin: 22px 0 10px; color: var(--ink-2, var(--ink)); }
.if-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); gap: 16px; }
.if-card .panel-body { display: flex; flex-direction: column; gap: 8px; }
.if-list { margin: 0; padding-left: 18px; } .if-list li { margin: 2px 0; }
.if-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

/* ------------------------------------------------------------------ service charge information pack */
.sc-pack { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 28px 32px; max-width: 1100px; }
.sc-pack section { margin-top: 26px; }
.sc-pack h2 { font-size: 17px; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--accent-soft); }
.sc-pack h3 { font-size: 14px; margin: 16px 0 6px; color: var(--ink-2); }
.scp-cover h2 { font-size: 26px; border: 0; margin: 4px 0 2px; padding: 0; }
.scp-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; color: var(--accent); font-weight: 600; }
.scp-draft { margin-inline-start: 8px; padding: 1px 8px; border-radius: 9px; background: var(--warn-soft, #fff4d6); color: var(--warn, #8a5a00); letter-spacing: 0; text-transform: none; }
.scp-meta { color: var(--ink-2); margin-bottom: 12px; }
.scp-note { width: 100%; min-width: 220px; font: inherit; font-size: 13px; }
.scp-notes { margin: 0; padding-inline-start: 18px; color: var(--ink-2); line-height: 1.6; }
@page pack { size: A4 portrait; margin: 14mm; }
@media print {
  .sc-pack { page: pack; border: 0; padding: 0; max-width: none; font-size: 10px; }
  .sc-pack .scp-break { break-before: page; }
  .sc-pack section { break-inside: auto; }
  .sc-pack table { break-inside: auto; }
  .sc-pack tr { break-inside: avoid; }
}
.sce-note { width: 100%; min-width: 220px; font: inherit; font-size: 13px; }
tr.flag-row td { background: var(--warn-soft, #fff8e6); }
.cm-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 18px; }
.cm-kind { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: inherit; text-decoration: none; }
.cm-kind:hover { border-color: var(--accent); }
.cm-kind span { color: var(--ink-2); font-size: 13px; }
.cm-kind.off { opacity: .5; pointer-events: none; }
.cm-compose textarea { width: 100%; font: inherit; font-size: 13.5px; }
.cm-compose input:not([type=checkbox]) { width: 100%; }
.cm-pick { max-height: 520px; overflow-y: auto; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; }
/* the documents panel lights up briefly when the Documents button jumps to it */
.panel.flash { box-shadow: 0 0 0 3px var(--accent, #1f7a6d); transition: box-shadow .3s; }
/* service charge buildings: groups of tabs above the tabs */
.scb-groups { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.scb-group { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line, #d9e1e7); color: var(--muted, #5b6b82); text-decoration: none; font-size: 13px; }
.scb-group.active { background: var(--accent, #1f7a6d); border-color: var(--accent, #1f7a6d); color: #fff; }
.scb-doc-head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.scb-doc-to { border: 1px solid var(--line, #d9e1e7); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }

/* setup and data */
.status.ok::before { background: var(--s-occupied); } .status.warn::before { background: #b7791f; } .status.bad::before { background: var(--danger); }
.perm-grid th.rot { font-size: 12px; white-space: normal; min-width: 72px; vertical-align: bottom; }
.perm-grid td.num { text-align: center; } .perm-grid .tick { color: var(--accent); font-weight: 700; }
.perm-grid tr.group td { background: var(--bg-2, #f6f7f8); }

/* top bar: one search, approvals, + New */
.gsearch { position: relative; }
.gsearch input { min-width: 340px; }
.gs-pop { position: absolute; top: calc(100% + 6px); inset-inline-start: 0; width: min(560px, 92vw); max-height: 70vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 60; padding: 6px 0; }
.gs-group + .gs-group { border-top: 1px solid var(--line); }
.gs-h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); padding: 8px 14px 4px; }
.gs-hit { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 12px; padding: 7px 14px; color: inherit; text-decoration: none; }
.gs-hit span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gs-hit:hover, .gs-hit.on { background: var(--accent-soft); }
.gs-empty { padding: 12px 14px; color: var(--ink-2); }
.tb-approvals { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: #fff4d6; color: #7a5200; font-size: 13px; text-decoration: none; margin-inline-end: 8px; }
.tb-approvals b { background: #7a5200; color: #fff; border-radius: 999px; padding: 0 7px; font-size: 12px; }
.tb-new { position: relative; margin-inline-end: 8px; }
.tb-new-pop { position: absolute; top: calc(100% + 6px); inset-inline-end: 0; min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px rgba(0,0,0,.14); z-index: 60; padding: 6px 0; }
.tb-new-pop button { display: block; width: 100%; text-align: start; padding: 8px 14px; background: none; border: 0; font: inherit; color: inherit; cursor: pointer; }
.tb-new-pop button:hover { background: var(--accent-soft); }
@media (max-width: 900px) { .gsearch input { min-width: 0; width: 100%; } .tb-approvals span { display: none; } }

/* v59: portal messages */
.msg-layout { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 860px) { .msg-layout { grid-template-columns: 1fr; } }
.msg-list { max-height: 70vh; overflow: auto; }
.msg-item { display: block; padding: 10px 14px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.msg-item .row { display: flex; justify-content: space-between; gap: 8px; }
.msg-item .muted { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-item.active, .msg-item:hover { background: var(--line-2); }
.msg-item .badge { background: var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.bubbles { display: flex; flex-direction: column; gap: 8px; padding: 14px; max-height: 56vh; overflow: auto; }
.bub { max-width: 78%; padding: 9px 12px; border-radius: 12px; }
.bub small { display: block; margin-top: 4px; font-size: 11px; opacity: .75; }
.bub.them { align-self: flex-start; background: var(--line-2); }
.bub.us { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.msg-reply { display: flex; gap: 8px; align-items: flex-end; padding: 0 14px 14px; }
.msg-reply textarea { flex: 1; }
.msg-item, .msg-item:hover, .msg-item * { text-decoration: none; }
#vl-f input[type=date], #vl-f select { width: auto; }
/* v60: inspection photos and signatures */
.ix-photos, .ix-sigs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 10px; }
.ix-photos figure, .ix-sigs figure { margin: 0; }
.ix-ph { width: 120px; height: 90px; border: 1px solid var(--line); border-radius: 8px; background: var(--line-2) center/cover no-repeat; cursor: pointer; display: block; }
.ix-photos figcaption, .ix-sigs figcaption { font-size: 12px; color: var(--ink-3); max-width: 120px; margin-top: 4px; }
.ix-sigs img { height: 90px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ix-sigs figcaption { max-width: 280px; }
/* v61: dashboard filters, views and Excel */
.db-filters { flex-wrap: wrap; gap: 8px; align-items: center; }
.db-pick, .db-views { position: relative; display: inline-block; }
.db-menu { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; }
.db-views .db-menu { left: auto; right: 0; }
.db-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.db-menu > a, .db-vrow a { display: block; padding: 6px 10px; color: var(--ink); text-decoration: none; border-radius: 6px; }
.db-menu > a:hover, .db-vrow a:hover { background: var(--line-2); }
.db-vrow { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.db-vrow a { flex: 1; }
.db-pmenu input[type=search] { width: 100%; margin-bottom: 6px; }
.db-plist { max-height: 260px; overflow: auto; display: flex; flex-direction: column; }
.db-plist label { display: flex; gap: 8px; align-items: center; padding: 4px 6px; border-radius: 6px; cursor: pointer; font-size: 13.5px; }
.db-plist label:hover { background: var(--line-2); }
.db-pfoot { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; border-top: 1px solid var(--line); padding-top: 6px; }
.db-cw { font-size: 10.5px; font-weight: 500; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; margin-left: 4px; white-space: nowrap; vertical-align: middle; }
.db-wide { margin-bottom: 16px; }
@media (max-width: 560px) { .db-menu { position: fixed; left: 12px !important; right: 12px !important; top: 120px; } }

/* report builder */
.rb-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.rb-side { display: flex; flex-direction: column; gap: 12px; }
.rb-side .panel-body { display: flex; flex-direction: column; gap: 6px; padding-top: 4px; }
.rb-side textarea, .rb-side select, .rb-side input[type=text], .rb-side input[type=number] { width: 100%; min-width: 0; }
.rb-row { display: flex; gap: 6px; align-items: center; }
.rb-row.wrap { flex-wrap: wrap; }
.rb-row select, .rb-row input[type=text] { flex: 1 1 120px; }
.rb-row .btn.ghost { padding: 2px 8px; }
.rb-cols { max-height: 320px; overflow-y: auto; }
.rb-name { flex: 1 1 auto; font-size: 13px; color: var(--ink-2); }
.rb-lbl { font-size: 12px; color: var(--ink-3); margin-top: 6px; }
.rb-formula { flex-basis: 100% !important; font-family: var(--mono, monospace); }
.rb-main { min-width: 0; }
.section-title { font-size: 15px; margin: 18px 0 8px; }
@media (max-width: 900px) { .rb-grid { grid-template-columns: 1fr; } }
.rb-main { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; }
@media (max-width: 900px) { .rb-main { position: static; max-height: none; } }
table.data tr.hl td { background: var(--accent-soft, #e3f1ee); }
.drawer .checks { max-height: 170px; overflow-y: auto; padding: 4px 0; }
/* type-ahead list (accounts, expense types) */
.ta-pop { position: fixed; z-index: 2000; max-height: 320px; overflow: auto; background: var(--surface, #fff); border: 1px solid var(--line, #d6dde3); border-radius: 8px; box-shadow: 0 8px 24px rgba(15, 30, 45, .16); padding: 4px; font-size: 13px; }
.ta-opt { padding: 6px 10px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.ta-opt.on, .ta-opt:hover { background: var(--accent-soft, #e3f1ee); }
.ta-none { padding: 8px 10px; }

/* reminders and alerts (version 67) */
.letter-box { border: 1px solid var(--line, #d9dee3); border-radius: 8px; padding: 12px 14px; margin: 8px 0 16px; background: var(--paper, #fff); }
pre.letter { white-space: pre-wrap; font-family: inherit; font-size: 14px; line-height: 1.55; margin: 8px 0 0; }
.letter-page { page-break-after: always; padding: 24px 0; }
.figure .value.small { font-size: 18px; }

/* multi-select dropdown (v72) */
details.ms { position: relative; }
details.ms > summary.ms-sum { list-style: none; cursor: pointer; border: 1px solid var(--line, #cfd6dd); border-radius: 8px; padding: 9px 34px 9px 12px; background: var(--paper, #fff);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; min-height: 20px; }
details.ms > summary.ms-sum::-webkit-details-marker { display: none; }
details.ms > summary.ms-sum::after { content: ""; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); opacity: .6; }
details.ms[open] > summary.ms-sum { border-color: var(--accent, #0f766e); }
details.ms .ms-pop { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); background: var(--paper, #fff); border: 1px solid var(--line, #cfd6dd); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: 8px; min-width: 240px; }
details.ms .ms-q { width: 100%; margin-bottom: 6px; }
details.ms .ms-tools { display: flex; gap: 6px; margin-bottom: 4px; }
details.ms .ms-list { max-height: 260px; overflow: auto; display: flex; flex-direction: column; }
details.ms .ms-row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-weight: normal; }
details.ms .ms-row:hover { background: var(--accent-soft, #e3f1ee); }
details.ms .ms-row input { width: auto; margin: 0; }

.filters .filter-acts { display: inline-flex; gap: 6px; }

/* lease form: the space picker (v74) */
.pk-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 4px 0 8px; }
.pk-filters .ms { min-width: 150px; }
.pk-filters .pk-q { flex: 1 1 180px; min-width: 160px; }
.pk-free { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; white-space: nowrap; }
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.pk-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--accent); font-size: 13px; font-weight: 500; }
.pk-chip button { border: 0; background: none; cursor: pointer; color: var(--ink-3); padding: 0 6px; font-size: 12px; }
.pk-table { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.pk-table tr.on td { background: var(--accent-soft); }
.pk-table tr.busy td { color: var(--ink-3); }
.pk-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; margin-top: 6px; }
.tag.ok { background: var(--accent-soft); color: var(--accent); }
.pk-table td { white-space: nowrap; } .pk-table td:last-child { white-space: normal; min-width: 220px; }
