/* ---------- Tokens ---------- */
:root {
  /* Primary — Javen blue + cream (BRAND — sampled from official brand sheet) */
  --g0: #F3F5E0;  /* BRAND cream accent — sidebar active, paid pills, icon tints */
  --g1: #E5E8C8;  /* slightly darker cream */
  --g2: #AEB4D6;  /* light blue-grey — inactive chart bars, disabled */
  --g3: #828BBC;
  --g4: #6D7DC9;  /* mid blue — focus borders, chart hover */
  --g5: #4F61B8;  /* BRAND blue */
  --g6: #43539E;  /* hover, darker */
  --g7: #3A4889;
  --g8: #313D74;
  --g9: #29335F;

  --ink-900: #232838;
  --ink-800: #2A3142;
  --ink-700: #3B4256;
  --ink-600: #525868;
  --ink-500: #767C8C;
  --ink-400: #A6AAB8;
  --ink-300: #CFD2DC;
  --ink-200: #E6E8EF;
  --ink-100: #EFF0F5;
  --ink-50:  #F8F9FC;

  --bg: #FFFFFF;
  --card: #FFFFFF;
  --border: #E6E8EF;
  --border-2: #D6D9E4;

  --red: #C13B3B;
  --red-bg: #FAEAEA;
  --amber: #B27518;
  --amber-bg: #FAEFD5;
  --blue: #2E7D9A;
  --blue-bg: #E3F0F4;

  /* Secondary — Javen coral (BRAND — sampled from official brand sheet) */
  --coral: #EF7864;
  --coral-strong: #C8492F;  /* darker — icons/text on coral-bg, solid fills */
  --coral-bg: #FCE9E4;      /* soft coral tint — accent surfaces */
  --coral-border: #F6D2C9;

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --sh-1: 0 1px 2px rgba(20,26,48,0.05);
  --sh-2: 0 2px 6px rgba(20,26,48,0.07), 0 8px 24px rgba(20,26,48,0.06);
  --sh-3: 0 24px 60px rgba(20,26,48,0.20);

  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;

  --side-w: 240px;
  --top-h: 64px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.45;
}
button { font-family: inherit; cursor: pointer; border: 0; background: none; padding: 0; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: inherit; text-decoration: none; }

h1,h2,h3,h4 { margin: 0; letter-spacing: -0.01em; }

/* ============================================================
   AUTH (login + otp) — centered card
   ============================================================ */
.auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg);
}
@media (min-width: 900px) {
  .auth { grid-template-columns: 1fr 1fr; }
}
.auth-side {
  display: none;
  position: relative;
  background:
    linear-gradient(150deg, var(--g6) 0%, var(--g5) 50%, var(--g4) 100%);
  color: #fff;
  padding: 48px 56px;
  flex-direction: column;
}
@media (min-width: 900px) {
  .auth-side { display: flex; }
}
.auth-side::before {
  content: ""; position: absolute;
  top: -100px; right: -100px; width: 320px; height: 320px;
  border-radius: 50%; background: rgba(255,255,255,0.06);
}
.auth-side::after {
  content: ""; position: absolute;
  bottom: -120px; left: -60px; width: 280px; height: 280px;
  border-radius: 50%; background: rgba(255,255,255,0.05);
}
.auth-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; position: relative; z-index: 1; }
.auth-side-content { margin-top: auto; position: relative; z-index: 1; }
.auth-side-content h1 { font-size: 38px; line-height: 1.1; font-weight: 800; max-width: 460px; }
.auth-side-content p { opacity: 0.85; max-width: 420px; font-size: 15px; line-height: 1.55; margin-top: 14px; }
.auth-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; max-width: 480px; }
.auth-stat { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 12px; padding: 14px; }
.auth-stat .v { font-size: 22px; font-weight: 800; }
.auth-stat .l { font-size: 12px; opacity: 0.8; margin-top: 2px; }

.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 32px 24px;
}
.auth-card {
  width: 100%; max-width: 420px;
}
.auth-card .mobile-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 32px;
  font-weight: 800; font-size: 17px;
}
@media (min-width: 900px) {
  .auth-card .mobile-brand { display: none; }
}
.auth-card h2 { font-size: 26px; font-weight: 800; }
.auth-card .sub { color: var(--ink-500); margin-top: 6px; font-size: 14px; }

