:root{
  --os-bg:#eef3f8;
  --os-paper:#ffffff;
  --os-ink:#0f1f33;
  --os-muted:#66788f;
  --os-line:#d8e3ee;
  --os-line-strong:#b8c8da;
  --os-navy:#102a43;
  --os-blue:#1b6f9f;
  --os-blue-soft:#e7f3fa;
  --os-cyan:#34b3d6;
  --os-gold:#b9892f;
  --os-gold-soft:#fff7e6;
  --os-green:#0f8a5f;
  --os-green-soft:#e8f7ef;
  --os-orange:#d46b08;
  --os-orange-soft:#fff2df;
  --os-red:#c93a3a;
  --os-red-soft:#fff1f1;
  --os-sidebar-width:286px;
  --sidebar-width:286px;
  --radius:10px;
  --radius-lg:12px;
  --shadow:0 18px 45px rgba(15,31,51,.09);
  --shadow-soft:0 8px 24px rgba(15,31,51,.065);
}

body{
  font-family:Tahoma,"Segoe UI",Arial,sans-serif!important;
  font-size:14px;
  letter-spacing:0;
  font-variant-numeric:tabular-nums;
  text-rendering:optimizeLegibility;
}

body:not(.report-print-preview):not(.report-table-printing){
  background:
    linear-gradient(180deg,#f8fbff 0%,var(--os-bg) 48%,#eaf0f6 100%) fixed!important;
  color:var(--os-ink)!important;
}

body.admin-body:not(.focus-mode) .sidebar{
  position:fixed!important;
  top:16px!important;
  right:16px!important;
  bottom:16px!important;
  left:auto!important;
  width:var(--os-sidebar-width)!important;
  height:auto!important;
  padding:12px!important;
  border:1px solid rgba(255,255,255,.16)!important;
  border-radius:10px!important;
  background:linear-gradient(180deg,#0b2238,#102a43)!important;
  color:#fff!important;
  box-shadow:0 24px 80px rgba(15,31,51,.24)!important;
}

body.admin-body:not(.focus-mode) .main{
  width:calc(100% - var(--os-sidebar-width) - 34px)!important;
  margin:0 calc(var(--os-sidebar-width) + 34px) 0 0!important;
  padding:18px 22px 58px!important;
}

.brand{
  min-height:72px!important;
  margin:0 0 12px!important;
  padding:12px!important;
  border:1px solid rgba(255,255,255,.16)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.08)!important;
  box-shadow:none!important;
}

.brand-mark{
  width:44px!important;
  height:44px!important;
  flex:0 0 44px!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,#2f9fd0,#8ad9ef)!important;
  color:#fff!important;
  box-shadow:0 10px 26px rgba(42,157,206,.24)!important;
}

.brand b{color:#fff!important;font-size:15px!important;font-weight:800!important}
.brand small{color:#bad0e3!important;font-size:11.5px!important;font-weight:700!important}

.nav{padding:2px 0 4px!important;scrollbar-color:#5e7894 transparent!important}
.nav::-webkit-scrollbar-thumb{background:#5e7894!important}

.nav-home-link{
  display:flex!important;
  align-items:center!important;
  gap:10px!important;
  min-height:48px!important;
  margin:0 0 10px!important;
  padding:11px 12px!important;
  border:1px solid rgba(116,212,243,.32)!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,rgba(52,179,214,.24),rgba(255,255,255,.08))!important;
  color:#fff!important;
  font-size:15px!important;
  font-weight:800!important;
  text-decoration:none!important;
  box-shadow:0 14px 32px rgba(0,0,0,.12)!important;
}

.nav-home-link svg{
  width:19px!important;
  height:19px!important;
  color:#8ad9ef!important;
}

.nav-home-link:hover,
.nav-home-link.active{
  background:#fff!important;
  color:#102a43!important;
  border-color:#fff!important;
}

.nav-home-link.active svg{color:var(--os-blue)!important}

.nav-group{
  margin:0 0 8px!important;
  padding:0!important;
  border:1px solid rgba(255,255,255,.1)!important;
  border-radius:10px!important;
  background:rgba(255,255,255,.045)!important;
  box-shadow:none!important;
  overflow:hidden;
}

.nav-group[open]{
  border-color:rgba(116,212,243,.28)!important;
  background:rgba(255,255,255,.075)!important;
  box-shadow:none!important;
}

.nav-group summary{
  min-height:42px!important;
  padding:10px 12px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  color:#d8e7f4!important;
  font-size:14px!important;
  font-weight:800!important;
  box-shadow:none!important;
}

.nav-group[open] summary{
  color:#fff!important;
  background:linear-gradient(90deg,rgba(42,157,206,.28),rgba(255,255,255,.03))!important;
}

.nav a,
.nav-disabled{
  min-height:37px!important;
  margin:3px 7px!important;
  padding:8px 9px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  background:transparent!important;
  color:#c8d7e6!important;
  font-size:13px!important;
  font-weight:700!important;
}

.nav a svg,
.nav-disabled svg{width:17px!important;height:17px!important;flex-basis:17px!important;color:#8fb6d3!important}
.nav a:hover{background:rgba(255,255,255,.1)!important;border-color:rgba(255,255,255,.12)!important;color:#fff!important;transform:none!important}
.nav a.active{background:#fff!important;border-color:#fff!important;color:#102a43!important;box-shadow:0 10px 24px rgba(0,0,0,.18)!important}
.nav a.active svg{color:var(--os-blue)!important}
.nav a.active:after{right:auto!important;left:8px!important;top:50%!important;bottom:auto!important;width:7px!important;height:7px!important;border-radius:999px!important;background:#13b981!important;transform:translateY(-50%)!important}

.nav-subgroup{margin:6px 7px!important;padding:4px!important;border:1px solid rgba(255,255,255,.1)!important;border-radius:10px!important;background:rgba(0,0,0,.08)!important}
.nav-children{margin:3px 7px 6px 0!important;padding-inline-start:8px!important;border-inline-start:1px solid rgba(255,255,255,.16)!important}

.topbar{
  position:sticky!important;
  top:0!important;
  z-index:60!important;
  margin:-18px -22px 18px!important;
  padding:14px 22px!important;
  border:0!important;
  border-bottom:1px solid rgba(215,226,238,.86)!important;
  background:rgba(247,250,253,.9)!important;
  backdrop-filter:blur(16px);
}

.topbar h1{color:var(--os-ink)!important;font-size:25px!important;font-weight:800!important}
.breadcrumb{color:#71839a!important;font-size:12px!important}
.breadcrumb b:last-child,.eyebrow{color:var(--os-blue)!important}

.topbar-icon,
.icon-btn.icon-only{
  width:42px!important;
  height:42px!important;
  min-width:42px!important;
  border:1px solid var(--os-line)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:var(--os-navy)!important;
  box-shadow:var(--shadow-soft)!important;
}

.topbar-badge{background:#e03131!important;color:#fff!important;border:2px solid #fff!important}

.page-head,
.panel,
.card,
.sub-card,
.page-state,
.record-panel div,
.smart-table,
.report-card,
.report-table-panel,
.report-methods-panel,
.report-summary-card,
.toolbar,
.smart-table-toolbar{
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:var(--shadow-soft)!important;
}

.page-head{
  background:linear-gradient(135deg,#fff 0%,#f8fbfe 48%,#e8f4fa 100%)!important;
}

.page-head h2,
.panel h2,
.panel h3{color:var(--os-ink)!important;font-weight:800!important}

.card:before{inset:0 0 auto 0!important;width:100%!important;height:4px!important;background:linear-gradient(90deg,var(--os-blue),#35a7d7)!important}

body.admin-body table th,
body.admin-body table th:first-child,
body.admin-body table th:last-child,
body.admin-body .smart-table-scroll table th,
body.admin-body .smart-table-scroll table th:first-child,
body.admin-body .smart-table-scroll table th:last-child{
  background:#eaf2f9!important;
  color:#26384d!important;
  border-color:#d9e4ef!important;
  font-size:12px!important;
  font-weight:800!important;
}

body.admin-body table td,
body.admin-body .smart-table-scroll table td{
  border-color:#e7eef6!important;
  color:#243247!important;
  font-size:13.5px!important;
}

tbody tr:hover td{background:#f7fbff!important}

.btn,
button,
input[type="submit"],
.smart-action{
  min-height:40px;
  border:1px solid var(--os-navy)!important;
  border-radius:10px!important;
  background:var(--os-navy)!important;
  color:#fff!important;
  font-weight:800!important;
  box-shadow:0 10px 24px rgba(8,39,66,.14)!important;
}

.btn.ghost,
.btn.secondary,
button.ghost,
button.secondary,
.icon-btn.ghost,
.icon-btn.icon-only,
.smart-action.ghost{
  border-color:var(--os-line)!important;
  background:#fff!important;
  color:var(--os-navy)!important;
  box-shadow:none!important;
}

.badge,
.status-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:5px 10px;
  border:1px solid #d6e1ed!important;
  border-radius:999px!important;
  background:#f8fbfe!important;
  color:#2d4057!important;
  font-size:12px!important;
  font-weight:800!important;
  white-space:nowrap;
}

.status-pill.ready,.badge.ready,.badge.success,.badge.paid,.badge.active{border-color:#bfe6d3!important;background:var(--os-green-soft)!important;color:var(--os-green)!important}
.status-pill.rented,.badge.rented{border-color:#b9dceb!important;background:var(--os-blue-soft)!important;color:var(--os-blue)!important}
.status-pill.due,.badge.due,.badge.warning,.badge.pending,.badge.unpaid{border-color:#f3d19a!important;background:var(--os-orange-soft)!important;color:#9a4d00!important}
.status-pill.risk,.badge.danger,.badge.cancelled,.badge.overdue{border-color:#f0b7b7!important;background:var(--os-red-soft)!important;color:var(--os-red)!important}

.amount,.os-money{color:var(--os-navy)!important;font-weight:800!important;font-variant-numeric:tabular-nums;direction:ltr}

.os-page{display:grid;gap:14px;max-width:100%;min-width:0}
body.admin-body:not(.focus-mode) .main > .os-page{
  width:min(100%,calc(100vw - var(--os-sidebar-width) - 78px));
  max-width:calc(100vw - var(--os-sidebar-width) - 78px);
  margin-inline-start:auto;
  margin-inline-end:0;
}
.os-page > *{width:100%;max-width:100%;min-width:0;box-sizing:border-box}
.os-command-card,.os-panel,.os-detail-card,.os-mini-card{
  border:1px solid var(--os-line);
  border-radius:12px;
  background:#fff;
  box-shadow:var(--shadow-soft);
}

.os-command-card{
  position:relative;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:center;
  padding:18px;
  overflow:hidden;
  background:
    linear-gradient(135deg,#ffffff 0%,#fbfdff 42%,#eef8fc 100%);
}

.os-command-card:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--os-gold),var(--os-cyan),var(--os-blue));
}

.os-luxe-hero{
  grid-template-columns:minmax(0,1fr) minmax(240px,300px) auto;
}

.os-command-snapshot{
  display:grid;
  gap:6px;
  padding:13px;
  border:1px solid rgba(184,200,218,.85);
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#f7fbff);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9),0 14px 28px rgba(15,31,51,.07);
}

.os-command-snapshot span,
.os-command-snapshot em{
  color:var(--os-muted);
  font-size:11.5px;
  font-style:normal;
  font-weight:800;
}

.os-command-snapshot b{
  color:var(--os-ink);
  font-size:28px;
  line-height:1;
  font-weight:800;
}

.os-command-snapshot small{color:#43566d;font-weight:700}
.os-command-snapshot strong{justify-self:start;color:var(--os-green);font-size:18px;font-weight:800}
.os-command-snapshot strong.negative{color:var(--os-red)}

.os-occupancy-bar{
  height:9px;
  overflow:hidden;
  border-radius:999px;
  background:#e3edf5;
}

.os-occupancy-bar i{
  display:block;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,var(--os-gold),var(--os-cyan),var(--os-blue));
}

.os-title small,.os-kicker{display:block;color:var(--os-blue);font-size:12px;font-weight:800}
.os-title h2,.os-panel h2{margin:4px 0 5px;color:var(--os-ink);font-size:24px;line-height:1.2;font-weight:800}
.os-title p,.os-panel p{margin:0;color:var(--os-muted);font-size:13px;font-weight:600}

.os-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.os-filter-grid{display:grid;grid-template-columns:1.1fr .75fr .75fr auto;gap:10px;align-items:end}
.os-field{display:grid;gap:5px}
.os-field label{color:#334155;font-size:12px;font-weight:800}
.os-field input,.os-field select{width:100%;min-height:42px;padding:8px 10px;border:1px solid var(--os-line)!important;border-radius:10px!important;background:#fff!important;color:var(--os-ink)!important;box-shadow:none!important}

.os-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
.os-metric{position:relative;min-height:100px;padding:15px;border:1px solid var(--os-line);border-radius:12px;background:linear-gradient(180deg,#fff,#fbfdff);box-shadow:var(--shadow-soft);overflow:hidden}
.os-metric:before{content:"";position:absolute;inset:0 0 auto 0;height:4px;background:var(--os-blue)}
.os-metric.blue:before{background:linear-gradient(90deg,var(--os-blue),var(--os-cyan))}
.os-metric.green:before{background:var(--os-green)}
.os-metric.orange:before{background:var(--os-orange)}
.os-metric.income:before{background:var(--os-green)}
.os-metric.expense:before{background:var(--os-orange)}
.os-metric.risk:before{background:var(--os-red)}
.os-metric span{color:var(--os-muted);font-size:12px;font-weight:800}
.os-metric b{display:block;margin-top:7px;color:var(--os-ink);font-size:22px;line-height:1.15;font-weight:800}
.os-metric small{display:block;margin-top:7px;color:var(--os-muted);font-size:11.5px;font-weight:600}

.os-units-layout{display:grid;grid-template-columns:minmax(0,1fr) 392px;gap:16px}
.os-panel{padding:16px}
.os-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.os-chips{display:flex;flex-wrap:wrap;gap:8px}
.os-chip{min-height:32px;display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border:1px solid var(--os-line);border-radius:999px;background:#fff;color:#334155;font-size:12px;font-weight:800}
.os-chip.active{border-color:var(--os-navy);background:var(--os-navy);color:#fff}

.os-unit-list{display:grid;gap:10px}
.os-unit-row{
  position:relative;
  display:grid;
  grid-template-columns:68px minmax(0,1fr) 110px 110px auto;
  gap:12px;
  align-items:center;
  padding:14px;
  border:1px solid var(--os-line);
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  color:inherit;
  text-decoration:none;
  box-shadow:0 1px 0 rgba(255,255,255,.95),0 10px 24px rgba(15,31,51,.045);
}

.os-unit-row:before{content:"";position:absolute;inset:12px auto 12px 8px;width:4px;border-radius:999px;background:#d5e3ef}
.os-unit-row:hover{border-color:#9ccbe2;background:#f7fcff;transform:translateY(-1px)}
.os-unit-row.selected{border-color:#8ecce7;background:#f3faff;box-shadow:0 16px 34px rgba(27,111,159,.14)}
.os-unit-row.selected:before{background:linear-gradient(180deg,var(--os-gold),var(--os-blue))}
.os-unit-no{display:grid;place-items:center;width:54px;height:54px;border-radius:12px;background:linear-gradient(180deg,#eef8fc,#dff0f8);color:var(--os-blue);font-size:20px;font-weight:800;box-shadow:inset 0 1px 0 rgba(255,255,255,.95)}
.os-unit-row b{display:block;font-weight:800}
.os-unit-row small{color:var(--os-muted);font-weight:600}

.os-detail-card{position:sticky;top:88px;align-self:start;padding:17px;background:linear-gradient(180deg,#ffffff,#fbfdff)}
.os-detail-card h3{margin:4px 0 12px;color:var(--os-ink);font-size:20px;font-weight:800}
.os-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.os-mini-card{padding:12px;box-shadow:none;background:#fff;border-color:#deebf5}
.os-mini-card span{display:block;color:var(--os-muted);font-size:11.5px;font-weight:800}
.os-mini-card b{display:block;margin-top:5px;font-size:16px;font-weight:800}

.os-meter-map,.os-feed{display:grid;gap:8px;margin-top:12px}
.os-meter-line,.os-feed-item{display:grid;grid-template-columns:96px minmax(0,1fr);gap:8px;align-items:center;padding:10px;border:1px dashed #b9cad9;border-radius:10px;background:#fbfdff}
.os-meter-units{display:flex;flex-wrap:wrap;gap:6px}
.os-meter-units span{padding:4px 8px;border-radius:999px;background:var(--os-blue-soft);color:var(--os-blue);font-size:11px;font-weight:800}
.os-feed-item{grid-template-columns:auto minmax(0,1fr)}
.os-feed-dot{width:10px;height:10px;border-radius:50%;background:var(--os-blue);box-shadow:0 0 0 5px var(--os-blue-soft)}
.os-empty{padding:18px;border:1px dashed var(--os-line-strong);border-radius:12px;background:#fbfdff;color:var(--os-muted);font-weight:700;text-align:center}

.os-tabs{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.os-tab{
  min-height:38px;
  padding:8px 13px;
  border:1px solid var(--os-line);
  border-radius:999px;
  background:#fff;
  color:#334155;
  font-weight:800;
  cursor:pointer;
}
.os-tab.active{border-color:var(--os-navy);background:var(--os-navy);color:#fff}
.os-tab-panel{display:none}
.os-tab-panel.active{display:block}
.os-form-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.os-form-grid .wide{grid-column:1/-1}
.os-action-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.os-action-card{padding:14px;border:1px solid var(--os-line);border-radius:12px;background:#fff;box-shadow:var(--shadow-soft)}
.os-action-card h3{margin:0 0 6px;font-size:17px;font-weight:800;color:var(--os-ink)}
.os-action-card p{margin:0;color:var(--os-muted);font-size:12.5px;font-weight:600}
.os-check-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;max-height:240px;overflow:auto;padding:8px;border:1px solid var(--os-line);border-radius:12px;background:#fbfdff}
.os-check-item{display:flex;align-items:center;gap:8px;min-height:34px;padding:7px 9px;border:1px solid #e0e9f3;border-radius:10px;background:#fff;font-size:12px;font-weight:800;color:#334155}
.os-check-item input{width:auto!important;min-height:auto!important}
.os-meter-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.os-meter-card{display:grid;gap:8px;padding:13px;border:1px solid var(--os-line);border-radius:12px;background:#fff;box-shadow:var(--shadow-soft)}
.os-meter-card header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.os-meter-card h3{margin:0;font-size:17px;color:var(--os-ink);font-weight:800}
.os-meter-card .latin{direction:ltr;text-align:left}
.os-table-wrap{width:100%;overflow:auto;border:1px solid var(--os-line);border-radius:12px;background:#fff}
.os-table-wrap table{margin:0;border:0;box-shadow:none}
.os-table-wrap th{position:sticky;top:0;z-index:1}
.os-muted-line{color:var(--os-muted);font-size:12px;font-weight:600}
.os-split{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:14px;align-items:start}

/* Premium entity pages: buildings, tenants, contracts */
.smart-command-strip{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(280px,auto)!important;
  gap:16px!important;
  align-items:center!important;
  padding:18px!important;
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:linear-gradient(135deg,#ffffff 0%,#fbfdff 45%,#edf8fc 100%)!important;
  box-shadow:var(--shadow-soft)!important;
  position:relative;
  overflow:hidden;
}

.smart-command-strip:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--os-gold),var(--os-cyan),var(--os-blue));
}

.smart-command-strip h2{margin:4px 0 6px!important;color:var(--os-ink)!important;font-size:23px!important;font-weight:800!important}
.smart-command-strip p{margin:0!important;color:var(--os-muted)!important;font-size:13px!important;font-weight:600!important;line-height:1.75}
.smart-command-actions{display:flex!important;flex-wrap:wrap!important;gap:8px!important;justify-content:flex-end!important}
.smart-command-actions .smart-action{
  min-height:38px!important;
  padding:8px 12px!important;
  border-radius:10px!important;
  border:1px solid var(--os-line)!important;
  background:#fff!important;
  color:var(--os-navy)!important;
  box-shadow:0 8px 18px rgba(15,31,51,.06)!important;
  text-decoration:none!important;
}
.smart-command-actions .smart-action:hover{border-color:#9ccbe2!important;background:#f7fcff!important}

.entity-workspace-tabs{
  display:grid;
  gap:14px;
  min-width:0;
}

.entity-tabbar{
  position:sticky;
  top:74px;
  z-index:40;
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  padding:10px!important;
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:var(--shadow-soft)!important;
  backdrop-filter:blur(14px);
}

.entity-tab{
  min-height:38px!important;
  padding:8px 13px!important;
  border:1px solid var(--os-line)!important;
  border-radius:999px!important;
  background:#fff!important;
  color:#334155!important;
  font-weight:800!important;
  box-shadow:none!important;
}

.entity-tab.active{
  border-color:var(--os-navy)!important;
  background:linear-gradient(135deg,var(--os-navy),#184363)!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(16,42,67,.16)!important;
}

.entity-tab-panel{
  display:none;
  gap:14px;
}

.entity-tab-panel.active{display:grid}

.grid.cards{
  gap:12px!important;
}

.grid.cards .card{
  min-height:104px;
  padding:15px!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#fff,#fbfdff)!important;
}

.grid.cards .card span{
  color:var(--os-muted)!important;
  font-size:12px!important;
  font-weight:800!important;
}

.grid.cards .card b{
  color:var(--os-ink)!important;
  font-size:21px!important;
  line-height:1.2!important;
  font-weight:800!important;
}

.record-panel dl{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr))!important;
  gap:10px!important;
}

.record-panel dl > div{
  padding:13px!important;
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#fff,#fbfdff)!important;
}

.record-panel dt{color:var(--os-muted)!important;font-size:11.5px!important;font-weight:800!important}
.record-panel dd{margin:5px 0 0!important;color:var(--os-ink)!important;font-size:15px!important;font-weight:800!important}

/* Dashboard command center */
body[data-current-page="dashboard.php"] .main > .os-page.dashboard-luxe{
  display:grid;
  gap:14px;
  width:100%;
  max-width:1680px;
  margin:0 auto;
}

body[data-current-page="dashboard.php"] .dashboard-control-panel{
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(360px,520px)!important;
  gap:18px!important;
  align-items:start!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:12px!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:hidden;
}

body[data-current-page="dashboard.php"] .dashboard-control-panel:before{
  display:none;
}

body[data-current-page="dashboard.php"] .dashboard-control-panel > div:first-child{
  position:relative;
  max-width:none!important;
  min-width:0!important;
  padding:22px!important;
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:
    radial-gradient(circle at 12% 8%,rgba(255,247,230,.92),transparent 30%),
    linear-gradient(135deg,#ffffff 0%,#f8fcff 58%,#eef8fc 100%)!important;
  box-shadow:var(--shadow-soft)!important;
  overflow:hidden;
}

body[data-current-page="dashboard.php"] .dashboard-control-panel > div:first-child:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--os-gold),var(--os-cyan),var(--os-blue));
}

body[data-current-page="dashboard.php"] .dashboard-kicker{
  color:var(--os-blue)!important;
  font-size:12px!important;
  font-weight:800!important;
  letter-spacing:0!important;
}

body[data-current-page="dashboard.php"] .dashboard-control-panel h2{
  margin:7px 0 6px!important;
  color:var(--os-ink)!important;
  font-size:31px!important;
  line-height:1.2!important;
  font-weight:800!important;
}

body[data-current-page="dashboard.php"] .dashboard-control-panel p{
  margin:0!important;
  max-width:720px;
  color:var(--os-muted)!important;
  font-size:13px!important;
  line-height:1.8!important;
  font-weight:600!important;
}

.dashboard-executive-note{
  display:grid;
  gap:6px;
  margin-top:14px;
  padding:14px;
  border:1px solid var(--os-line);
  border-radius:12px;
  background:linear-gradient(135deg,#ffffff,#f6fbff);
  box-shadow:0 8px 20px rgba(15,31,51,.045);
}

.dashboard-executive-note span{
  color:var(--os-muted);
  font-size:11.5px;
  font-weight:800;
}

.dashboard-executive-note b{
  color:var(--os-ink);
  font-size:20px;
  line-height:1.55;
  font-weight:800;
}

.dashboard-executive-note small{
  color:var(--os-muted);
  font-size:12px;
  line-height:1.6;
  font-weight:700;
}

.dashboard-executive-note.is-good{border-color:#b9ead4;background:linear-gradient(135deg,#fff,#f2fbf6)}
.dashboard-executive-note.is-danger{border-color:#f1b8b8;background:linear-gradient(135deg,#fff,#fff5f5)}

.dashboard-command-metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}

.dashboard-command-metric{
  min-height:108px;
  padding:14px;
  border:1px solid var(--os-line);
  border-radius:10px;
  background:rgba(255,255,255,.78);
  color:inherit;
  text-decoration:none;
  box-shadow:0 8px 20px rgba(15,31,51,.045);
}

.dashboard-command-metric span{
  display:block;
  color:var(--os-muted);
  font-size:11.5px;
  font-weight:800;
}

.dashboard-command-metric strong{
  display:block;
  margin-top:7px;
  color:var(--os-ink);
  font-size:23px;
  line-height:1.1;
  font-weight:800;
}

.dashboard-command-metric small{
  display:block;
  margin-top:7px;
  color:var(--os-muted);
  font-size:11.5px;
  line-height:1.5;
  font-weight:650;
}

.dashboard-command-metric.is-good{border-color:#b9ead4;background:linear-gradient(180deg,#ffffff,#f2fbf6)}
.dashboard-command-metric.is-warning{border-color:#f3d399;background:linear-gradient(180deg,#ffffff,#fff9ed)}
.dashboard-command-metric.is-danger{border-color:#f1b8b8;background:linear-gradient(180deg,#ffffff,#fff5f5)}
.dashboard-command-metric.is-rental-revenue{
  grid-column:1 / -1;
  min-height:96px;
  border-color:#bcd5ff;
  background:linear-gradient(135deg,#ffffff,#eef5ff);
}
.dashboard-command-metric.is-good strong{color:var(--os-green)}
.dashboard-command-metric.is-warning strong{color:var(--os-orange)}
.dashboard-command-metric.is-danger strong{color:var(--os-red)}
.dashboard-command-metric.is-rental-revenue strong{color:#1d4ed8}

.dashboard-rent-forecast{
  border-color:#cfe0f7;
  background:linear-gradient(180deg,#ffffff,#f8fbff);
}
.dashboard-rent-forecast tr.is-current-month td{
  background:#eef5ff;
  font-weight:750;
}
.dashboard-rent-forecast tr.is-current-month td:first-child{
  color:#1d4ed8;
}

.dashboard-command-rail{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:14px;
}

.dashboard-command-action{
  min-height:94px;
  padding:12px;
  border:1px solid var(--os-line);
  border-radius:10px;
  background:rgba(255,255,255,.78);
  color:inherit;
  text-decoration:none;
  box-shadow:0 8px 20px rgba(15,31,51,.045);
}

.dashboard-command-action span,
.dashboard-decision-card span,
.dashboard-link-map span{
  display:block;
  color:var(--os-muted);
  font-size:11.5px;
  font-weight:800;
}

.dashboard-command-action b{
  display:block;
  margin-top:7px;
  color:var(--os-ink);
  font-size:16px;
  line-height:1.1;
  font-weight:800;
}

.dashboard-command-action small,
.dashboard-decision-card small{
  display:block;
  margin-top:7px;
  color:var(--os-muted);
  font-size:11.5px;
  line-height:1.5;
  font-weight:650;
}

.dashboard-command-action.primary{border-color:#b9dceb;background:linear-gradient(180deg,#ffffff,#eef8fc)}
.dashboard-command-action.warning{border-color:#f3d399;background:linear-gradient(180deg,#ffffff,#fff9ed)}
.dashboard-command-action.primary b{color:var(--os-blue)}
.dashboard-command-action.warning b{color:var(--os-orange)}

body[data-current-page="dashboard.php"] .dashboard-filter{
  align-self:start!important;
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:10px!important;
  align-content:start!important;
  align-items:start!important;
  padding:13px!important;
  border:1px solid #dce8f2!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.72)!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter label span{
  color:#405167!important;
  font-size:11.5px!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter select,
body[data-current-page="dashboard.php"] .dashboard-filter input{
  min-height:42px!important;
  border-radius:10px!important;
  border-color:#d7e3ee!important;
  background:#fff!important;
  color:var(--os-ink)!important;
  font-weight:750!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-occupancy{
  grid-column:1 / -1!important;
  display:grid!important;
  gap:10px!important;
  margin-top:3px!important;
  padding-top:13px!important;
  border-top:1px solid #dce8f2!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-occupancy-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-occupancy-head b{
  color:var(--os-ink)!important;
  font-size:13px!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-occupancy-head span{
  color:var(--os-muted)!important;
  font-size:11px!important;
  font-weight:700!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-occupancy-grid{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:8px!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-status{
  position:relative!important;
  display:grid!important;
  align-content:center!important;
  min-height:108px!important;
  padding:12px!important;
  overflow:hidden!important;
  border:1px solid #dce8f2!important;
  border-radius:12px!important;
  background:#fff!important;
  color:var(--os-ink)!important;
  text-decoration:none!important;
  box-shadow:0 8px 20px rgba(15,31,51,.04)!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-status::before{
  content:""!important;
  position:absolute!important;
  top:0!important;
  right:0!important;
  bottom:0!important;
  width:4px!important;
  background:var(--status-color,#5b8def)!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-status:hover{
  transform:translateY(-2px)!important;
  border-color:var(--status-color,#5b8def)!important;
  box-shadow:0 12px 26px rgba(15,31,51,.09)!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-status span{
  color:#52657a!important;
  font-size:11.5px!important;
  font-weight:800!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-status strong{
  margin:4px 0 2px!important;
  color:var(--status-color,#5b8def)!important;
  font-size:28px!important;
  line-height:1!important;
  font-weight:900!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-status small{
  color:var(--os-muted)!important;
  font-size:10px!important;
  line-height:1.4!important;
  font-weight:650!important;
}

body[data-current-page="dashboard.php"] .dashboard-filter-status.is-total{--status-color:#525fb7}
body[data-current-page="dashboard.php"] .dashboard-filter-status.is-vacant{--status-color:#0f9f73}
body[data-current-page="dashboard.php"] .dashboard-filter-status.is-occupied{--status-color:#1976d2}
body[data-current-page="dashboard.php"] .dashboard-filter-status.is-maintenance{--status-color:#d78516}
body[data-current-page="dashboard.php"] .dashboard-filter-status.is-maintenance-request{--status-color:#e46732}
body[data-current-page="dashboard.php"] .dashboard-filter-status.is-complaint{--status-color:#c23a67}

body[data-current-page="dashboard.php"] .dashboard-period-strip{
  display:grid!important;
  grid-template-columns:1.25fr repeat(3,minmax(0,1fr))!important;
  gap:10px!important;
  margin:0!important;
}

body[data-current-page="dashboard.php"] .dashboard-period-strip div{
  min-height:66px!important;
  padding:12px!important;
  border:1px solid var(--os-line)!important;
  border-radius:10px!important;
  background:#fff!important;
  box-shadow:0 8px 20px rgba(15,31,51,.04)!important;
}

body[data-current-page="dashboard.php"] .dashboard-period-strip span{
  color:var(--os-muted)!important;
  font-size:11.5px!important;
}

body[data-current-page="dashboard.php"] .dashboard-period-strip b{
  color:var(--os-ink)!important;
  font-size:14px!important;
}

.dashboard-section-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  min-height:74px;
  padding:14px 16px;
  border:1px solid var(--os-line);
  border-radius:12px;
  background:linear-gradient(135deg,#fff,#f8fcff);
  box-shadow:var(--shadow-soft);
}

.dashboard-section-head-compact{
  min-height:62px;
}

.dashboard-section-head span{
  display:block;
  color:var(--os-blue);
  font-size:11.5px;
  font-weight:800;
}

.dashboard-section-head h2{
  margin:4px 0 0;
  color:var(--os-ink);
  font-size:20px;
  line-height:1.25;
  font-weight:800;
}

body[data-current-page="dashboard.php"] .dashboard-metrics-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  margin:0!important;
}

body[data-current-page="dashboard.php"] .dashboard-metric-card{
  position:relative!important;
  overflow:hidden!important;
  min-height:120px!important;
  padding:15px!important;
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#fff,#fbfdff)!important;
  box-shadow:var(--shadow-soft)!important;
}

body[data-current-page="dashboard.php"] .dashboard-metric-card:before{
  content:""!important;
  display:block!important;
  position:absolute!important;
  inset:0 0 auto 0!important;
  height:4px!important;
  background:var(--os-blue)!important;
}

body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-green{
  border-color:#b9ead4!important;
  background:linear-gradient(180deg,#fff,#f3fbf7)!important;
}

body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-red{
  border-color:#f1b8b8!important;
  background:linear-gradient(180deg,#fff,#fff5f5)!important;
}

body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-amber{
  border-color:#f3d399!important;
  background:linear-gradient(180deg,#fff,#fff9ed)!important;
}

body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-blue{
  border-color:#bfd9ea!important;
  background:linear-gradient(180deg,#fff,#f4faff)!important;
}

body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-green:before{background:var(--os-green)!important}
body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-red:before{background:var(--os-red)!important}
body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-amber:before{background:var(--os-orange)!important}
body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-blue:before{background:var(--os-blue)!important}
body[data-current-page="dashboard.php"] .dashboard-metric-card.tone-violet:before{background:#7c3aed!important}

body[data-current-page="dashboard.php"] .dashboard-metric-card:hover{
  border-color:#9ccbe2!important;
  box-shadow:0 16px 34px rgba(15,31,51,.08)!important;
}

body[data-current-page="dashboard.php"] .metric-label{
  color:#304158!important;
  font-size:12.5px!important;
  font-weight:800!important;
}

body[data-current-page="dashboard.php"] .dashboard-metric-card b{
  font-size:24px!important;
  font-weight:800!important;
}

body[data-current-page="dashboard.php"] .metric-value-profit{color:var(--os-green)!important}
body[data-current-page="dashboard.php"] .metric-value-expense{color:var(--os-orange)!important}
body[data-current-page="dashboard.php"] .metric-value-loss{color:var(--os-red)!important}
body[data-current-page="dashboard.php"] .metric-value-blue{color:var(--os-blue)!important}
body[data-current-page="dashboard.php"] .metric-value-commission{color:#9a6b00!important}

body[data-current-page="dashboard.php"] .metric-subline{
  color:var(--os-muted)!important;
  font-size:11.5px!important;
}

.dashboard-decision-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.dashboard-decision-card{
  position:relative;
  min-height:112px;
  padding:15px 15px 15px 18px;
  border:1px solid var(--os-line);
  border-radius:12px;
  background:#fff;
  color:inherit;
  text-decoration:none;
  box-shadow:var(--shadow-soft);
  overflow:hidden;
}

.dashboard-decision-card:before{
  content:"";
  position:absolute;
  inset:12px 8px 12px auto;
  width:4px;
  border-radius:999px;
  background:var(--os-blue);
}

.dashboard-decision-card strong{
  display:block;
  margin-top:8px;
  color:var(--os-ink);
  font-size:25px;
  font-weight:800;
}

.dashboard-decision-card.is-good:before{background:var(--os-green)}
.dashboard-decision-card.is-warning:before{background:var(--os-orange)}
.dashboard-decision-card.is-danger:before{background:var(--os-red)}
.dashboard-decision-card.is-good strong{color:var(--os-green)}
.dashboard-decision-card.is-warning strong{color:var(--os-orange)}
.dashboard-decision-card.is-danger strong{color:var(--os-red)}

body[data-current-page="dashboard.php"] .dashboard-profit-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:14px!important;
}

body[data-current-page="dashboard.php"] .table-panel{
  border-radius:12px!important;
  border-color:var(--os-line)!important;
  background:#fff!important;
  box-shadow:var(--shadow-soft)!important;
}

body[data-current-page="dashboard.php"] .table-panel h2{
  color:var(--os-ink)!important;
  font-size:18px!important;
  font-weight:800!important;
}

.dashboard-link-map{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.dashboard-link-map a{
  min-height:80px;
  padding:14px;
  border:1px solid var(--os-line);
  border-radius:12px;
  background:linear-gradient(180deg,#fff,#fbfdff);
  color:inherit;
  text-decoration:none;
  box-shadow:var(--shadow-soft);
}

.dashboard-link-map b{
  display:block;
  margin-top:7px;
  color:var(--os-ink);
  font-size:14px;
  line-height:1.5;
  font-weight:800;
}

.dashboard-link-map a:hover,
.dashboard-decision-card:hover,
.dashboard-command-metric:hover,
.dashboard-command-action:hover{
  border-color:#9ccbe2;
  transform:translateY(-1px);
}

/* Shared operating lists */
.list-os-page{
  gap:14px;
}

.list-command-head{
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:14px!important;
  align-items:center!important;
  margin:0!important;
  padding:17px!important;
  overflow:hidden;
}

.list-command-head:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--os-gold),var(--os-cyan),var(--os-blue));
}

.list-command-head h2{
  margin:4px 0 6px!important;
  color:var(--os-ink)!important;
  font-size:23px!important;
  line-height:1.25!important;
  font-weight:800!important;
}

.list-command-head p{
  margin:0!important;
  color:var(--os-muted)!important;
  font-size:13px!important;
  line-height:1.8!important;
  font-weight:600!important;
}

.list-command-head .actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  justify-content:flex-end!important;
}

.toolbar{
  display:flex!important;
  align-items:end!important;
  gap:10px!important;
  padding:12px!important;
  margin:0!important;
}

.toolbar .search-field{
  flex:1 1 360px!important;
  min-width:220px!important;
}

.toolbar input,
.toolbar select{
  min-height:42px!important;
  border-radius:10px!important;
  background:#fff!important;
  border-color:#d7e3ee!important;
  font-weight:700!important;
}

.list-table-panel{
  padding:0!important;
  overflow:hidden!important;
}

.list-table-panel .os-table-wrap{
  border:0!important;
  border-radius:12px!important;
}

.list-table-panel table{
  min-width:920px;
}

.list-table-panel tbody tr{
  transition:background .14s ease;
}

.list-table-panel td:first-child,
.list-table-panel th:first-child{
  padding-inline-start:16px!important;
}

.list-table-panel td:last-child,
.list-table-panel th:last-child{
  padding-inline-end:16px!important;
}

.row-actions{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:6px!important;
  min-width:132px!important;
}

.row-actions .btn,
.row-actions a,
.row-actions button{
  min-height:32px!important;
  padding:6px 9px!important;
  border-radius:9px!important;
  font-size:11.5px!important;
  box-shadow:none!important;
}

.latin{
  direction:ltr;
  unicode-bidi:embed;
  font-variant-numeric:tabular-nums;
}

.muted{
  color:var(--os-muted)!important;
  font-size:12px!important;
  line-height:1.7!important;
}

/* Focus-mode workflows: building, tenant, expenses, maintenance */
body.admin-body.focus-mode{
  background:
    linear-gradient(180deg,#f8fbff 0%,#eef4fa 48%,#e9f0f7 100%) fixed!important;
}

body.admin-body.focus-mode .main{
  width:min(100%,1180px)!important;
  margin:0 auto!important;
  padding:18px 18px 64px!important;
}

body.admin-body.focus-mode .topbar{
  margin:-18px -18px 18px!important;
  padding:13px 18px!important;
  border-bottom:1px solid rgba(215,226,238,.9)!important;
  background:rgba(248,251,255,.92)!important;
}

body.admin-body.focus-mode .topbar h1{
  font-size:24px!important;
  font-weight:800!important;
}

body.admin-body.focus-mode .page-head,
body.admin-body.focus-mode form.panel,
body.admin-body.focus-mode .tenant-workflow-form,
body.admin-body.focus-mode .building-work-form,
body.admin-body.focus-mode [data-accounting-expense-form]{
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:var(--shadow-soft)!important;
}

body.admin-body.focus-mode .page-head{
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:14px!important;
  align-items:center!important;
  padding:17px!important;
  overflow:hidden!important;
  background:linear-gradient(135deg,#ffffff 0%,#f8fcff 58%,#eef8fc 100%)!important;
}

body.admin-body.focus-mode .page-head:before,
body.admin-body.focus-mode form.panel:before,
body.admin-body.focus-mode .building-work-form:before,
body.admin-body.focus-mode .tenant-workflow-form:before,
body.admin-body.focus-mode [data-accounting-expense-form]:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--os-gold),var(--os-cyan),var(--os-blue));
}

body.admin-body.focus-mode form.panel,
body.admin-body.focus-mode .building-work-form,
body.admin-body.focus-mode .tenant-workflow-form,
body.admin-body.focus-mode [data-accounting-expense-form]{
  position:relative;
  padding:16px!important;
  overflow:hidden;
}

body.admin-body.focus-mode .form-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr))!important;
  gap:12px!important;
}

body.admin-body.focus-mode .field{
  display:grid!important;
  gap:6px!important;
  min-width:0!important;
}

body.admin-body.focus-mode .field label{
  color:#34465b!important;
  font-size:12px!important;
  line-height:1.5!important;
  font-weight:800!important;
}

body.admin-body.focus-mode .field input,
body.admin-body.focus-mode .field select,
body.admin-body.focus-mode .field textarea,
body.admin-body.focus-mode input:not([type="checkbox"]):not([type="radio"]),
body.admin-body.focus-mode select,
body.admin-body.focus-mode textarea{
  min-height:43px!important;
  border:1px solid #d6e3ee!important;
  border-radius:10px!important;
  background:#fff!important;
  color:var(--os-ink)!important;
  font-size:13.5px!important;
  font-weight:700!important;
  box-shadow:none!important;
}

body.admin-body.focus-mode textarea{
  min-height:92px!important;
  line-height:1.7!important;
}

body.admin-body.focus-mode input:focus,
body.admin-body.focus-mode select:focus,
body.admin-body.focus-mode textarea:focus{
  border-color:#7fc3df!important;
  box-shadow:0 0 0 4px rgba(52,179,214,.15)!important;
  outline:0!important;
}

.building-tabbar,
.tenant-step-grid,
.accounting-category-grid{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  margin:0 0 14px!important;
  padding:10px!important;
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:#f8fbff!important;
}

.accounting-category-panel{
  padding:16px!important;
  overflow:hidden!important;
}

.accounting-panel-head{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(240px,340px)!important;
  gap:14px!important;
  align-items:end!important;
  margin-bottom:12px!important;
}

.accounting-panel-head h2{
  margin:4px 0 4px!important;
  color:var(--os-ink)!important;
  font-size:21px!important;
  line-height:1.25!important;
  font-weight:800!important;
}

.accounting-panel-head p{
  margin:0!important;
  color:var(--os-muted)!important;
  font-size:12.5px!important;
  line-height:1.7!important;
  font-weight:650!important;
}

.accounting-category-search{
  display:grid!important;
  gap:6px!important;
}

.accounting-category-search span{
  color:#34465b!important;
  font-size:12px!important;
  font-weight:800!important;
}

.accounting-category-search input{
  min-height:42px!important;
  border:1px solid #d6e3ee!important;
  border-radius:10px!important;
  background:#fff!important;
  color:var(--os-ink)!important;
  font-size:13px!important;
  font-weight:750!important;
}

body.admin-body.focus-mode .building-tabbar,
body.admin-body.focus-mode .tenant-step-grid,
body.admin-body.focus-mode .accounting-category-grid{
  position:relative!important;
  top:auto!important;
  z-index:1!important;
  margin-top:0!important;
}

.building-tab,
.tenant-step,
.accounting-category-check{
  min-height:42px!important;
  border:1px solid #d7e3ee!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#334155!important;
  font-size:12.5px!important;
  font-weight:800!important;
  box-shadow:0 6px 16px rgba(15,31,51,.035)!important;
}

.accounting-category-check{
  position:relative!important;
  display:inline-flex!important;
  align-items:center!important;
  gap:9px!important;
  padding:9px 12px!important;
  cursor:pointer!important;
}

.accounting-category-check input{
  order:2!important;
  width:18px!important;
  height:18px!important;
  margin:0!important;
  accent-color:var(--os-blue)!important;
}

.accounting-category-check span{
  order:1!important;
  white-space:nowrap!important;
}

.accounting-category-check[hidden]{
  display:none!important;
}

.accounting-category-empty{
  margin-top:10px!important;
  padding:12px 14px!important;
  border:1px dashed #c9d9e7!important;
  border-radius:10px!important;
  background:#f8fbff!important;
  color:var(--os-muted)!important;
  font-size:13px!important;
  font-weight:750!important;
  text-align:center!important;
}

.building-tab{
  padding:8px 12px!important;
  cursor:pointer!important;
}

.building-tab.active,
.accounting-category-check.selected{
  border-color:var(--os-navy)!important;
  background:linear-gradient(135deg,var(--os-navy),#184363)!important;
  color:#fff!important;
  box-shadow:0 10px 24px rgba(16,42,67,.16)!important;
}

.tenant-step{
  flex:1 1 170px!important;
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  padding:9px 11px!important;
}

.tenant-step b{
  display:inline-grid!important;
  place-items:center!important;
  width:28px!important;
  height:28px!important;
  flex:0 0 28px!important;
  border-radius:999px!important;
  background:var(--os-blue-soft)!important;
  color:var(--os-blue)!important;
  font-size:12px!important;
}

.building-tab-panel{
  display:none;
  gap:14px;
}

.building-tab-panel.active{
  display:grid;
}

.nested-panel,
.internal-commission-box,
.employee-commission-panel,
.expense-smart-profile,
.selected-accounting-category,
.unit-summary,
.owner-schedule-summary,
.review-summary{
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#fff,#fbfdff)!important;
  box-shadow:0 8px 20px rgba(15,31,51,.04)!important;
}

.selected-accounting-category{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto auto!important;
  gap:10px!important;
  align-items:center!important;
  padding:12px 14px!important;
  margin-bottom:12px!important;
}

.selected-accounting-category b{
  color:var(--os-navy)!important;
  font-size:15px!important;
  font-weight:800!important;
}

.selected-accounting-category span{
  color:#40566e!important;
  font-size:12.5px!important;
  font-weight:750!important;
}

.selected-accounting-category em{
  padding:6px 9px!important;
  border:1px solid #f3d399!important;
  border-radius:999px!important;
  background:var(--os-orange-soft)!important;
  color:var(--os-orange)!important;
  font-size:11.5px!important;
  font-style:normal!important;
  font-weight:800!important;
}

.expense-smart-profile{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(220px,42%)!important;
  gap:12px!important;
  align-items:start!important;
  padding:14px!important;
  margin-bottom:14px!important;
}

.expense-smart-profile b{
  display:block!important;
  margin-bottom:5px!important;
  color:var(--os-green)!important;
  font-size:16px!important;
  font-weight:800!important;
}

.expense-smart-profile p{
  margin:0!important;
  color:#41566d!important;
  line-height:1.75!important;
  font-size:13px!important;
  font-weight:650!important;
}

.expense-smart-profile ul{
  margin:0!important;
  padding:0 18px 0 0!important;
  color:var(--os-ink)!important;
  font-size:12.5px!important;
  line-height:1.8!important;
  font-weight:700!important;
}

.expense-smart-profile li::marker{
  color:var(--os-green)!important;
}

.employee-commission-panel{
  display:grid!important;
  grid-template-columns:minmax(260px,34%) minmax(0,1fr)!important;
  gap:12px!important;
  align-items:start!important;
  padding:14px!important;
  margin-bottom:14px!important;
  border-color:#f3d399!important;
  background:linear-gradient(135deg,#fff 0%,#fff9ed 100%)!important;
}

.employee-commission-panel[hidden]{
  display:none!important;
}

.employee-commission-panel > div:first-child b{
  color:#8b651e!important;
  font-size:16px!important;
}

.employee-commission-panel > div:first-child p{
  color:#4b5563!important;
  line-height:1.8!important;
  font-size:13px!important;
}

.employee-commission-panel .field{
  align-self:start!important;
}

.employee-commission-summary{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(140px,1fr))!important;
  gap:8px!important;
  grid-column:1/-1!important;
  padding:10px!important;
  border:1px solid #f3d399!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#34465b!important;
  font-size:12.5px!important;
  font-weight:700!important;
}

.employee-commission-summary span{
  min-height:64px!important;
  padding:9px!important;
  border:1px solid #f1dfbd!important;
  border-radius:9px!important;
  background:#fffaf1!important;
}

.employee-commission-summary b{
  display:block!important;
  margin-bottom:5px!important;
  color:#8b651e!important;
  font-size:11.5px!important;
  font-weight:800!important;
}

.expense-submit-bar{
  position:sticky!important;
  bottom:10px!important;
  z-index:30!important;
  margin:16px -4px -4px!important;
  padding:12px!important;
  border:1px solid rgba(216,227,238,.92)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 16px 34px rgba(15,31,51,.12)!important;
  backdrop-filter:blur(14px)!important;
  justify-content:flex-start!important;
}

.expense-submit-bar button{
  min-width:190px!important;
}

.accounting-recent-panel{
  padding:0!important;
  overflow:hidden!important;
}

.accounting-recent-panel table{
  min-width:920px!important;
}

.unit-summary,
.owner-schedule-summary,
.review-summary{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;
  gap:10px!important;
  padding:12px!important;
  margin:12px 0!important;
}

.unit-summary > div,
.owner-schedule-summary > section,
.owner-schedule-summary > div,
.review-summary > div{
  min-height:78px!important;
  padding:12px!important;
  border:1px solid #dce8f2!important;
  border-radius:10px!important;
  background:#fff!important;
}

.unit-summary span,
.owner-schedule-summary span,
.review-summary span{
  display:block!important;
  color:var(--os-muted)!important;
  font-size:11.5px!important;
  font-weight:800!important;
}

.unit-summary b,
.owner-schedule-summary b,
.review-summary b{
  display:block!important;
  margin-top:6px!important;
  color:var(--os-ink)!important;
  font-size:17px!important;
  line-height:1.25!important;
  font-weight:800!important;
}

.checkline{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  min-height:43px!important;
  padding:9px 12px!important;
  border:1px solid #d7e3ee!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#34465b!important;
  font-size:13px!important;
  font-weight:800!important;
}

.checkline input,
body.admin-body.focus-mode input[type="checkbox"],
body.admin-body.focus-mode input[type="radio"]{
  width:18px!important;
  height:18px!important;
  accent-color:var(--os-blue)!important;
}

body.admin-body.focus-mode .actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:9px!important;
  align-items:center!important;
}

body.admin-body.focus-mode form.panel > .actions:last-child,
body.admin-body.focus-mode .tenant-workflow-form > .actions:last-child,
body.admin-body.focus-mode .building-work-form > .actions:last-child,
body.admin-body.focus-mode [data-accounting-expense-form] > .actions:last-child{
  position:sticky;
  bottom:10px;
  z-index:30;
  margin:16px -4px -4px!important;
  padding:12px!important;
  border:1px solid rgba(216,227,238,.92)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 16px 34px rgba(15,31,51,.12)!important;
  backdrop-filter:blur(14px);
}

.table-panel,
.owner-cheques-table-wrap,
.tenant-workflow-form .table-panel,
body.admin-body.focus-mode .table-panel{
  border-radius:12px!important;
  border-color:var(--os-line)!important;
  background:#fff!important;
  overflow:auto!important;
}

.owner-cheques-table,
.tenant-cheques-table{
  min-width:980px!important;
}

.compact-input{
  min-height:34px!important;
  border-radius:8px!important;
  font-size:12.5px!important;
}

.unsaved-dialog{
  position:fixed!important;
  inset:0!important;
  z-index:9999!important;
  display:none!important;
  place-items:center!important;
  padding:18px!important;
  background:rgba(15,31,51,.34)!important;
  backdrop-filter:blur(8px)!important;
}

.unsaved-dialog.open{
  display:grid!important;
}

.unsaved-card{
  width:min(94vw,460px)!important;
  margin:0!important;
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 28px 80px rgba(15,31,51,.26)!important;
}

/* Phase 2: management centers and printable reports */
.section-title-row,
.table-head,
.table-panel-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:14px 16px!important;
  border-bottom:1px solid var(--os-line)!important;
}

.section-title-row h2,
.table-head h2,
.table-panel-head h2,
.report-table-title h2,
.report-table-title h3{
  margin:2px 0 4px!important;
  color:var(--os-ink)!important;
  font-size:18px!important;
  line-height:1.35!important;
  font-weight:800!important;
}

.section-title-row p,
.table-head p,
.table-panel-head p,
.report-table-title p{
  margin:0!important;
  color:var(--os-muted)!important;
  font-size:12.5px!important;
  line-height:1.7!important;
  font-weight:650!important;
}

body[data-current-page="reports.php"] .report-center-launcher,
body[data-current-page="reports.php"] .reports-section,
body[data-current-page="accounts.php"] .financial-integrity-panel,
body[data-current-page="accounts.php"] .allocation-settings{
  position:relative;
  overflow:hidden;
}

body[data-current-page="reports.php"] .report-center-launcher:before,
body[data-current-page="reports.php"] .reports-section:before,
body[data-current-page="accounts.php"] .financial-integrity-panel:before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg,var(--os-gold),var(--os-cyan),var(--os-blue));
}

.report-control-center,
.report-filter-bar{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;
  gap:10px!important;
  align-items:end!important;
  padding:14px!important;
}

.report-control-center .actions,
.report-filter-bar .actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
  justify-content:flex-start!important;
}

.report-control-center .field,
.report-filter-bar .field{
  min-width:0!important;
}

.report-control-center input,
.report-control-center select,
.report-filter-bar input,
.report-filter-bar select{
  min-height:42px!important;
  border-radius:10px!important;
  border-color:#d7e3ee!important;
  background:#fff!important;
  color:var(--os-ink)!important;
  font-weight:750!important;
}

.report-summary-cards{
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;
}

.report-summary-card{
  position:relative;
  min-height:112px!important;
  padding:15px!important;
  overflow:hidden;
}

.report-summary-card:after{
  content:"";
  position:absolute;
  inset:14px 10px 14px auto;
  width:4px;
  border-radius:999px;
  background:var(--os-blue);
}

.report-summary-card b{
  color:var(--os-navy)!important;
  font-size:22px!important;
}

.report-summary-card small{
  display:block!important;
  margin-top:7px!important;
  color:var(--os-muted)!important;
  font-size:11.5px!important;
  line-height:1.45!important;
  font-weight:650!important;
}

.report-summary-card.is-green:after,
.report-summary-card.is-profit:after{background:var(--os-green)}
.report-summary-card.is-orange:after,
.report-summary-card.is-expense:after{background:var(--os-orange)}
.report-summary-card.is-red:after,
.report-summary-card.is-danger:after{background:var(--os-red)}
.report-summary-card.is-gold:after{background:var(--os-gold)}
.report-summary-card.is-green b,
.report-summary-card.is-profit b{color:var(--os-green)!important}
.report-summary-card.is-orange b,
.report-summary-card.is-expense b{color:var(--os-orange)!important}
.report-summary-card.is-red b,
.report-summary-card.is-danger b{color:var(--os-red)!important}
.report-summary-card.is-gold b{color:#8b651e!important}

.report-print-header{
  padding:17px!important;
  background:linear-gradient(135deg,#fff 0%,#f7fbff 55%,#eef8fc 100%)!important;
}

.report-print-header h1{
  margin:5px 0 10px!important;
  color:var(--os-ink)!important;
  font-size:25px!important;
  line-height:1.25!important;
  font-weight:800!important;
}

.report-print-meta{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;
  gap:8px!important;
}

.report-print-meta span{
  display:block!important;
  padding:8px 10px!important;
  border:1px solid #dce8f2!important;
  border-radius:9px!important;
  background:#fff!important;
  color:var(--os-muted)!important;
  font-size:12px!important;
  font-weight:700!important;
}

.report-print-meta b{
  color:var(--os-ink)!important;
}

.report-output-actions,
.report-table-actions{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:8px!important;
  align-items:center!important;
  justify-content:flex-end!important;
}

.report-table-actions .report-table-print-btn{
  background:linear-gradient(135deg,var(--os-navy),#184363)!important;
  border-color:var(--os-navy)!important;
  color:#fff!important;
}

.report-table-panel,
.report-methods-panel{
  padding:0!important;
  overflow:hidden!important;
}

.report-table-panel table{
  min-width:1080px!important;
}

.report-table-panel th,
.report-table-panel td{
  white-space:nowrap;
}

.report-table-panel td:nth-child(2),
.report-table-panel td:nth-child(3){
  white-space:normal;
}

.report-methods-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
  gap:10px!important;
  padding:14px!important;
}

.report-method-item{
  min-height:84px!important;
  padding:13px!important;
  border:1px solid var(--os-line)!important;
  border-radius:10px!important;
  background:linear-gradient(180deg,#fff,#fbfdff)!important;
}

.report-method-item span{
  display:block!important;
  color:var(--os-muted)!important;
  font-size:12px!important;
  font-weight:800!important;
}

.report-method-item b{
  display:block!important;
  margin-top:8px!important;
  color:var(--os-green)!important;
  font-size:21px!important;
  font-weight:800!important;
}

.report-note{
  padding:14px 16px!important;
  border-color:#d9e8f0!important;
  background:#f8fcff!important;
}

body.report-table-printing .sidebar,
body.report-table-printing .topbar,
body.report-table-printing .screen-only,
body.report-table-printing .report-filter-bar,
body.report-table-printing .report-output-actions{
  display:none!important;
}

body.report-table-printing .main{
  width:100%!important;
  margin:0!important;
  padding:0!important;
}

body.report-table-printing .report-table-panel{
  box-shadow:none!important;
  border:0!important;
  border-radius:0!important;
}

body[data-current-page="accounts.php"] .integrity-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(190px,1fr))!important;
  gap:10px!important;
  padding:14px!important;
}

.integrity-check{
  display:block!important;
  min-height:92px!important;
  padding:13px!important;
  border:1px solid var(--os-line)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:inherit!important;
  text-decoration:none!important;
}

.integrity-check b{
  display:block!important;
  margin-top:6px!important;
  color:var(--os-ink)!important;
  font-size:20px!important;
  font-weight:800!important;
}

.integrity-check.is-clean{
  border-color:#b9ead4!important;
  background:linear-gradient(180deg,#fff,#f3fbf7)!important;
}

.integrity-check.is-clean b{color:var(--os-green)!important}
.integrity-check.has-issue{
  border-color:#f1b8b8!important;
  background:linear-gradient(180deg,#fff,#fff5f5)!important;
}

.integrity-check.has-issue b{color:var(--os-red)!important}

.accounting-flags{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
  gap:9px!important;
  margin:12px 0!important;
}

.allocation-settings,
.manual-allocation-grid{
  padding:14px!important;
  border:1px solid var(--os-line)!important;
  border-radius:12px!important;
  background:linear-gradient(180deg,#fff,#fbfdff)!important;
}

.manual-allocation-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;
  gap:10px!important;
  margin-top:10px!important;
}

.badge{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  min-height:26px!important;
  padding:4px 9px!important;
  border-radius:999px!important;
  border:1px solid var(--os-line)!important;
  background:#fff!important;
  color:var(--os-ink)!important;
  font-size:11.5px!important;
  line-height:1!important;
  font-weight:800!important;
}

.badge-ok,
.badge-success,
.badge-paid,
.badge-active{
  border-color:#b9ead4!important;
  background:var(--os-green-soft)!important;
  color:var(--os-green)!important;
}

.badge-danger,
.badge-error,
.badge-cancelled,
.badge-overdue{
  border-color:#f1b8b8!important;
  background:var(--os-red-soft)!important;
  color:var(--os-red)!important;
}

.badge-warning,
.badge-pending,
.badge-upcoming{
  border-color:#f3d399!important;
  background:var(--os-orange-soft)!important;
  color:var(--os-orange)!important;
}

html{
  font-variant-numeric:tabular-nums!important;
}

input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[data-native-date-control="disabled"],
input[type="number"],
input[inputmode="numeric"],
.latin,
.amount,
td.amount,
th.amount{
  direction:ltr!important;
  text-align:left!important;
  unicode-bidi:embed!important;
  font-variant-numeric:tabular-nums!important;
  font-feature-settings:"tnum"!important;
}

input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="time"],
input[data-native-date-control="disabled"]{
  font-family:Tahoma,"Segoe UI",Arial,sans-serif!important;
}

.entity-workspace-tabs{
  margin-top:14px!important;
}

.entity-workspace-tabs .entity-tab-panel > .panel,
.entity-workspace-tabs .entity-tab-panel > .grid,
.entity-workspace-tabs .entity-tab-panel > .record-panel{
  margin:0!important;
}

.entity-workspace-tabs .entity-tab-panel{
  align-items:start!important;
}

.entity-workspace-tabs .panel > h2,
.entity-workspace-tabs .panel > h3{
  margin:0 0 12px!important;
  padding-bottom:10px!important;
  border-bottom:1px solid var(--os-line)!important;
  color:var(--os-ink)!important;
  font-size:18px!important;
  font-weight:800!important;
}

.entity-workspace-tabs .panel table{
  min-width:820px;
}

.entity-workspace-tabs .panel:has(table){
  padding:0!important;
  overflow:auto!important;
}

.entity-workspace-tabs .panel:has(table) > h2,
.entity-workspace-tabs .panel:has(table) > h3{
  padding:14px 16px 12px!important;
  margin:0!important;
}

@media (max-width:1180px){
  body.admin-body:not(.focus-mode) .sidebar{top:10px!important;right:10px!important;bottom:10px!important;transform:translateX(110%)!important;transition:transform .18s ease!important}
  body.admin-body:not(.focus-mode) .sidebar.open{transform:translateX(0)!important}
  body.admin-body:not(.focus-mode) .main{width:100%!important;margin:0!important;padding:16px 14px 72px!important}
  .mobile-nav-toggle{display:inline-flex!important}
  .topbar{margin:-16px -14px 14px!important;padding:12px 14px!important}
  .os-units-layout,.os-command-card,.os-filter-grid,.os-form-grid,.os-action-grid,.os-split,.smart-command-strip,.list-command-head,body[data-current-page="dashboard.php"] .dashboard-control-panel{grid-template-columns:1fr!important}
  .accounting-panel-head,.expense-smart-profile,.employee-commission-panel,.selected-accounting-category{grid-template-columns:1fr!important}
  .os-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-command-metrics,.dashboard-command-rail,body[data-current-page="dashboard.php"] .dashboard-metrics-grid,.dashboard-decision-strip,.dashboard-link-map{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  body[data-current-page="dashboard.php"] .dashboard-period-strip,body[data-current-page="dashboard.php"] .dashboard-profit-grid{grid-template-columns:1fr!important}
  .os-detail-card{position:relative;top:auto}
  .entity-tabbar{position:relative;top:auto}
}

@media (max-width:720px){
  .os-metrics,.os-detail-grid,.os-unit-row,.os-check-grid,.dashboard-command-metrics,.dashboard-command-rail,body[data-current-page="dashboard.php"] .dashboard-filter,body[data-current-page="dashboard.php"] .dashboard-metrics-grid,.dashboard-decision-strip,.dashboard-link-map{grid-template-columns:1fr!important}
  body[data-current-page="dashboard.php"] .dashboard-filter-occupancy-grid{grid-template-columns:1fr!important}
  .accounting-category-grid{max-height:260px!important;overflow:auto!important}
  .expense-submit-bar{position:static!important}
  .os-actions{justify-content:flex-start}
  .toolbar{align-items:stretch!important;flex-direction:column!important}
}

/* Design finish v8: tighter operations shell, long-form polish, and table rhythm */
.topbar-actions{
  min-height:48px!important;
  padding:5px!important;
  border:1px solid rgba(216,227,238,.82)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.78)!important;
  box-shadow:0 10px 28px rgba(15,31,51,.06)!important;
  backdrop-filter:blur(10px);
}

.topbar-actions:empty{
  display:none!important;
}

.topbar-actions .btn{
  min-height:38px!important;
  border-radius:9px!important;
}

.aqari-back-link svg{
  width:17px!important;
  height:17px!important;
}

.grid.cards{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(156px,1fr))!important;
  gap:12px!important;
  align-items:stretch!important;
}

.grid.cards .card{
  min-height:92px!important;
  padding:15px 16px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:space-between!important;
}

.grid.cards .card b,
.grid.cards .card strong{
  line-height:1.2!important;
}

.page-head{
  min-height:116px!important;
  align-items:center!important;
}

.page-head .actions{
  justify-content:flex-start!important;
}

.workflow-note{
  margin:0 0 14px!important;
  padding:12px 14px!important;
  border:1px solid #d7e8f5!important;
  border-radius:10px!important;
  background:linear-gradient(135deg,#f7fbff,#eef7fc)!important;
  color:#25415b!important;
  font-size:13px!important;
  font-weight:800!important;
  line-height:1.7!important;
}

.tenant-step-grid,
.smart-flow{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(132px,1fr))!important;
  gap:8px!important;
  margin:0 0 18px!important;
}

body.admin-body.focus-mode .tenant-step-grid{
  position:sticky!important;
  top:74px!important;
  z-index:35!important;
  padding:10px!important;
  border:1px solid rgba(216,227,238,.9)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 14px 34px rgba(15,31,51,.08)!important;
  backdrop-filter:blur(12px);
}

.tenant-step,
.smart-flow a,
.smart-flow-node{
  min-height:46px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
  padding:9px 10px!important;
  border:1px solid var(--os-line)!important;
  border-radius:10px!important;
  background:#fff!important;
  color:#26384d!important;
  font-size:12px!important;
  font-weight:800!important;
  box-shadow:none!important;
}

.tenant-step b,
.smart-flow b{
  display:inline-grid!important;
  place-items:center!important;
  width:24px!important;
  height:24px!important;
  border-radius:999px!important;
  background:#e8f4fb!important;
  color:var(--os-blue)!important;
  font-size:11px!important;
}

body.admin-body.focus-mode .tenant-workflow-form > h2,
body.admin-body.focus-mode .building-work-form > h2,
body.admin-body.focus-mode form.panel > h2{
  margin:22px 0 12px!important;
  padding:0 0 10px!important;
  border-bottom:1px solid #e4edf5!important;
  color:#102a43!important;
  font-size:20px!important;
}

body.admin-body.focus-mode .tenant-workflow-form > h2:first-of-type,
body.admin-body.focus-mode .building-work-form > h2:first-of-type,
body.admin-body.focus-mode form.panel > h2:first-of-type{
  margin-top:12px!important;
}

body.admin-body.focus-mode .tenant-workflow-form > .actions:last-child,
body.admin-body.focus-mode .building-work-form > .actions:last-child,
body.admin-body.focus-mode [data-accounting-expense-form] > .actions:last-child{
  position:sticky!important;
  bottom:10px!important;
  z-index:36!important;
  margin:18px -4px 0!important;
  padding:10px!important;
  border:1px solid rgba(216,227,238,.95)!important;
  border-radius:12px!important;
  background:rgba(255,255,255,.94)!important;
  box-shadow:0 18px 44px rgba(15,31,51,.12)!important;
  backdrop-filter:blur(12px);
}

.smart-table-toolbar{
  display:grid!important;
  grid-template-columns:minmax(260px,1fr) auto!important;
  gap:10px!important;
  align-items:center!important;
  padding:11px!important;
}

.smart-table-tools{
  display:grid!important;
  grid-template-columns:minmax(180px,1fr) minmax(120px,auto) minmax(84px,auto) auto!important;
  gap:8px!important;
  align-items:center!important;
}

.smart-table-actions{
  justify-content:flex-start!important;
  gap:7px!important;
}

.smart-table-scroll{
  border-radius:0 0 12px 12px!important;
  background:#fff!important;
}

body.admin-body .smart-table-scroll table{
  border-collapse:separate!important;
  border-spacing:0!important;
}

body.admin-body .smart-table-scroll table td,
body.admin-body .smart-table-scroll table th{
  padding:13px 14px!important;
  vertical-align:middle!important;
}

body.admin-body .smart-table-scroll table tbody tr:nth-child(even) td{
  background:#fbfdff!important;
}

body.admin-body .smart-table-scroll table tbody tr:hover td{
  background:#f3f8fc!important;
}

.password-toggle,
.password-toggle:hover,
.password-toggle:focus{
  position:absolute!important;
  inset-inline-end:6px!important;
  top:50%!important;
  width:34px!important;
  height:34px!important;
  min-height:34px!important;
  padding:0!important;
  border:0!important;
  border-radius:9px!important;
  background:transparent!important;
  color:var(--os-muted)!important;
  box-shadow:none!important;
  transform:translateY(-50%)!important;
}

.password-toggle:hover,
.password-toggle:focus{
  background:#edf4fa!important;
  color:var(--os-blue)!important;
}

.password-toggle svg{
  width:18px!important;
  height:18px!important;
}

body.login-page{
  background:
    radial-gradient(circle at 15% 18%,rgba(52,179,214,.14),transparent 28%),
    linear-gradient(180deg,#f8fbff,#eaf1f7)!important;
}

.login-box{
  border-radius:14px!important;
  padding:26px!important;
}

.login-box .brand{
  border-color:#dce8f3!important;
  background:linear-gradient(135deg,#102a43,#173d60)!important;
}

@media (max-width:1180px){
  .topbar-actions{
    min-height:42px!important;
  }
  .smart-table-toolbar,
  .smart-table-tools{
    grid-template-columns:1fr!important;
  }
}

@media (max-width:720px){
  .topbar{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr)!important;
    align-items:stretch!important;
    gap:10px!important;
  }
  .topbar > div:not(.topbar-actions){
    min-width:0!important;
  }
  .topbar h1{
    font-size:20px!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important;
  }
  .mobile-nav-toggle{
    align-self:start!important;
  }
  .topbar-actions{
    grid-column:1/-1!important;
    width:100%!important;
    justify-content:flex-start!important;
  }
  .grid.cards{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .page-head{
    min-height:auto!important;
    grid-template-columns:1fr!important;
  }
  body.admin-body.focus-mode .tenant-step-grid{
    position:relative!important;
    top:auto!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

@media (max-width:460px){
  .grid.cards,
  body.admin-body.focus-mode .tenant-step-grid{
    grid-template-columns:1fr!important;
  }
}

/* Table fit v9: keep operational lists inside the visible page. */
body.admin-body .smart-table > .smart-table-scroll,
body.admin-body .list-table-panel .os-table-wrap{
  max-width:100%!important;
  overflow-x:hidden!important;
}

body.admin-body .smart-table > .smart-table-scroll table,
body.admin-body .list-table-panel table{
  width:100%!important;
  min-width:0!important;
  table-layout:fixed!important;
}

body.admin-body .smart-table > .smart-table-scroll th,
body.admin-body .smart-table > .smart-table-scroll td,
body.admin-body .list-table-panel th,
body.admin-body .list-table-panel td{
  min-width:0!important;
  padding:10px 8px!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:normal!important;
  line-height:1.38!important;
  font-size:12.35px!important;
}

body.admin-body .smart-table .table-sort-button{
  width:100%!important;
  min-width:0!important;
  min-height:30px!important;
  padding:4px 5px!important;
  white-space:normal!important;
  text-align:center!important;
  line-height:1.25!important;
}

body.admin-body .smart-table td.amount,
body.admin-body .smart-table th.amount,
body.admin-body .list-table-panel td.amount,
body.admin-body .list-table-panel th.amount{
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  font-size:12px!important;
}

body.admin-body .smart-table .badge,
body.admin-body .list-table-panel .badge{
  max-width:100%!important;
  min-height:24px!important;
  padding:4px 7px!important;
  white-space:normal!important;
  text-align:center!important;
}

body.admin-body .smart-table .row-actions,
body.admin-body .list-table-panel .row-actions{
  min-width:0!important;
  width:100%!important;
  justify-content:center!important;
  gap:5px!important;
}

body.admin-body .smart-table .row-actions .icon-btn,
body.admin-body .list-table-panel .row-actions .icon-btn{
  flex:0 0 30px!important;
  width:30px!important;
  min-width:30px!important;
  height:30px!important;
  min-height:30px!important;
  padding:0!important;
}

body.admin-body .smart-table .row-actions .icon-btn svg,
body.admin-body .list-table-panel .row-actions .icon-btn svg{
  width:15px!important;
  height:15px!important;
}

@media (min-width:901px){
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(1),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(1){width:8%!important}
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(2),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(2){width:18%!important}
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(3),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(3){width:8%!important}
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(4),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(4){width:8%!important}
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(5),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(5),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(6),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(6){width:5%!important}
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(7),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(7){width:7%!important}
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(8),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(8){width:8%!important}
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(9),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(9),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(10),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(10),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(11),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(11){width:9%!important}
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll th:nth-child(12),
  body.admin-body .buildings-list-page .smart-table > .smart-table-scroll td:nth-child(12){width:6%!important}
}

@media (max-width:900px){
  body.admin-body .smart-table.has-mobile-cards{
    border:0!important;
    background:transparent!important;
    box-shadow:none!important;
  }
  body.admin-body .smart-table.has-mobile-cards .smart-table-scroll{
    display:none!important;
  }
  body.admin-body .smart-table.has-mobile-cards .smart-mobile-cards{
    display:grid!important;
    gap:10px!important;
    padding:10px!important;
  }
  body.admin-body .smart-mobile-card{
    border:1px solid var(--os-line)!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:0 10px 24px rgba(15,31,51,.06)!important;
    overflow:hidden!important;
  }
  body.admin-body .smart-mobile-row{
    display:grid!important;
    grid-template-columns:minmax(94px,34%) minmax(0,1fr)!important;
    gap:10px!important;
    align-items:start!important;
    padding:9px 10px!important;
    border-bottom:1px solid #e7eef6!important;
  }
  body.admin-body .smart-mobile-row:last-child{
    border-bottom:0!important;
  }
  body.admin-body .smart-mobile-label{
    color:var(--os-muted)!important;
    font-size:11.5px!important;
    font-weight:850!important;
    line-height:1.35!important;
  }
  body.admin-body .smart-mobile-value{
    min-width:0!important;
    color:var(--os-ink)!important;
    font-size:12.5px!important;
    font-weight:760!important;
    line-height:1.45!important;
    overflow-wrap:anywhere!important;
  }
  body.admin-body .smart-mobile-value .row-actions{
    justify-content:flex-start!important;
  }
  body.admin-body .smart-table-pagination{
    padding:10px!important;
  }
}

/* UPDATE 9: final action alignment and soft print treatment */
.smart-table-toolbar{
  align-items:end!important;
  gap:10px!important;
  padding:10px 12px!important;
}

.smart-table-tools{
  align-items:end!important;
  gap:8px!important;
}

.smart-table-actions{
  width:auto!important;
  align-items:center!important;
  justify-content:flex-start!important;
  flex-wrap:nowrap!important;
  gap:6px!important;
}

.smart-table-export-button,
.report-table-actions .btn,
.page-print-button,
.dashboard-portal-actions .btn{
  min-height:36px!important;
  padding:7px 11px!important;
  border-radius:9px!important;
  font-size:12.5px!important;
  line-height:1.2!important;
  box-shadow:none!important;
}

.smart-table-export-button svg,
.report-table-actions .btn svg,
.page-print-button svg{
  width:16px!important;
  height:16px!important;
  stroke-width:1.75!important;
}

.smart-table-export-button.is-print,
.report-table-actions .report-table-print-btn,
.page-print-button,
.print-action-soft{
  border:1px solid #C9D7E4!important;
  background:#F8FBFE!important;
  color:#294A67!important;
  box-shadow:0 1px 2px rgba(15,42,68,.08)!important;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important;
}

body.admin-body .smart-table-export-button.is-print,
body.admin-body .report-table-actions .report-table-print-btn,
body.admin-body .page-print-button,
body.admin-body .print-action-soft{
  border:1px solid #C9D7E4!important;
  background:#F8FBFE!important;
  color:#294A67!important;
  box-shadow:0 1px 2px rgba(15,42,68,.08)!important;
}

.smart-table-export-button.is-print:hover,
.report-table-actions .report-table-print-btn:hover,
.page-print-button:hover,
.print-action-soft:hover{
  border-color:#AFC3D5!important;
  background:#EEF5FB!important;
  color:#123A5F!important;
  transform:translateY(-1px);
}

.smart-table-export-button.is-print:focus-visible,
.report-table-actions .report-table-print-btn:focus-visible,
.page-print-button:focus-visible,
.print-action-soft:focus-visible{
  outline:3px solid rgba(41,105,157,.18)!important;
  outline-offset:2px;
}

.dashboard-portal-actions{
  justify-content:flex-start!important;
  gap:7px!important;
  margin-top:14px!important;
  padding-top:12px;
  border-top:1px solid #E4EBF2;
}

.dashboard-portal-actions .dashboard-print-button{
  border-color:#C9D7E4!important;
  background:#F8FBFE!important;
  color:#294A67!important;
}

@media (min-width:761px) and (max-width:1180px){
  .smart-table-toolbar{
    grid-template-columns:minmax(0,1fr) auto!important;
  }

  .smart-table-tools{
    grid-template-columns:minmax(180px,1fr) minmax(120px,auto) minmax(84px,auto) auto!important;
  }

  .smart-table-actions{
    justify-self:start!important;
  }
}

@media (max-width:760px){
  .smart-table-toolbar{
    grid-template-columns:1fr!important;
    align-items:stretch!important;
  }

  .smart-table-tools{
    grid-template-columns:minmax(0,1fr) minmax(92px,110px)!important;
  }

  .smart-table-tools > .smart-table-search,
  .smart-table-tools > .smart-table-count{
    grid-column:1 / -1;
  }

  .smart-table-tools > .smart-table-count{
    justify-self:start;
  }

  .smart-table-actions{
    width:100%!important;
  }

  .smart-table-actions .smart-table-export-button{
    flex:1 1 0!important;
  }
}

/* UPDATE 22: searchable, task-first sidebar */
body.admin-body:not(.focus-mode) .sidebar .sidebar-tools{
  flex:0 0 auto;
  margin:0 0 10px;
  padding:10px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:10px;
  background:rgba(255,255,255,.065);
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-search{
  position:relative;
  display:flex;
  align-items:center;
  min-height:42px;
  border:1px solid rgba(176,215,238,.28);
  border-radius:9px;
  background:rgba(2,15,29,.28);
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-search:focus-within{
  border-color:#79D2EE;
  background:rgba(255,255,255,.11);
  box-shadow:0 0 0 3px rgba(82,187,222,.14);
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-search > svg{
  width:17px;
  height:17px;
  margin-inline-start:11px;
  flex:0 0 17px;
  color:#8AD9EF;
  fill:none;
  stroke:currentColor;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-search input{
  width:100%;
  min-width:0;
  height:40px;
  padding:0 9px;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  color:#FFFFFF!important;
  font:inherit;
  font-size:13.5px;
  font-weight:750;
  box-shadow:none!important;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-search input::placeholder{
  color:#B7CADC;
  opacity:1;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-search-clear{
  width:28px;
  height:28px;
  margin-inline-end:6px;
  padding:0;
  border:0;
  border-radius:7px;
  background:rgba(255,255,255,.12);
  color:#FFFFFF;
  font-size:19px;
  line-height:1;
  cursor:pointer;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-search-clear:hover{
  background:rgba(255,255,255,.22);
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  margin:9px 2px 6px;
  color:#E9F5FC;
  font-size:11.5px;
  font-weight:900;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-head small{
  color:#9FB7CB;
  font-size:10.5px;
  font-weight:750;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-links{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-links a{
  min-width:0;
  min-height:39px;
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 8px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  background:rgba(255,255,255,.075);
  color:#DCEBF7;
  font-size:11.5px;
  font-weight:800;
  text-decoration:none;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-links a:hover,
body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-links a.active{
  border-color:rgba(128,218,245,.55);
  background:rgba(52,179,214,.2);
  color:#FFFFFF;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-links a svg{
  width:15px;
  height:15px;
  flex:0 0 15px;
  color:#8AD9EF;
  fill:none;
  stroke:currentColor;
  stroke-width:1.9;
  stroke-linecap:round;
  stroke-linejoin:round;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-links a span{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

body.admin-body:not(.focus-mode) .sidebar .sidebar-search-empty{
  margin:9px 0 0;
  padding:9px;
  border:1px dashed rgba(255,255,255,.22);
  border-radius:8px;
  color:#C9DBE9;
  font-size:11.5px;
  font-weight:750;
  text-align:center;
}

body.admin-body:not(.focus-mode) .sidebar .nav [hidden],
body.admin-body:not(.focus-mode) .sidebar .sidebar-tools [hidden]{
  display:none!important;
}

@media (max-height:760px) and (min-width:761px){
  body.admin-body:not(.focus-mode) .sidebar .brand{
    min-height:60px!important;
    margin-bottom:8px!important;
    padding:8px!important;
  }

  body.admin-body:not(.focus-mode) .sidebar .sidebar-tools{
    padding:8px;
    margin-bottom:8px;
  }

  body.admin-body:not(.focus-mode) .sidebar .sidebar-quick-links a{
    min-height:34px;
    padding:5px 7px;
  }
}

/* UPDATE 23: dashboard section navigator */
body[data-current-page="dashboard.php"] .dashboard-section-nav{
  position:sticky;
  top:74px;
  z-index:45;
  display:flex;
  align-items:center;
  gap:6px;
  min-width:0;
  margin:0;
  padding:8px;
  overflow-x:auto;
  border:1px solid rgba(199,215,229,.94);
  border-radius:12px;
  background:rgba(247,250,253,.94);
  box-shadow:0 10px 28px rgba(15,31,51,.09);
  backdrop-filter:blur(16px);
  scrollbar-width:none;
}

body[data-current-page="dashboard.php"] .dashboard-section-nav::-webkit-scrollbar{
  display:none;
}

body[data-current-page="dashboard.php"] .dashboard-section-nav-label{
  flex:0 0 auto;
  padding:8px 10px;
  border-radius:8px;
  background:#102a43;
  color:#fff;
  font-size:11.5px;
  font-weight:850;
  white-space:nowrap;
}

body[data-current-page="dashboard.php"] .dashboard-section-nav a{
  flex:0 0 auto;
  min-height:34px;
  padding:8px 11px;
  border:1px solid transparent;
  border-radius:8px;
  color:#52667d;
  font-size:12px;
  font-weight:800;
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}

body[data-current-page="dashboard.php"] .dashboard-section-nav a:hover{
  border-color:#bfd9ea;
  background:#fff;
  color:#102a43;
}

body[data-current-page="dashboard.php"] .dashboard-section-nav a[aria-current]{
  border-color:#0f7aa8;
  background:#0f7aa8;
  color:#fff;
  box-shadow:0 6px 16px rgba(15,122,168,.2);
}

body[data-current-page="dashboard.php"] [data-dashboard-section]{
  scroll-margin-top:154px;
}

@media (max-width:760px){
  body[data-current-page="dashboard.php"] .main{
    overflow:visible!important;
  }

  body[data-current-page="dashboard.php"] .dashboard-section-nav{
    top:62px;
    gap:5px;
    padding:7px;
    border-radius:10px;
  }

  body[data-current-page="dashboard.php"] .dashboard-section-nav-label{
    display:none;
  }

  body[data-current-page="dashboard.php"] .dashboard-section-nav a{
    min-height:32px;
    padding:7px 10px;
    font-size:11.5px;
  }

  body[data-current-page="dashboard.php"] [data-dashboard-section]{
    scroll-margin-top:134px;
  }
}

@media print{
  body[data-current-page="dashboard.php"] .dashboard-section-nav{
    display:none!important;
  }
}
