/* ============ EstateOS Design System ============ */
:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --surface-3: #f1f3f5;
  --border: #e6e9ef;
  --border-strong: #d7dbe3;
  --ink: #0e1526;
  --ink-2: #3c4657;
  --muted: #6b7686;
  --muted-2: #98a2b3;
  --primary: #0c6b58;
  --primary-strong: #095447;
  --primary-soft: #e7f2ee;
  --primary-softer: #f0f7f4;
  --accent: #c9973b;
  --accent-soft: #f6ecd7;
  --danger: #c0392b;
  --danger-soft: #fdeceb;
  --warn: #b26a00;
  --warn-soft: #fdf3e3;
  --info: #1f6feb;
  --info-soft: #e8f0fe;
  --success: #15803d;
  --success-soft: #e6f5ec;
  --violet: #6d4fc1;
  --violet-soft: #eeeafb;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.06);
  --shadow-md: 0 4px 10px rgba(16,24,40,.06), 0 2px 4px rgba(16,24,40,.05);
  --shadow-lg: 0 18px 40px rgba(16,24,40,.12), 0 6px 14px rgba(16,24,40,.07);
  --shadow-xl: 0 28px 70px rgba(16,24,40,.2);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --sidebar-w: 248px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 64px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --tr: 180ms cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
svg { display: block; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
a { color: var(--primary); text-decoration: none; }
::selection { background: var(--primary); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd2dd; border-radius: 20px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

#app { display: flex; min-height: 100vh; }

/* ============ Sidebar ============ */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0b1420 0%, #0d1a29 100%);
  color: #b8c4d4;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  transition: transform var(--tr), width var(--tr);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 18px;
}
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #14a583);
  display: grid; place-items: center; color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 18px rgba(12,107,88,.45);
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-text strong { font-size: 19px; letter-spacing: .2px; color: #fff; font-weight: 800; display: block; line-height: 1.1; }
.brand-text strong span { color: #59d8b4; }
.brand-text small { font-size: 11px; color: #7d8ea3; letter-spacing: .4px; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.2px;
  color: #5f7086; font-weight: 700; padding: 16px 12px 7px;
}
.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9.5px 12px; border-radius: 10px;
  color: #9fb0c5; font-weight: 500; font-size: 13.5px;
  transition: var(--tr); margin-bottom: 2px;
  position: relative;
}
.nav-link:hover { background: rgba(255,255,255,.06); color: #dbe4ee; }
.nav-link.active { background: linear-gradient(90deg, rgba(12,107,88,.9), rgba(12,107,88,.35)); color: #fff; box-shadow: 0 6px 16px rgba(12,107,88,.25); }
.nav-link.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px;
  width: 3.5px; border-radius: 4px; background: #5fe0b6;
}
.nav-ico { width: 19px; height: 19px; flex-shrink: 0; display: grid; place-items: center; }
.nav-ico svg { width: 19px; height: 19px; }
.nav-txt { flex: 1; white-space: nowrap; overflow: hidden; }
.nav-pill {
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px;
  background: linear-gradient(135deg, #59d8b4, #2fb08c); color: #062e25;
  padding: 2px 7px; border-radius: 20px; text-transform: uppercase;
}

.sidebar-foot { padding: 14px; border-top: 1px solid rgba(255,255,255,.08); }
.sidebar-profile {
  display: flex; align-items: center; gap: 11px;
  background: rgba(255,255,255,.05); border-radius: 12px; padding: 10px;
}
.profile-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), #e3b85f); color: #3b2c07;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
}
.profile-meta { flex: 1; min-width: 0; }
.profile-meta strong { color: #e6edf5; font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-meta small { color: #7d8ea3; font-size: 11px; }

/* ============ Main ============ */
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; transition: margin-left var(--tr); }
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; gap: 14px;
  padding: 0 28px; background: rgba(245,246,248,.85); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border);
}
.menu-toggle { display: none; }
.topbar-search {
  flex: 1; max-width: 460px; position: relative;
}
.topbar-search input {
  width: 100%; height: 40px; padding: 0 40px 0 38px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  outline: none; transition: var(--tr); font-size: 13.5px;
}
.topbar-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12,107,88,.13); }
.search-ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-2); width: 17px; height: 17px; }
.search-ico svg { width: 17px; height: 17px; }
.topbar-search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  font-family: var(--font); font-size: 11px; color: var(--muted); border: 1px solid var(--border-strong);
  background: var(--surface-2); padding: 1px 7px; border-radius: 6px;
}
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.search-panel {
  position: absolute; top: var(--topbar-h); left: 28px; right: 28px; margin: 0 auto;
  max-width: 560px; background: var(--surface); border-radius: var(--r-md);
  box-shadow: var(--shadow-xl); border: 1px solid var(--border); z-index: 45;
  overflow: hidden; max-height: 70vh; overflow-y: auto;
}
.search-group { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.search-group-title { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; padding: 4px 8px 6px; }
.search-item {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px;
  cursor: pointer; transition: var(--tr);
}
.search-item:hover { background: var(--surface-3); }
.search-item .si-icon { width: 32px; height: 32px; border-radius: 8px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.search-item .si-icon svg { width: 16px; height: 16px; }
.search-item b { font-size: 13px; font-weight: 600; display: block; }
.search-item small { color: var(--muted); font-size: 12px; }

.content { padding: 26px 28px 48px; }

/* ============ Page header ============ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .h-group { display: flex; align-items: center; gap: 14px; }
.page-head h1 { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.3px; }
.page-head .sub { color: var(--muted); margin-top: 3px; font-size: 13px; }
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.crumb { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.crumb a { color: var(--primary); }

/* ============ Buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  font-weight: 600; font-size: 13px; border: 1px solid transparent;
  transition: var(--tr); white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(12,107,88,.28); }
.btn-primary:hover { background: var(--primary-strong); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--ink); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fbdbd9; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; justify-content: center; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); display: grid; place-items: center;
  transition: var(--tr); position: relative;
}
.icon-btn:hover { background: var(--surface-3); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn.ghost { border-color: transparent; background: transparent; color: #8fa1b6; }
.icon-btn.ghost:hover { background: rgba(255,255,255,.08); color: #fff; }
.icon-btn.has-dot::after { content: ""; position: absolute; top: 8px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); border: 2px solid var(--surface); }
.icon-btn.sm { width: 30px; height: 30px; border-radius: 8px; }
.icon-btn.sm svg { width: 15px; height: 15px; }

/* ============ Cards ============ */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); transition: box-shadow var(--tr);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 700; }
.card-head .ch-sub { font-size: 12px; color: var(--muted); }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }

