@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/instrument-serif.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('assets/fonts/instrument-serif-italic.woff2') format('woff2');
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('assets/fonts/manrope.woff2') format('woff2');
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --paper: #F4F0E6;
  --paper-deep: #EDE6D8;
  --card: #FFFDF8;
  --card-soft: #FBF7EE;
  --ink: #18261F;
  --ink-soft: #526158;
  --ink-faint: #637169;
  --forest: #173F35;
  --forest-deep: #102C25;
  --forest-soft: #245447;
  --sage: #DDE6D8;
  --sage-light: #EAF0E6;
  --clay: #C55D3A;
  --clay-deep: #A84627;
  --clay-light: #F2DCCF;
  --ochre: #E7D2A8;
  --gold: #B88934;
  --line: rgba(24, 38, 31, 0.12);
  --line-strong: rgba(24, 38, 31, 0.2);
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --sans: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --shadow-sm: 0 2px 8px rgba(22, 40, 31, 0.05);
  --shadow-md: 0 18px 50px rgba(22, 40, 31, 0.1);
  --shadow-lg: 0 36px 90px rgba(14, 35, 27, 0.22);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--clay-deep); outline-offset: 2px; }
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ============ BRAND ============ */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; letter-spacing: -0.05em;
  font-size: 20px; font-weight: 700; color: var(--ink);
}
.brand-mark { width: 34px; height: 34px; color: var(--forest); flex: none; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-word span { color: var(--clay); }
.brand--light { color: var(--paper); }
.brand--light .brand-mark { color: var(--paper); }
.brand--light .brand-word span { color: #E79070; }

/* ============ LOGIN ============ */
.login {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  overflow: hidden;
  background: var(--paper);
}
.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(24, 38, 31, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 38, 31, 0.045) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 45%, #000, transparent 78%);
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(8px); }
.login-orb--one { width: 520px; height: 520px; right: -140px; top: -160px; background: rgba(221, 230, 216, 0.65); }
.login-orb--two { width: 420px; height: 420px; left: -180px; bottom: -200px; background: rgba(242, 220, 207, 0.55); }

.login-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  min-height: 690px;
  display: grid;
  grid-template-columns: 1fr 1.06fr;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--card);
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 38px 42px 34px;
  background:
    radial-gradient(ellipse 120% 80% at 0% 0%, rgba(36, 84, 71, 0.85), transparent 62%),
    linear-gradient(155deg, #1C4A3E 0%, var(--forest) 45%, var(--forest-deep) 100%);
  color: var(--paper);
  overflow: hidden;
}
.login-brand::after {
  content: '';
  position: absolute; right: -110px; bottom: -120px;
  width: 340px; height: 340px; border-radius: 50%;
  border: 1px solid rgba(247, 243, 234, 0.14);
  box-shadow: 0 0 0 42px rgba(247, 243, 234, 0.035), 0 0 0 84px rgba(247, 243, 234, 0.02);
}
.login-copy { margin-top: 8px; }
.eyebrow-light {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(247, 243, 234, 0.78);
  font-size: 10px; font-weight: 700; letter-spacing: 0.17em; text-transform: uppercase;
}
.eyebrow-light > span {
  width: 6px; height: 6px; border-radius: 50%; background: #E79070;
  box-shadow: 0 0 0 4px rgba(231, 144, 112, 0.16);
}
.login-copy h1 {
  margin-top: 20px;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.6rem, 4.4vw, 3.9rem);
  line-height: 0.94; letter-spacing: -0.035em;
  color: var(--paper);
}
.login-copy h1 em { color: #E9A487; font-style: italic; }
.login-copy p {
  margin-top: 18px; max-width: 380px;
  color: rgba(247, 243, 234, 0.76);
  font-size: 13.5px; line-height: 1.6;
}
.login-points { display: grid; gap: 12px; margin-top: auto; }
.login-points li {
  display: flex; align-items: flex-start; gap: 10px;
  color: rgba(247, 243, 234, 0.72); font-size: 12.5px;
}
.login-points .icon { width: 17px; height: 17px; margin-top: 1px; color: #C9DEC6; }
.login-quote {
  padding-top: 22px; border-top: 1px solid rgba(247, 243, 234, 0.14);
}
.login-quote p {
  font-family: var(--serif); font-size: 17px; line-height: 1.25;
  letter-spacing: -0.01em; color: rgba(247, 243, 234, 0.9);
}
.login-quote span {
  display: block; margin-top: 9px;
  color: rgba(247, 243, 234, 0.56); font-size: 10px;
  font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
}

.login-panel {
  display: flex; flex-direction: column;
  padding: 38px 46px 24px;
  background: var(--card);
}
.login-card { width: 100%; max-width: 410px; margin: auto; }
.demo-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 11px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--card-soft);
  color: var(--ink-soft); font-size: 10px; font-weight: 700;
  letter-spacing: 0.09em; text-transform: uppercase;
}
.demo-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--clay);
  box-shadow: 0 0 0 3px rgba(197, 93, 58, 0.14);
}
.login-card h2 {
  margin-top: 18px; font-size: 27px; font-weight: 650;
  letter-spacing: -0.035em; line-height: 1.1;
}
.login-sub { margin-top: 7px; color: var(--ink-soft); font-size: 12.5px; }

