/* Shieldstone Housing — "Horizon" design system: navy sidebar, indigo accent, soft white cards, generous spacing */
:root {
  --bg: #F4F5FA;
  --paper: var(--bg);
  --paper-2: #ECEEF6;
  --card: #FFFFFF;
  --surface-2: #F8F9FC;
  --hover: #F6F7FC;
  --input: #FFFFFF;
  --line: #E4E7F0;
  --line-2: #EEF0F6;
  --ink: #111833;
  --ink-2: #1F2A4D;
  --ink-3: #4338CA;
  --text: #1F2638;
  --muted: #6B7287;
  --muted-2: #9BA1B4;

  --accent: #4F46E5;
  --accent-2: #4338CA;
  --accent-soft: #EEF0FF;
  --accent-ring: rgba(79, 70, 229, .18);
  /* former names, kept so every screen follows the new palette */
  --gold: var(--accent); --gold-2: var(--accent-2); --gold-soft: var(--accent-soft);

  --green: #059669; --green-soft: #E6F7EF;
  --red: #DC2626; --red-soft: #FDECEC;
  --amber: #D97706; --amber-soft: #FEF3E2;
  --blue: #2563EB; --blue-soft: #E8F0FE;
  --violet: #7C3AED; --violet-soft: #F1EBFE;
  --orange: #EA580C; --orange-soft: #FFF0E6;
  --teal: #0D9488; --teal-soft: #E5F6F4;

  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sans: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--display);
  --mono: "SF Mono", Menlo, Consolas, monospace;
  --radius: 18px;
  --radius-s: 12px;
  --radius-xs: 9px;
  --shadow: 0 1px 2px rgba(17, 24, 51, .04), 0 12px 32px -20px rgba(17, 24, 51, .22);
  --shadow-lg: 0 2px 4px rgba(17, 24, 51, .04), 0 22px 44px -22px rgba(17, 24, 51, .38);
  --sidebar-w: 256px;
  --gap: 24px;
  --c1: #4F46E5; --c2: #F59E42; --c3: #10B981; --c4: #EF4444; --c5: #38BDF8; --c6: #A78BFA; --c7: #2DD4BF; --c8: #F472B6;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans); font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; overflow: hidden; line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--ink-3); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; color: var(--ink); margin: 0; letter-spacing: -.015em; }
::selection { background: var(--accent-soft); }
.ic { flex: none; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #0E1A3B 0%, #111F47 55%, #0C1632 100%); color: #DCE1F0; display: flex; flex-direction: column;
  position: relative; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; } .sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 6px; }