.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-5 { grid-template-columns: repeat(5, 1fr); }
.g-12 { grid-template-columns: 1.25fr 1fr; }
.g-21 { grid-template-columns: 1fr 1.25fr; }
.g-13 { grid-template-columns: 1.6fr 1fr; }
.g-31 { grid-template-columns: 1fr 1.6fr; }

/* ============ KPI stats ============ */
.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.stat-ico svg { width: 21px; height: 21px; }
.stat-label { color: var(--muted); font-size: 12.5px; font-weight: 600; margin-top: 14px; letter-spacing: .2px; }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.6px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat-sub { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12px; font-weight: 600; }
.stat-sub .up { color: var(--success); }
.stat-sub .down { color: var(--danger); }
.stat-sub .flat { color: var(--muted); }
.stat-sub span.track { color: var(--muted); font-weight: 500; }
.stat-bar { height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 14px; overflow: hidden; }
.stat-bar > i { display: block; height: 100%; border-radius: 4px; }
.ico-soft-green { background: var(--primary-soft); color: var(--primary); }
.ico-soft-gold { background: var(--accent-soft); color: #9a6f1c; }
.ico-soft-blue { background: var(--info-soft); color: var(--info); }
.ico-soft-red { background: var(--danger-soft); color: var(--danger); }
.ico-soft-purple { background: var(--violet-soft); color: var(--violet); }
.ico-soft-gray { background: var(--surface-3); color: var(--ink-2); }

/* ============ Badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 20px;
  letter-spacing: .2px; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge.green { background: var(--success-soft); color: var(--success); }
.badge.red { background: var(--danger-soft); color: var(--danger); }
.badge.amber { background: var(--warn-soft); color: var(--warn); }
.badge.blue { background: var(--info-soft); color: var(--info); }
.badge.gray { background: var(--surface-3); color: var(--ink-2); }
.badge.purple { background: var(--violet-soft); color: var(--violet); }
.badge.gold { background: var(--accent-soft); color: #9a6f1c; }
.badge.green-dark { background: var(--primary); color: #fff; }

/* ============ Tables ============ */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .7px;
  color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface-2); white-space: nowrap;
}
table.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tbody tr { transition: var(--tr); }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .num { font-variant-numeric: tabular-nums; }
table.tbl .cell-main { font-weight: 600; }
table.tbl .cell-sub { color: var(--muted); font-size: 12px; }
.tbl-actions { display: flex; gap: 4px; justify-content: flex-end; }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0; color: #fff;
}
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user b { font-weight: 600; font-size: 13px; display: block; }
.cell-user small { color: var(--muted); font-size: 12px; }
.tbl-progress { display: flex; align-items: center; gap: 9px; min-width: 120px; }
.tbl-progress .bar { flex: 1; height: 5px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.tbl-progress .bar > i { display: block; height: 100%; border-radius: 6px; background: var(--primary); }
.tbl-progress span { font-size: 11.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============ Tabs ============ */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab {
  padding: 11px 14px; font-size: 13px; font-weight: 600; color: var(--muted);
  border: none; background: none; border-bottom: 2px solid transparent;
  transition: var(--tr); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab .count { background: var(--surface-3); color: var(--muted); font-size: 10.5px; border-radius: 12px; padding: 1px 7px; font-weight: 700; }
.tab.active .count { background: var(--primary-soft); color: var(--primary); }

/* ============ Forms ============ */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 9px; background: var(--surface);
  outline: none; transition: var(--tr); font-size: 13.5px;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12,107,88,.12); }
.select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7686' 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 11px center; padding-right: 34px; }
.input.err, .select.err, .textarea.err { border-color: var(--danger); }
.err-msg { color: var(--danger); font-size: 11.5px; margin-top: 4px; display: none; }
.field.has-err .err-msg { display: block; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.input-prefix { position: relative; }
.input-prefix > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 13px; font-weight: 600; }
.input-prefix input { padding-left: 34px; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-strong); border-radius: 24px; transition: var(--tr); cursor: pointer; }
.switch .track::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: var(--tr); }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::before { transform: translateX(18px); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.switch-row .lbl { font-size: 13px; font-weight: 600; }
.switch-row .sub { font-size: 11.5px; color: var(--muted); }

/* ============ Modal ============ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(10,18,32,.5); backdrop-filter: blur(4px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px; overflow-y: auto; opacity: 0; animation: fadeIn .18s ease forwards;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--surface); border-radius: var(--r-xl); width: 100%;
  box-shadow: var(--shadow-xl); overflow: hidden; animation: slideUp .24s cubic-bezier(.2,.8,.25,1) forwards;
  max-height: 90vh; display: flex; flex-direction: column;
}
.modal-xl { max-width: 960px; }
.modal-lg { max-width: 720px; }
.modal-md { max-width: 560px; }
.modal-sm { max-width: 430px; }
@keyframes slideUp { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px 0; }
.modal-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.modal-ico svg { width: 20px; height: 20px; }
.modal-head h3 { margin: 0; font-size: 16.5px; font-weight: 800; }
.modal-head .mh-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-body { padding: 18px 24px 8px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; }

/* ============ Toast ============ */
#toast-root { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 11px;
  background: var(--ink); color: #fff; border-radius: 12px; padding: 12px 16px;
  box-shadow: var(--shadow-lg); min-width: 280px; max-width: 380px;
  animation: toastIn .3s cubic-bezier(.2,.8,.25,1) forwards;
}
.toast.out { animation: toastOut .25s ease forwards; }
@keyframes toastIn { from { transform: translateX(24px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(24px); opacity: 0; } }
.toast-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; }
.toast-ico svg { width: 16px; height: 16px; }
.toast b { display: block; font-size: 13px; font-weight: 700; }
.toast small { color: #b7c3d4; font-size: 12px; display: block; }
.toast .t-close { margin-left: auto; color: #8fa1b6; background: none; border: none; padding: 4px; border-radius: 6px; }
.toast .t-close:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ============ Property cards ============ */
.prop-card { overflow: hidden; display: flex; flex-direction: column; cursor: pointer; }
.prop-media { position: relative; height: 168px; overflow: hidden; }
.prop-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.prop-card:hover .prop-media img { transform: scale(1.05); }
.prop-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,16,30,0) 40%, rgba(10,16,30,.55) 100%); }
.prop-badges { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 6px; z-index: 2; }
.prop-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .3px; padding: 3px 9px; border-radius: 20px;
  background: rgba(10,18,32,.68); color: #fff; backdrop-filter: blur(6px); text-transform: uppercase;
}
.prop-price {
  position: absolute; bottom: 10px; left: 12px; z-index: 2; color: #fff; font-weight: 800; font-size: 15px;
  font-variant-numeric: tabular-nums; letter-spacing: -.2px;
}
.prop-price small { display: block; font-size: 10px; font-weight: 600; color: rgba(255,255,255,.75); text-transform: uppercase; letter-spacing: .8px; }
.prop-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.prop-title { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.prop-loc { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; }
.prop-loc svg { width: 13px; height: 13px; }
.prop-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.prop-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; }
.prop-stat b { display: block; font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.prop-stat small { font-size: 10.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }

/* ============ Alerts / timeline ============ */
.alert-item { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.alert-item:last-child { border-bottom: none; }
.alert-dot { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.alert-dot svg { width: 16px; height: 16px; }
.alert-body { flex: 1; min-width: 0; }
.alert-body b { font-size: 13px; font-weight: 600; display: block; }
.alert-body p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.alert-time { font-size: 11px; color: var(--muted-2); white-space: nowrap; padding-top: 2px; }

/* ============ Coming Up ============ */
.up-item { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border); text-decoration: none; transition: background .15s; }
.up-item:last-child { border-bottom: none; }
.up-item:hover { background: var(--surface-2); }
.up-date { width: 42px; text-align: center; flex-shrink: 0; line-height: 1.15; }
.up-date b { display: block; font-size: 15px; font-weight: 800; color: var(--ink); }
.up-date small { font-size: 10px; text-transform: uppercase; color: var(--muted-2); }
.up-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.up-ico svg { width: 15px; height: 15px; }
.up-body { flex: 1; min-width: 0; }
.up-body b { display: block; font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-body small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.up-amt { font-size: 12.5px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.up-amt.pos { color: var(--success); }
.up-amt.neg { color: var(--danger); }

/* ============ Property notes ============ */
.note-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--border); align-items: flex-start; }
.note-item:last-child { border-bottom: none; }
.note-dot { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.note-dot svg { width: 15px; height: 15px; }
.note-body { flex: 1; min-width: 0; }
.note-body b { font-size: 13px; font-weight: 600; line-height: 1.5; display: block; }
.note-body small { font-size: 11px; color: var(--muted-2); }

.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); font-size: 12.5px; }
.kv-row:last-child { border-bottom: none; }
.kv-row span:first-child { color: var(--muted); }
.kv-row .pos { color: var(--success); }
.kv-row .neg { color: var(--danger); }

/* ============ Tenant property photos ============ */
.tn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tn-prop { display: flex; flex-direction: column; gap: 8px; border-bottom: 1px dashed var(--border); padding: 10px 16px; }
.tn-prop:last-child { border-bottom: none; }
.tn-prop-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tn-prop-thumbs img { width: 100%; height: 64px; object-fit: cover; border-radius: 8px; }
.tn-prop-meta b { font-size: 13px; font-weight: 600; display: block; }
.tn-prop-meta small { font-size: 11.5px; color: var(--muted); }
.g-tile { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.g-tile b { font-size: 13px; font-weight: 600; display: block; }
.g-tile small { font-size: 11.5px; color: var(--muted); }
.g-tile-img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.rt-thumb { width: 64px; height: 44px; object-fit: cover; border-radius: 8px; display: block; }





.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -22px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tl-item.gold::before { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-item.red::before { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.tl-item b { font-size: 13px; font-weight: 600; }
.tl-item .tl-time { font-size: 11px; color: var(--muted-2); }
.tl-item p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }

/* ============ Charts ============ */
.chart-tip { font-family: var(--font); }
.chart-box { position: relative; width: 100%; }
.chart-box canvas { width: 100%; height: 100%; display: block; }
.chart-center { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; text-align: center; }
.chart-center b { font-size: 22px; font-weight: 800; display: block; }
.chart-center small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .6px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.legend-item i { width: 10px; height: 10px; border-radius: 3px; }
.legend-item b { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============ Lists / misc ============ */
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.kv dd.neg { color: var(--danger); }
.kv dd.pos { color: var(--success); }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search-field { position: relative; flex: 1; min-width: 220px; max-width: 320px; }
.search-field input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); outline: none; font-size: 13px; transition: var(--tr); }
.search-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(12,107,88,.12); }
.search-field .sf-ico { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted-2); width: 16px; height: 16px; }
.search-field .sf-ico svg { width: 16px; height: 16px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: none; background: none; padding: 6px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); transition: var(--tr); display: inline-flex; align-items: center; gap: 6px; }
.seg button svg { width: 15px; height: 15px; }
.seg button.active { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); transition: var(--tr); white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip svg { width: 14px; height: 14px; }
.chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state .es-ico { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 16px; background: var(--surface-3); display: grid; place-items: center; color: var(--muted-2); }
.empty-state .es-ico svg { width: 26px; height: 26px; }
.empty-state b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 3px; }
.empty-state p { margin: 0; font-size: 13px; }