.role-picker { display: grid; gap: 8px; margin-top: 22px; }
.role-card {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); text-align: left; color: var(--ink);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}
.role-card:hover { border-color: var(--line-strong); background: var(--card-soft); }
.role-card.is-active {
  border-color: var(--forest);
  background: var(--sage-light);
  box-shadow: inset 0 0 0 1px var(--forest);
}
.role-icon {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 9px; background: var(--paper-deep); color: var(--forest);
  flex: none;
}
.role-card.is-active .role-icon { background: var(--forest); color: var(--paper); }
.role-icon .icon { width: 17px; height: 17px; }
.role-card > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.role-card strong { font-size: 12.5px; font-weight: 700; line-height: 1.3; }
.role-card em { margin-top: 1px; color: var(--ink-soft); font-size: 10.5px; font-style: normal; }
.role-check { width: 16px; height: 16px; margin-left: auto; color: var(--forest); opacity: 0; }
.role-card.is-active .role-check { opacity: 1; }

.login-form { margin-top: 20px; display: grid; gap: 12px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--card); color: var(--ink); font-size: 13px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.12);
}
.login-error { color: var(--clay-deep); font-size: 11.5px; font-weight: 600; }
.login-form .btn { margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 9px 16px; border: 1px solid transparent;
  border-radius: 999px; font-size: 12px; font-weight: 700;
  letter-spacing: -0.01em; text-decoration: none;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--forest); color: var(--paper); }