.is-mac.is-electron .sidebar { padding-top: 24px; }
.brand { display: flex; align-items: center; justify-content: flex-start; padding: 22px 26px 18px; -webkit-app-region: drag; }
.brand-logo { width: 150px; height: auto; display: block; }
.brand svg { flex: none; }
.brand-name { font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: .02em; color: #fff; }
.brand-sub { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: #A5B4FC; margin-top: 3px; }
.nav { padding: 2px 16px 22px; flex: 1; position: relative; z-index: 1; }
.nav-section { font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgba(214,222,245,.38); padding: 20px 14px 8px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin: 2px 0; border-radius: 12px; color: #B4BDD6; text-decoration: none;
  font-size: 13.5px; font-weight: 500; position: relative; transition: background .15s, color .15s, box-shadow .15s;
}
.nav a svg { width: 19px; height: 19px; opacity: .8; flex: none; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: linear-gradient(135deg, #5B54F0, #4F46E5); color: #fff; box-shadow: 0 12px 24px -12px rgba(79,70,229,.95); }
.nav a.active svg { opacity: 1; color: #fff; }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; background: #EF4444; color: #fff; border-radius: 10px; padding: 1px 8px; line-height: 17px; }
.nav .count.soft { background: rgba(165,180,252,.18); color: #C7D2FE; }
.nav a.active .count { background: #fff; color: var(--accent); }
.sidebar-foot { padding: 64px 26px 22px; font-size: 11.5px; color: rgba(214,222,245,.5); position: relative; }
.sidebar-foot > *:not(.skyline) { position: relative; z-index: 1; }
.sidebar-foot .foot-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none; z-index: 0; }
.skyline svg { width: 100%; height: 100%; display: block; }
.lang-switch { display: inline-flex; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 3px; }
.lang-switch button { border: 0; background: transparent; color: rgba(214,222,245,.7); font-size: 11.5px; font-weight: 700; letter-spacing: .06em; padding: 5px 11px; border-radius: 7px; cursor: pointer; }
.lang-switch button:hover { color: #fff; }
.lang-switch button.on { background: var(--accent); color: #fff; }
.req { color: var(--accent); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar {
  display: flex; align-items: center; gap: 16px; padding: 16px 40px; min-height: 78px;
  background: rgba(255,255,255,.82); backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line); -webkit-app-region: drag; position: relative; z-index: 20;
}
.topbar * { -webkit-app-region: no-drag; }
.content { flex: 1; overflow-y: auto; padding: 34px 40px 72px; }
.content-inner { max-width: 1520px; margin: 0 auto; }

/* search */
.search { position: relative; flex: 0 1 460px; min-width: 220px; }
.search > .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted-2); pointer-events: none; }
.search input[type=search] {
  height: 46px; padding: 0 64px 0 44px; border-radius: 14px; background: var(--bg); border: 1px solid transparent; font-size: 14px;
}
.search input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input[type=search]:focus { background: var(--input); border-color: var(--accent); }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 11px; font-weight: 600; color: var(--muted); background: var(--card); border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; pointer-events: none; }
.pop { position: absolute; top: calc(100% + 10px); background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 60; animation: rise .14s ease; }
.search .pop { left: 0; right: 0; max-height: 440px; overflow-y: auto; }
.pop-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; cursor: pointer; text-decoration: none; color: var(--text); }
.pop-item:hover, .pop-item.sel { background: var(--hover); }
.pop-item .pi-ic { width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.pop-item .pi-ic svg { width: 17px; height: 17px; }
.pop-item .grow { flex: 1; min-width: 0; }
.pop-item .t, .pop-item .m { display: block; }
.pop-item .t { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-item .m { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pop-item mark { background: none; color: var(--accent); font-weight: 700; }
.pop-head { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); padding: 8px 12px 4px; }
.pop-empty { padding: 18px 14px; color: var(--muted); font-size: 13px; text-align: center; }
.pop-foot { border-top: 1px solid var(--line-2); margin: 6px -8px -8px; padding: 10px 18px; font-size: 12.5px; }
.pop-foot a { font-weight: 600; text-decoration: none; }

.icon-btn { position: relative; width: 46px; height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s, border-color .12s; flex: none; }
.icon-btn:hover { background: var(--hover); border-color: #D6DAE8; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .bubble { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #EF4444; color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid var(--card); }
.bell-wrap { position: relative; }
.bell-wrap .pop { right: 0; width: 380px; }
.zoom-ctl { display: inline-flex; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; height: 46px; padding: 4px; gap: 2px; flex: none; }
.zoom-ctl button { border: 0; background: transparent; color: var(--ink-2); height: 36px; min-width: 34px; border-radius: 10px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 12.5px; font-weight: 650; }
.zoom-ctl button:hover:not(:disabled) { background: var(--hover); }
.zoom-ctl button:disabled { opacity: .35; cursor: default; }
.zoom-ctl button svg { width: 16px; height: 16px; }
.zoom-ctl .zoom-val { min-width: 56px; color: var(--muted); font-variant-numeric: tabular-nums; }
.zoom-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.zoom-row > div:first-child { flex: 1; min-width: 260px; }
.brand-mark { display: none; width: 46px; height: auto; }
.top-sep { width: 1px; height: 30px; background: var(--line); flex: none; }

/* company / profile chip */
.company-switch { display: flex; align-items: center; gap: 11px; background: transparent; border: 1px solid transparent; color: var(--ink); border-radius: 14px; padding: 5px 10px 5px 5px; cursor: pointer; text-align: left; -webkit-app-region: no-drag; max-width: 280px; }
.company-switch:hover { background: var(--hover); border-color: var(--line); }
.company-switch .who { min-width: 0; display: flex; flex-direction: column; }
.company-switch .who b { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.company-switch .who small { font-size: 11.5px; color: var(--muted); }
.company-switch > svg { width: 15px; height: 15px; color: var(--muted-2); flex: none; transform: rotate(90deg); }
.company-switch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-avatar { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #6366F1, #8B5CF6); color: #fff; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; flex: none; letter-spacing: .02em; }

/* page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 13px; font-weight: 500; color: var(--muted); margin-bottom: 6px; }
.page-head h1 { font-size: 30px; line-height: 1.15; letter-spacing: -.025em; }
.page-head .ph-sub { margin: 7px 0 0; color: var(--muted); font-size: 14.5px; }
.page-head .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.page-head .actions select { width: auto; }

/* ---------- Building blocks ---------- */
.grid { display: grid; gap: var(--gap); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1280px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1, .g-1-2 { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stack > * + * { margin-top: var(--gap); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.mt { margin-top: var(--gap); } .mt-s { margin-top: 12px; } .mb { margin-bottom: var(--gap); }

.card { background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 24px 14px; }
.card-h h3 { font-size: 17px; font-weight: 700; }
.card-h .sub { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.card-b { padding: 18px 24px 24px; }
.card-h + .card-b { padding-top: 6px; }
.card > .card-b:first-child { padding-top: 22px; }
.card-b.flush, .card-h + .card-b.flush { padding: 0 0 6px; }
.card-f { padding: 16px 24px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }

.kpi { padding: 22px 24px; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.kpi .lab { font-size: 13px; color: var(--muted); font-weight: 500; }
.kpi .val { font-family: var(--display); font-size: 28px; font-weight: 700; color: var(--ink); margin-top: 6px; line-height: 1.1; white-space: nowrap; letter-spacing: -.025em; }
.kpi .val.pos { color: var(--green); } .kpi .val.neg { color: var(--red); }
.kpi .cap { font-size: 12.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.kpi .progress { margin-top: 14px; }
.kpi.has-ic { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; align-content: start; }
.kpi.has-ic .lab { font-weight: 600; color: var(--ink-2); line-height: 1.3; }
.kpi.has-ic .val { grid-column: 1 / -1; margin-top: 18px; font-size: 30px; }
.kpi.has-ic > .progress, .kpi.has-ic > .cap, .kpi.has-ic > .kpi-foot { grid-column: 1 / -1; }
.kpi.has-ic > .cap { margin-top: 10px; }
.kpi-ic { width: 46px; height: 46px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }
.kpi-ic svg { width: 22px; height: 22px; }
.kpi-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.kpi-foot .cap { margin: 0; }
.tone-indigo { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.tone-green { --tone: var(--green); --tone-soft: var(--green-soft); }
.tone-red { --tone: var(--red); --tone-soft: var(--red-soft); }
.tone-amber { --tone: var(--amber); --tone-soft: var(--amber-soft); }
.tone-blue { --tone: var(--blue); --tone-soft: var(--blue-soft); }
.tone-violet { --tone: var(--violet); --tone-soft: var(--violet-soft); }
.tone-orange { --tone: var(--orange); --tone-soft: var(--orange-soft); }
.tone-teal { --tone: var(--teal); --tone-soft: var(--teal-soft); }
[class*="tone-"] .kpi-ic, .ic-tile[class*="tone-"] { background: var(--tone-soft); color: var(--tone); }
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--paper-2); color: var(--muted); white-space: nowrap; }
.trend.good { background: var(--green-soft); color: var(--green); }
.trend.bad { background: var(--red-soft); color: var(--red); }
.trend svg { width: 13px; height: 13px; stroke-width: 2.4; }
.trend.down svg { transform: scaleY(-1); }
.ic-tile { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.ic-tile svg { width: 19px; height: 19px; }

.eyebrow-s { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.pos { color: var(--green); } .neg { color: var(--red); } .warn { color: var(--amber); }
.serif { font-family: var(--display); font-weight: 700; }
.strong { font-weight: 600; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12px; }
.hr { height: 1px; background: var(--line-2); margin: 18px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  padding: 9px 16px; border-radius: var(--radius-s); cursor: pointer; font-size: 13.5px; font-weight: 600; white-space: nowrap; line-height: 1.3;
  transition: background .12s, border-color .12s, box-shadow .12s, transform .06s;
}
.btn:hover { border-color: #D3D7E6; background: var(--hover); }
a.btn, a.btn:hover { text-decoration: none; }
table.t a, .list a, .kv a { color: var(--ink-3); text-decoration: none; }
table.t a:hover, .list a:hover, .kv a:hover { text-decoration: underline; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary, .btn.gold { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 18px -10px rgba(79,70,229,.85); }
.btn.primary:hover, .btn.gold:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-3); box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { color: var(--red); }
.btn.danger.solid { background: var(--red); color: #fff; border-color: var(--red); }
.btn.sm { padding: 7px 12px; font-size: 12.5px; border-radius: 10px; gap: 6px; }
.btn.xs { padding: 4px 9px; font-size: 12px; border-radius: 8px; gap: 5px; }
.btn.sm svg, .btn.xs svg { width: 14px; height: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-group { display: inline-flex; background: var(--paper-2); border-radius: var(--radius-s); padding: 3px; gap: 2px; }
.btn-group .btn { border-color: transparent; background: transparent; box-shadow: none; border-radius: 9px; padding: 6px 12px; }
select.btn, .btn-group select.btn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239BA1B4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; min-height: 0; }
.btn-group .btn.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(17,24,51,.12); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; border: 1px solid transparent; line-height: 1.45; }
.badge:before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.paid, .badge.active, .badge.ok { background: var(--green-soft); color: var(--green); }
.badge.partial, .badge.upcoming, .badge.soon { background: var(--amber-soft); color: var(--amber); }
.badge.late, .badge.unpaid.late, .badge.danger { background: var(--red-soft); color: var(--red); }
.badge.unpaid, .badge.ended, .badge.neutral, .badge.draft { background: var(--paper-2); color: var(--muted); }
.badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.gold { background: var(--accent-soft); color: var(--accent-2); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.orange { background: var(--orange-soft); color: var(--orange); }
.badge.teal { background: var(--teal-soft); color: var(--teal); }
.badge.plain:before { display: none; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 12px 16px; border-bottom: 1px solid var(--line-2); border-top: 1px solid var(--line-2); background: var(--surface-2); position: sticky; top: 0; white-space: nowrap; }
table.t td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t th:first-child, table.t td:first-child { padding-left: 24px; }
table.t th:last-child, table.t td:last-child { padding-right: 24px; }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover td { background: var(--hover); }
table.t tr.clickable { cursor: pointer; }
table.t tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: none; background: var(--surface-2); }
table.t td.actions { text-align: right; white-space: nowrap; }
table.t td.actions .btn + .btn { margin-left: 4px; }
table.t .strong { font-weight: 600; color: var(--ink); }
table.t .pos, .kv .pos { color: var(--green); } table.t .neg, .kv .neg { color: var(--red); }
table.t.compact td { padding: 10px 8px; }
table.t.compact td:first-child { padding-left: 22px; }
table.t.compact td:last-child { padding-right: 18px; }
table.t tr.year td { background: var(--paper-2); font-weight: 600; color: var(--ink); }
table.t tr.done td { color: var(--muted-2); }
table.t tr.hl td { background: var(--accent-soft); }
.card > table.t:first-child th, .card > .table-wrap:first-child table.t th { border-top: 0; }
.card > table.t:first-child th:first-child, .card > .table-wrap:first-child table.t th:first-child { border-top-left-radius: var(--radius); }
.card > table.t:first-child th:last-child, .card > .table-wrap:first-child table.t th:last-child { border-top-right-radius: var(--radius); }
.card > table.t:last-child tbody tr:last-child td:first-child, .card > .table-wrap:last-child table.t tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
.card > table.t:last-child tbody tr:last-child td:last-child, .card > .table-wrap:last-child table.t tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }

.empty { text-align: center; padding: 48px 24px; color: var(--muted); }
.empty > svg { width: 30px; height: 30px; color: var(--green); background: var(--green-soft); border-radius: 50%; padding: 10px; box-sizing: content-box; }
.empty h3 { font-size: 19px; margin-bottom: 8px; }
.empty p { margin: 0 auto 18px; max-width: 540px; line-height: 1.6; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid.g3f { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.span2 { grid-column: span 2; }
.field.span3 { grid-column: 1 / -1; }
.field > label, .flabel { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.field .help { font-size: 12px; color: var(--muted-2); line-height: 1.45; }
.field .field-err { font-size: 12.5px; font-weight: 500; color: var(--red); line-height: 1.45; }
.field input.invalid, .field select.invalid { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 14%, transparent); }
.input, input[type=text], input[type=number], input[type=date], input[type=email], input[type=tel], input[type=month], input[type=time], input[type=password], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--input); border-radius: 11px; padding: 10px 13px; font-size: 13.5px; outline: none; min-height: 42px;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
select { padding-right: 34px; -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239BA1B4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 32px; }
.input-suffix span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); font-size: 13px; pointer-events: none; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.field > label.check { font-size: 13.5px; font-weight: 400; color: var(--text); }
.checklist { display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; border: 1px solid var(--line); border-radius: 11px; padding: 10px 13px; background: var(--input); }
.fieldset-title { grid-column: 1 / -1; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); margin-top: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); }
.filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 160px; }
.seg { display: inline-flex; background: var(--paper-2); border-radius: 12px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 9px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(17,24,51,.12); font-weight: 600; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(13, 19, 40, .45); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 24px; z-index: 50; overflow-y: auto; animation: fade .15s ease; }
.modal { background: var(--card); border-radius: 22px; width: 660px; max-width: 100%; box-shadow: 0 40px 90px -30px rgba(13, 19, 40, .55); border: 1px solid var(--line-2); animation: rise .18s ease; }
.modal.wide { width: 940px; } .modal.narrow { width: 480px; }
.modal-h { padding: 26px 28px 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.modal-h h2 { font-size: 21px; }
.modal-h .sub { font-size: 13px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.modal-b { padding: 16px 28px 24px; max-height: 70vh; overflow-y: auto; }
.modal-f { padding: 16px 28px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 22px 22px; }
.x { border: 0; background: var(--paper-2); width: 34px; height: 34px; font-size: 20px; line-height: 1; cursor: pointer; color: var(--muted); border-radius: 10px; flex: none; }
.x:hover { background: var(--line); color: var(--ink); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }

/* ---------- Toasts ---------- */
.toasts { position: fixed; left: calc(var(--sidebar-w) + 28px); bottom: 26px; display: flex; flex-direction: column; gap: 10px; z-index: 80; pointer-events: none; }
.login ~ .toasts, .ts ~ .toasts { left: 28px; }
.toast { pointer-events: auto; }
.toast { background: #141B38; color: #F1F3FA; padding: 13px 18px 13px 16px; border-radius: 14px; box-shadow: 0 18px 40px -16px rgba(13,19,40,.55); font-size: 13.5px; max-width: 440px; animation: rise .2s ease; border-left: 4px solid #818CF8; }
.toast.error { background: #4C1D24; border-left-color: #FCA5A5; }
.toast.ok { border-left-color: #34D399; }
.toast a { color: #C7D2FE; cursor: pointer; text-decoration: underline; margin-left: 6px; }

/* ---------- Charts ---------- */
.chart-wrap { width: 100%; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 4; }
svg.chart .grid.zero { stroke: #CDD2E1; stroke-dasharray: none; }
svg.chart .tick, svg.chart .xlab { fill: var(--muted-2); font-size: 11px; font-family: var(--sans); }
svg.chart .bar { transition: opacity .12s; }
svg.chart .bar:hover, svg.chart .slice:hover { opacity: .78; }
svg.chart .ln { stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
svg.chart .ln.dashed { stroke-dasharray: 6 5; }
svg.chart .area { opacity: .12; }
svg.chart .area.grad { opacity: 1; }
svg.chart .dot { stroke: var(--card); stroke-width: 2; }
svg.chart.smooth .dot { opacity: 0; transition: opacity .12s; }
svg.chart.smooth .dot:hover { opacity: 1; }
svg.chart.smooth .ln { stroke-width: 3; }
svg.chart .marker { stroke: var(--accent); stroke-dasharray: 3 3; }
.s1 { fill: var(--c1); stroke: var(--c1); color: var(--c1); } .s2 { fill: var(--c2); stroke: var(--c2); color: var(--c2); } .s3 { fill: var(--c3); stroke: var(--c3); color: var(--c3); } .s4 { fill: var(--c4); stroke: var(--c4); color: var(--c4); }
.s5 { fill: var(--c5); stroke: var(--c5); color: var(--c5); } .s6 { fill: var(--c6); stroke: var(--c6); color: var(--c6); } .s7 { fill: var(--c7); stroke: var(--c7); color: var(--c7); } .s8 { fill: var(--c8); stroke: var(--c8); color: var(--c8); }
.sL1 { fill: var(--c2); stroke: var(--c2); } .sL2 { fill: var(--c3); stroke: var(--c3); }
polyline.ln, path.ln { fill: none !important; }
svg.chart .bar, svg.chart .slice { stroke: none; }
svg.chart .area { stroke: none; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; padding-left: 46px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.sw.line { height: 4px; width: 16px; border-radius: 2px; }
.sw.s1 { background: var(--c1); } .sw.s2 { background: var(--c2); } .sw.s3 { background: var(--c3); } .sw.s4 { background: var(--c4); }
.sw.s5 { background: var(--c5); } .sw.s6 { background: var(--c6); } .sw.s7 { background: var(--c7); } .sw.s8 { background: var(--c8); }
.sw.sL1 { background: var(--c2); } .sw.sL2 { background: var(--c3); }
.donut-wrap { display: flex; align-items: center; gap: 26px; }
.donut-wrap svg { width: 176px; flex: none; }
.donut-total { font-family: var(--display); font-weight: 700; font-size: 17px; fill: var(--ink); }
.donut-sub { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); }
.donut-empty { stroke: var(--line-2); }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; font-size: 13px; }
.donut-legend li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.donut-legend li:last-child { border-bottom: 0; }
.donut-legend li span { flex: 1; color: var(--text); }
.progress { height: 8px; background: var(--paper-2); border-radius: 8px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); border-radius: 8px; }
.progress.gold span { background: var(--accent); }
.progress.green span { background: var(--green); }
.progress.red span { background: var(--red); }
svg.spark { width: 120px; height: 32px; }

/* ---------- Lists & misc ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; color: var(--ink); }
.list .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; letter-spacing: .02em; }
.avatar.a1 { background: #E0E7FF; color: #4338CA; } .avatar.a2 { background: #DCFCE7; color: #15803D; } .avatar.a3 { background: #FFE4E6; color: #BE123C; }
.avatar.a4 { background: #FEF3C7; color: #B45309; } .avatar.a5 { background: #E0F2FE; color: #0369A1; } .avatar.a6 { background: #F3E8FF; color: #7E22CE; }
.avatars { display: flex; align-items: center; }
.avatars .avatar { width: 34px; height: 34px; font-size: 12px; border: 2.5px solid var(--card); margin-left: -9px; }
.avatars .avatar:first-child { margin-left: 0; }
.avatars .more { background: var(--paper-2); color: var(--muted); }
.datechip { width: 50px; text-align: center; border: 1px solid var(--line); border-radius: 13px; background: var(--input); flex: none; overflow: hidden; }
.datechip .m { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--accent-soft); color: var(--accent-2); padding: 3px 0; }
.datechip .d { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); padding: 3px 0 4px; }

.prop-card { cursor: pointer; transition: transform .14s, box-shadow .14s; overflow: hidden; }
.prop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.prop-cover { height: 96px; border-radius: var(--radius) var(--radius) 0 0; position: relative; overflow: hidden; background: linear-gradient(135deg, #312E81 0%, #4F46E5 60%, #7C3AED 100%); }
.prop-cover .cover-mark { position: absolute; right: -8px; bottom: -20px; width: 120px; opacity: .14; }
.prop-cover .ptype { position: absolute; left: 22px; top: 18px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.82); }
.prop-cover h3 { position: absolute; left: 22px; bottom: 16px; right: 22px; color: #fff; font-size: 21px; }
.prop-cover .cover-badge { position: absolute; top: 14px; right: 14px; z-index: 1; }
.prop-cover .cover-badge .badge { background: rgba(255,255,255,.94); box-shadow: 0 4px 12px -6px rgba(0,0,0,.35); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat { display: flex; flex-direction: column; justify-content: space-between; }
.stat .k { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat .v { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--ink); margin-top: 3px; white-space: nowrap; letter-spacing: -.01em; }
.stat .v.pos, .spot-stats .v.pos { color: var(--green); } .stat .v.neg, .spot-stats .v.neg { color: var(--red); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; font-size: 13.5px; }
.kv > div:nth-child(odd) { color: var(--muted); }
.kv > div:nth-child(even) { text-align: right; font-weight: 500; }
.callout { border: 1px solid #DCE0FB; background: var(--accent-soft); border-radius: 14px; padding: 15px 18px; font-size: 13.5px; line-height: 1.6; }
.callout.green { background: var(--green-soft); border-color: #BFE9D4; }
.callout.red { background: var(--red-soft); border-color: #F7CACA; }
.callout.blue { background: var(--blue-soft); border-color: #C9DAFB; }
.callout h4 { font-size: 15px; margin-bottom: 4px; }
.verdict { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--ink); }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--card); border: 1px solid var(--line-2); border-radius: 15px; padding: 5px; margin-bottom: var(--gap); box-shadow: var(--shadow); }
.tabs a { padding: 8px 15px; text-decoration: none; color: var(--muted); font-size: 13.5px; font-weight: 500; border-radius: 11px; cursor: pointer; white-space: nowrap; transition: background .12s, color .12s; }
.tabs a:hover { color: var(--ink); background: var(--hover); }
.tabs a.on { color: var(--accent-2); background: var(--accent-soft); font-weight: 650; }
.dropzone { border: 1.5px dashed #C9CEE6; border-radius: var(--radius); padding: 32px; text-align: center; background: var(--surface-2); transition: background .12s, border-color .12s; }
.dropzone.over { background: var(--accent-soft); border-color: var(--accent); }
.dropzone h3 { font-size: 18px; margin-bottom: 8px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; font-size: 13.5px; }
.steps li { counter-increment: s; position: relative; padding: 0 0 12px 34px; line-height: 1.55; }
.steps li:before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.welcome { position: relative; overflow: hidden; background: radial-gradient(900px 380px at 100% 0%, rgba(139,92,246,.55), transparent 60%), linear-gradient(135deg, #1E1B4B 0%, #312E81 45%, #4F46E5 100%); color: #E0E7FF; border-radius: 26px; padding: 44px 48px; display: flex; gap: 36px; align-items: center; box-shadow: 0 30px 60px -36px rgba(49,46,129,.9); }
.welcome:after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; border: 60px solid rgba(255,255,255,.05); }
.welcome > * { position: relative; z-index: 1; }
.welcome h2 { color: #fff; font-size: 34px; margin-bottom: 10px; letter-spacing: -.03em; }
.welcome .eyebrow-s { color: #A5B4FC !important; }
.welcome .btn { border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.1); color: #fff; box-shadow: none; }
.welcome .btn:hover { background: rgba(255,255,255,.18); }
.welcome .btn.gold, .welcome .btn.primary { background: #fff; color: var(--accent-2); border-color: #fff; }
.welcome .btn.ghost { background: transparent; border-color: transparent; color: #C7D2FE; }
.welcome-logo { width: 230px; flex: none; }
.welcome-lang { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: 11.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: #A5B4FC; }
.welcome-lang .lang-switch { margin: 0; }
.welcome-lang .lang-switch button { letter-spacing: .02em; text-transform: none; font-size: 12.5px; }
.lang-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lang-card { cursor: pointer; display: flex; gap: 16px; align-items: center; transition: border-color .12s, box-shadow .12s; }
.lang-card .flag { font-family: var(--display); font-weight: 700; font-size: 22px; color: var(--accent); width: 48px; height: 48px; border-radius: 14px; border: 0; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); flex: none; }
.lang-card.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.welcome p { margin: 0 0 22px; color: #C7D2FE; max-width: 660px; line-height: 1.65; font-size: 14.5px; }
.preview-frame { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.sig-preview { max-height: 60px; max-width: 200px; border: 1px dashed var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.hidden { display: none !important; }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.scroll-y { max-height: 440px; overflow-y: auto; }
details.year > summary { cursor: pointer; padding: 11px 24px; background: var(--surface-2); font-weight: 600; color: var(--ink); border-bottom: 1px solid var(--line-2); list-style: none; display: flex; justify-content: space-between; }
details.year > summary::-webkit-details-marker { display: none; }
@media print { .sidebar, .topbar, .page-head .actions { display: none; } }

/* ---------- Company switcher dialog, rooms, misc ---------- */
.room-card { border: 1px solid var(--line); border-radius: 16px; background: var(--card); margin-bottom: 16px; overflow: hidden; }
.room-card .room-h { display: flex; gap: 12px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.room-card .room-h input { max-width: 260px; font-weight: 600; }
.room-card table.t td { padding: 8px 12px; }
.room-card select, .room-card input[type=text] { padding: 7px 10px; font-size: 13px; min-height: 36px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px 18px; }
.thumbs .th { position: relative; }
.thumbs img { width: 100px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.thumbs .th button { position: absolute; top: 3px; right: 3px; }
.alert-row { display: flex; gap: 14px; align-items: center; padding: 14px 24px; border-bottom: 1px solid var(--line-2); }
.alert-row:last-child { border-bottom: 0; }
.alert-row .grow { flex: 1; min-width: 0; }
.lvl { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.lvl.overdue { background: var(--red); } .lvl.soon { background: var(--amber); } .lvl.later { background: var(--blue); } .lvl.info { background: var(--muted-2); }
.dpe { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 22px; border-radius: 6px; color: #fff; font-weight: 700; font-size: 12px; }
.dpe.A { background: #009A44; } .dpe.B { background: #52B153; } .dpe.C { background: #A5CC74; color: #234; } .dpe.D { background: #F4E70F; color: #333; } .dpe.E { background: #F0B40F; color: #333; } .dpe.F { background: #EB8235; } .dpe.G { background: #D7221F; }
.pill-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.letter-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.letter-card { cursor: pointer; padding: 20px 22px; transition: transform .14s, box-shadow .14s, border-color .14s; }
.letter-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #DCE0FB; }
.letter-card h4 { font-size: 15.5px; margin: 10px 0 5px; }
.onboard { max-width: 780px; }
@media (max-width: 1280px) { .letter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
button.letter-card { text-align: left; width: 100%; font: inherit; color: inherit; display: block; }
button.letter-card svg { width: 21px; height: 21px; color: var(--accent); display: block; }
button.letter-card > svg:first-child { width: 42px; height: 42px; padding: 10px; border-radius: 12px; background: var(--accent-soft); box-sizing: border-box; }
button.letter-card:disabled { opacity: .5; cursor: default; transform: none; box-shadow: var(--shadow); }
.list li.clickable { cursor: pointer; }
.list li.clickable:hover { background: var(--hover); }
.onboard .card-f .btn.ghost { color: var(--ink-3); }
textarea[readonly] { background: var(--surface-2); font-size: 12.5px; line-height: 1.6; }
.fintable-ic svg { width: 22px; height: 22px; color: var(--accent); display: block; }
.fintable-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* ---------- Property photo ---------- */
.prop-card .prop-cover { height: 168px; }
.prop-card .card-f { background: transparent; }
.prop-card .prop-cover .cover-badge { left: 16px; right: auto; top: 16px; }
.prop-card .prop-cover h3 { bottom: 38px; }
.prop-card .prop-cover .ptype { top: auto; bottom: 16px; right: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 500; }
.prop-card .card-f .avatars .avatar { width: 30px; height: 30px; font-size: 11px; }
.prop-cover.has-photo { background-size: cover; background-position: center; }
.prop-cover.has-photo:before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,35,.42) 0%, rgba(10,14,35,.05) 35%, rgba(10,14,35,.05) 50%, rgba(10,14,35,.72) 100%); }
.prop-cover.has-photo .cover-mark { display: none; }
.prop-cover.has-photo .ptype, .prop-cover.has-photo h3 { z-index: 1; text-shadow: 0 1px 8px rgba(0,0,0,.4); }
.prop-cover .cover-art { position: absolute; left: 0; right: 0; bottom: 0; height: 75%; opacity: .22; }
.prop-cover.has-photo .cover-art { display: none; }
.prop-hero { position: relative; border-radius: var(--radius); overflow: hidden; height: 280px; background: linear-gradient(135deg, #312E81, #4F46E5 60%, #7C3AED) center / cover no-repeat; margin-bottom: var(--gap); box-shadow: var(--shadow); }
.prop-hero:before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,35,0) 45%, rgba(10,14,35,.55)); }
.prop-hero .hero-actions { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 8px; z-index: 1; }
.prop-hero .hero-actions .btn { background: rgba(255,255,255,.94); border-color: transparent; color: #111833; }
.prop-hero.empty { height: auto; background: var(--card); border: 1.5px dashed #C9CEE6; box-shadow: none; padding: 22px 24px; display: flex; align-items: center; gap: 16px; color: var(--muted); }
.prop-hero.empty:before { display: none; }
.prop-hero.empty .hero-actions { position: static; margin-left: auto; }
.theme-toggle { display: inline-flex; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 10px; padding: 3px; }
.theme-toggle button { border: 0; background: transparent; color: rgba(214,222,245,.7); padding: 4px 8px; border-radius: 7px; cursor: pointer; display: inline-flex; align-items: center; }
.theme-toggle button svg { width: 15px; height: 15px; }
.theme-toggle button:hover { color: #fff; }
.theme-toggle button.on { background: var(--accent); color: #fff; }

/* ---------- Dashboard ---------- */
.spot { overflow: hidden; display: flex; flex-direction: column; }
.spot-cover { height: 210px; position: relative; background: linear-gradient(135deg, #312E81 0%, #4F46E5 60%, #7C3AED 100%) center / cover no-repeat; }
.spot-cover:before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,35,.25), rgba(10,14,35,0) 40%); }
.spot-cover .cover-art { position: absolute; left: 0; right: 0; bottom: 0; height: 78%; opacity: .25; }
.spot-cover.loaded .cover-art { display: none; }
.spot-cover .cover-badge { position: absolute; top: 16px; left: 16px; z-index: 1; }
.spot-cover .cover-badge .badge { background: rgba(255,255,255,.95); box-shadow: 0 4px 12px -6px rgba(0,0,0,.35); }
.spot-nav { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; z-index: 1; }
.spot-nav button { width: 32px; height: 32px; border-radius: 10px; border: 0; background: rgba(255,255,255,.92); color: #111833; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.spot-nav button svg { width: 16px; height: 16px; }
.spot-nav button:hover { background: #fff; }
.spot-b { padding: 20px 24px 22px; flex: 1; display: flex; flex-direction: column; gap: 16px; }
.spot-b h3 { font-size: 19px; }
.spot-b .addr { color: var(--muted); font-size: 13px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.spot-b .addr svg { width: 14px; height: 14px; }
.spot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.spot-stats > div { background: var(--surface-2); border-radius: 12px; padding: 11px 12px; display: flex; flex-direction: column; justify-content: space-between; gap: 2px; }
.spot-stats .k { font-size: 11.5px; color: var(--muted); }
.spot-stats .v { font-weight: 700; font-size: 15px; color: var(--ink); margin-top: 2px; white-space: nowrap; }
.spot-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.timeline { list-style: none; margin: 0; padding: 4px 24px 18px; position: relative; }
.timeline li { display: flex; gap: 14px; align-items: flex-start; padding: 11px 0; position: relative; cursor: pointer; }
.timeline li:not(:last-child):after { content: ""; position: absolute; left: 24px; top: 62px; bottom: -11px; width: 2px; background: var(--line-2); }
.timeline li:hover .title { color: var(--accent); }
.timeline .grow { flex: 1; min-width: 0; padding-top: 3px; }
.timeline .title { font-weight: 600; color: var(--ink); line-height: 1.35; }
.timeline .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline .when { font-size: 12px; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.activity { list-style: none; margin: 0; padding: 4px 24px 18px; }
.activity li { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.activity li:last-child { border-bottom: 0; }
.activity .grow { flex: 1; min-width: 0; }
.activity .title { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity .meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity .amt { font-weight: 700; white-space: nowrap; text-align: right; }
.activity .amt small { display: block; font-weight: 500; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 4px 24px 24px; }
.quick a, .quick button { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; font-size: 13px; text-align: left; cursor: pointer; text-decoration: none; transition: transform .12s, box-shadow .12s, background .12s, border-color .12s; line-height: 1.3; }
.quick a:hover, .quick button:hover { background: var(--card); border-color: var(--line); box-shadow: var(--shadow); transform: translateY(-2px); }
.fin-head { display: flex; gap: 28px; padding: 0 24px 6px; flex-wrap: wrap; }
.fin-head .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.fin-head .v { font-family: var(--display); font-size: 22px; font-weight: 700; color: var(--ink); margin-top: 3px; letter-spacing: -.02em; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-2); }
.strip > div { padding: 18px 20px; min-width: 0; border-right: 1px solid var(--line-2); }
.strip > div:last-child { border-right: 0; }
.strip .k { font-size: 12px; color: var(--muted); }
.strip .v { font-family: var(--display); font-size: 19px; font-weight: 700; color: var(--ink); margin-top: 4px; white-space: nowrap; letter-spacing: -.01em; }
.strip .v.pos { color: var(--green); } .strip .v.neg { color: var(--red); }
.late li { align-items: flex-start; }
.late .late-r { text-align: right; flex: none; }
.late .late-r .row { justify-content: flex-end; gap: 6px; margin-top: 8px; }
.strip .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) { .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip > div:nth-child(2) { border-right: 0; } }

/* ---------- Narrow windows and large zoom: compact top bar, then a sidebar of icons ---------- */
@media (max-width: 1180px) {
  .company-switch .who, .company-switch > svg, .top-sep, .search kbd { display: none; }
  .company-switch { padding: 3px; }
  .search input[type=search] { padding-right: 16px; }
}
@media (max-width: 1000px) {
  :root { --sidebar-w: 88px; --gap: 18px; }
  .brand { padding: 16px 0 10px; justify-content: center; }
  .brand-logo { display: none; }
  .brand-mark { display: block; }
  .nav { padding: 2px 14px 18px; }
  .nav-section { font-size: 0; padding: 12px 0 6px; }
  .nav-section:after { content: ""; display: block; height: 1px; background: rgba(255,255,255,.09); margin: 0 8px; }
  .nav a { justify-content: center; padding: 11px 0; }
  .nav a > span:not(.count) { display: none; }
  .nav .count { position: absolute; top: 3px; right: 6px; padding: 0 5px; font-size: 10px; line-height: 15px; margin: 0; }
  .sidebar-foot { padding: 40px 8px 14px; }
  .sidebar-foot .foot-row, #storage-note { display: none; }
  .topbar { padding: 14px 24px; gap: 12px; }
  .content { padding: 26px 24px 60px; }
  .page-head h1 { font-size: 26px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .page-head .actions { justify-content: flex-start; }
}

/* ---------- Dark mode ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B1020; --paper-2: #182037; --card: #121A30; --surface-2: #0F162A; --hover: #18213A; --input: #0D1427;
  --line: #242E4A; --line-2: #1C253E;
  --ink: #F2F4FB; --ink-2: #DDE2F1; --ink-3: #A5B4FC;
  --text: #D6DBEA; --muted: #98A1BB; --muted-2: #6E7792;
  --accent: #6366F1; --accent-2: #A5B4FC; --accent-soft: #1D2250; --accent-ring: rgba(129, 140, 248, .28);
  --green: #34D399; --green-soft: #0E2A23; --red: #F87171; --red-soft: #351820; --amber: #FBBF24; --amber-soft: #2F2410;
  --blue: #60A5FA; --blue-soft: #122440; --violet: #A78BFA; --violet-soft: #241B44; --orange: #FB923C; --orange-soft: #33200F; --teal: #2DD4BF; --teal-soft: #0D2A2A;
  --shadow: 0 1px 0 rgba(0, 0, 0, .25), 0 14px 34px -22px rgba(0, 0, 0, .8);
  --shadow-lg: 0 2px 0 rgba(0, 0, 0, .25), 0 24px 48px -24px rgba(0, 0, 0, .9);
  --c1: #818CF8; --c2: #FB923C; --c3: #34D399; --c4: #F87171; --c5: #38BDF8; --c6: #C4B5FD; --c7: #2DD4BF; --c8: #F472B6;
}
:root[data-theme="dark"] body { background: var(--bg); }
:root[data-theme="dark"] .sidebar { background: linear-gradient(180deg, #080D1E 0%, #0A1128 60%, #070C1B 100%); box-shadow: inset -1px 0 0 #151C33; }
:root[data-theme="dark"] .topbar { background: rgba(14, 20, 38, .82); }
:root[data-theme="dark"] .btn:hover { border-color: #33405F; }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .btn.gold { color: #fff; box-shadow: 0 8px 18px -10px rgba(99,102,241,.9); }
:root[data-theme="dark"] .btn.primary:hover, :root[data-theme="dark"] .btn.gold:hover { background: #7C7FF5; border-color: #7C7FF5; }
:root[data-theme="dark"] .btn.danger.solid { color: #1A0D0E; }
:root[data-theme="dark"] .icon-btn:hover { border-color: #33405F; }
:root[data-theme="dark"] .toast { background: #1E2747; }
:root[data-theme="dark"] .toast.error { background: #4A1C24; }
:root[data-theme="dark"] .callout { border-color: #2C3470; }
:root[data-theme="dark"] .callout.green { border-color: #1E4A3C; }
:root[data-theme="dark"] .callout.red { border-color: #5A2A33; }
:root[data-theme="dark"] .callout.blue { border-color: #24406A; }
:root[data-theme="dark"] .avatar.a1 { background: #1D2250; color: #A5B4FC; } :root[data-theme="dark"] .avatar.a2 { background: #0E2A23; color: #6EE7B7; } :root[data-theme="dark"] .avatar.a3 { background: #351820; color: #FDA4AF; }
:root[data-theme="dark"] .avatar.a4 { background: #2F2410; color: #FCD34D; } :root[data-theme="dark"] .avatar.a5 { background: #122440; color: #7DD3FC; } :root[data-theme="dark"] .avatar.a6 { background: #241B44; color: #D8B4FE; }
:root[data-theme="dark"] .overlay { background: rgba(0, 0, 0, .6); }
:root[data-theme="dark"] .modal { box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9); }
:root[data-theme="dark"] svg.chart .grid.zero { stroke: #3A4566; }
:root[data-theme="dark"] .preview-frame, :root[data-theme="dark"] .sig-preview { background: #fff; }
:root[data-theme="dark"] .seg button.on, :root[data-theme="dark"] .btn-group .btn.on { background: #26304F; box-shadow: 0 1px 3px rgba(0, 0, 0, .5); }
:root[data-theme="dark"] ::selection { background: #2C3470; }
:root[data-theme="dark"] img.invert-dark { filter: invert(1) hue-rotate(180deg); }
:root[data-theme="dark"] .dropzone, :root[data-theme="dark"] .prop-hero.empty { border-color: #2C3656; }
:root[data-theme="dark"] select, :root[data-theme="dark"] select.btn { background-repeat: no-repeat; background-position: right 12px center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E7792' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); }
:root[data-theme="dark"] .letter-card:hover { border-color: #2C3470; }

/* ---------- Tenancy file (lease, insurance, inventory) ---------- */
.kd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 4px 24px 24px; }
@media (max-width: 1100px) { .kd-grid { grid-template-columns: 1fr; } }
.kd-item { border: 1px solid var(--line-2); border-radius: 16px; padding: 16px 18px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.kd-item.st-missing, .kd-item.st-expired { background: var(--card); border-style: dashed; border-color: #F2B8B8; }
.kd-item.st-partial, .kd-item.st-soon { border-color: #F5D9A8; }
.kd-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.kd-t { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.kd-d { font-size: 12.5px; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.kd-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.kd-person + .kd-person { border-top: 1px solid var(--line-2); margin-top: 8px; padding-top: 8px; }
.kd-pname { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); flex-wrap: wrap; }
.kd-pname .avatar { width: 24px; height: 24px; font-size: 10px; }
.kd-person .kd-actions { padding-top: 6px; margin-top: 0; }
.kd-score { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; height: 52px; border-radius: 14px; background: var(--amber-soft); color: var(--amber); line-height: 1.1; }
.kd-score b { font-size: 17px; }
.kd-score span { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.kd-score.full { background: var(--green-soft); color: var(--green); }
.kd-mini { display: inline-flex; gap: 4px; cursor: pointer; }
.kd-dot { width: 24px; height: 24px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: var(--tone-soft); color: var(--tone); }
.kd-dot svg { width: 13px; height: 13px; stroke-width: 2.2; }
:root[data-theme="dark"] .kd-item.st-missing, :root[data-theme="dark"] .kd-item.st-expired { border-color: #5A2A33; }
:root[data-theme="dark"] .kd-item.st-partial, :root[data-theme="dark"] .kd-item.st-soon { border-color: #4A3A18; }

/* ---------- Receipt wizard ---------- */
.modal.rw-modal { width: 960px; }
.rw-tabs { margin-bottom: 22px; box-shadow: none; }
.rw-n { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; align-items: center; justify-content: center; margin-left: 4px; }
.rw-sec h4 { font-size: 15px; margin: 0 0 14px; }
.rw-sec + .rw-sec { border-top: 1px solid var(--line-2); margin-top: 24px; padding-top: 22px; }
.rw-quick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.rw-months { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.rw-tile { position: relative; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 12px 6px 10px; display: flex; flex-direction: column; align-items: center; gap: 3px; cursor: pointer; font: inherit; color: var(--ink); transition: background .12s, border-color .12s, box-shadow .12s; }
.rw-tile b { font-size: 14.5px; }
.rw-tile span { font-size: 12.5px; color: var(--muted); }
.rw-tile:hover:not(:disabled) { border-color: #C9CEE6; background: var(--hover); }
.rw-tile.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-ring); }
.rw-tile.on span { color: var(--accent-2); }
.rw-tile:disabled { opacity: .4; cursor: default; }
.rw-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; border-radius: 50%; }
.rw-dot.paid { background: var(--green); } .rw-dot.partial { background: var(--amber); } .rw-dot.unpaid { background: var(--red); }
.rw-link { display: inline-block; margin-top: 14px; font-weight: 600; font-size: 13.5px; text-decoration: none; }
.rw-from { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.rw-from label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rw-from input { width: auto; }
.rw-older { margin-top: 12px; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rw-x { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0 0 0 4px; font-size: 14px; line-height: 1; }
.rw-pick { max-width: 460px; margin-bottom: 14px; }
.rw-lease { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 12px; }
.rw-lh { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--accent-soft); border: 0; cursor: pointer; font: inherit; color: var(--ink); text-align: left; }
.rw-lease:not(.open) .rw-lh { background: var(--surface-2); }
.rw-lh .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rw-lh small { color: var(--muted); font-size: 12px; }
.rw-chev { width: 16px; height: 16px; transition: transform .15s; color: var(--muted); }
.rw-lease.open .rw-chev { transform: rotate(90deg); }
.rw-lh .avatars .avatar { width: 34px; height: 34px; font-size: 11.5px; border-color: var(--accent-soft); }
.rw-lb { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; }
.rw-sub { font-weight: 700; color: var(--ink); font-size: 13.5px; margin-top: 4px; }
.rw-paid { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); font-size: 13px; }
.rw-paid .grow { flex: 1; min-width: 0; }
.rw-period { display: flex; flex-direction: column; gap: 8px; }
.rw-period + .rw-period { margin-top: 6px; }
.rw-pl { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.rw-pl b { color: var(--ink); }
.rw-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rw-opt { border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 13px 10px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; transition: background .12s, border-color .12s, box-shadow .12s; }
.rw-opt b { font-weight: 600; font-size: 14px; }
.rw-opt small { font-size: 11.5px; color: var(--muted); }
.rw-opt:hover:not(:disabled) { background: var(--hover); }
.rw-opt.on { border-color: var(--accent); color: var(--accent-2); box-shadow: 0 0 0 3px var(--accent-ring); }
.rw-opt:disabled { opacity: .45; cursor: default; }
.rw-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--amber); line-height: 1.45; }
.rw-warn svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.callout.amber { background: var(--amber-soft); border-color: #F5D9A8; }
.rw-prev + .rw-prev { margin-top: 20px; }
.rw-ph { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; flex-wrap: wrap; }
.rw-prev .preview-frame { height: 62vh; }
@media (max-width: 900px) { .rw-months { grid-template-columns: repeat(4, minmax(0, 1fr)); } .rw-opts { grid-template-columns: 1fr; } }
:root[data-theme="dark"] .callout.amber { border-color: #4A3A18; }

.caf-sum { margin-bottom: 20px; }
.caf-done { display: flex; gap: 14px; align-items: flex-start; }
.caf-sum .small { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lang-card .flag svg { width: 22px; height: 22px; }

/* ---------- Accounting space: bank transactions and their supporting documents ---------- */
.kpi-of { font-size: .55em; font-weight: 600; color: var(--muted); }
.pf-card .card-h.wrap { flex-wrap: wrap; gap: 12px; }
.pf-card .tabs a { display: inline-flex; align-items: center; gap: 7px; }
.pf-n { font-size: 11.5px; font-weight: 700; min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--paper-2); color: var(--muted); text-align: center; }
.pf-card .tabs a.on .pf-n { background: var(--accent-soft); color: var(--accent); }
.pf-table td { vertical-align: middle; }
.pf-table .pf-label { max-width: 340px; }
.pf-table .pf-label .strong { overflow-wrap: anywhere; }
.pf-table .pf-doc { min-width: 220px; max-width: 360px; }
.pf-row.missing td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
.pf-row.ok td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.pf-row.none td:first-child { box-shadow: inset 3px 0 0 var(--line); }
tr.pf-over td, tr.pf-over { background: var(--accent-soft) !important; }
tr.pf-over td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.pf-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 6px 4px 9px; border-radius: 9px; background: var(--green-soft); color: var(--green); font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.pf-chip.auto { background: var(--accent-soft); color: var(--accent); }
.pf-chip svg { width: 14px; height: 14px; flex: none; }
.pf-chip a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.pf-chip a:hover { text-decoration: underline; }
.pf-x { border: 0; background: transparent; color: inherit; opacity: .55; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 3px; border-radius: 5px; }
.pf-x:hover { opacity: 1; background: rgba(0,0,0,.06); }
.pf-ask { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--amber); }
.pf-ask svg { width: 15px; height: 15px; flex: none; }
.pf-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pf-state.ok { color: var(--green); }
.pf-state.none { color: var(--muted); font-weight: 500; }
.pf-state svg { width: 14px; height: 14px; }
.mb-s { margin-bottom: 8px; }
/* last known balances, kept for when Fintable cannot be reached */
.ft-balances { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.ft-bal { padding: 10px 14px; border-radius: 12px; background: var(--surface-2); min-width: 180px; }
.ft-bal .strong { font-size: 17px; margin: 2px 0; }
.callout.row svg { width: 18px; height: 18px; flex: none; color: var(--amber); }
/* one transaction after the other */
.pw-progress { display: flex; align-items: center; gap: 14px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 18px; }
.pw-progress .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; }
.pw-progress .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .25s ease; }
.pw-tx { display: flex; align-items: center; gap: 20px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); }
.pw-amt { font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; }
.pw-what { min-width: 0; }
.pw-what .strong { font-size: 15px; overflow-wrap: anywhere; }
.pw-ask { display: flex; align-items: center; gap: 10px; margin: 18px 0 6px; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.pw-ask svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.pw-drop { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding: 22px 22px; border: 1.5px dashed #C9CEE6; border-radius: 16px; background: var(--card); transition: background .12s, border-color .12s; }
.pw-drop > svg { width: 26px; height: 26px; color: var(--accent); flex: none; }
.pw-drop.pf-over { background: var(--accent-soft); border-color: var(--accent); }
.pw-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.pw-alt .btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-2); }
.pw-alt .btn .badge { margin-left: 4px; }
.pw-alt a.small { margin-left: 6px; }
.pw-panel { margin-top: 12px; padding: 16px 18px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.pw-done { text-align: center; padding: 36px 10px 26px; }
.pw-done > svg { width: 44px; height: 44px; color: var(--green); background: var(--green-soft); border-radius: 50%; padding: 10px; }
.pw-done h3 { font-size: 20px; margin: 14px 0 6px; }
:root[data-theme="dark"] .pw-drop { border-color: #33406A; }
:root[data-theme="dark"] .pf-x:hover { background: rgba(255,255,255,.08); }
@media (max-width: 760px) { .pw-tx { flex-direction: column; align-items: flex-start; gap: 6px; } .pw-drop { flex-wrap: wrap; } }

/* ---------- Version and what's new ---------- */
.sidebar-foot .side-ver { display: inline-block; margin-top: 8px; color: rgba(214,222,245,.62); text-decoration: none; font-weight: 600; letter-spacing: .02em; border-bottom: 1px dotted rgba(214,222,245,.3); }
.sidebar-foot .side-ver:hover { color: #fff; border-bottom-color: rgba(255,255,255,.6); }
.cl { display: flex; flex-direction: column; gap: 14px; }
.cl-v { padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--surface-2); }
.cl-v.cur { background: var(--accent-soft); border-color: #DCE0FB; }
.card-b > .cl > .cl-v.cur { background: transparent; border: 0; padding: 0; }
.cl-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.cl-num { font-weight: 700; color: var(--ink); font-size: 14.5px; }
.cl ul { margin: 0; padding-left: 18px; line-height: 1.6; font-size: 13.5px; color: var(--ink-2); }
:root[data-theme="dark"] .cl-v.cur { border-color: #2E3766; }
@media (max-width: 1000px) { .sidebar-foot .side-ver { display: none; } }

/* ---------- Documents folder tree (Settings › Documents) ---------- */
.dtree-card { border-top: 1px solid var(--line-2); padding-top: 18px; }
.dtree, .dtree ul { list-style: none; margin: 0; padding: 0; }
.dtree { margin-top: 14px; font-size: 13px; color: var(--ink-2); columns: 2 320px; column-gap: 28px; }
.dtree ul { padding-left: 20px; border-left: 1px dashed var(--line); margin-left: 7px; }
.dtree li { break-inside: avoid; }
.dtree li > span { display: inline-flex; align-items: center; gap: 7px; padding: 3px 0; }
.dtree li > span svg { width: 15px; height: 15px; color: var(--accent); flex: none; }
.dtree li.leaf > span svg { color: var(--muted-2); }
.dtree li.root > span { font-weight: 700; color: var(--ink); }

/* ---------- Selecting and deleting documents ---------- */
.t .w-sel { width: 38px; padding-right: 0; }
.t input.sel { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.t tr.sel-on td { background: var(--accent-soft); }
.sel-bar { display: none; align-items: center; gap: 10px; padding: 12px 20px; background: var(--accent-soft); border-bottom: 1px solid #DCE0FB; border-radius: var(--radius) var(--radius) 0 0; }
.sel-bar.on { display: flex; }
.sel-bar .check { font-weight: 600; color: var(--accent-2); }
:root[data-theme="dark"] .sel-bar { border-bottom-color: #2E3766; }
.del-list { margin: 0 0 14px; padding-left: 20px; line-height: 1.8; }
.del-list b { color: var(--red); }
.prop-card .card-del { opacity: 0; transition: opacity .12s; margin-left: 6px; }
.prop-card:hover .card-del, .prop-card .card-del:focus { opacity: 1; }

/* ---------- Dashboard (1.8): hero, overview, tiles, properties, tenants, events, activity, banner ---------- */
:root { --title-serif: "New York", ui-serif, "Iowan Old Style", "Palatino", Georgia, serif; --gold-btn: #E9C46A; --gold-btn-2: #D9AE4B; --navy: #141B3C; }
/* three zones the user can arrange (Customize): main column (half / full widths), right column, bottom of the page
   (thirds). The columns of the bottom zone line up with the main and right columns above. */
.dash { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(300px, 1fr); gap: 24px; align-items: start; }
.dz { min-width: 0; display: grid; gap: 24px; align-content: start; }
.dz:empty { display: none; }
.dz-main { grid-column: 1 / 3; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dz-side { grid-column: 3; grid-template-columns: minmax(0, 1fr); }
.dz-bottom { grid-column: 1 / -1; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(300px, 1fr); }
.dash.no-side .dz-main { grid-column: 1 / -1; }
.dash.no-main .dz-side { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dw { grid-column: span var(--span, 1); min-width: 0; position: relative; container-type: inline-size; display: flex; flex-direction: column; }
.dw-body { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dw-body > * { flex: 1 1 auto; }
.dw-empty { padding: 30px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.dnum { white-space: nowrap; font-family: var(--title-serif); font-weight: 700; font-size: 34px; letter-spacing: -.01em; color: var(--ink); line-height: 1.1; font-variant-numeric: lining-nums; }
.dash h3, .ts h3 { font-family: var(--title-serif); font-size: 21px; font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: 10px; margin: 0; letter-spacing: -.005em; }
.dash h3 svg, .ts h3 svg { width: 22px; height: 22px; color: var(--accent-2); }
/* hero */
.dhero { position: relative; border-radius: 26px; overflow: hidden; min-height: 330px; box-shadow: var(--shadow-lg); background: #2A3557; isolation: isolate; }
.dhero-art, .dhero-art svg, .dhero-photo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.dhero-photo { background-size: cover; background-position: center; }
.dhero-veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,16,38,.86) 0%, rgba(12,16,38,.62) 36%, rgba(12,16,38,.08) 68%, rgba(12,16,38,0) 100%), linear-gradient(0deg, rgba(12,16,38,.35), rgba(12,16,38,0) 40%); }
.dhero-text { position: relative; z-index: 1; padding: 44px 46px; max-width: 660px; color: #fff; }
.dhero-date { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.72); margin-bottom: 14px; }
.dhero h1 { font-family: var(--title-serif); font-size: 44px; line-height: 1.08; font-weight: 700; margin: 0 0 14px; color: #fff; letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.dhero p { font-size: 18px; line-height: 1.5; color: rgba(255,255,255,.88); margin: 0 0 26px; max-width: 420px; }
.btn.dbtn-gold { background: linear-gradient(180deg, var(--gold-btn), var(--gold-btn-2)); border: 0; color: #1D1A10; font-weight: 700; padding: 12px 22px; border-radius: 999px; box-shadow: 0 10px 24px -12px rgba(233,196,106,.9); }
.btn.dbtn-gold:hover { filter: brightness(1.05); }
.btn.dbtn-gold svg { width: 17px; height: 17px; margin: 0 0 0 4px; }
.btn.dbtn-glass { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 999px; padding: 12px 20px; backdrop-filter: blur(8px); }
.btn.dbtn-glass:hover { background: rgba(255,255,255,.24); }
/* overview */
.dov { padding: 22px 24px 18px; }
.dov-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dround { width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); box-shadow: 0 6px 14px -10px rgba(17,24,51,.4); }
.dround svg { width: 18px; height: 18px; }
.dround:hover { color: var(--accent); border-color: var(--accent); }
.dov-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.dov-row.last { border-bottom: 0; padding-bottom: 4px; align-items: flex-end; }
.dov-lab { font-size: 15px; color: var(--ink-2); margin-top: 4px; }
.dchip { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.dchip.good { background: var(--green-soft); color: var(--green); }
.dchip.bad { background: var(--red-soft); color: var(--red); }
.dchip svg { width: 14px; height: 14px; stroke-width: 2.4; }
.dchip svg.down { transform: scaleY(-1); }
.dspark { width: 58%; max-width: 230px; height: 72px; flex: none; overflow: visible; }
/* tiles */
.dtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.dtile { padding: 22px 22px 18px; display: flex; flex-direction: column; min-height: 196px; transition: transform .15s, box-shadow .15s; }
.dtile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.dtile-ic { width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--tone-soft); color: var(--tone); margin-bottom: 18px; }
.dtile-ic svg { width: 30px; height: 30px; }
.dtile-lab { font-size: 15.5px; color: var(--ink-2); margin-top: 6px; }
.dtile-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: flex-end; }
.dtile-foot a, .dcard-h a, .dev-h a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-size: 13.5px; font-weight: 600; color: var(--accent-2); text-decoration: none; }
.dtile-foot a svg, .dcard-h a svg, .dev-h a svg { width: 15px; height: 15px; }
.dtile-foot a:hover, .dcard-h a:hover { color: var(--accent); }
.dpill { display: inline-flex; align-items: center; font-size: 12.5px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.dpill.green { background: var(--green-soft); color: var(--green); }
.dpill.blue { background: var(--accent-soft); color: var(--accent-2); }
.dpill.red { background: var(--red-soft); color: var(--red); }
.dpill.grey { background: var(--paper-2); color: var(--muted); }
/* lists: properties, tenants */
.dlist, .dact { padding: 0; overflow: hidden; }
.dcard-h { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); }
.dprop, .dperson { display: flex; align-items: center; gap: 16px; padding: 14px 22px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line-2); transition: background .12s; }
.dprop:last-child, .dperson:last-child { border-bottom: 0; }
.dprop:hover, .dperson:hover { background: var(--surface-2); }
.dthumb { width: 104px; height: 78px; border-radius: 14px; overflow: hidden; flex: none; background: #C9DCEB center/cover no-repeat; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.dthumb svg { width: 100%; height: 100%; display: block; }
.dprop .grow, .dperson .grow { min-width: 0; flex: 1; }
.dprop-name { font-weight: 650; font-size: 15.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dprop-addr { display: flex; align-items: center; gap: 5px; font-size: 13.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dprop-addr svg { width: 14px; height: 14px; color: var(--orange); flex: none; }
.dprop-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.dprop-meta span { display: inline-flex; align-items: center; gap: 5px; }
.dprop-meta svg { width: 15px; height: 15px; color: var(--muted); }
.dchev { width: 18px; height: 18px; color: var(--muted-2); flex: none; }
.dface { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: none; background: var(--accent-soft); color: var(--accent-2); box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--line); font-family: var(--title-serif); }
.dface.a1 { background: linear-gradient(135deg, #E0E7FF, #C7D2FE); color: #3730A3; } .dface.a2 { background: linear-gradient(135deg, #DCFCE7, #BBF7D0); color: #166534; } .dface.a3 { background: linear-gradient(135deg, #FFE4E6, #FECDD3); color: #9F1239; }
.dface.a4 { background: linear-gradient(135deg, #FEF3C7, #FDE68A); color: #92400E; } .dface.a5 { background: linear-gradient(135deg, #E0F2FE, #BAE6FD); color: #075985; } .dface.a6 { background: linear-gradient(135deg, #F3E8FF, #E9D5FF); color: #6B21A8; }
.dstat { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.dstat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.dstat.green { background: var(--green-soft); color: var(--green); }
.dstat.amber { background: var(--amber-soft); color: var(--amber); }
.dstat.red { background: var(--red-soft); color: var(--red); }
/* upcoming events: navy header, timeline */
.dev { padding: 0; overflow: hidden; }
.dev-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; background: var(--navy); }
.dev-h h3 { color: #fff; }
.dev-h h3 svg { color: #E9C46A; }
.dev-h a { color: #fff; }
.dtl { list-style: none; margin: 0; padding: 16px 22px 18px 22px; position: relative; }
.dtl li { display: flex; align-items: center; gap: 14px; padding: 9px 0; position: relative; cursor: pointer; }
.dtl li::before { content: ""; position: absolute; left: 5px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.dtl li:first-child::before { top: 50%; } .dtl li:last-child::before { bottom: 50%; }
.dtl .dot { width: 12px; height: 12px; border-radius: 50%; background: var(--tone); box-shadow: 0 0 0 3px var(--card); position: relative; z-index: 1; flex: none; }
.dday { width: 64px; flex: none; padding: 6px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.dday b { display: block; font-weight: 700; color: var(--ink); }
.dtl li:hover .dprop-name { color: var(--accent-2); }
/* recent activity */
.dact ul { list-style: none; margin: 0; padding: 6px 0; }
.dact li { display: flex; align-items: center; gap: 14px; padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
.dact li:last-child { border-bottom: 0; }
.dago { font-size: 12.5px; color: var(--muted); white-space: nowrap; align-self: flex-start; padding-top: 2px; }
/* finances overview, property spotlight, quick actions, portfolio at a glance */
.dcard-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }
.dcard-h { gap: 14px; flex-wrap: wrap; }
.dfin { padding: 0; overflow: hidden; }
.dfin .fin-head { padding: 18px 22px 4px; }
.dfin-chart { padding: 4px 16px 16px; }
.dquick .quick { padding: 18px 22px 22px; }
.destate .strip { border-top: 0; }
.spot-b { cursor: pointer; }
.spot-b:hover h3 { color: var(--accent-2); }
/* dark mode */
:root[data-theme="dark"] { --navy: #0F1530; }
:root[data-theme="dark"] .dround { background: #1A2140; }
:root[data-theme="dark"] .dface { box-shadow: 0 0 0 3px var(--card), 0 0 0 4px #2A3358; }
:root[data-theme="dark"] .dface.a1 { background: #1D2250; color: #A5B4FC; } :root[data-theme="dark"] .dface.a2 { background: #0E2A23; color: #6EE7B7; } :root[data-theme="dark"] .dface.a3 { background: #351820; color: #FDA4AF; }
:root[data-theme="dark"] .dface.a4 { background: #2F2410; color: #FCD34D; } :root[data-theme="dark"] .dface.a5 { background: #122440; color: #7DD3FC; } :root[data-theme="dark"] .dface.a6 { background: #241B44; color: #D8B4FE; }
/* narrower windows */
/* each widget adapts to the width it is given, wherever it is placed */
@container (max-width: 680px) { .dtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dhero h1 { font-size: 34px; } .dhero-text { padding: 30px 26px; } .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip > div:nth-child(2) { border-right: 0; } }
@container (max-width: 320px) { .dtiles { grid-template-columns: minmax(0, 1fr); } .spot-stats { grid-template-columns: minmax(0, 1fr); } }
@container (min-width: 720px) { .dquick .quick { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 1040px) { .dquick .quick { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
/* Customize: the bar, the tools on each widget, where it will drop */
.dash-top { display: flex; justify-content: flex-end; margin: -22px 0 10px; }
.dash-edit { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; background: var(--card); border: 1.5px solid var(--accent); border-radius: 18px; padding: 16px 20px; margin: -10px 0 22px; box-shadow: var(--shadow-lg); }
.dash-edit b { font-size: 15.5px; color: var(--ink); }
.dash-edit .grow { min-width: 0; flex: 1; }
.dash-edit .small { margin-top: 3px; line-height: 1.45; }
.dash-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.dash-chip { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent-2); border-radius: 999px; padding: 4px 11px 4px 8px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.dash-chip svg { width: 14px; height: 14px; }
.dash-chip:hover { background: var(--card); }
.dash.editing .dw { cursor: grab; outline: 2px dashed rgba(99, 102, 241, .45); outline-offset: 5px; border-radius: 22px; padding-top: 46px; }
.dash.editing .dw:hover { outline-color: var(--accent); }
.dash.editing .dw-body { pointer-events: none; user-select: none; }
.dash.editing .dw.dragging { opacity: .35; }
.dw-tools { position: absolute; top: 2px; left: 2px; right: 2px; z-index: 6; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.dw-name, .dw-btns { pointer-events: auto; background: rgba(17, 24, 51, .92); color: #fff; border-radius: 11px; box-shadow: 0 6px 18px -6px rgba(10, 14, 35, .55); }
.dw-name { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 6px 11px 6px 7px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dw-btns { display: inline-flex; padding: 3px; gap: 2px; flex: none; }
.dw-btns button { border: 0; background: transparent; color: #fff; height: 28px; min-width: 28px; padding: 0 6px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; cursor: pointer; font: inherit; font-size: 12px; font-weight: 600; }
.dw-btns button:hover { background: rgba(255, 255, 255, .16); }
.dw-btns svg, .dw-name svg { width: 15px; height: 15px; flex: none; }
.dw.drop-before::before, .dw.drop-after::before { content: ""; position: absolute; z-index: 7; background: var(--accent); border-radius: 4px; box-shadow: 0 0 0 4px rgba(99, 102, 241, .2); }
.dw.drop-y.drop-before::before { left: 0; right: 0; top: -15px; height: 5px; }
.dw.drop-y.drop-after::before { left: 0; right: 0; bottom: -15px; height: 5px; }
.dw.drop-x.drop-before::before { top: 0; bottom: 0; left: -15px; width: 5px; }
.dw.drop-x.drop-after::before { top: 0; bottom: 0; right: -15px; width: 5px; }
.dz-drop { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 70px; border: 2px dashed var(--line); border-radius: 18px; color: var(--muted); font-size: 13px; font-weight: 600; }
.dz-drop svg { width: 16px; height: 16px; }
.dz.dz-over .dz-drop { border-color: var(--accent); color: var(--accent-2); background: var(--accent-soft); }
@media (max-width: 1380px) { .dash { grid-template-columns: minmax(0, 1fr); } .dz-main, .dz-side, .dz-bottom, .dash.no-side .dz-main, .dash.no-main .dz-side { grid-column: 1 / -1; } .dz-side { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dz-bottom { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1180px) { .dz-main, .dz-side, .dz-bottom, .dash.no-main .dz-side { grid-template-columns: minmax(0, 1fr); } .dw { grid-column: auto; } }
@media (max-width: 760px) { .dhero h1 { font-size: 34px; } .dhero-text { padding: 30px 26px; } .dtiles { grid-template-columns: minmax(0, 1fr); } }

.dprop-pill { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.dprop-rent { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.dtl .grow, .dact .grow { min-width: 0; flex: 1; }
.dtl .dprop-name, .dact .dprop-name { white-space: normal; font-size: 15px; line-height: 1.3; }
.dday.late { background: var(--red-soft); border-color: transparent; color: var(--red); }
.dday.late b { color: var(--red); }

/* ---------- Sign-in screen: Owner or Tenant ---------- */
.login { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); min-height: 100vh; background: var(--bg); }
.login-art { position: relative; overflow: hidden; background: radial-gradient(60% 35% at 78% 92%, rgba(255,222,160,.75), rgba(255,222,160,0) 70%), linear-gradient(180deg, #141B3C 0%, #2E4374 36%, #7FA8D6 70%, #C9DCEB 86%, #F5D9AE 100%); }
.login-art > svg { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: max(150%, 900px); height: auto; aspect-ratio: 1200 / 420; display: block; }
.login-veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(12,16,38,.35) 0%, rgba(12,16,38,0) 45%, rgba(12,16,38,0) 75%, rgba(12,16,38,.25) 100%); }
.login-brand { position: absolute; left: 56px; right: 56px; top: 60px; color: #fff; }
.login-brand img { width: 230px; display: block; margin-bottom: 26px; }
.login-brand h1 { font-family: var(--title-serif); font-size: 44px; line-height: 1.12; margin: 0 0 12px; color: #fff; max-width: 560px; letter-spacing: -.01em; }
.login-brand p { margin: 0; font-size: 16px; color: rgba(255,255,255,.78); letter-spacing: .02em; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-inner { width: 100%; max-width: 440px; }
.login-top { display: flex; justify-content: flex-end; margin-bottom: 36px; }
.login-panel h2 { font-family: var(--title-serif); font-size: 38px; margin: 0 0 8px; color: var(--ink); }
.login-panel > .login-inner > p { margin: 0 0 28px; font-size: 16px; }
.login-choices { display: flex; flex-direction: column; gap: 14px; }
.login-card { display: flex; align-items: center; gap: 18px; width: 100%; text-align: left; padding: 20px 22px; border-radius: 20px; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); cursor: pointer; transition: border-color .12s, transform .12s, box-shadow .12s; color: inherit; font: inherit; }
.login-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.login-card.on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.login-ic { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.login-card[data-role=tenant] .login-ic { background: var(--green-soft); color: var(--green); }
.login-ic svg { width: 26px; height: 26px; }
.login-ct { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.login-ct b { font-size: 18px; color: var(--ink); }
.login-ct span { font-size: 13.5px; color: var(--muted); }
.login-chev { width: 20px; height: 20px; color: var(--muted-2); }
.login-code { margin-top: 22px; padding: 22px; border-radius: 20px; background: var(--card); border: 1px solid var(--line); }
.login-code label { display: block; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.login-code input { width: 100%; font-size: 26px; letter-spacing: .4em; text-align: center; padding: 14px; border-radius: 14px; font-family: var(--mono); }
.login-code input[type=text] { letter-spacing: .12em; font-size: 20px; text-transform: uppercase; }
.login-err { color: var(--red); font-weight: 600; font-size: 13.5px; min-height: 20px; margin: 8px 0 2px; }
.login-code.shake { animation: shake .35s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.login-foot { display: flex; align-items: center; gap: 8px; margin-top: 36px; font-size: 12.5px; color: var(--muted); }
.login-foot svg { width: 15px; height: 15px; }
@media (max-width: 980px) { .login { grid-template-columns: minmax(0, 1fr); } .login-art { min-height: 360px; } .login-brand { left: 28px; right: 28px; top: 28px; } .login-brand h1 { font-size: 30px; } .login-brand img { width: 170px; margin-bottom: 14px; } .login-panel { padding: 28px; } }
/* sidebar: version and sign out */
.sidebar-foot .side-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.sidebar-foot .side-row .side-ver { margin-top: 0; }
.sidebar-foot .side-out { display: inline-flex; align-items: center; gap: 6px; color: rgba(214,222,245,.62); text-decoration: none; font-weight: 600; }
.sidebar-foot .side-out svg { width: 15px; height: 15px; }
.sidebar-foot .side-out:hover { color: #fff; }
@media (max-width: 1000px) { .sidebar-foot .side-out span { display: none; } }
/* personal codes */
.code-big { font-family: var(--mono); font-size: 44px; font-weight: 700; letter-spacing: .14em; text-align: center; padding: 20px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-2); }
.code-big span { display: inline-block; width: 18px; }
.code-big.key { font-size: 26px; letter-spacing: .08em; }
/* ---------- Tenant space ---------- */
.ts { min-height: 100vh; background: var(--bg); }
.ts-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 16px; padding: 14px 36px; background: var(--navy); color: #fff; }
.ts-logo { height: 40px; }
.ts-title { display: flex; flex-direction: column; line-height: 1.25; }
.ts-title b { font-family: var(--title-serif); font-size: 18px; }
.ts-title span { font-size: 12.5px; color: rgba(255,255,255,.7); }
.ts-who { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; }
.ts-who .dface { width: 36px; height: 36px; font-size: 13px; box-shadow: none; }
.ts-top .lang-switch { background: rgba(255,255,255,.08); }
.btn.ts-out { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }
.btn.ts-out:hover { background: rgba(255,255,255,.2); }
.ts-main { max-width: 1280px; margin: 0 auto; padding: 30px 36px 70px; display: flex; flex-direction: column; gap: 24px; }
.ts-hero { min-height: 250px; }
.ts-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 24px; align-items: start; }
.ts-side { display: flex; flex-direction: column; gap: 24px; }
.ts-body { padding: 18px 22px 22px; }
.ts-group + .ts-group { margin-top: 18px; }
.ts-list { list-style: none; margin: 8px 0 0; padding: 0; }
.ts-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.ts-list li:last-child { border-bottom: 0; }
.ts-list .grow { min-width: 0; flex: 1; }
.ts-pays { list-style: none; margin: 6px 0 0; padding: 0; }
.ts-pays li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line-2); }
.ts-add .field { margin-bottom: 12px; }
@media (max-width: 1000px) { .ts-grid { grid-template-columns: minmax(0, 1fr); } .ts-top { padding: 12px 18px; flex-wrap: wrap; } .ts-main { padding: 20px 18px 50px; } }
.login-top .lang-switch, .ts .lang-switch { background: var(--paper-2); border-color: var(--line); }
.login-top .lang-switch button { color: var(--muted); }
.login-top .lang-switch button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(17,24,51,.12); }
.ts-top .lang-switch { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); }
.ts-top .lang-switch button { color: rgba(255,255,255,.7); }
.login-foot > span:last-child { white-space: nowrap; }

/* Enable Banking: list of banks, linked banks and their accounts */
.eb-banks { max-height: 330px; overflow-y: auto; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 14px; padding: 6px; background: var(--card); }
.eb-bank { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.eb-bank:hover { background: var(--surface-2); }
.eb-bank.on { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.eb-bank input { accent-color: var(--accent); margin: 0; }
.eb-bank .tiny { margin-left: auto; }
.eb-list { display: grid; gap: 12px; }
.eb-row { border: 1px solid var(--line-2); border-radius: 16px; padding: 14px 16px; display: grid; gap: 12px; }
.eb-row-h { display: flex; align-items: center; gap: 12px; }
.eb-row-h .grow { min-width: 0; }
.eb-accounts { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; }
