/* =================================================================
   Hunian Kita — Management Portal
   portal.css  ·  built on the Dhany Indraswara design tokens
   ================================================================= */

:root {
  /* accent (overridden by Tweaks) */
  --accent:        #02A0C1;
  --accent-2:      #3581E1;
  --accent-soft:   #D7E8FB;
  --accent-ink:    #FFFFFF;

  /* surfaces (light) */
  --surface:    #FFFFFF;
  --surface-2:  #F4F7FB;
  --surface-3:  #EEF3F9;
  --page-grad:  radial-gradient(120% 90% at 12% -5%, #EAF3FE 0%, #F4F7FB 48%, #FBFCFE 100%);
  --border:     #E6E8EC;
  --border-2:   #EFF1F4;
  --glass:      rgba(255,255,255,0.72);
  --glass-line: rgba(255,255,255,0.7);

  --t1: #1F1F1F;
  --t2: #4A4A4A;
  --t3: #7A7A7A;

  /* semantic status */
  --pos:  #11936A;  --pos-soft:  #DFF3EC;
  --warn: #C9810D;  --warn-soft: #FBEFD6;
  --neg:  #DC4A3D;  --neg-soft:  #FBE3E0;
  --info: #3581E1;  --info-soft: #DEEAFB;
  --pend: #7A6CF0;  --pend-soft: #E7E3FB;

  /* density */
  --pad-card: 22px;
  --gap:      20px;
  --row-h:    52px;
  --radius:   20px;

  --shadow-card: 0 8px 24px rgba(15,23,42,0.07);
  --shadow-pop:  0 24px 60px rgba(15,23,42,0.18);

  --sidebar-w: 248px;
}

:root[data-density="compact"] { --pad-card: 16px; --gap: 14px; --row-h: 44px; }
:root[data-density="comfy"]   { --pad-card: 28px; --gap: 26px; --row-h: 60px; }

:root[data-theme="dark"] {
  --surface:    #161B26;
  --surface-2:  #0E121B;
  --surface-3:  #1E2533;
  --page-grad:  radial-gradient(120% 90% at 12% -5%, #16263a 0%, #0E121B 52%, #0B0E15 100%);
  --border:     #2A3242;
  --border-2:   #232b3a;
  --glass:      rgba(22,27,38,0.74);
  --glass-line: rgba(255,255,255,0.06);
  --t1: #F1F4F9;
  --t2: #B7C0CE;
  --t3: #7E8a9c;
  --accent-soft: rgba(2,160,193,0.18);
  --pos-soft:  rgba(17,147,106,0.18);
  --warn-soft: rgba(201,129,13,0.20);
  --neg-soft:  rgba(220,74,61,0.20);
  --info-soft: rgba(53,129,225,0.20);
  --pend-soft: rgba(122,108,240,0.22);
  --shadow-card: 0 8px 24px rgba(0,0,0,0.35);
  --shadow-pop:  0 24px 60px rgba(0,0,0,0.55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-family-base);
  background: var(--surface-2);
  color: var(--t1);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
#root { height: 100vh; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea, select { font-family: inherit; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--t3); background-clip: content-box; }

/* ---------------- App shell ---------------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; background: var(--page-grad); }

.sidebar {
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 20px 14px; gap: 4px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.brand .mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff; flex: none; box-shadow: 0 8px 20px rgba(2,160,193,.30); }
.brand .mark svg { width: 21px; height: 21px; }
.brand .nm { font-weight: 800; font-size: 16px; letter-spacing: -0.01em; line-height: 1.1; }
.brand .nm span { color: var(--accent); }
.brand .sub { font-size: 11px; color: var(--t3); font-weight: 600; }

.estate {
  display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 13px;
  background: var(--surface-3); border: 1px solid var(--border-2); margin-bottom: 12px; cursor: pointer;
  transition: background .15s;
}
.estate:hover { background: var(--accent-soft); }
.estate .av { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; flex: none; }
.estate .en { font-size: 13px; font-weight: 700; line-height: 1.15; }
.estate .em { font-size: 11px; color: var(--t3); font-weight: 600; }
.estate .chev { margin-left: auto; color: var(--t3); }

.navlabel { font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--t3); padding: 14px 10px 6px; }
.navitem { display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: 11px;
  font-size: 14px; font-weight: 600; color: var(--t2); transition: background .14s, color .14s; position: relative; width: 100%; text-align: left; }
.navitem svg { width: 19px; height: 19px; flex: none; }
.navitem:hover { background: var(--surface-3); color: var(--t1); }
.navitem.active { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 16px rgba(2,160,193,.28); }
.navitem.active svg { color: var(--accent-ink); }
.navitem .count { margin-left: auto; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px;
  background: var(--neg); color: #fff; }
.navitem.active .count { background: rgba(255,255,255,.25); }
.navitem .count.calm { background: var(--surface-3); color: var(--t2); }
.navitem.active .count.calm { background: rgba(255,255,255,.22); color: #fff; }

/* role pill on the estate switcher / user chip */
.rolepill { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .05em; padding: 3px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.sidebar .close-nav { display: none; }

.sidefoot { margin-top: auto; padding-top: 14px; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; background: var(--surface-3); }
.userchip .av { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#3581E1,#7A6CF0);
  color:#fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.userchip .nm { font-size: 13px; font-weight: 700; line-height: 1.1; }
.userchip .role { font-size: 11px; color: var(--t3); font-weight: 600; }

/* ---------------- Main column ---------------- */
.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 16px 28px; border-bottom: 1px solid var(--border);
  background: var(--glass); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); flex: none; }
.hamburger { display: none; width: 40px; height: 40px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border-2);
  place-items: center; color: var(--t2); flex: none; }
.hamburger:hover { background: var(--accent-soft); color: var(--accent); }
.topbar .mbrand { display: none; align-items: center; gap: 9px; font-weight: 800; font-size: 15px; letter-spacing: -0.01em; }
.topbar .mbrand .mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center; color: #fff; flex: none; }
.topbar .mbrand .mark svg { width: 17px; height: 17px; }
.topbar .mbrand span { color: var(--accent); }
.topbar .ttl { display: flex; flex-direction: column; }
.topbar .ttl h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.topbar .ttl p { font-size: 12.5px; color: var(--t3); font-weight: 600; }
.search { margin-left: auto; display: flex; align-items: center; gap: 9px; background: var(--surface-3);
  border: 1px solid var(--border-2); border-radius: 99px; padding: 9px 16px; width: 280px; color: var(--t3); }
.search input { border: none; background: none; outline: none; color: var(--t1); font-size: 13.5px; font-weight: 500; width: 100%; }
.search input::placeholder { color: var(--t3); }
.iconbtn { width: 40px; height: 40px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border-2);
  display: grid; place-items: center; color: var(--t2); position: relative; transition: background .15s, transform .15s; }
.iconbtn:hover { background: var(--accent-soft); color: var(--accent); }
.iconbtn .dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--neg); border: 2px solid var(--surface); }
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; padding: 11px 18px;
  border-radius: 99px; transition: transform .16s, box-shadow .16s, background .16s; white-space: nowrap; }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px rgba(2,160,193,.30); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(2,160,193,.38); }