/* ============================================================
   PORTAL LAYOUT — sidebar + topbar + main
   ============================================================ */
.portal { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100dvh; }
@media (max-width: 900px) {
  .portal { grid-template-columns: 1fr; }
}

/* Sidebar */
.side {
  background: var(--side-bg, #3A4889);
  color: #C9CEEC;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100dvh;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 20px;
  font-weight: 800; color: #fff; font-size: 16px;
}
.side-section { padding: 18px 12px 6px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #A7AFDB; }
.side-nav { padding: 4px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-nav button {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px; font-weight: 500;
  color: #D2D7F2;
  width: 100%; text-align: left;
}
.side-nav button:hover { background: rgba(255,255,255,0.10); color: #fff; }
.side-nav button.active { background: rgba(0,0,0,0.22); color: #fff; font-weight: 700; }
.side-nav button .count {
  margin-left: auto;
  background: rgba(255,255,255,0.18);
  color: #fff;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 700;
}
.side-nav button.active .count { background: rgba(255,255,255,0.22); color: #fff; }

.side-user {
  margin-top: auto;
  padding: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex; align-items: center; gap: 10px;
}
.side-user .avatar { background: rgba(255,255,255,0.1); color: #fff; }
.side-user .nm { color: #fff; font-weight: 600; font-size: 13px; }
.side-user .rl { color: #B4BBE4; font-size: 11px; }
.side-user .lo { margin-left: auto; color: #B4BBE4; padding: 6px; border-radius: 8px; }
.side-user .lo:hover { background: rgba(255,255,255,0.06); color: #fff; }

/* Sidebar backdrop — hidden by default, only shown when mobile sidebar is open */
.side-backdrop { display: none; }

/* Mobile sidebar drawer */
@media (max-width: 900px) {
  .side {
    position: fixed; inset: 0 auto 0 0; z-index: 100;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }
  .side.open { transform: translateX(0); box-shadow: var(--sh-3); }
  .side-backdrop.open {
    display: block;
    position: fixed; inset: 0; background: rgba(18,22,40,0.45); z-index: 99;
  }
}

/* Main */
.main { display: flex; flex-direction: column; min-width: 0; }

/* Topbar */
.topbar {
  height: var(--top-h);
  background: #fff;
  box-shadow: 0 4px 10px -2px rgba(42, 51, 46, 0.10), 0 2px 4px rgba(42, 51, 46, 0.05);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
@media (max-width: 900px) { .topbar { padding: 0 16px; } }
.topbar .hamburger {
  display: none;
  width: 36px; height: 36px; border-radius: 8px; align-items: center; justify-content: center;
  border: 1px solid var(--border);
}
@media (max-width: 900px) { .topbar .hamburger { display: inline-flex; } }
.topbar .page-title { font-weight: 700; font-size: 17px; }
.topbar .breadcrumb { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

.search {
  margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  padding: 0 12px;
  height: 38px;
  background: var(--ink-50);
  border-radius: 10px;
  width: 350px;
  max-width: 100%;
  border: 1px solid transparent;
}
.search:focus-within { background: #fff; border-color: var(--g4); box-shadow: 0 0 0 3px rgba(79,97,184,0.16); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; font-size: 13px; }
@media (max-width: 700px) { .search { display: none; } }

.icon-btn {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--ink-700);
  position: relative;
}
.icon-btn:hover { background: var(--ink-50); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red);
  border: 2px solid #fff;
}

/* Page wrapper */
.page {
  padding: 24px 28px 40px;
  max-width: none;
  width: 100%;
}
@media (max-width: 900px) { .page { padding: 18px 16px 32px; } }

.page-header {
  display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.page-header h1 { font-size: 24px; font-weight: 800; }
.page-header .sub { color: var(--ink-500); font-size: 13px; margin-top: 4px; }
.page-header .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ============================================================
   COMPONENTS — buttons, cards, tables, pills, inputs
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px;
  border-radius: 10px;
  font-size: 13px; font-weight: 600;
  transition: background 0.12s, transform 0.06s, box-shadow 0.12s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--g5); color: #fff; }
.btn-primary:hover { background: var(--g6); }
.btn-primary:disabled { background: var(--g2); cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink-700); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--ink-50); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-lg { height: 46px; padding: 0 20px; font-size: 14px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
}
.card-pad-0 { padding: 0; }

/* Inputs */
.field { margin-bottom: 16px; }
.field > label { display:block; font-size: 13px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.input, input.input, select.input, textarea.input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: #fff;
  outline: none;
  font-size: 14px;
  transition: border 0.12s, box-shadow 0.12s;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--g4); box-shadow: 0 0 0 3px rgba(79,97,184,0.16); }
.input-prefix { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1px solid var(--border-2); border-radius: 10px; background: #fff; }
.input-prefix .pre { color: var(--ink-500); font-weight: 600; }
.input-prefix input { border: 0; outline: 0; height: 40px; flex: 1; }

/* Status pills */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.pill-paid { background: var(--g0); color: var(--g8); }
.pill-due  { background: var(--amber-bg); color: var(--amber); }
.pill-late { background: var(--red-bg); color: var(--red); }
.pill-new  { background: var(--red-bg); color: var(--red); }
.pill-progress { background: var(--amber-bg); color: var(--amber); }
.pill-assigned { background: var(--blue-bg); color: var(--blue); }
.pill-done { background: var(--g0); color: var(--g8); }
.pill-high { background: var(--red-bg); color: var(--red); }
.pill-medium { background: var(--amber-bg); color: var(--amber); }
.pill-low { background: var(--g0); color: var(--g8); }
.pill-plain { background: var(--ink-50); color: var(--ink-700); }
.pill-plain::before { display: none; }

/* Avatar */
.avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--coral-bg);
  color: var(--coral-strong);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; border-radius: 8px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; border-radius: 12px; }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--r-lg); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
.tbl thead th {
  text-align: left;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  padding: 12px 16px;
  background: var(--ink-50);
  border-bottom: 1px solid var(--border);
}
.tbl tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  vertical-align: middle;
}
.tbl tbody tr { background: #fff; transition: background 0.1s; cursor: pointer; }
.tbl tbody tr:hover { background: var(--ink-50); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:last-child td:first-child { border-bottom-left-radius: var(--r-lg); }
.tbl tbody tr:last-child td:last-child { border-bottom-right-radius: var(--r-lg); }

/* Mobile: card list fallback for tables */
.list-mobile { display: none; }
@media (max-width: 700px) {
  .table-wrap { display: none; }
  .list-mobile { display: flex; flex-direction: column; gap: 10px; }
}

/* ============================================================
   DASHBOARD pieces
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.kpi { padding: 16px 18px; cursor: pointer; transition: border-color 0.12s, box-shadow 0.12s; }
.kpi:hover { border-color: var(--ink-200); box-shadow: var(--sh-2); }
.kpi .kpi-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kpi .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.kpi .v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.kpi .l { font-size: 12px; color: var(--ink-500); margin-top: 4px; }
.kpi .delta { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 3px; }
.kpi .delta.up { background: var(--g0); color: var(--g8); }
.kpi .delta.down { background: var(--red-bg); color: var(--red); }

.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .grid-2-1 { grid-template-columns: 1fr; } }
.grid-1-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .grid-1-1 { grid-template-columns: 1fr; } }

.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.section-head h3 { font-size: 15px; font-weight: 700; }
.section-head .sub { color: var(--ink-500); font-size: 12px; }
.section-head .link { margin-left: auto; color: var(--g7); font-weight: 600; font-size: 12px; }

/* Activity rows */
.row-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.row-item:last-child { border-bottom: 0; }
.row-item .body { flex: 1; min-width: 0; }
.row-item .body .t { font-size: 13.5px; font-weight: 600; }
.row-item .body .s { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

/* Chart */
.chart {
  display: flex; align-items: flex-end; gap: 10px;
  height: 180px;
  margin-top: 14px;
}
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.chart .col .bar { width: 100%; background: var(--g2); border-radius: 8px 8px 4px 4px; transition: background 0.15s; }
.chart .col:hover .bar { background: var(--g4); }
.chart .col.active .bar { background: var(--g5); }
.chart .col .lbl { font-size: 11px; color: var(--ink-500); font-weight: 600; }

/* OTP boxes */
.otp-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 22px 0; }
.otp-box {
  height: 56px;
  border-radius: 12px;
  border: 1.5px solid var(--border-2);
  background: #fff;
  display: grid; place-items: center;
  font-size: 22px; font-weight: 700;
  transition: border 0.12s, transform 0.12s, box-shadow 0.12s;
}
.otp-box.filled { border-color: var(--g5); }
.otp-box.active { border-color: var(--g5); box-shadow: 0 0 0 3px rgba(79,97,184,0.18); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(18,22,40,0.5); z-index: 200;
  display: grid; place-items: center;
  padding: 20px;
  animation: fade 0.18s ease;
}
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--sh-3);
  animation: pop 0.22s cubic-bezier(0.2,0.7,0.2,1);
}
.modal-head { padding: 20px 22px 12px; display: flex; align-items: flex-start; gap: 12px; }
.modal-head h3 { flex: 1; font-size: 18px; font-weight: 700; }
.modal-head .close { color: var(--ink-500); padding: 4px; }
.modal-body { padding: 0 22px 18px; }
.modal-foot { padding: 14px 22px 20px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--border); background: var(--ink-50); border-radius: 0 0 16px 16px; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.fade-in { animation: fade 0.2s ease; }

/* Toast */
.toast {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 28px;
  background: var(--ink-900);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: var(--sh-3);
  z-index: 300;
  animation: toastIn 0.25s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* Helpers */
.muted { color: var(--ink-500); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }

/* Tabs (segmented) */
.tabs {
  display: inline-flex; background: var(--ink-50);
  border-radius: 10px; padding: 4px; gap: 2px;
}
.tabs button {
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--ink-600);
}
.tabs button.active { background: #fff; color: var(--ink-900); box-shadow: var(--sh-1); }

/* Empty state */
.empty { padding: 40px 16px; text-align: center; color: var(--ink-500); }

/* Detail view (drawer style — sidebar from right) */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(18,22,40,0.45); z-index: 150; animation: fade 0.2s ease; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 151;
  width: 100%; max-width: 520px;
  background: #fff;
  display: flex; flex-direction: column;
  animation: slideRight 0.28s cubic-bezier(0.2,0.7,0.2,1);
  box-shadow: var(--sh-3);
}
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 24px; }
.drawer-foot { padding: 14px 22px 18px; border-top: 1px solid var(--border); background: var(--ink-50); display: flex; gap: 10px; }
@keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

/* Detail rows */
.detail-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.detail-row:last-child { border-bottom: 0; }
.detail-row .l { color: var(--ink-500); }
.detail-row .v { font-weight: 600; }

/* Property cards grid */
.prop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.prop-card { padding: 0; overflow: hidden; cursor: pointer; transition: transform 0.12s, box-shadow 0.12s; }
.prop-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.prop-card .img {
  height: 130px;
  background: linear-gradient(135deg, var(--g6), var(--g5));
  position: relative;
  display: grid; place-items: center;
  color: rgba(255,255,255,0.4);
}
.prop-card .img .occ {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.95); color: var(--ink-900);
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700;
}
.prop-card .img .type {
  position: absolute; top: 12px; left: 12px;
  background: rgba(18,22,40,0.62); color: #fff;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  backdrop-filter: blur(8px);
}
.prop-card .info { padding: 14px 16px 16px; }
.prop-card .info .nm { font-weight: 700; font-size: 15px; }
.prop-card .info .ad { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.prop-card .info .stats { display: flex; gap: 14px; margin-top: 12px; }
.prop-card .info .stats div .v { font-weight: 700; font-size: 14px; }
.prop-card .info .stats div .l { font-size: 11px; color: var(--ink-500); }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.filter-bar .search {
  background: var(--ink-50); border-color: transparent; width: 240px;
}
.filter-bar .search:focus-within { background: #fff; }
.filter-bar select.input, .filter-bar input.input {
  height: 36px; width: auto; min-width: 140px;
}
.filter-clear { color: var(--g7); font-weight: 600; font-size: 12px; margin-left: auto; }

/* ============================================================
   PROPERTY DETAIL
   ============================================================ */
.prop-hero {
  position: relative;
  height: 200px;
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--g7), var(--g5));
  overflow: hidden;
  margin-bottom: 20px;
}
.prop-hero::before {
  content: ""; position: absolute;
  top: -80px; right: -60px; width: 240px; height: 240px;
  border-radius: 50%; background: rgba(255,255,255,0.08);
}
.prop-hero::after {
  content: ""; position: absolute;
  bottom: -100px; left: -40px; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(255,255,255,0.06);
}
.prop-hero .content {
  position: relative; z-index: 1;
  padding: 24px; color: #fff;
  height: 100%; display: flex; flex-direction: column;
}
.prop-hero h1 { font-size: 26px; font-weight: 800; }
.prop-hero .meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; opacity: 0.9; font-size: 13px; }
.prop-hero .pills { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.prop-hero .pill { background: rgba(255,255,255,0.18); color: #fff; backdrop-filter: blur(4px); }
.prop-hero .pill::before { background: #fff; }

/* Tab navigation */
.tab-nav { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-nav button {
  padding: 12px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-500);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab-nav button.active { color: var(--g7); border-bottom-color: var(--g5); }
.tab-nav button:hover:not(.active) { color: var(--ink-700); }

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-grid {
  display: grid; grid-template-columns: 220px 1fr; gap: 24px;
}
@media (max-width: 900px) { .settings-grid { grid-template-columns: 1fr; gap: 16px; } }
.settings-nav { display: flex; flex-direction: column; gap: 4px; }
.settings-nav button {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 500;
  color: var(--ink-700);
  text-align: left;
  display: flex; align-items: center; gap: 10px;
}
.settings-nav button:hover { background: var(--ink-50); }
.settings-nav button.active { background: var(--g0); color: var(--g8); font-weight: 600; }
@media (max-width: 900px) {
  .settings-nav { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .settings-nav button { white-space: nowrap; }
}

/* Toggle switch */
.toggle {
  position: relative;
  width: 44px; height: 24px;
  background: var(--ink-200);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.18s;
  flex-shrink: 0;
}
.toggle::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle.on { background: var(--g5); }
.toggle.on::after { transform: translateX(20px); }

/* Setting row */
.setting-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: 0; }
.setting-row .body { flex: 1; }
.setting-row .t { font-weight: 600; font-size: 14px; }
.setting-row .s { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

/* Permission grid */
.perm-table { width: 100%; }
.perm-table th { text-align: left; padding: 10px 8px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-500); border-bottom: 1px solid var(--border); }
.perm-table td { padding: 14px 8px; border-bottom: 1px solid var(--border); font-size: 13px; }
.perm-table tr:last-child td { border-bottom: 0; }
.perm-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
}
.perm-manage { background: var(--g0); color: var(--g8); }
.perm-view { background: var(--blue-bg); color: var(--blue); }
.perm-view-own { background: var(--amber-bg); color: var(--amber); }
.perm-view-assigned { background: var(--amber-bg); color: var(--amber); }
.perm-none { background: var(--ink-100); color: var(--ink-500); }

/* Modal — wider variant */
.modal.wide { max-width: 640px; }
.modal-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 600px) { .modal-grid-2 { grid-template-columns: 1fr; } }
.form-section { margin-bottom: 20px; }
.form-section .title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--g7); margin-bottom: 10px; }

/* Empty list larger */
.empty-lg { padding: 60px 24px; text-align: center; }
.empty-lg .ico { width: 64px; height: 64px; border-radius: 16px; background: var(--coral-bg); color: var(--coral-strong); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-lg .t { font-weight: 700; margin-bottom: 4px; }
.empty-lg .s { color: var(--ink-500); font-size: 13px; margin-bottom: 16px; }

/* Action menu (kebab) */
.menu-pop {
  position: absolute; z-index: 30;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--sh-2);
  padding: 6px;
  min-width: 160px;
}
.menu-pop button {
  width: 100%; text-align: left;
  padding: 8px 12px;
  font-size: 13px; border-radius: 6px;
  display: flex; align-items: center; gap: 10px;
}
.menu-pop button:hover { background: var(--ink-50); }
.menu-pop button.danger { color: var(--red); }
.menu-pop button.danger:hover { background: var(--red-bg); }
.menu-pop hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }

/* Stat strip — used inside property detail */
.stat-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 700px) { .stat-strip { grid-template-columns: 1fr 1fr; gap: 10px; } }

/* Unit status chips */
.unit-cell {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 8px;
  background: var(--ink-50);
  border-radius: 6px;
  font-weight: 700; font-size: 12px;
}