/* ============ Property profile ============ */
.pp-hero { position: relative; border-radius: var(--r-xl); overflow: hidden; margin-bottom: 20px; background: #0b1420; }
.pp-hero-media { position: relative; height: 300px; }
.pp-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.pp-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,13,26,.25) 0%, rgba(8,13,26,.15) 40%, rgba(8,13,26,.82) 100%); }
.pp-thumbs { position: absolute; right: 16px; top: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 3; }
.pp-thumb { width: 54px; height: 42px; border-radius: 9px; overflow: hidden; border: 2px solid rgba(255,255,255,.35); opacity: .75; cursor: pointer; transition: var(--tr); background: #fff; }
.pp-thumb:hover { opacity: 1; }
.pp-thumb.active { border-color: #fff; opacity: 1; }
.pp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pp-hero-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 26px; z-index: 2; color: #fff; }
.pp-hero-body .pp-type { font-size: 11px; text-transform: uppercase; letter-spacing: 1.2px; color: #7fe3c0; font-weight: 700; margin-bottom: 6px; }
.pp-hero-body h1 { margin: 0 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.pp-hero-body .pp-loc { display: flex; align-items: center; gap: 6px; font-size: 13px; color: rgba(255,255,255,.8); }
.pp-hero-body .pp-loc svg { width: 14px; height: 14px; }
.pp-hero-stats { position: absolute; right: 22px; bottom: 24px; z-index: 2; display: flex; gap: 10px; }
.pp-hero-stat { background: rgba(255,255,255,.12); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.18); border-radius: 12px; padding: 10px 16px; text-align: center; color: #fff; }
.pp-hero-stat b { display: block; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pp-hero-stat small { font-size: 10px; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.7); }
.pp-back { position: absolute; top: 16px; left: 16px; z-index: 3; }

.mini-nav { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 4px; overflow-x: auto; margin-bottom: 20px; }
.mini-nav .mn-item { padding: 8px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; transition: var(--tr); background: none; border: none; }
.mini-nav .mn-item:hover { color: var(--ink); background: var(--surface-3); }
.mini-nav .mn-item.active { background: var(--primary); color: #fff; box-shadow: 0 4px 10px rgba(12,107,88,.3); }

.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.gallery-grid img { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; cursor: pointer; transition: var(--tr); }
.gallery-grid img:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }

/* ============ Map ============ */
.map-shell { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #e8ecf1; min-height: 560px; }
.map-canvas { position: absolute; inset: 0; }
.map-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(120,135,155,.14) 1px, transparent 1px), linear-gradient(90deg, rgba(120,135,155,.14) 1px, transparent 1px); background-size: 34px 34px; }
.map-pin { position: absolute; transform: translate(-50%, -100%); cursor: pointer; z-index: 5; transition: transform var(--tr); }
.map-pin:hover { transform: translate(-50%, -100%) scale(1.15); z-index: 6; }
.map-pin .pin-core {
  width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgba(12,107,88,.4); border: 2px solid #fff;
}
.map-pin .pin-core svg { width: 14px; height: 14px; transform: rotate(45deg); }
.map-pin.red .pin-core { background: linear-gradient(135deg, #c0392b, #e0685a); box-shadow: 0 6px 16px rgba(192,57,43,.4); }
.map-pin.gold .pin-core { background: linear-gradient(135deg, #a9771f, #d9a441); box-shadow: 0 6px 16px rgba(169,119,31,.4); }
.map-pin.purple .pin-core { background: linear-gradient(135deg, #5b3f9e, #8368cf); box-shadow: 0 6px 16px rgba(91,63,158,.4); }
.map-pin.selected { z-index: 7; }
.map-pin.selected .pin-core { outline: 3px solid rgba(255,255,255,.85); }
.map-pop { position: absolute; z-index: 8; background: var(--surface); border-radius: 13px; box-shadow: var(--shadow-lg); border: 1px solid var(--border); width: 300px; overflow: hidden; animation: popIn .2s ease; }
@keyframes popIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.map-pop img { width: 100%; height: 110px; object-fit: cover; }
.map-pop .mp-body { padding: 13px 15px; }
.map-pop b { font-size: 14px; display: block; }
.map-pop .mp-meta { color: var(--muted); font-size: 12.5px; margin: 3px 0 8px; }
.map-legend { position: absolute; left: 14px; bottom: 14px; background: rgba(255,255,255,.94); border-radius: 10px; padding: 10px 13px; box-shadow: var(--shadow-md); display: flex; gap: 12px; z-index: 9; }
.map-legend .lg-item { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.map-legend .dot { width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); }
.map-legend .dot.g { background: var(--primary); }
.map-legend .dot.r { background: #c0392b; }
.map-legend .dot.y { background: #d9a441; }
.map-legend .dot.p { background: #6d4fc1; }
.map-filters { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; gap: 8px; z-index: 9; flex-wrap: wrap; }

/* ============ Finance ============ */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ledger-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px; }
.ledger-col h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); }
.ledger-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.ledger-item:last-child { border-bottom: none; }
.ledger-item b { flex: 1; font-weight: 600; }
.ledger-item .amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.ledger-item .amt.in { color: var(--success); }
.ledger-item .amt.out { color: var(--danger); }

/* ============ Ownership ============ */
.owner-card { padding: 18px; display: flex; gap: 14px; align-items: center; }
.owner-card .share-ring { width: 66px; height: 66px; flex-shrink: 0; position: relative; }
.owner-ring { position: relative; width: 66px; height: 66px; }
.owner-ring svg { transform: rotate(-90deg); }
.owner-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.owner-meta b { font-size: 14.5px; display: block; }
.owner-meta small { color: var(--muted); }
.owner-meta .value { font-weight: 800; color: var(--primary); font-size: 13.5px; margin-top: 3px; }

/* ============ Documents ============ */
.doc-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.doc-ico { width: 44px; height: 52px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface-2); position: relative; display: grid; place-items: center; color: var(--muted); }
.doc-ico::after { content: ""; position: absolute; top: 0; right: 0; border-width: 0 0 14px 14px; border-style: solid; border-color: transparent transparent var(--surface-3) transparent; border-radius: 0 0 0 8px; }
.doc-ico svg { width: 18px; height: 18px; }
.doc-card b { font-size: 13px; line-height: 1.35; display: block; }
.doc-card small { color: var(--muted); font-size: 11.5px; }
.doc-card .doc-meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }

/* ============ Chat ============ */
.chat-shell { display: flex; flex-direction: column; height: calc(100vh - 160px); min-height: 520px; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.chat-ava { width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--primary), #16a285); display: grid; place-items: center; color: #fff; box-shadow: 0 6px 16px rgba(12,107,88,.35); }
.chat-ava svg { width: 22px; height: 22px; }
.chat-body { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); }
.msg { display: flex; gap: 10px; max-width: 78%; }
.msg.user { margin-left: auto; flex-direction: row-reverse; }
.msg .bubble { padding: 11px 15px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.msg.ai .bubble { background: var(--surface); border: 1px solid var(--border); border-top-left-radius: 4px; box-shadow: var(--shadow-sm); }
.msg.user .bubble { background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.msg.user .m-ava { background: var(--accent); color: #3b2c07; }
.msg .m-ava { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex-shrink: 0; }
.msg .bubble .typing { display: inline-flex; gap: 4px; align-items: center; }
.msg .bubble .typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.msg .bubble .typing i:nth-child(2) { animation-delay: .2s; }
.msg .bubble .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.chat-suggests { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 20px 0; }
.chat-suggest { font-size: 12px; font-weight: 600; color: var(--primary); background: var(--primary-soft); border: 1px solid var(--primary); padding: 6px 12px; border-radius: 20px; transition: var(--tr); }
.chat-suggest:hover { background: var(--primary); color: #fff; }
.chat-input { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-input .input { flex: 1; border-radius: 12px; }

/* ============ AI drawer ============ */
.ai-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 92vw; background: var(--surface); z-index: 120; box-shadow: var(--shadow-xl); transform: translateX(100%); transition: transform .3s cubic-bezier(.2,.8,.25,1); display: flex; flex-direction: column; }
.ai-drawer.open { transform: translateX(0); }

/* ============ Misc components ============ */
.divider { border: none; border-top: 1px solid var(--border); margin: 18px 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.flex-1 { flex: 1; }
.mt-0 { margin-top: 0; } .mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; } .mb-4 { margin-bottom: 4px; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; } .mb-18 { margin-bottom: 18px; } .mb-20 { margin-bottom: 20px; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }

.progress-wrap { display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 8px; background: var(--surface-3); border-radius: 10px; overflow: hidden; }
.progress-track i { display: block; height: 100%; border-radius: 10px; transition: width .6s cubic-bezier(.2,.8,.25,1); }

.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin: 24px 0 14px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.grow-bar { display: flex; flex-direction: column; gap: 4px; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

.kpi-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 14px; }
@media (max-width: 1500px) { .kpi-strip { grid-template-columns: repeat(4, 1fr); } .g-5 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1200px) {
  .kpi-strip { grid-template-columns: repeat(3, 1fr); }
  .g-4, .g-2, .g-3 { grid-template-columns: repeat(2, 1fr); }
  .g-12, .g-21, .g-13, .g-31, .g-5 { grid-template-columns: 1fr; }
}

/* ============ Responsive ============ */
@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-xl); }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .overlay { position: fixed; inset: 0; background: rgba(10,18,32,.45); z-index: 55; opacity: 0; pointer-events: none; transition: var(--tr); }
  .overlay.show { opacity: 1; pointer-events: auto; }
  .content { padding: 20px 18px 40px; }
  .topbar { padding: 0 16px; }
}
@media (max-width: 768px) {
  .g-2, .g-3, .g-4, .g-5 { grid-template-columns: 1fr; }
  .kpi-strip { grid-template-columns: 1fr 1fr; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head h1 { font-size: 19px; }
  .stat-value { font-size: 22px; }
  .ledger { grid-template-columns: 1fr; }
  .pp-hero-media { height: 240px; }
  .pp-hero-stats { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .chat-shell { height: calc(100vh - 140px); }
  .modal { margin: auto 0; }
  #toast-root { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: none; min-width: 0; }
  .topbar-search { max-width: none; }
  .search-panel { left: 12px; right: 12px; }
  .pp-hero-body { padding: 16px 18px; }
  .pp-hero-body h1 { font-size: 21px; }
}
@media (max-width: 480px) {
  .kpi-strip { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-actions .btn { padding: 0 12px; }
}

/* ============ Print ============ */
@media print {
  .sidebar, .topbar, .mini-nav, .page-actions { display: none !important; }
  .main { margin: 0; }
  body { background: #fff; }
}