.btn.ghost { background: var(--surface-3); color: var(--t2); border: 1px solid var(--border-2); }
.btn.ghost:hover { background: var(--accent-soft); color: var(--accent); }
.btn.sm { padding: 8px 14px; font-size: 12.5px; }

.content { flex: 1; overflow-y: auto; padding: 26px 28px 60px; }
.content-inner { max-width: 1240px; margin: 0 auto; }

/* ---------------- Cards / primitives ---------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-card); }
.card.pad { padding: var(--pad-card); }
.card-h { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.card-h h3 { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.card-h .hint { font-size: 12px; color: var(--t3); font-weight: 600; }
.card-h .right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

.seg { display: inline-flex; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 99px; padding: 3px; gap: 2px; }
.seg button { font-size: 12px; font-weight: 700; padding: 6px 13px; border-radius: 99px; color: var(--t3); transition: .14s; }
.seg button.on { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-card); }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.pos  { background: var(--pos-soft);  color: var(--pos); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.neg  { background: var(--neg-soft);  color: var(--neg); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.pend { background: var(--pend-soft); color: var(--pend); }
.badge.calm { background: var(--surface-3); color: var(--t3); }

.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.prio.critical { color: var(--neg); }
.prio.high { color: var(--warn); }
.prio.normal { color: var(--info); }
.prio.low { color: var(--t3); }

/* ---------------- KPI ---------------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--pad-card);
  box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
  transition: transform .18s, box-shadow .18s; cursor: pointer; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.kpi .top { display: flex; align-items: center; gap: 10px; }
.kpi .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.kpi .ic svg { width: 20px; height: 20px; }
.kpi .lbl { font-size: 12.5px; font-weight: 700; color: var(--t3); }
.kpi .val { font-size: 30px; font-weight: 800; letter-spacing: -0.025em; line-height: 1; }
.kpi .val small { font-size: 15px; font-weight: 700; color: var(--t3); }
.kpi .delta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.kpi .delta.up { color: var(--pos); }
.kpi .delta.down { color: var(--neg); }
.kpi .delta .muted { color: var(--t3); font-weight: 600; }
.kpi .spark { position: absolute; right: 0; bottom: 0; opacity: .5; }

/* ---------------- layout helpers ---------------- */
.row { display: flex; gap: var(--gap); }
.grid { display: grid; gap: var(--gap); }
.mt { margin-top: var(--gap); }
.section-title { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.section-title h2 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.section-title .right { margin-left: auto; }

/* ---------------- Table ---------------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
  color: var(--t3); padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--border-2); font-size: 13.5px; font-weight: 600; color: var(--t2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; cursor: pointer; }
.tbl tbody tr:hover { background: var(--surface-3); }
.tbl .strong { color: var(--t1); font-weight: 700; }
.tbl .unit { font-variant-numeric: tabular-nums; }
.amt { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--t1); }

.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex: none; }
.who { display: flex; align-items: center; gap: 9px; }
.who .nm { font-weight: 700; color: var(--t1); font-size: 13px; }
.who .meta { font-size: 11.5px; color: var(--t3); }

/* ---------------- Drawer ---------------- */
.scrim { position: fixed; inset: 0; background: rgba(12,18,28,.42); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  z-index: 50; opacity: 0; animation: fade .2s forwards; }
@keyframes fade { to { opacity: 1; } }
.drawer { position: fixed; top: 0; right: 0; height: 100vh; width: 520px; max-width: 94vw; background: var(--surface);
  border-left: 1px solid var(--border); box-shadow: var(--shadow-pop); z-index: 51; display: flex; flex-direction: column;
  transform: translateX(100%); animation: slidein .32s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes slidein { to { transform: translateX(0); } }
.drawer-h { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 12px; }
.drawer-b { flex: 1; overflow-y: auto; padding: 22px 24px; }
.drawer-f { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; }

/* ---------------- Modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.modal .box { background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow-pop);
  width: 640px; max-width: 100%; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column;
  transform: translateY(12px); opacity: 0; animation: pop .3s cubic-bezier(.22,1,.36,1) forwards; }
@keyframes pop { to { transform: translateY(0); opacity: 1; } }
.modal .mh { padding: 22px 26px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.modal .mb { padding: 24px 26px; overflow-y: auto; }
.modal .mf { padding: 16px 26px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* form controls */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 12.5px; font-weight: 700; color: var(--t2); }
.field input, .field textarea, .field select { background: var(--surface-3); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px; font-size: 13.5px; font-weight: 600; color: var(--t1); outline: none; transition: border .15s, box-shadow .15s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { padding: 9px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface-3);
  font-size: 13px; font-weight: 700; color: var(--t2); display: inline-flex; align-items: center; gap: 7px; transition: .14s; }
.choice:hover { border-color: var(--accent); color: var(--accent); }
.choice.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* timeline */
.tl { display: flex; flex-direction: column; gap: 0; }
.tl .ev { display: grid; grid-template-columns: 26px 1fr; gap: 12px; padding-bottom: 18px; position: relative; }
.tl .ev::before { content: ''; position: absolute; left: 12px; top: 22px; bottom: -4px; width: 2px; background: var(--border); }
.tl .ev:last-child::before { display: none; }
.tl .ev .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; z-index: 1;
  background: var(--accent-soft); color: var(--accent); }