.btn--primary:hover { background: var(--forest-deep); }
.btn--clay { background: var(--clay-deep); color: #fff; }
.btn--clay:hover { background: #92391E; }
.btn--outline { border-color: var(--line-strong); background: var(--card); color: var(--ink); }
.btn--outline:hover { border-color: var(--forest); background: var(--sage-light); }
.btn--ghost { background: transparent; color: var(--ink-soft); }
.btn--ghost:hover { background: var(--paper-deep); color: var(--ink); }
.btn--small { min-height: 32px; padding: 6px 11px; font-size: 11px; }
.btn--full { width: 100%; }
.btn .icon { width: 16px; height: 16px; }

.login-note {
  margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line);
  color: var(--ink-faint); font-size: 10.5px; line-height: 1.6;
}
.login-note a { color: var(--forest); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.login-foot {
  display: flex; justify-content: space-between; gap: 12px;
  width: 100%; max-width: 410px; margin: 24px auto 0;
  color: var(--ink-faint); font-size: 10px;
}
.login-foot span { display: inline-flex; align-items: center; gap: 5px; }
.login-foot .icon { width: 12px; height: 12px; }

/* ============ APP SHELL ============ */
.app { display: flex; min-height: 100vh; background: var(--paper); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: 252px; display: flex; flex-direction: column;
  padding: 26px 18px 20px;
  background:
    radial-gradient(ellipse 120% 60% at 0% 0%, rgba(36, 84, 71, 0.6), transparent 60%),
    linear-gradient(180deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--paper);
  transition: transform 0.28s var(--ease);
}
.sidebar-top { padding: 0 6px; }
.brand--app { font-size: 19px; }
.brand--app .brand-mark { width: 31px; height: 31px; }
.workspace-label {
  display: block; margin: 20px 0 8px 2px;
  color: rgba(247, 243, 234, 0.45);
  font-size: 9px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
}
.side-nav { display: grid; gap: 3px; margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: 0; border-radius: 9px;
  background: transparent; color: rgba(247, 243, 234, 0.68);
  font-size: 12.5px; font-weight: 600; text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-item .icon { width: 17px; height: 17px; opacity: 0.9; }
.nav-item:hover { background: rgba(247, 243, 234, 0.07); color: var(--paper); }
.nav-item.is-active {
  background: rgba(247, 243, 234, 0.12); color: var(--paper);
  box-shadow: inset 2px 0 0 #E9A487;
}
.nav-item.is-active .icon { color: #E9A487; }
.nav-count {
  margin-left: auto; min-width: 19px; padding: 1px 6px;
  border-radius: 999px; background: var(--clay); color: #fff;
  font-size: 9.5px; font-weight: 700; text-align: center;
}
.nav-item:not(.is-active) .nav-count { background: rgba(197, 93, 58, 0.7); }

.sidebar-foot {
  margin-top: auto; padding: 16px 6px 0;
  border-top: 1px solid rgba(247, 243, 234, 0.12);
}
.side-person { display: flex; align-items: center; gap: 10px; }
.person-avatar {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: var(--clay-light); color: #7E2F14;
  font-size: 10px; font-weight: 800; letter-spacing: 0.02em; flex: none;
}
.side-person-text { min-width: 0; }
.side-person-text strong {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; font-weight: 700; color: var(--paper);
}
.side-person-text span {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 1px; color: rgba(247, 243, 234, 0.55); font-size: 9.5px;
}
.side-actions { display: flex; gap: 4px; margin-left: auto; }
.side-icon {
  display: grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 7px; background: transparent;
  color: rgba(247, 243, 234, 0.55);
}
.side-icon:hover { background: rgba(247, 243, 234, 0.1); color: var(--paper); }
.side-icon .icon { width: 15px; height: 15px; }
.side-demo-note {
  margin-top: 12px; color: rgba(247, 243, 234, 0.4);
  font-size: 9px; line-height: 1.5;
}

.app-main { flex: 1; min-width: 0; margin-left: 252px; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 16px;
  min-height: 76px; padding: 12px 30px;
  background: rgba(244, 240, 230, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.page-heading { min-width: 0; }
.page-eyebrow {
  display: block; color: var(--ink-faint);
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
}
.page-heading h1 {
  margin-top: 2px; font-family: var(--serif); font-weight: 400;
  font-size: 27px; line-height: 1; letter-spacing: -0.025em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }

.property-switch, .role-switch {
  position: relative; display: flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 0 9px; border: 1px solid var(--line-strong);
  border-radius: 9px; background: var(--card);
  color: var(--ink-soft); font-size: 11px; font-weight: 700;
}
.property-switch .icon, .role-switch .icon { width: 14px; height: 14px; }
.property-switch select, .role-switch select {
  appearance: none; border: 0; background: transparent;
  padding: 0 16px 0 0; font-size: 11px; font-weight: 700;
  color: var(--ink); cursor: pointer; max-width: 156px;
}
.property-switch .chevron, .role-switch .chevron {
  position: absolute; right: 6px; pointer-events: none;
  width: 13px; height: 13px; opacity: 0.6;
}
.role-switch { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.role-switch select { color: var(--paper); max-width: 96px; }
.role-switch .chevron { color: var(--paper); opacity: 0.7; }
.role-switch .icon:first-child { color: #E9A487; }
.role-switch option { color: var(--ink); background: var(--card); }

.demo-chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 28px; padding: 0 10px; border-radius: 999px;
  background: var(--sage); color: var(--forest);
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
}
.demo-chip .demo-dot { width: 5px; height: 5px; }

.icon-btn {
  position: relative; display: grid; place-items: center;
  width: 36px; height: 36px; border: 1px solid var(--line-strong);
  border-radius: 9px; background: var(--card); color: var(--ink-soft);
}
.icon-btn:hover { border-color: var(--forest); color: var(--forest); }
.icon-btn .icon { width: 17px; height: 17px; }
.menu-btn { display: none; }
.notif-wrap, .avatar-wrap { position: relative; }
.notif-dot {
  position: absolute; top: 8px; right: 9px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--clay); border: 1.5px solid var(--card);
}
.avatar-btn {
  display: grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 50%; background: var(--forest); color: var(--paper);
  font-size: 10px; font-weight: 800; letter-spacing: 0.02em;
}
.avatar-btn:hover { background: var(--forest-deep); }

.notif-pop, .account-pop {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 90;
  width: 330px; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px;
  background: var(--card); box-shadow: var(--shadow-md);
  animation: pop 0.16s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.pop-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 15px; border-bottom: 1px solid var(--line);
}
.pop-head strong { font-size: 12px; }
.pop-head span { color: var(--ink-faint); font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.notif-row {
  display: flex; gap: 10px; padding: 12px 15px;
  border-bottom: 1px solid var(--line);
}
.notif-row:last-child { border-bottom: 0; }
.notif-row .notif-icon {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: var(--sage-light); color: var(--forest); flex: none;
}
.notif-row .notif-icon.is-alert { background: var(--clay-light); color: var(--clay-deep); }
.notif-row .notif-icon .icon { width: 15px; height: 15px; }
.notif-row p { font-size: 11.5px; line-height: 1.45; color: var(--ink); }
.notif-row span { display: block; margin-top: 3px; color: var(--ink-faint); font-size: 9.5px; }
.pop-foot {
  width: 100%; padding: 10px; border: 0; border-top: 1px solid var(--line);
  background: var(--card-soft); color: var(--forest);
  font-size: 10.5px; font-weight: 700;
}
.pop-foot:hover { background: var(--sage-light); }
.account-pop { width: 236px; padding: 8px; }
.account-head { padding: 8px 9px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.account-head strong { display: block; font-size: 12px; }
.account-head span { display: block; margin-top: 2px; color: var(--ink-faint); font-size: 10.5px; }
.account-pop button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 9px; border: 0; border-radius: 7px;
  background: transparent; color: var(--ink-soft); font-size: 11.5px; text-align: left;
}
.account-pop button:hover { background: var(--paper-deep); color: var(--ink); }
.account-pop button .icon { width: 14px; height: 14px; }
.account-pop button:last-child { color: var(--clay-deep); }

.view-root { width: 100%; max-width: 1360px; margin: 0 auto; padding: 26px 30px 64px; }
.view { animation: viewIn 0.22s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.view-head p { color: var(--ink-soft); font-size: 12.5px; }
.view-head h2 { font-family: var(--serif); font-size: 24px; font-weight: 400; letter-spacing: -0.02em; }
.view-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ CARDS / COMMON ============ */
.card {
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--card); box-shadow: var(--shadow-sm);
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 18px; border-bottom: 1px solid var(--line);
}
.card-head h2, .card-head h3 { font-size: 13.5px; font-weight: 700; letter-spacing: -0.015em; }
.card-head p { margin-top: 2px; color: var(--ink-faint); font-size: 10.5px; }
.card-body { padding: 18px; }
.card-link {
  display: inline-flex; align-items: center; gap: 5px;
  border: 0; background: transparent; color: var(--forest);
  font-size: 10.5px; font-weight: 700; text-decoration: none;
}
.card-link:hover { text-decoration: underline; text-underline-offset: 2px; }
.card-link .icon { width: 13px; height: 13px; }

.kpi-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px; margin-bottom: 18px;
}
.kpi {
  position: relative; min-width: 0; padding: 16px 17px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--card); box-shadow: var(--shadow-sm);
}
.kpi-label {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--ink-faint); font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.kpi-label .icon { width: 15px; height: 15px; color: var(--ink-faint); }
.kpi-value {
  margin-top: 11px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.75rem, 2.3vw, 2.35rem); line-height: 0.95;
  letter-spacing: -0.035em;
}
.kpi-value.is-alert { color: var(--clay-deep); }
.kpi-sub { display: flex; align-items: center; gap: 6px; margin-top: 9px; color: var(--ink-faint); font-size: 10.5px; }
.kpi-sub strong { color: var(--forest); font-weight: 700; }
.kpi-sub .up { color: var(--forest); }
.kpi-sub .down { color: var(--clay-deep); }
.kpi-bar { height: 4px; margin-top: 12px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.kpi-bar span { display: block; height: 100%; border-radius: inherit; background: var(--forest); }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
}
.chip::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.chip--paid, .chip--good { background: var(--sage); color: #23503C; }
.chip--late, .chip--alert { background: var(--clay-light); color: #7E2F14; }
.chip--pending { background: #F4E6C8; color: #6E4E0F; }
.chip--info { background: #E2EBEA; color: #245447; }
.chip--muted { background: var(--paper-deep); color: var(--ink-soft); }
.chip--plain::before { display: none; }

.overview-grid {
  display: grid; grid-template-columns: minmax(0, 1.72fr) minmax(300px, 1fr);
  gap: 16px; align-items: start;
}
.overview-grid > *, .stack > * { min-width: 0; }
.stack { display: grid; gap: 16px; }

.chart { display: flex; align-items: flex-end; gap: 10px; height: 160px; padding-top: 8px; }
.chart-col { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; height: 100%; }
.chart-bar {
  width: 100%; max-width: 38px; min-height: 8px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--forest-soft), var(--forest));
  transition: height 0.5s var(--ease);
}
.chart-col.is-current .chart-bar { background: linear-gradient(180deg, var(--clay), var(--clay-deep)); }
.chart-col span { color: var(--ink-faint); font-size: 9px; font-weight: 600; }
.chart-legend { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.chart-legend strong { font-size: 11px; }
.chart-legend span { color: var(--ink-faint); font-size: 10px; }

.attention-list { display: grid; }
.attention-row {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.attention-row:last-child { border-bottom: 0; }
.attention-icon {
  display: grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: var(--sage-light); color: var(--forest); flex: none;
}
.attention-icon.is-alert { background: var(--clay-light); color: var(--clay-deep); }
.attention-icon .icon { width: 15px; height: 15px; }
.attention-row p { font-size: 11.5px; line-height: 1.4; }
.attention-row p strong { font-weight: 700; }
.attention-row span { display: block; margin-top: 2px; color: var(--ink-faint); font-size: 9.5px; }
.attention-row .btn { margin-left: auto; flex: none; }

.activity { display: grid; }
.activity-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-dot {
  width: 7px; height: 7px; margin-top: 5px; border-radius: 50%;
  background: var(--sage); box-shadow: 0 0 0 3px rgba(221, 230, 216, 0.5); flex: none;
}
.activity-dot.is-clay { background: var(--clay); box-shadow: 0 0 0 3px rgba(197, 93, 58, 0.12); }
.activity-row p { font-size: 11px; line-height: 1.45; }
.activity-row span { display: block; margin-top: 2px; color: var(--ink-faint); font-size: 9.5px; }

.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th {
  padding: 0 0 8px; border-bottom: 1px solid var(--line);
  color: var(--ink-faint); font-size: 9px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; text-align: right;
}
.mini-table th:first-child { text-align: left; }
.mini-table td { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; text-align: right; }
.mini-table tr:last-child td { border-bottom: 0; }
.mini-table td:first-child { text-align: left; font-weight: 600; }
.mini-table td:first-child span { display: block; margin-top: 1px; color: var(--ink-faint); font-size: 9.5px; font-weight: 400; }
.mini-table .num { font-variant-numeric: tabular-nums; }

/* ============ TABLES / TOOLBARS ============ */
.toolbar {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.search-box { position: relative; flex: 1 1 230px; max-width: 340px; }
.search-box .icon {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--ink-faint); pointer-events: none;
}
.search-box input {
  width: 100%; min-height: 38px; padding: 8px 11px 8px 34px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--card); font-size: 12px;
}
.search-box input:focus { outline: none; border-color: var(--forest); box-shadow: 0 0 0 3px rgba(23, 63, 53, 0.1); }
.select-box {
  position: relative; display: inline-flex; align-items: center;
  min-height: 38px; padding: 0 9px 0 11px;
  border: 1px solid var(--line-strong); border-radius: 9px;
  background: var(--card); color: var(--ink-soft);
}
.select-box select {
  appearance: none; border: 0; background: transparent; padding-right: 17px;
  font-size: 11.5px; font-weight: 600; color: var(--ink); cursor: pointer;
}
.select-box .icon { position: absolute; right: 7px; width: 13px; height: 13px; pointer-events: none; opacity: 0.6; }

.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; min-width: 740px; border-collapse: collapse; }
.data-table th {
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--card-soft); color: var(--ink-faint);
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  text-align: left; white-space: nowrap;
}
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td {
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  font-size: 11.5px; vertical-align: middle;
}
.data-table tbody tr { transition: background 0.12s ease; }
.data-table tbody tr:hover { background: rgba(234, 240, 230, 0.45); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tfoot td {
  padding: 11px 14px; border-top: 1px solid var(--line-strong);
  background: var(--card-soft); font-size: 11px; font-weight: 700;
}
.data-table .strong { font-weight: 700; }
.data-table .muted { color: var(--ink-faint); }
.tenant-cell { display: flex; align-items: center; gap: 9px; min-width: 160px; }
.tenant-avatar {
  display: grid; place-items: center; width: 29px; height: 29px;
  border-radius: 50%; background: var(--clay-light); color: #7E2F14;
  font-size: 8.5px; font-weight: 800; flex: none;
}
.tenant-avatar--sage { background: var(--sage); color: #23503C; }
.tenant-avatar--ochre { background: var(--ochre); color: #5C4424; }
.tenant-avatar--blue { background: #DCE6EA; color: #2B4C57; }
.tenant-cell strong { display: block; font-size: 11.5px; line-height: 1.3; }
.tenant-cell > span:last-child > span { display: block; margin-top: 1px; color: var(--ink-faint); font-size: 9.5px; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.row-actions .btn { white-space: nowrap; }
.table-empty { padding: 34px 20px; text-align: center; color: var(--ink-faint); font-size: 12px; }
.table-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 14px; border-top: 1px solid var(--line);
  background: var(--card-soft); color: var(--ink-faint); font-size: 10px;
}
.table-foot strong { color: var(--ink); }

/* ============ PROPERTIES ============ */
.property-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.property-card { padding: 18px; }
.property-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.property-top h3 { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.property-top p { margin-top: 3px; color: var(--ink-faint); font-size: 10.5px; }
.property-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.property-stats span { display: block; color: var(--ink-faint); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; }
.property-stats strong { display: block; margin-top: 3px; font-size: 13px; font-variant-numeric: tabular-nums; }
.property-bar { height: 5px; margin-top: 14px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.property-bar span { display: block; height: 100%; background: var(--forest); border-radius: inherit; }
.property-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.property-foot span { color: var(--ink-faint); font-size: 10px; }

/* ============ STATEMENTS / DOCS ============ */
.statement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.statement-card { padding: 17px; }
.statement-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.statement-period { font-family: var(--serif); font-size: 22px; line-height: 1; letter-spacing: -0.02em; }
.statement-card .meta { margin-top: 4px; color: var(--ink-faint); font-size: 10px; }
.statement-net { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.statement-net span { display: block; color: var(--ink-faint); font-size: 9px; text-transform: uppercase; letter-spacing: 0.07em; }
.statement-net strong { display: block; margin-top: 3px; font-family: var(--serif); font-size: 25px; font-weight: 400; letter-spacing: -0.02em; }
.statement-actions { display: flex; gap: 6px; margin-top: 14px; }

.doc-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.filter-chips { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-chip {
  padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: var(--card); color: var(--ink-soft); font-size: 10px; font-weight: 700;
}
.filter-chip:hover { border-color: var(--forest); color: var(--forest); }
.filter-chip.is-active { background: var(--forest); border-color: var(--forest); color: var(--paper); }
.doc-list { display: grid; gap: 0; }
.doc-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
}
.doc-row:last-child { border-bottom: 0; }
.doc-row:hover { background: rgba(234, 240, 230, 0.35); }
.doc-icon {
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 8px; background: var(--sage-light); color: var(--forest); flex: none;
}
.doc-icon.is-notice { background: var(--clay-light); color: var(--clay-deep); }
.doc-icon.is-statement { background: #E2EBEA; color: #245447; }
.doc-icon .icon { width: 16px; height: 16px; }
.doc-main { min-width: 0; flex: 1; }
.doc-main strong { display: block; font-size: 12px; font-weight: 700; }
.doc-main span { display: block; margin-top: 2px; color: var(--ink-faint); font-size: 9.5px; }
.doc-row .chip { flex: none; }
.doc-row .btn { flex: none; }

/* ============ MAINTENANCE ============ */
.kanban {
  display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 13px; align-items: start;
  overflow-x: auto; padding-bottom: 6px;
}
.kanban-col { min-width: 0; }
.kanban-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2px 9px; color: var(--ink-soft);
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
}
.kanban-head span { color: var(--ink-faint); font-size: 9.5px; }
.kanban-cards { display: grid; gap: 9px; }
.work-card {
  padding: 13px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); box-shadow: var(--shadow-sm);
}
.work-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.work-top strong { font-size: 11.5px; line-height: 1.35; }
.priority { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-faint); font-size: 9px; font-weight: 700; }
.priority::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.priority.is-high { color: var(--clay-deep); }
.priority.is-high::before { background: var(--clay); }
.priority.is-low::before { background: var(--forest-soft); }
.work-meta { margin-top: 6px; color: var(--ink-faint); font-size: 9.5px; line-height: 1.45; }
.work-cost { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); }
.work-cost span { color: var(--ink-faint); font-size: 9.5px; }
.work-cost strong { font-size: 11px; }
.work-card .btn { width: 100%; margin-top: 9px; }
.kanban-empty {
  padding: 18px; border: 1px dashed var(--line-strong); border-radius: 12px;
  color: var(--ink-faint); font-size: 10.5px; text-align: center;
}

/* ============ OWNER / TENANT SPECIFIC ============ */
.distribution-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  padding: 24px 26px; border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 70% 140% at 100% 0%, rgba(36, 84, 71, 0.9), transparent 60%),
    linear-gradient(140deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--paper);
  box-shadow: var(--shadow-md);
}
.distribution-hero::after {
  content: ''; position: absolute; right: -50px; top: -70px;
  width: 240px; height: 240px; border-radius: 50%;
  border: 1px solid rgba(247, 243, 234, 0.15);
  box-shadow: 0 0 0 34px rgba(247, 243, 234, 0.04);
}
.distribution-copy { position: relative; z-index: 1; }
.distribution-copy span { color: rgba(247, 243, 234, 0.68); font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
.distribution-copy strong {
  display: block; margin-top: 7px; font-family: var(--serif); font-weight: 400;
  font-size: clamp(2.2rem, 3.4vw, 3.1rem); line-height: 0.95; letter-spacing: -0.035em;
}
.distribution-copy p { margin-top: 8px; color: rgba(247, 243, 234, 0.7); font-size: 11px; }
.distribution-side { position: relative; z-index: 1; text-align: right; }
.distribution-side > span:not(.chip) { display: block; color: rgba(247, 243, 234, 0.6); font-size: 9.5px; }
.distribution-side strong { display: block; margin-top: 4px; font-size: 14px; }
.distribution-side .chip { margin-top: 7px; }

.owner-property-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.owner-property { padding: 18px; }
.owner-property h3 { font-size: 15px; }
.owner-property .meta { margin-top: 3px; color: var(--ink-faint); font-size: 10.5px; }
.owner-split { display: flex; align-items: center; gap: 14px; margin-top: 15px; }
.owner-split-bar { flex: 1; height: 7px; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.owner-split-bar span { display: block; height: 100%; border-radius: inherit; background: var(--forest); }
.owner-split small { color: var(--ink-faint); font-size: 10px; white-space: nowrap; }

.approval-card { padding: 18px; }
.approval-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.approval-card h3 { font-size: 14px; }
.approval-card .meta { margin-top: 3px; color: var(--ink-faint); font-size: 10.5px; }
.approval-quote { margin-top: 14px; padding: 13px; border-radius: 10px; background: var(--card-soft); border: 1px solid var(--line); }
.approval-quote span { display: block; color: var(--ink-faint); font-size: 9.5px; }
.approval-quote strong { display: block; margin-top: 3px; font-family: var(--serif); font-size: 24px; font-weight: 400; }
.approval-actions { display: flex; gap: 7px; margin-top: 13px; }

.tenant-hero {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 22px;
  padding: 24px 26px; border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse 80% 130% at 100% 0%, rgba(36, 84, 71, 0.8), transparent 60%),
    linear-gradient(140deg, var(--forest) 0%, var(--forest-deep) 100%);
  color: var(--paper);
  box-shadow: var(--shadow-md);
}
.tenant-hero h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.9rem, 2.8vw, 2.6rem); line-height: 0.98; letter-spacing: -0.03em; }
.tenant-hero h2 em { color: #E9A487; font-style: italic; }
.tenant-hero p { margin-top: 9px; max-width: 390px; color: rgba(247, 243, 234, 0.7); font-size: 11.5px; }
.tenant-hero-side {
  position: relative; z-index: 1; align-self: center;
  padding: 15px 16px; border: 1px solid rgba(247, 243, 234, 0.18);
  border-radius: 12px; background: rgba(247, 243, 234, 0.07);
}
.tenant-hero-side span { color: rgba(247, 243, 234, 0.62); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.tenant-hero-side strong { display: block; margin-top: 5px; font-family: var(--serif); font-size: 29px; font-weight: 400; }
.tenant-hero-side small { display: flex; align-items: center; gap: 5px; margin-top: 7px; color: #C9DEC6; font-size: 10px; }
.tenant-hero-side .icon { width: 13px; height: 13px; }

.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.quick-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  padding: 15px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--card); text-align: left; color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.quick-card:hover { border-color: var(--forest); background: var(--sage-light); }
.quick-icon {
  display: grid; place-items: center; width: 31px; height: 31px;
  border-radius: 8px; background: var(--sage-light); color: var(--forest);
}
.quick-card:hover .quick-icon { background: var(--forest); color: var(--paper); }
.quick-icon .icon { width: 15px; height: 15px; }
.quick-card strong { font-size: 11.5px; }
.quick-card span { color: var(--ink-faint); font-size: 9.5px; line-height: 1.4; }

.receipt-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.receipt-row:last-child { border-bottom: 0; }
.receipt-date {
  display: grid; place-items: center; width: 40px; height: 40px;
  border-radius: 9px; background: var(--card-soft); border: 1px solid var(--line);
  color: var(--ink-soft); font-size: 9px; font-weight: 700; text-align: center; line-height: 1.15; flex: none;
}
.receipt-date strong { display: block; font-size: 13px; color: var(--ink); }
.receipt-main { flex: 1; min-width: 0; }
.receipt-main strong { display: block; font-size: 11.5px; }
.receipt-main span { display: block; margin-top: 1px; color: var(--ink-faint); font-size: 9.5px; }
.receipt-row > strong { font-size: 12px; font-variant-numeric: tabular-nums; }
.receipt-row .btn { flex: none; }

.request-card { padding: 13px 0; border-bottom: 1px solid var(--line); }
.request-card:last-child { border-bottom: 0; }
.request-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.request-top strong { font-size: 11.5px; }
.request-card p { margin-top: 3px; color: var(--ink-faint); font-size: 10px; line-height: 1.45; }
.request-meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--ink-faint); font-size: 9.5px; }

.unit-detail {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  margin: 4px 0 16px;
}
.unit-detail div { padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--card-soft); }
.unit-detail span { display: block; color: var(--ink-faint); font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; }
.unit-detail strong { display: block; margin-top: 2px; font-size: 12px; }

/* ============ MODAL / TOAST ============ */
.modal {
  width: min(680px, calc(100vw - 28px));
  max-height: min(86vh, 860px);
  padding: 0; border: 0; border-radius: 18px;
  background: var(--card); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.modal::backdrop { background: rgba(16, 44, 37, 0.55); backdrop-filter: blur(3px); }
.modal-shell { position: relative; padding: 26px 28px 24px; overflow: auto; max-height: inherit; }
.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: grid; place-items: center; width: 32px; height: 32px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--card); color: var(--ink-soft);
}
.modal-close:hover { border-color: var(--forest); color: var(--forest); }
.modal-close .icon { width: 15px; height: 15px; }
.modal-eyebrow { color: var(--ink-faint); font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; }
.modal h2 {
  margin-top: 6px; padding-right: 30px;
  font-family: var(--serif); font-size: 29px; font-weight: 400;
  line-height: 1.02; letter-spacing: -0.025em;
}
.modal-sub { margin-top: 7px; color: var(--ink-soft); font-size: 11.5px; line-height: 1.55; }
.modal-section { margin-top: 20px; }
.modal-section h3 { font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); }
.modal-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.modal-table td { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.modal-table tr:last-child td { border-bottom: 0; }
.modal-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.modal-table .total td { padding-top: 11px; border-top: 1px solid var(--line-strong); font-weight: 700; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.modal-note { margin-top: 15px; padding: 10px 12px; border-radius: 8px; background: var(--sage-light); color: var(--forest); font-size: 10px; line-height: 1.5; }
.modal-highlight {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-top: 16px; padding: 14px; border-radius: 10px;
  background: var(--forest); color: var(--paper);
}
.modal-highlight span { color: rgba(247, 243, 234, 0.66); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.08em; }
.modal-highlight strong { display: block; margin-top: 3px; font-family: var(--serif); font-size: 24px; font-weight: 400; }
.modal-highlight .chip { background: rgba(247, 243, 234, 0.15); color: var(--paper); }
.modal-list { display: grid; gap: 0; margin-top: 6px; }
.modal-list-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.modal-list-row:last-child { border-bottom: 0; }
.modal-list-row .icon { width: 15px; height: 15px; color: var(--forest); }
.modal-list-row span { color: var(--ink-faint); margin-left: auto; }
.modal-form { display: grid; gap: 11px; margin-top: 16px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 200;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  max-width: calc(100vw - 30px);
  padding: 11px 16px; border-radius: 999px;
  background: var(--forest); color: var(--paper);
  font-size: 11.5px; font-weight: 600;
  box-shadow: 0 18px 50px rgba(14, 35, 27, 0.28);
  animation: toastIn 0.22s var(--ease);
}
.toast .icon { width: 15px; height: 15px; color: #C9DEC6; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.sidebar-scrim {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(16, 44, 37, 0.45);
  backdrop-filter: blur(2px);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1180px) {
  .topbar { padding: 12px 22px; }
  .view-root { padding: 24px 22px 56px; }
  .demo-chip { display: none; }
  .overview-grid { grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); }
}

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app-main { margin-left: 0; }
  .menu-btn { display: grid; }
  .property-switch { display: none; }
  .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(4, minmax(210px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
}

@media (max-width: 900px) {
  .login { padding: 18px; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-brand { padding: 28px 30px 26px; gap: 18px; }
  .login-copy h1 { font-size: clamp(2.2rem, 8vw, 3rem); margin-top: 12px; }
  .login-copy p { margin-top: 10px; font-size: 12.5px; max-width: 520px; }
  .login-points, .login-quote { display: none; }
  .login-panel { padding: 28px 30px 20px; }
  .login-card { max-width: 480px; }
  .login-foot { max-width: 480px; }
  .overview-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .property-grid, .owner-property-grid { grid-template-columns: 1fr; }
  .statement-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-actions { gap: 7px; }
  .page-heading h1 { font-size: 24px; }
  .tenant-hero { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topbar { min-height: 68px; padding: 10px 15px; gap: 10px; }
  .view-root { padding: 18px 15px 48px; }
  .page-eyebrow { display: none; }
  .page-heading h1 { font-size: 21px; }
  .role-switch { min-height: 34px; padding: 0 8px; }
  .role-switch select { max-width: 78px; font-size: 10.5px; }
  .role-switch .icon:first-child { display: none; }
  .bell-wrap, .notif-wrap { display: none; }
  .avatar-btn { width: 34px; height: 34px; }
  .icon-btn { width: 34px; height: 34px; }
  .kpi-grid { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 1.9rem; }
  .statement-grid { grid-template-columns: 1fr; }
  .view-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .view-head h2 { font-size: 21px; }
  .data-table { min-width: 680px; }
  .chart { height: 132px; gap: 7px; }
  .modal-shell { padding: 22px 18px 20px; }
  .modal h2 { font-size: 25px; }
  .notif-pop { width: min(330px, calc(100vw - 30px)); right: -42px; }
  .account-pop { right: 0; }
  .login-panel { padding: 24px 20px 18px; }
  .login-brand { padding: 24px 22px 22px; }
  .login { padding: 0; }
  .login-shell { border-radius: 0; min-height: 100vh; box-shadow: none; }
  .login-card h2 { font-size: 24px; }
  .tenant-hero { padding: 20px; }
  .quick-grid { gap: 9px; }
}

@media (max-width: 520px) {
  .topbar { flex-wrap: wrap; }
  .page-heading { flex: 1; }
  .topbar-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .role-switch { margin-right: auto; }
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 1.65rem; }
  .kpi-label { font-size: 8.5px; }
  .kpi-sub { font-size: 9.5px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .property-stats { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .property-stats strong { font-size: 11.5px; }
  .toolbar { gap: 7px; }
  .search-box { max-width: none; flex-basis: 100%; }
  .doc-row { flex-wrap: wrap; }
  .doc-row .btn { margin-left: auto; }
  .statement-actions { flex-wrap: wrap; }
  .demo-pill { font-size: 9px; }
  .login-card h2 { font-size: 22px; }
  .login-sub { font-size: 11.5px; }
  .role-card { padding: 9px 10px; }
  .role-card em { font-size: 9.5px; }
  .login-foot { font-size: 9px; }
  .tenant-hero h2 { font-size: 1.9rem; }
  .receipt-row { gap: 8px; }
  .receipt-row .btn span { display: none; }
  .distribution-hero { flex-direction: column; align-items: flex-start; }
  .distribution-side { text-align: left; }
}

@media (max-width: 380px) {
  .role-card em { display: none; }
  .role-check { display: none; }
  .kpi-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr; }
  .login-foot { flex-direction: column; gap: 4px; }
}

@media print {
  body > *:not(dialog) { display: none !important; }
  dialog.modal { display: block; position: static; width: 100%; max-height: none; border: 0; box-shadow: none; }
  dialog.modal::backdrop { display: none; }
  .modal-shell { padding: 0; overflow: visible; }
  .modal-close, .modal-actions { display: none !important; }
}
