/* ============================================
   COMPACT / ADVANCED OVERRIDES
   Denser spacing, smaller type — enterprise SaaS feel.
   Loaded after variables.css / base.css / dashboard.css.
   ============================================ */

:root {
  --radius-sm: 5px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 3px 10px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.14);
}

/* ---------- Base type scale ---------- */
body { font-size: 13.5px; line-height: 1.5; }
h1, h2, h3, h4, h5 { letter-spacing: -0.012em; }
h1 { font-size: 19px; }
h2 { font-size: 16px; }
h3 { font-size: 13.5px; }
h4 { font-size: 12.5px; }
h5 { font-size: 11px; }
p { font-size: 13px; }

/* ---------- Sidebar ---------- */
/* Sidebar/content width overrides only apply above the mobile breakpoint —
   dashboard.css collapses the sidebar and zeroes .main-area's margin below
   900px, but since this file loads AFTER dashboard.css, an unguarded rule
   here would always win (later in the cascade beats an earlier @media
   block at equal specificity) and silently break that collapse on every
   phone. Wrapping just these two lines keeps the rest of the file's
   density tweaks applying everywhere, as intended. */
@media (min-width: 901px) {
  .sidebar { width: 216px; }
  .main-area { margin-left: 216px; }
}
.sidebar-brand { padding: 16px 18px 14px; }
.sidebar-brand .mark { width: 30px; height: 30px; font-size: 12.5px; border-radius: 7px; }
.sidebar-brand .name { font-size: 13px; }
.sidebar-brand .role { font-size: 9.5px; }
.sidebar-nav { padding: 10px 10px; }
.sidebar-nav .nav-label { font-size: 9.5px; padding: 10px 10px 4px; }
.nav-item { padding: 8px 11px; font-size: 12px; gap: 10px; }
.nav-item i { font-size: 13px; width: 16px; }
.nav-item .count { font-size: 9.5px; padding: 1px 6px; }
.sidebar-footer { padding: 10px 16px 16px; }
.sidebar-user .u-name { font-size: 12px; }
.sidebar-user .u-role { font-size: 10.5px; }
.sidebar-logout { padding: 8px 12px; font-size: 12px; }

/* ---------- Topbar ---------- */
.topbar { height: 54px; padding: 0 20px; }
.topbar-left h1 { font-size: 15px; }
.topbar-search { padding: 6px 12px; width: 240px; }
.topbar-search input { font-size: 12.5px; }
.icon-btn { width: 32px; height: 32px; font-size: 13px; }
.topbar-profile .avatar { width: 30px; height: 30px; }
.topbar-profile .p-name { font-size: 12px; }
.topbar-profile .p-role { font-size: 10px; }

.content { padding: 20px; }

/* ---------- Page head ---------- */
.page-head { margin-bottom: 16px; gap: 10px; }
.page-head h2 { font-size: 17px; margin-bottom: 2px; }
.page-head .sub { font-size: 12px; }

/* ---------- Stat cards ---------- */
.stat-grid { gap: 12px; margin-bottom: 16px; }
.stat-card { padding: 14px; gap: 8px; }
.stat-icon { width: 32px; height: 32px; font-size: 13px; border-radius: 8px; }
.stat-trend { font-size: 10.5px; }
.stat-value { font-size: 20px; }
.stat-label { font-size: 11px; }

/* ---------- Panels ---------- */
.grid-2 { gap: 12px; }
.panel-title { padding: 14px 16px 4px; }
.panel-title h3 { font-size: 12.5px; }
.panel-title .link { font-size: 11px; }
.bar-chart { height: 130px; padding: 12px 16px 4px; gap: 8px; }
.bar-col .bar-label { font-size: 9.5px; }
.donut-wrap { padding: 4px 16px 16px; gap: 14px; }
.donut { width: 84px; height: 84px; }
.donut .donut-hole { width: 54px; height: 54px; }
.donut .donut-hole b { font-size: 13.5px; }
.donut .donut-hole span { font-size: 8px; }
.legend { font-size: 11px; gap: 7px; }
.activity-list { padding: 4px 16px 14px; }
.activity-item { padding: 8px 0; gap: 10px; }
.activity-item .a-icon { width: 28px; height: 28px; font-size: 11px; }
.activity-item .a-text { font-size: 12px; }
.activity-item .a-time { font-size: 10px; }

/* ---------- Cards / buttons / inputs ---------- */
.card-pad { padding: 16px; }
.btn { padding: 8px 16px; font-size: 12.5px; gap: 6px; }
.btn i, .btn svg { font-size: 12.5px; }
.btn-sm { padding: 6px 10px; font-size: 11.5px; }
.btn-icon { width: 30px; height: 30px; }
.field { margin-bottom: 14px; }
.field label { font-size: 12px; margin-bottom: 5px; }
.field .hint { font-size: 11px; }
.field-row { gap: 12px; }
.input, select.input, textarea.input { padding: 9px 12px; font-size: 12.5px; }
.badge { padding: 3px 9px; font-size: 10.5px; }

/* ---------- Filters / pills ---------- */
.filters-bar { gap: 8px; margin-bottom: 12px; }
.filters-bar .input-icon-wrap { width: 220px; }
.pill-tab { padding: 6px 13px; font-size: 11.5px; }

/* ---------- Building / unit cards ---------- */
.building-grid { gap: 14px; }
.building-card .b-cover { height: 84px; padding: 10px 14px; }
.building-card .b-cover h4 { font-size: 13.5px; }
.building-card .b-cover i { font-size: 20px; }
.building-card .b-body { padding: 13px 14px; }
.building-card .b-addr { font-size: 11px; margin-bottom: 10px; }
.building-card .b-stats { gap: 6px; margin-bottom: 10px; }
.building-card .b-stat { padding: 6px 4px; }
.building-card .b-stat b { font-size: 13px; }
.building-card .b-stat span { font-size: 9px; }
.occ-text { font-size: 10.5px; margin-bottom: 10px; }

.unit-grid { gap: 10px; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); }
.unit-card { padding: 11px; }
.unit-card .u-num { font-size: 13.5px; }
.unit-card .u-floor { font-size: 10.5px; margin-bottom: 7px; }
.unit-card .u-rent { font-size: 12.5px; margin-bottom: 6px; }
.unit-card .u-tenant { font-size: 11px; }

.floor-block { margin-bottom: 16px; }
.floor-block .floor-label { font-size: 11px; margin-bottom: 9px; }

.back-link { font-size: 12px; margin-bottom: 10px; }

/* ---------- Table ---------- */
table.data-table thead th { font-size: 10px; padding: 10px 14px; }
table.data-table tbody td { padding: 10px 14px; font-size: 12px; }
.avatar { width: 28px; height: 28px; font-size: 11px; }

.empty-state { padding: 40px 20px; }
.empty-state i { font-size: 26px; margin-bottom: 10px; }

/* ---------- Modal ---------- */
.modal { max-width: 460px; }
.modal.modal-lg { max-width: 680px; }
.modal-header { padding: 15px 18px; }
.modal-header h3 { font-size: 14px; gap: 8px; }
.modal-body { padding: 16px 18px; }
.modal-footer { padding: 12px 18px; gap: 8px; }

/* ---------- Owner detail hero ---------- */
.detail-hero { padding: 16px; gap: 12px; }
.detail-hero .avatar { width: 46px; height: 46px; font-size: 15px; }
.detail-hero h2 { font-size: 15px; margin-bottom: 3px; }
.detail-hero .meta { font-size: 11px; gap: 12px; }