.tl .ev .dot svg { width: 14px; height: 14px; }
.tl .ev.done .dot { background: var(--pos-soft); color: var(--pos); }
.tl .ev .et { font-size: 13px; font-weight: 700; color: var(--t1); }
.tl .ev .em { font-size: 12px; color: var(--t3); font-weight: 600; margin-top: 2px; }

/* progress */
.bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* SLA pill */
.sla { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; padding: 4px 10px; border-radius: 99px; }
.sla.ok { background: var(--pos-soft); color: var(--pos); }
.sla.warn { background: var(--warn-soft); color: var(--warn); }
.sla.breach { background: var(--neg-soft); color: var(--neg); }

/* empty / misc */
.muted { color: var(--t3); }
.statline { font-size: 12.5px; color: var(--t3); font-weight: 600; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.photobox { border-radius: 14px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-3);
  aspect-ratio: 4/3; display: grid; place-items: center; color: var(--t3); position: relative; }
.photobox .tag { position: absolute; bottom: 8px; left: 8px; font-size: 10.5px; font-weight: 700; background: rgba(0,0,0,.55); color: #fff; padding: 3px 8px; border-radius: 7px; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 80;
  background: var(--t1); color: var(--surface); font-size: 13.5px; font-weight: 700; padding: 13px 20px; border-radius: 14px;
  box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 10px; opacity: 0; animation: toastin .3s forwards; }
.toast svg { color: var(--accent); width: 18px; height: 18px; }
@keyframes toastin { to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* legend */
.legend { display: flex; flex-wrap: wrap; gap: 14px; }
.legend .li { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--t2); }
.legend .sw { width: 11px; height: 11px; border-radius: 4px; flex: none; }

/* ---------------- Mobile nav scrim + bottom tab bar ---------------- */
.nav-scrim { display: none; }
.bottomnav { display: none; }

@media (max-width: 1080px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Tablet / mobile: drawer sidebar, compact topbar ===== */
@media (max-width: 960px) {
  body { overflow: hidden; }
  .app { grid-template-columns: 1fr; }

  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 284px; max-width: 84vw; z-index: 80;
    transform: translateX(-102%); transition: transform .3s cubic-bezier(.22,1,.36,1);
    box-shadow: var(--shadow-pop); background: var(--surface);
  }
  .app.nav-open .sidebar { transform: translateX(0); }
  .sidebar .close-nav { display: grid; place-items: center; position: absolute; top: 16px; right: 14px;
    width: 34px; height: 34px; border-radius: 10px; background: var(--surface-3); color: var(--t2); }

  .nav-scrim { display: block; position: fixed; inset: 0; z-index: 79; background: rgba(12,18,28,.42);
    opacity: 0; pointer-events: none; transition: opacity .3s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
  .app.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

  .hamburger { display: grid; }
  .topbar { padding: 11px 14px; gap: 10px; }
  .topbar .ttl { display: none; }
  .topbar .mbrand { display: flex; }
  .topbar .search { display: none; }
  .topbar .mbrand + .search { display: none; }

  .content { padding: 18px 15px 40px; }

  /* collapse every inline 2-column grid to a single column */
  .content .grid[style] { grid-template-columns: 1fr !important; }
  .set-shell { grid-template-columns: 1fr; }
  .set-nav { flex-direction: row; flex-wrap: wrap; }
}

/* ===== Phones ===== */
@media (max-width: 620px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mini-stats { grid-template-columns: 1fr 1fr; }
  .glance-grid { grid-template-columns: 1fr 1fr; }
  .topbar .ttl h1 { font-size: 18px; }
  .kpi .val { font-size: 24px; }

  /* tables scroll horizontally instead of squishing */
  .content .card.pad { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .content .tbl { min-width: 540px; }

  .section-title { flex-wrap: wrap; row-gap: 10px; }
  .section-title .right { margin-left: 0; width: 100%; }
  .section-title .right .btn { width: 100%; justify-content: center; }

  .drawer { width: 100vw; max-width: 100vw; }
  .modal { padding: 0; align-items: flex-end; }
  .modal .box { width: 100%; max-width: 100%; border-radius: 24px 24px 0 0; max-height: 92vh; }
}

@media (max-width: 380px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ===== Resident app: bottom tab bar on mobile ===== */
@media (max-width: 960px) {
  .app.role-penghuni .content { padding-bottom: 86px; }
  .app.role-penghuni .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: var(--glass); -webkit-backdrop-filter: blur(20px) saturate(140%); backdrop-filter: blur(20px) saturate(140%);
    border-top: 1px solid var(--border); padding: 8px 6px calc(8px + env(safe-area-inset-bottom, 0px));
    justify-content: space-around;
  }
  .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 3px; flex: 1; padding: 4px 2px;
    color: var(--t3); font-size: 10.5px; font-weight: 700; border-radius: 12px; transition: color .14s; }
  .bottomnav button svg { width: 22px; height: 22px; }
  .bottomnav button.active { color: var(--accent); }
  .bottomnav button .nv-badge { position: absolute; top: 2px; margin-left: 16px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 99px; background: var(--neg); color: #fff; font-size: 9.5px; font-weight: 800; display: grid; place-items: center; }
}
