   PPW MANAGER — stylesheet
   ══════════════════════════════════════ */

/* ── Brand fonts (Facility Office) ─────────────────────────────────────
   File extensions are uppercase (.OTF/.TTF) — Netlify is case-sensitive.
   font-display: swap so the page never blocks on these. */
@font-face {
  font-family: 'D-DIN-PRO';
  src: url('fonts/D-DIN-PRO-400-REGULAR.OTF') format('opentype');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'D-DIN-PRO';
  src: url('fonts/D-DIN-PRO-500-MEDIUM.OTF') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'D-DIN-PRO';
  src: url('fonts/D-DIN-PRO-600-SEMIBOLD.OTF') format('opentype');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'D-DIN-PRO';
  src: url('fonts/D-DIN-PRO-700-BOLD.OTF') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'D-DIN-PRO';
  src: url('fonts/D-DIN-PRO-800-EXTRABOLD.OTF') format('opentype');
  font-weight: 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'D-DIN-PRO';
  src: url('fonts/D-DIN-PRO-900-HEAVY.OTF') format('opentype');
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DIN';
  src: url('fonts/DIN-MEDIUM.OTF') format('opentype');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DIN';
  src: url('fonts/DIN-BOLD.OTF') format('opentype');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'DIN';
  src: url('fonts/DIN-BLACKALTERNATE.TTF') format('truetype');
  font-weight: 900; font-style: normal; font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:      #185FA5;
  --ppw-blue:  #185FA5;
  --pool-blue: #0077B6;
  --blue-lt: #E6F1FB;
  --blue-bd: #85B7EB;
  --green:   #0F6E56;
  --green-lt:#E1F5EE;
  --green-bd:#5DCAA5;
  --teal-lt: #EAF3DE;
  --teal-bd: #97C459;
  --amber-lt:#FAEEDA;
  --amber-bd:#EF9F27;
  --amber:   #854F0B;
  --red-lt:  #FCEBEB;
  --red-bd:  #F09595;
  --red:     #791F1F;
  --purple-lt:#EEEDFE;
  --purple-bd:#AFA9EC;
  --purple:  #534AB7;
  --coral-lt:#FAECE7;
  --coral:   #993C1D;
  --bg:      #F4F4F2;
  --bg2:     #FFFFFF;
  --bg3:     #EBEBEB;
  --border:  rgba(0,0,0,0.10);
  --border2: rgba(0,0,0,0.18);
  --text:    #1A1A1A;
  --text2:   #666660;
  --text3:   #AAAAAA;
  --radius:  12px;
  --radius-sm: 8px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  background: var(--blue);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}

/* ── APP SHELL ── */
.app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.status-bar {
  background: var(--blue);
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}
.status-bar span { font-size: 10px; color: white; opacity: 0.9; font-weight: 500; }
/* Hide the global status bar on all FO screens (data-fo-active toggled by enterFoView/exitFoView/go()) */
body[data-fo-active="true"] .status-bar { display: none; }

/* ── SCREENS ── */
.screen { display: none; flex: 1; overflow-y: auto; }
.screen.active { display: flex; flex-direction: column; overflow-y: hidden; }

/* ── HEADERS ── */
.s-header {
  background: var(--blue);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}
.s-header h2 { font-size: 15px; font-weight: 600; color: white; flex: 1; }
.s-header small { font-size: 11px; color: rgba(255,255,255,0.75); }

.detail-header { padding: 14px 16px; flex-shrink: 0; display:flex; justify-content:space-between; align-items:flex-start; }
.dh-blue   { background: var(--blue); }
.dh-green  { background: #3B6D11; }
.dh-teal   { background: var(--green); }
.dh-amber  { background: var(--amber); }

.det-floor { font-size: 11px; color: rgba(255,255,255,0.72); }
.det-unit  { font-size: 12px; color: rgba(255,255,255,0.75); margin-top: 2px; }
.det-name  { font-size: 18px; font-weight: 600; color: white; margin-top: 2px; }
.det-sub   { font-size: 11px; color: rgba(255,255,255,0.70); margin-top: 3px; }

.back-btn {
  background: rgba(255,255,255,0.2); border: 1.5px solid rgba(255,255,255,0.5);
  color: white;
  font-size: 13px; cursor: pointer;
  padding: 8px 16px; margin-bottom: 0;
  font-family: inherit; display: inline-flex;
  align-items: center; gap: 6px;
  border-radius: 24px; font-weight: 700;
  flex-shrink: 0;
}

.pe-wrap { position:relative; display:inline-block; }
.pe-menu { position:absolute; top:calc(100% + 6px); right:0; background:white; border-radius:10px; box-shadow:0 4px 20px rgba(0,0,0,0.15); display:none; z-index:500; min-width:150px; overflow:hidden; }
.pe-menu.open { display:block; }
.pe-menu-item { padding:11px 16px; font-size:13px; cursor:pointer; display:flex; align-items:center; gap:10px; color:#1a1a1a; white-space:nowrap; }
.pe-menu-item:hover { background:#f5f5f5; }
.import-btn {
  background: rgba(255,255,255,0.18);
  border: 0.5px solid rgba(255,255,255,0.35);
  color: white; border-radius: 8px;
  padding: 5px 10px; font-size: 11px; font-weight: 500;
  cursor: pointer; font-family: inherit;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}

/* ── HOME ── */
.home-top {
  background: linear-gradient(160deg, #0a2d52 0%, var(--blue) 60%, #1a6bbf 100%);
  padding: 14px 16px 18px;
  flex-shrink: 0;
}
.home-logos-row {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,0.18);
  margin-bottom: 12px; gap: 12px;
}
.logo-ppw {
  height: 38px; object-fit: contain; flex: 1; max-width: 56%;
  filter: brightness(0) invert(1);
}
.logo-barkan {
  height: 30px; object-fit: contain; flex: 1; max-width: 38%;
  filter: brightness(0) invert(1);
}
.logo-divider {
  width: 1px; height: 34px; background: rgba(255,255,255,0.25); flex-shrink: 0;
}
.home-info-row {
  display: flex; align-items: flex-end; justify-content: space-between;
}
.home-superintendent { font-size: 13px; font-weight: 600; color: white; }
.home-role { font-size: 11px; color: rgba(255,255,255,0.70); margin-top: 2px; font-style: italic; }

.date-pill {
  background: rgba(255,255,255,0.18);
  border-radius: 10px; padding: 6px 10px; text-align: center;
}
.date-day  { font-size: 15px; font-weight: 600; color: white; }
.date-wday { font-size: 10px; color: rgba(255,255,255,0.75); }

.home-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 14px 14px 8px;
}
.hcard {
  background: var(--bg2); border-radius: var(--radius);
  border: 0.5px solid var(--border);
  padding: 14px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: opacity .15s;
}
.hcard:hover { opacity: .8; }
.hcard span { font-size: 11px; font-weight: 600; color: var(--text); text-align: center; }

.ic {
  width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.ic-blue  { background: var(--blue-lt); }
.ic-green { background: var(--green-lt); }
.ic-teal  { background: var(--teal-lt); }

/* TO DO SHORTCUT */
.todo-shortcut {
  margin: 6px 14px 0;
  background: #E6F1FB;
  border-radius: var(--radius); padding: 12px 16px;
  display: flex; align-items: center; gap: 14px;
  border: 1px solid #85B7EB;
  width: calc(100% - 28px); text-decoration: none;
}
.todo-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--blue);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.todo-info { flex: 1; }
.todo-title { font-size: 13px; font-weight: 600; color: #0C447C; }
.todo-sub   { font-size: 11px; color: var(--blue); margin-top: 1px; }
.todo-badge {
  background: var(--blue); color: white;
  font-size: 11px; font-weight: 600;
  padding: 4px 12px; border-radius: 20px; white-space: nowrap;
}

/* CALENDAR */
.cal-section { padding: 12px 14px 16px; }
.day-hdr {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; margin-top: 10px;
}
.day-lbl {
  font-size: 11px; font-weight: 600; color: var(--text2);
  letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 6px;
}
.day-lbl.today { color: var(--blue); }
.day-bdg {
  font-size: 10px; background: var(--blue); color: white;
  padding: 2px 8px; border-radius: 10px;
}
.day-bdg.tmr {
  background: var(--bg3); color: var(--text2);
  border: 0.5px solid var(--border2);
}
.cal-ev {
  background: var(--bg2); border-radius: var(--radius);
  border: 0.5px solid var(--border);
  padding: 9px 12px; margin-bottom: 7px;
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; transition: background .1s;
}
.cal-ev:hover { background: var(--bg3); }
.ev-bar  { width: 3px; border-radius: 2px; align-self: stretch; flex-shrink: 0; min-height: 32px; }
.ev-time { font-size: 11px; font-weight: 600; color: var(--text2); min-width: 34px; text-align: center; flex-shrink: 0; }
.ev-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ev-title { font-size: 12px; font-weight: 600; color: var(--text); }
.ev-sub   { font-size: 10px; color: var(--text2); margin-top: 1px; }

/* ── FLOORS ── */
.floor-intro { padding: 12px 16px 6px; font-size: 12px; color: var(--text2); }
.floor-grid {
  display: grid; grid-template-columns: repeat(2,1fr);
  gap: 10px; padding: 10px 14px 20px;
}
.floor-btn {
  background: white; border: 0.5px solid rgba(0,0,0,0.10);
  border-radius: 14px; padding: 16px 16px 14px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  cursor: pointer; transition: all .15s;
}
.floor-btn:hover { border-color: var(--blue); background: #E6F1FB; }
.floor-num { font-size: 28px; font-weight: 700; color: var(--blue); line-height: 1; }
.floor-lbl { font-size: 12px; font-weight: 600; color: #333; }
.floor-cnt { font-size: 11px; background: #E6F1FB; color: #0C447C; padding: 3px 10px; border-radius: 10px; font-weight: 500; }
.floor-progress { width: 100%; height: 4px; background: #E6F1FB; border-radius: 2px; margin-top: 2px; overflow: hidden; }
.floor-progress-fill { height: 100%; background: var(--blue); border-radius: 2px; transition: width .3s; }
.floor-data-lbl { font-size: 10px; color: #888; }

/* ── UNITS ── */
.units-header { background: var(--blue); padding: 14px 16px; flex-shrink: 0; display: flex; justify-content: space-between; align-items: flex-start; }
.u-floor { font-size: 17px; font-weight: 700; color: white; margin-bottom: 2px; }
.u-title { font-size: 17px; font-weight: 600; color: white; }
.u-sub   { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.units-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: 8px; padding: 14px 14px 70px; overflow-y: auto;
}
.unit-btn {
  background: var(--bg2); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 10px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; transition: all .15s;
}
.unit-btn:hover { border-color: var(--blue); }
.unit-av {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-lt);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #0C447C;
}
.unit-num  { font-size: 11px; font-weight: 600; color: var(--text); }
.unit-name { font-size: 8px; color: var(--text2); text-align: center; line-height: 1.3; }
.unit-btn.vacant { opacity: .3; cursor: default; }
.unit-btn.vacant .unit-av { background: var(--bg3); color: var(--text3); }

/* ── PERSON CARDS ── */
.scroll-body { overflow-y: auto; flex: 1; background: var(--bg2); padding-bottom: 70px !important; }
.sec { padding: 11px 16px; border-bottom: 0.5px solid var(--border); }
.sec-title { font-size: 10px; font-weight: 700; color: var(--text2); letter-spacing: 0.05em; margin-bottom: 8px; }
.field { display: flex; justify-content: space-between; padding: 3px 0; gap: 12px; }
.fl { font-size: 12px; color: var(--text2); flex-shrink: 0; }
.fv { font-size: 12px; color: var(--text); text-align: right; }
.fv.link { color: var(--blue); }

.person-card {
  background: var(--bg); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px;
  border: 0.5px solid var(--border);
}
.person-card:last-child { margin-bottom: 0; }
.person-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.p-av {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.av-o { background: var(--blue); color: white; }
.av-t { background: var(--blue-lt); color: #0C447C; }
.p-name { font-size: 13px; font-weight: 600; color: var(--text); }
.p-role { font-size: 10px; color: var(--text2); margin-top: 1px; }

.cl { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 0.5px solid var(--border); }
.cw { width: 18px; display: flex; justify-content: center; flex-shrink: 0; }
.cv { flex: 1; font-size: 14px; color: var(--text); }
.cv.em { color: var(--blue); font-size: 13px; }
.ais { display: flex; gap: 6px; }
.ai {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: none; transition: transform .12s; flex-shrink: 0;
}
.ai:hover { transform: scale(1.12); }
.aip { background: var(--green-lt); }
.aie { background: var(--blue-lt); }

.ir { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 0.5px solid var(--border); }
.irv { flex: 1; font-size: 12px; color: var(--text); }
.cdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; border: 0.5px solid rgba(0,0,0,0.1); }

.ptag { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-top: 0.5px solid var(--border); font-size: 11px; font-weight: 600; }
.ptag.garage  { color: #0C447C; }
.ptag.outdoor { color: #27500A; }
.ptag.none    { color: var(--text3); font-weight: 400; }
.pdot { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.pdot.garage  { background: var(--blue-bd); }
.pdot.outdoor { background: var(--teal-bd); }
.pdot.none    { background: var(--border2); }

.oaddr { font-size: 11px; color: var(--text2); padding: 5px 0; border-top: 0.5px solid var(--border); display: flex; align-items: center; gap: 8px; }

.fob-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-top: 0.5px solid var(--border); }
.fob-tag {
  display: flex; align-items: center; gap: 6px;
  background: var(--amber-lt); border: 0.5px solid var(--amber-bd);
  border-radius: 20px; padding: 3px 10px; cursor: pointer; transition: opacity .15s;
}
.fob-tag:hover { opacity: .8; }
.fob-tag span { font-size: 11px; font-weight: 600; color: #633806; }
.fob-st { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: var(--teal-lt); color: #27500A; margin-left: auto; }
.fob-x {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--red-lt); border: none;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}

/* ── FOB HISTORY ── */
.fob-header { background: #1F3A5F; padding: 14px 16px; flex-shrink: 0; display:flex; flex-direction:column; }
.fob-num-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: #4A6FA5; color: white;
  font-size: 12px; font-weight: 600; padding: 4px 12px; border-radius: 20px; margin-bottom: 8px;
}
.stats-row {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: 8px; padding: 12px 16px;
  background: var(--bg2); border-bottom: 0.5px solid var(--border);
  flex-shrink: 0;
}
.stat-card { background: var(--bg); border-radius: var(--radius-sm); padding: 10px 8px; text-align: center; }
.stat-num { font-size: 20px; font-weight: 700; color: var(--text); }
.stat-lbl { font-size: 10px; color: var(--text2); margin-top: 2px; }
.period-pills {
  display: flex; gap: 6px; padding: 10px 16px;
  background: var(--bg2); border-bottom: 0.5px solid var(--border);
  overflow-x: auto; flex-shrink: 0;
}
.ppill {
  font-size: 11px; padding: 5px 14px; border-radius: 20px;
  border: 0.5px solid var(--border2); cursor: pointer;
  background: var(--bg); color: var(--text2); white-space: nowrap; flex-shrink: 0;
}
.ppill.on { background: var(--blue); color: white; border-color: var(--blue); }
.hist-list { overflow-y: auto; flex: 1; background: var(--bg2); }
.dg-lbl {
  font-size: 10px; font-weight: 700; color: var(--text2);
  letter-spacing: 0.04em; padding: 8px 16px 4px; background: var(--bg);
}
.hi { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 0.5px solid var(--border); }
.hi-time { font-size: 11px; font-weight: 600; color: var(--text2); min-width: 44px; }
.hi-icon { width: 28px; height: 28px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hi-door { font-size: 12px; font-weight: 600; color: var(--text); }
.hi-area { font-size: 10px; color: var(--text2); margin-top: 1px; }
.hbadge { font-size: 10px; padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.hb-in  { background: var(--teal-lt); color: #27500A; }
.hb-out { background: var(--blue-lt); color: #0C447C; }
.cancel-fob-btn {
  margin: 12px 16px 16px; width: calc(100% - 32px); padding: 11px;
  background: var(--red-lt); color: var(--red);
  border: 0.5px solid var(--red-bd); border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  flex-shrink: 0;
}

/* ── PARKING ── */
.search-wrap { padding: 10px 12px; background: var(--bg2); border-bottom: 0.5px solid var(--border); flex-shrink: 0; }
.search-input {
  width: 100%; background: var(--bg); border-radius: var(--radius-sm);
  padding: 7px 10px; font-size: 12px; color: var(--text);
  border: 0.5px solid var(--border2); font-family: inherit;
}
.legend {
  display: flex; gap: 14px; padding: 8px 14px;
  background: var(--bg2); border-bottom: 0.5px solid var(--border); flex-shrink: 0;
}
.leg { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text2); }
.leg-dot { width: 12px; height: 12px; border-radius: 3px; }
.map-scroll { overflow-y: auto; padding: 10px 12px 70px; flex: 1; }
.psec-hdr { display: flex; align-items: center; gap: 8px; margin: 10px 0 5px; }
.psec-icon { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.parking-row { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.spot {
  width: 36px; height: 36px; border-radius: 7px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; border: 1px solid transparent; transition: transform .12s; flex-shrink: 0;
}
.spot:hover { transform: scale(1.12); }
.spot:active { transform: scale(.94); }
.spot-num  { font-size: 10px; font-weight: 700; line-height: 1; }
.spot-unit { font-size: 8px; margin-top: 1px; line-height: 1; }
.sg { background: var(--blue-lt); border-color: var(--blue-bd); }
.sg .spot-num { color: #0C447C; } .sg .spot-unit { color: var(--blue); }
.so { background: var(--teal-lt); border-color: var(--teal-bd); }
.so .spot-num { color: #27500A; } .so .spot-unit { color: #3B6D11; }
.sv { background: var(--purple-lt); border-color: var(--purple-bd); }
.sv .spot-num { color: #3C3489; } .sv .spot-unit { color: var(--purple); }
.sr { background: #EF9A9A; border-color: #C62828; }
.sr .spot-num { color: #7F0000; } .sr .spot-unit { color: #B71C1C; }
.sv-vac { background: #FFF3E0; border-color: #FFA726; }
.sv-vac .spot-num { color: #E65100; } .sv-vac .spot-unit { color: #F57C00; }
.sh { background: var(--blue) !important; border-color: #0C447C !important; }
.sh .spot-num { color: white !important; } .sh .spot-unit { color: rgba(255,255,255,.85) !important; }

.pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.pill { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.report-btn {
  margin: 14px 16px; width: calc(100% - 32px); padding: 11px;
  background: var(--red-lt); color: var(--red);
  border: 0.5px solid var(--red-bd); border-radius: 10px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ── INSPECTION ── */
.tab-pills {
  display: flex; gap: 8px; padding: 10px 14px;
  background: var(--bg2); border-bottom: 0.5px solid var(--border); flex-shrink: 0;
}
.tpill {
  font-size: 11px; padding: 5px 14px; border-radius: 20px;
  border: 0.5px solid var(--border2); cursor: pointer;
  background: var(--bg); color: var(--text2);
}
.tpill.on { background: var(--blue); color: white; border-color: var(--blue); }
.list-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 0.5px solid var(--border);
  cursor: pointer; transition: background .1s;
}
.list-item:hover { background: var(--bg); }
.li-icon { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.li-info { flex: 1; }
.li-title { font-size: 12px; font-weight: 600; color: var(--text); }
.li-sub   { font-size: 10px; color: var(--text2); margin-top: 1px; }
.chevron  { font-size: 14px; color: var(--text3); }
/* ── INSPECTIONS MENU ── */
.insp-menu-card { background:var(--bg);border:0.5px solid var(--border);border-radius:16px;padding:16px;cursor:pointer;transition:all 0.15s;display:flex;flex-direction:column;gap:10px; }
.insp-menu-card:active { transform:scale(0.97); }
.insp-menu-icon { width:56px;height:56px;border-radius:14px;display:flex;align-items:center;justify-content:center; }
.insp-menu-label { font-size:14px;font-weight:700;color:var(--text); }
.insp-menu-sub { font-size:11px;color:var(--text2);margin-top:1px; }
/* ── INSPECTION NEW ── */
.insp-step { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.insp-step-title { font-size: 11px; font-weight: 700; color: #888; letter-spacing: 0.06em; margin-bottom: 2px; }
.insp-unit-input { display: flex; gap: 8px; align-items: center; }
#insp-unit-in::-webkit-outer-spin-button, #insp-unit-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.insp-unit-badge { background: var(--blue); color: white; border-radius: 10px; padding: 8px 14px; font-size: 15px; font-weight: 700; }
.auth-options { display: flex; flex-direction: column; gap: 8px; }
.auth-opt { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg); cursor: pointer; transition: all 0.15s; }
.auth-opt.sel-auth { border-color: var(--blue); background: #E6F1FB; }
.auth-opt-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.auth-opt-label { font-size: 13px; font-weight: 700; color: var(--text); }
.auth-opt-sub { font-size: 11px; color: var(--text2); margin-top: 1px; }
/* Bottom sheet */
.bottom-sheet-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 8000; display: none; align-items: flex-end; justify-content: center; }
.bottom-sheet-overlay.open { display: flex; }
.bottom-sheet { background: var(--bg); border-radius: 20px 20px 0 0; padding: 8px 16px 32px; width: 100%; max-width: 480px; max-height: 85vh; overflow-y: auto; }
.bs-handle { width: 36px; height: 4px; background: #DDD; border-radius: 2px; margin: 8px auto 16px; }
.bs-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.bs-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.bs-cat-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 12px; border: 1.5px solid var(--border); background: var(--bg); cursor: pointer; transition: all 0.15s; }
.bs-cat-btn.sel { border-color: var(--blue); background: #E6F1FB; }
.bs-cat-btn span { font-size: 11px; font-weight: 600; color: var(--text); text-align: center; line-height: 1.2; }
.bs-sub-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bs-sub-pill { font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 20px; border: 1.5px solid var(--border); background: var(--bg); cursor: pointer; color: var(--text); }
.bs-sub-pill.sel { border-color: var(--blue); background: var(--blue); color: white; }
.insp-verdict-card { border-radius: 12px; padding: 12px 14px; border: 1.5px solid var(--border); background: var(--bg); }
.insp-voice-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--blue); border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; box-shadow: 0 2px 8px rgba(24,95,165,0.3); }
.insp-voice-btn.recording { background: #E53935; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{box-shadow:0 0 0 0 rgba(229,57,53,0.4)} 50%{box-shadow:0 0 0 8px rgba(229,57,53,0)} }
.insp-progress { display: flex; align-items: center; gap: 0; margin: 0 0 4px; }
.insp-prog-step { flex: 1; height: 3px; background: #DDD; border-radius: 2px; transition: background 0.3s; }
.insp-prog-step.done { background: var(--blue); }
.insp-prog-step.active { background: var(--blue); }
.step-labels { display: flex; justify-content: space-between; margin-bottom: 12px; }
.step-lbl { font-size: 9px; color: #AAA; font-weight: 600; text-align: center; flex: 1; }
.step-lbl.active { color: var(--blue); }
.fab {
  background: var(--blue); color: white; border: none;
  border-radius: 20px; padding: 9px 18px; font-size: 11px; font-weight: 600;
  margin: 10px auto; display: block; cursor: pointer; font-family: inherit;
}

.badge { font-size: 10px; padding: 2px 8px; border-radius: 8px; white-space: nowrap; font-weight: 600; }
.b-urgent  { background: var(--red-lt); color: var(--red); }
.b-high    { background: var(--amber-lt); color: #633806; }
.b-normal  { background: var(--blue-lt); color: #0C447C; }
.b-ok      { background: var(--teal-lt); color: #27500A; }
.b-pending { background: var(--amber-lt); color: #633806; }

/* INSP DETAIL */
.units-aff { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.u-pill { font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px; background: var(--blue-lt); color: #0C447C; border: 0.5px solid var(--blue-bd); }
.u-pill.org { background: var(--red-lt); color: var(--red); border-color: var(--red-bd); }
.photos-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.ph-thumb { width: 68px; height: 68px; border-radius: 10px; background: var(--blue-lt); border: 0.5px solid var(--blue-bd); display: flex; align-items: center; justify-content: center; }
.insp-resp { border-radius: var(--radius); padding: 12px 14px; margin-top: 4px; border: 0.5px solid; }
.insp-resp.edif   { background: var(--teal-lt); border-color: var(--teal-bd); }
.insp-resp.dono   { background: var(--amber-lt); border-color: var(--amber-bd); }
.insp-resp.seguro { background: var(--red-lt); border-color: var(--red-bd); }
.ir-title { font-size: 13px; font-weight: 600; }
.insp-resp.edif   .ir-title { color: #27500A; }
.insp-resp.dono   .ir-title { color: #633806; }
.insp-resp.seguro .ir-title { color: var(--red); }
.ir-sub { font-size: 11px; margin-top: 3px; }
.insp-resp.edif   .ir-sub { color: #3B6D11; }
.insp-resp.dono   .ir-sub { color: #854F0B; }
.insp-resp.seguro .ir-sub { color: #A32D2D; }

/* INSP FORM */
.form-body { overflow-y: auto; flex: 1; background: var(--bg2); }
.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cat-btn {
  padding: 10px 8px; border-radius: 10px;
  border: 0.5px solid var(--border2);
  background: var(--bg); cursor: pointer;
  display: flex; align-items: center; gap: 8px; font-family: inherit;
}
.cat-btn.sel { border-color: var(--blue); background: var(--blue-lt); }
.cat-btn span { font-size: 12px; color: var(--text); }
.urg-row { display: flex; gap: 8px; }
.urg-btn {
  flex: 1; padding: 9px 6px; border-radius: 10px;
  border: 0.5px solid var(--border2); background: var(--bg);
  cursor: pointer; text-align: center; font-size: 11px; font-weight: 600;
  font-family: inherit; color: var(--text2);
}
.urg-btn.uu.sel { background: var(--red-lt); color: var(--red); border-color: var(--red-bd); }
.urg-btn.uh.sel { background: var(--amber-lt); color: #633806; border-color: var(--amber-bd); }
.urg-btn.un.sel { background: var(--blue-lt); color: #0C447C; border-color: var(--blue-bd); }
.resp-options { display: flex; flex-direction: column; gap: 8px; }
.resp-opt {
  padding: 12px 14px; border-radius: var(--radius);
  border: 1.5px solid var(--border); cursor: pointer; background: var(--bg);
}
.resp-opt.se { background: var(--teal-lt); border-color: var(--teal-bd); }
.resp-opt.sd { background: var(--amber-lt); border-color: var(--amber-bd); }
.resp-opt.ss { background: var(--red-lt); border-color: var(--red-bd); }
.ro-title { font-size: 12px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.ro-sub { font-size: 11px; color: var(--text2); margin-top: 3px; line-height: 1.4; }
.resp-opt.se .ro-title { color: #27500A; }
.resp-opt.sd .ro-title { color: #633806; }
.resp-opt.ss .ro-title { color: var(--red); }
.utags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.utag { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 20px; background: var(--blue-lt); color: #0C447C; border: 0.5px solid var(--blue-bd); display: flex; align-items: center; gap: 4px; }
.utag.org { background: var(--red-lt); color: var(--red); border-color: var(--red-bd); }
.utag button { background: none; border: none; cursor: pointer; color: inherit; font-size: 13px; line-height: 1; padding: 0; }
.au-row { display: flex; gap: 6px; }
.au-in {
  flex: 1; background: var(--bg); border: 0.5px solid var(--border2);
  border-radius: var(--radius-sm); padding: 7px 10px; font-size: 12px;
  font-family: inherit; color: var(--text);
}
.au-btn { background: var(--blue); color: white; border: none; border-radius: var(--radius-sm); padding: 7px 10px; font-size: 11px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.au-btn.org { background: #A32D2D; }
.rec-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rec-pill { font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 20px; background: var(--blue-lt); color: #0C447C; border: 0.5px solid var(--blue-bd); cursor: pointer; }
.rec-pill.on { background: var(--blue); color: white; border-color: var(--blue); }
.photos-add-row { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-add-box {
  width: 68px; height: 68px; border-radius: 10px;
  border: 1.5px dashed var(--border2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; gap: 3px; background: var(--bg);
}
.photo-add-box span { font-size: 9px; color: var(--text3); }
.photo-added { width: 68px; height: 68px; border-radius: 10px; background: var(--teal-lt); border: 0.5px solid var(--teal-bd); display: flex; align-items: center; justify-content: center; }
.form-note {
  width: 100%; background: var(--bg); border: 0.5px solid var(--border2);
  border-radius: var(--radius-sm); padding: 8px 10px; font-size: 12px;
  font-family: inherit; color: var(--text); resize: none; height: 68px;
}
.send-btn {
  margin: 12px 16px 16px; width: calc(100% - 32px); padding: 13px;
  background: var(--green); color: white; border: none; border-radius: var(--radius);
  font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* SUCCESS */
.success-body {
  padding: 40px 24px; text-align: center; background: var(--bg2);
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--teal-lt); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.success-title { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.success-sub   { font-size: 13px; color: var(--text2); line-height: 1.6; }
.success-email { font-size: 12px; color: var(--blue); margin-top: 8px; }
.ok-btn { margin-top: 20px; padding: 11px 32px; background: var(--blue); color: white; border: none; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }

/* ── BOTTOM NAV ── */
.bottom-nav {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border-top: 0.5px solid var(--border);
  flex-shrink: 0;
}
.bottom-nav-row {
  display: flex;
  flex: 1;
}
.bottom-nav-row .nav-btn {
  flex: 1;
  padding: 0 4px;
}
.nav-btn {
  flex: 0 0 auto;
  min-width: 60px;
  padding: 5px 4px 4px; border: none; background: none;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-family: inherit;
}
.nav-btn span { font-size: 9px; color: var(--text2); font-weight: 600; white-space: nowrap; }
.nav-btn svg  { color: var(--text2); }
.nav-btn img  { opacity: 1; filter: brightness(0) invert(0.5); }
.nav-btn .np { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 10px; border-radius: 14px; }
.nav-btn.on .np { background: var(--blue); }
.nav-btn.on .np span { color: #fff; }
.nav-btn.on .np svg { color: #fff; }
.nav-btn.on .np img { opacity: 1; filter: brightness(0) invert(1); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 70px; left: 50%; transform: translateX(-50%);
  background: #2C2C2A; color: white; font-size: 12px; font-weight: 600;
  padding: 8px 18px; border-radius: 20px; white-space: nowrap;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 999;
  max-width: 90%;
}
.toast.show { opacity: 1; }

/* ── RESPONSIVE ── */
@media (min-width: 430px) {
  .app { box-shadow: 0 0 40px rgba(0,0,0,0.15); min-height: 100vh; }
}
@media (max-width: 430px) {
  body { background: var(--bg); }
}


.stack-btn {
  background: white;
  border: 0.5px solid #85B7EB;
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
}
.stack-btn:hover { background: #E6F1FB; }
.fob-act-tabs { display:flex; gap:6px; padding:10px 14px; background:var(--bg); border-bottom:0.5px solid var(--border); overflow-x:auto; flex-shrink:0; }
.fob-panel { overflow-y:auto; }
.fob-metrics { display:grid; grid-template-columns:repeat(2,1fr); gap:8px; padding:12px 14px; }
.fob-metric { background:var(--bg3); border-radius:8px; padding:10px 8px; text-align:center; }
.fob-metric-num { font-size:20px; font-weight:500; color:var(--text); }
.fob-metric-lbl { font-size:10px; color:var(--text2); margin-top:2px; }
.fob-bar-item { display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.fob-bar-label { font-size:11px; color:var(--text2); min-width:120px; text-align:right; flex-shrink:0; }
.fob-bar-track { flex:1; background:var(--bg3); border-radius:4px; height:22px; overflow:hidden; }
.fob-bar-fill  { height:100%; border-radius:4px; display:flex; align-items:center; padding:0 8px; }
.fob-bar-val   { font-size:11px; font-weight:500; color:white; }
.fob-unit-list { overflow-y:auto; max-height:420px; }
.fob-unit-item { display:flex; align-items:center; justify-content:space-between; padding:9px 14px; border-bottom:0.5px solid var(--border); }
.fob-unit-name { font-size:12px; font-weight:500; color:var(--text); }
.fob-unit-sub  { font-size:10px; color:var(--text2); margin-top:1px; }
.fob-unit-badge { font-size:11px; font-weight:500; padding:3px 10px; border-radius:10px; background:#E6F1FB; color:#0C447C; white-space:nowrap; }

.residents-header { flex-direction: column; align-items: stretch; gap: 10px; padding-bottom: 14px; }
.residents-title h2 { color: white; font-size: 18px; }
.residents-sub { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 2px; }
.residents-import-btns { display: flex; gap: 6px; }
.res-import-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 4px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.15); color: white; font-size: 11px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.res-import-btn:hover { background: rgba(255,255,255,0.25); }

/* ── VENDORS ── */
.cat-scroll { overflow-y: auto; flex: 1; padding-bottom: 70px; }
.vcat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; padding: 14px;
}
.vcat-card {
  background: white; border: 0.5px solid rgba(0,0,0,0.10);
  border-radius: 14px; padding: 14px 8px 12px;
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; cursor: pointer; transition: opacity .15s;
}
.vcat-card:hover { opacity: 0.8; }
.vcat-ic {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.vcat-name { font-size: 11px; font-weight: 600; color: #1A1A1A; text-align: center; line-height: 1.2; }
.vcat-count { font-size: 10px; color: #888; }

/* ── PARKING HUB ── */
.park-hub { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.park-hub-card {
  border-radius: 16px; padding: 20px 18px; cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; position: relative;
  transition: opacity .15s;
}
.park-hub-card:hover { opacity: 0.9; }
.phc-title { font-size: 20px; font-weight: 700; color: white; margin-top: 8px; }
.phc-sub   { font-size: 12px; color: rgba(255,255,255,0.75); }
.phc-arrow { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 24px; color: rgba(255,255,255,0.6); }

/* ── OUTDOOR SECTIONS ── */
.out-section { margin-bottom: 14px; }
.out-section-hdr { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; margin: 0 14px 8px; }
.out-section-hdr .sec-icon { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.out-section-label { font-size: 12px; font-weight: 700; }
.out-section-count { font-size: 12px; font-weight: 700; color: #0C447C; }
.out-spots-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 6px; padding: 0 14px; }

/* ── GARAGE ROWS ── */
.garage-row-hdr { padding: 10px 14px 6px; font-size: 12px; font-weight: 700; color: var(--text2); letter-spacing: 0.04em; }
.garage-spots-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 6px; padding: 0 14px 14px; }

/* ── SPOT CARD ── */
.spot-card {
  border-radius: 10px; padding: 8px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid transparent; transition: all .15s;
}
.spot-card:hover { transform: scale(1.05); }
.spot-num { font-size: 16px; font-weight: 700; }
.spot-unit { font-size: 11px; opacity: 0.7; }
.spot-visitor { opacity: 0.5; cursor: default; }
.spot-visitor:hover { transform: none; }

/* ── SEARCH RESULTS ── */
.search-result-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 0.5px solid var(--border); cursor: pointer; }
.search-result-item:hover { background: var(--bg2); }

/* ── TASKS ── */
.task-panel { flex: 1; overflow-y: auto; }
.task-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-bottom: 0.5px solid var(--border);
  background: white; cursor: pointer;
}
.task-item:hover { background: var(--bg2); }
.task-check {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--blue); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.task-check.done { background: var(--blue); border-color: var(--blue); }
.task-check.done::after { content: '✓'; color: white; font-size: 12px; font-weight: 700; }
.task-text { font-size: 13px; color: #1A1A1A; flex: 1; line-height: 1.4; }
.task-text.done { text-decoration: line-through; color: #999; }
.task-note-field { width:100%; border:0.5px solid var(--border2); border-radius:8px; padding:7px 10px; font-size:12px; font-family:inherit; color:var(--text); background:var(--bg); margin-top:6px; resize:none; }
.task-note-preview { font-size:11px; color:#534AB7; margin-top:4px; font-style:italic; }
.task-photo-thumb { width:56px; height:56px; border-radius:8px; object-fit:cover; margin-top:6px; margin-right:6px; cursor:pointer; }
.season-badge { font-size:9px; font-weight:600; padding:2px 7px; border-radius:10px; margin-left:6px; vertical-align:middle; }
.task-group-hdr { padding: 10px 14px 4px; font-size: 11px; font-weight: 700; color: #888; letter-spacing: 0.05em; background: var(--bg2); }
.task-delete { padding: 4px 8px; background: none; border: none; color: #CCC; font-size: 16px; cursor: pointer; }
.task-delete:hover { color: #A32D2D; }

/* ── POOL ── */
.pool-field { margin-bottom: 12px; }
.pool-field-label { font-size: 12px; font-weight: 600; color: #1A1A1A; margin-bottom: 5px; }
.pool-input { width: 100%; padding: 10px 12px; border: 1.5px solid #E0E0E0; border-radius: 10px; font-size: 14px; font-family: inherit; box-sizing: border-box; background: white; }
.pool-input:focus { outline: none; border-color: var(--pool-blue); }
.pool-status { font-size: 11px; font-weight: 600; margin-top: 3px; height: 16px; }
.pool-status.ok  { color: #1D9E75; }
.pool-status.warn { color: #EF9F27; }
.pool-status.bad  { color: #D85A30; }
.pool-field-group { background: white; border-radius: 14px; padding: 14px; border: 0.5px solid #E0E0E0; }
.pool-log-row { background: white; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; border: 0.5px solid #E0E0E0; }
.pool-log-time { font-size: 11px; font-weight: 700; color: var(--pool-blue); }
.pool-log-vals { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.pool-val-chip { background: #E6F1FB; border-radius: 6px; padding: 3px 8px; font-size: 11px; font-weight: 600; color: #0C447C; }
.pool-val-chip.warn { background: #FFF3E0; color: #E65100; }
.pool-val-chip.bad  { background: #FFEBEE; color: #B71C1C; }
body:not([data-role="superintendent"]) .su-only { display: none !important; }
body:not([data-role="superintendent"]) .task-toggle-area { pointer-events: none !important; cursor: default !important; }

/* ═══════════════════════════════════════════════════════════════════════
   Facility Office (View Adm) — Phase 1
   Scoped to #s-fo-home; never bleeds into Dashboard atual.
   All classes prefixed .fo-*.
═════════════════════════════════════════════════════════════════════════ */

/* "View Adm" pill on Dashboard atual — bigger, centered via home-info-row layout */
.fo-view-adm-btn {
  background: #1F3A5F; color: #fff; border: none;
  border-radius: 12px; padding: 12px 24px;
  font-family: 'D-DIN-PRO','DIN','Helvetica Neue',Arial,sans-serif;
  font-weight: 500; font-size: 16px;
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
}
.fo-view-adm-btn:active { background: #14253D; transform: translateY(1px); }

/* Belt-and-suspenders: hide the shared bottom nav while FO Home is active.
   Two complementary rules — sibling selector + body data-attribute toggled
   by enterFoView/exitFoView (covers any DOM nesting surprise). */
/* nav visibility now managed by renderNav() — see JS */

/* IMPORTANT: do NOT set display here — ID specificity (1,0,0) would beat
   the .screen.active class (0,2,0) and the screen would render permanently.
   Keep this rule strictly to background/cosmetics. */
#s-fo-home {
  background: #1F2E3D;
}

/* FO header: two stacked blocks (light + dark). The wrapper is a flex column
   with no styling of its own — backgrounds and padding belong to the blocks. */
.fo-header {
  display: flex; flex-direction: column;
}

/* Block 1 — white background, Facility Office logo centred (compact) */
.fo-header-block-light {
  background: #ffffff;
  padding: 6px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* Block 2 — dark blue background, PPW wordmark + condominium + back/version (compact) */
.fo-header-block-dark {
  background: #1F3A5F;
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Footer row inside Block 2: ← Dashboard (left) and V 1.0 (right) */
.fo-header-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 4px;
}
.fo-header-back {
  background: rgba(255,255,255,0.10); color: #fff;
  border: 0.5px solid rgba(255,255,255,0.22);
  border-radius: 12px; padding: 6px 14px;
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 700; font-size: 13px; line-height: 1;
  cursor: pointer;
  display: flex; align-items: center; gap: 4px;
}
.fo-header-back:active { background: rgba(255,255,255,0.18); }
.fo-header-version {
  color: rgba(255,255,255,0.7);
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 700; font-size: 13px;
  letter-spacing: 0.12em;
}

/* Logo Facility Office — sits in the white block, compact height */
.fo-logo {
  display: block;
  width: auto;
  max-height: 52px;
  margin: 0 auto;
}

/* Parkway Plaza West horizontal wordmark — reduced ~10% from previous size.
   The "condominium" text is baked into the SVG and scales proportionally,
   so reducing the image width also reduces "condominium" automatically. */
.fo-header-pw {
  display: block;
  width: min(180px, 50%);
  height: auto;
  margin: 0 auto;
}

/* Blue identity band */
.fo-band {
  background: #1F3A5F;
  padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.fo-band-info { color: #fff; min-width: 0; }
.fo-band-name {
  font-family: 'DIN','D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 500; font-size: 18px; line-height: 1.15;
  letter-spacing: 0.01em;
}
.fo-band-role {
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 500; font-size: 12px;
  color: rgba(255,255,255,0.75); margin-top: 2px;
}
.fo-weather {
  background: #6FA8C9;
  border-radius: 14px; padding: 10px 16px;
  color: #fff; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
}
.fo-weather-top { display: flex; justify-content: center; align-items: center; gap: 4px; }
.fo-weather-num { font-size: 26px; font-weight: 700; line-height: 1; }
.fo-weather-leaf { font-size: 18px; line-height: 1; }
.fo-weather-wd { font-size: 13px; font-weight: 500; opacity: 0.95; }
.fo-weather-temp { font-size: 13px; font-weight: 700; opacity: 1; }

/* Cards body */
.fo-content {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: #fff;
  padding: 16px 14px 70px;
}
.fo-grid-row {
  display: grid; gap: 10px; margin-bottom: 10px;
}
.fo-grid-row--3 { grid-template-columns: repeat(3, 1fr); }
.fo-grid-row--4 { grid-template-columns: repeat(4, 1fr); }

.fo-card {
  border-radius: 14px;
  border: none; cursor: pointer;
  font-family: inherit;
  color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 10px 6px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s ease, opacity 0.2s ease;
}
.fo-card:active { transform: scale(0.97); }
.fo-card--lg { aspect-ratio: 1 / 1; padding: 12px 8px; }
.fo-card--sm { aspect-ratio: 1 / 1; padding: 8px 4px; }
/* Disabled (inert) cards — only Residents stays interactive in Phase 1 */
.fo-card--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.fo-card-icon {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  margin-bottom: 4px;
}
.fo-card-icon-img {
  display: block;
  filter: brightness(0) invert(1);   /* force any SVG fill to pure white */
}
.fo-card--lg .fo-card-icon-img { width: 60px; height: 60px; }
.fo-card--sm .fo-card-icon-img { width: 38px; height: 38px; }
/* Brand-coloured raster fallbacks (Barkan/PPW) keep their original tones */
.fo-card-icon-img--brand { filter: none; }
.fo-card--sm .fo-card-icon-img--brand { width: auto; height: auto; max-width: 78%; max-height: 70%; object-fit: contain; }
.fo-card-label {
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 500; font-size: 14px;
  letter-spacing: 0.005em;
  text-align: center;
  color: #fff;
}
.fo-card--sm .fo-card-label { font-size: 11px; }

/* Card colours */
.fo-card--residents   { background: #4A6FA5; }
.fo-card--parking     { background: #4A6FA5; }
.fo-card--todo        { background: #4A6FA5; }
.fo-card--pool        { background: #4A6FA5; }
.fo-card--floors      { background: #4A6FA5; }
.fo-card--inspections { background: #4A6FA5; }
.fo-card--vendors     { background: #3B7A57; }
.fo-card--stacks      { background: #3B7A57; }
.fo-card--stats       { background: #3B7A57; }
.fo-card--storage     { background: #3B7A57; }
.fo-card--calendar    { background: #4A6FA5; }
.fo-card--barkan      { background: #3B7A57; }
.fo-card--ppw         { background: #3B7A57; }
.fo-card--applications { background: #4A6FA5; }
.fo-card--issues       { background: #4A6FA5; }
.fo-card--boletim      { background: #3B7A57; }

/* Bottom nav specific to FO Home */
.fo-bottom-nav {
  display: flex; justify-content: space-around; align-items: stretch;
  background: #2D3748;
  padding: 8px 4px calc(10px + env(safe-area-inset-bottom));
  flex-shrink: 0;
  border-top: 1px solid #1A2533;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 100;
}
.fo-bottom-nav-btn {
  background: none; border: none; cursor: pointer; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 4px 0px; flex: 1;
  color: rgba(255,255,255,0.6);
}
.fo-bottom-nav-btn.on { color: #fff; }
.fo-bottom-nav-btn svg { width: 18px; height: 18px; display: block; }
.fo-bottom-nav-btn span {
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 500; font-size: 8px; letter-spacing: 0.02em;
}

/* home-info-row: name left, date/temp right */
#s-home .home-info-row.fo-info-row--3col {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
#s-home .fo-info-row--3col > .home-info-left { flex: 0 0 auto; }
#s-home .fo-info-row--3col > .home-info-right { flex: 0 0 auto; }

/* ═══════════════════════════════════════════════════════════════════════
   FO Residents (sub-screens) — list + detail
═════════════════════════════════════════════════════════════════════════ */

/* Section bar — coloured strip below the blue identity band, holds the
   section title + a contextual back button. Reused on both residents
   screens; module colour swappable via .fo-section-bar--<module>. */
.fo-section-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  background: #3B7A57;
  min-height: 44px;
  color: #fff;
}
.fo-section-bar-title {
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 700; font-size: 18px; letter-spacing: 0.01em;
}
.fo-section-bar-back {
  background: rgba(255,255,255,0.14); color: #fff;
  border: 0.5px solid rgba(255,255,255,0.28);
  border-radius: 12px; padding: 5px 12px;
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 500; font-size: 12px; line-height: 1;
  cursor: pointer;
}
.fo-section-bar-back:active { background: rgba(255,255,255,0.24); }
body, body * {
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif !important;
}

/* Search bar */
.fo-residents-search {
  display: flex; align-items: center; gap: 8px;
  background: #F4F4F2;
  border: 0.5px solid #DDD;
  border-radius: 12px;
  padding: 9px 12px;
  margin: 12px 14px 8px;
}
.fo-residents-search svg {
  width: 16px; height: 16px;
  color: #888; flex-shrink: 0;
}
.fo-residents-search input {
  flex: 1;
  background: transparent;
  border: none; outline: none;
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 500; font-size: 14px;
  color: #1F3A5F;
}
.fo-residents-search input::placeholder { color: #999; font-weight: 400; }

/* Resident list */
.fo-residents-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: #fff;
  padding: 4px 14px 70px;
  display: flex; flex-direction: column; gap: 6px;
}
.fo-resident-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff;
  border: 0.5px solid #E4E4E2;
  border-radius: 14px;
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s ease, transform 0.1s ease;
}
.fo-resident-item:active { background: #F4F4F2; transform: scale(0.99); }
.fo-resident-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #1F3A5F;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}
.fo-resident-meta { flex: 1; min-width: 0; }
.fo-resident-name {
  font-family: 'D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 600; font-size: 15px;
  color: #1F3A5F; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fo-resident-role {
  font-family: 'DIN','D-DIN-PRO','Helvetica Neue',Arial,sans-serif;
  font-weight: 500; font-size: 11px;
  color: #888; margin-top: 2px;
  letter-spacing: 0.02em;
}
.fo-resident-unit {
  background: #1F3A5F; color: #fff;
  border-radius: 10px; padding: 4px 10px;
  font-family: 'DIN','D-DIN-PRO',sans-serif;
  font-weight: 700; font-size: 11px;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.fo-residents-empty {
  padding: 32px 16px;
  text-align: center; color: #888;
  font-family: 'D-DIN-PRO',sans-serif; font-size: 13px;
}

/* Apply the light-gray background at the screen level so any space below
   the card (when content is short) stays neutral, not the dark FO blue. */
#s-fo-residents, #s-fo-resident-detail { background: #F4F4F2; }

/* Resident detail body — flex container, scrollable. Visual styling lives
   on the .fo-detail-wrap that this body wraps around. */
.fo-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* FO Resident Detail — card */
.fo-detail-body { flex: 1; overflow-y: auto; background: #E8E8E8; padding-bottom: 70px; }
.fo-detail-wrap { background: #E8E8E8; padding: 12px; }
.fo-detail-header { background: #D0CFC9; border-radius: 12px 12px 0 0; padding: 16px 14px 12px; display: flex; align-items: flex-end; gap: 12px; position: relative; min-height: 80px; }
.fo-detail-field--clickable { background: #EAEAEA; cursor: pointer; border: none; text-align: left; transition: background .15s; }
.fo-detail-field--clickable:hover { background: #d4d4d4; }
.fo-detail-field--clickable:active { background: #c8c8c8; }
.fo-detail-avatar { width: 110px; height: 110px; min-width: 110px; border-radius: 50%; background: #1F3A5F; display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 700; color: #fff; }
.fo-detail-name-block { flex: 1; display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
.fo-detail-name { font-size: 22px; font-weight: 700; color: #1a1a1a; margin: 0; line-height: 1.2; word-break: break-word; }
.fo-detail-role { font-size: 14px; color: #555; margin: 0; }
.fo-detail-emergency-badge { background: #D32F2F; color: #fff; font-size: 10px; font-weight: 700; padding: 4px 8px; border-radius: 5px; position: absolute; top: 10px; right: 10px; }
.fo-detail-unit-badge { background: #2d4a6b; color: #fff; border-radius: 8px; padding: 6px 10px; text-align: center; min-width: 56px; flex-shrink: 0; }
.fo-detail-unit-badge span { display: block; font-size: 9px; opacity: .75; letter-spacing: .06em; }
.fo-detail-unit-badge strong { display: block; font-size: 20px; font-weight: 700; line-height: 1; }
.fo-detail-owner-row { background: #D0CFC9; padding: 0 14px 12px; text-align: center; }
.fo-detail-owner-box { background: #2d4a6b; color: #fff; border-radius: 8px; padding: 9px 20px; display: inline-block; }
.fo-detail-owner-box p { margin: 0; }
.fo-detail-owner-name { font-size: 14px; font-weight: 700; }
.fo-detail-owner-label { font-size: 10px; opacity: .7; letter-spacing: .08em; }
.fo-detail-body-inner { background: #fff; border-radius: 0 0 12px 12px; padding: 12px 14px; }
.fo-detail-sep { border: none; border-top: 1px solid #ddd; margin: 10px 0; }
.fo-detail-row3 { display: flex; gap: 8px; margin-bottom: 8px; }
.fo-detail-field { background: #EAEAEA; border-radius: 8px; padding: 8px 10px; }
.fo-detail-field--phone { flex: 0 0 45%; }
.fo-detail-field--fob { flex: 0 0 27%; }
.fo-detail-field--intercom { flex: 1; }
.fo-detail-field--full { background: #EAEAEA; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; }
.fo-detail-field-label { font-size: 11px; font-weight: 600; color: #444; margin: 0 0 3px; }
.fo-detail-field-value { font-size: 15px; font-weight: 700; color: #1F3A5F; margin: 0; word-break: break-word; white-space: normal; }
.fo-detail-vrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fo-detail-vrow .fo-detail-field-value { font-size: 13px; }
.fo-detail-also-title { font-size: 10px; font-weight: 700; letter-spacing: .08em; color: #666; margin: 10px 0 6px; text-transform: uppercase; }
.fo-detail-also-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.fo-detail-also-item { background: #EAEAEA; border-radius: 10px; padding: 10px 12px; border: none; text-align: left; width: 100%; cursor: pointer; transition: background .15s; }
.fo-detail-also-item:hover { background: #d4d4d4; }
.fo-detail-also-name { font-size: 16px; font-weight: 700; color: #1F3A5F; margin: 0 0 2px; word-break: break-word; }
.fo-detail-also-role { font-size: 12px; color: #666; margin: 0; }
.fo-detail-ec-title { font-size: 11px; font-weight: 700; color: #444; margin: 0 0 6px; }
.fo-detail-ec-box { background: #D32F2F; border-radius: 8px; padding: 12px 16px; display: inline-block; }
.fo-detail-ec-name { color: #fff; font-size: 17px; font-weight: 700; margin: 0 0 2px; }
.fo-detail-ec-phone { color: #fff; font-size: 15px; font-weight: 700; margin: 0; }
.fo-detail-notes-label { font-size: 12px; color: #444; margin: 10px 0 4px; }
.fo-detail-notes-text { font-size: 13px; color: #555; margin: 0; }
.fo-detail-cage-btn { background: #FF9800; border: none; border-radius: 10px; padding: 11px 18px; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; width: 100%; margin-top: 8px; }

/* ── AUTH GATE ─────────────────────────────────────────── */
  #auth-gate {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100vw; height: 100vh;
    background: linear-gradient(135deg, #1F3A5F 0%, #3E5C76 100%);
    z-index: 999999;
    display: flex !important;
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }
  #auth-gate.hidden { display: none !important; }
  .pw-card {
    background: #fff; border-radius: 20px;
    padding: 40px 32px; max-width: 400px; width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    text-align: center;
  }
  .pw-logo {
    width: 180px; height: auto; max-height: 120px;
    margin: 0 auto 24px;
    display: block;
    object-fit: contain;
    background: #1F3A5F;
    padding: 18px 24px;
    border-radius: 14px;
    box-sizing: content-box;
  }
  .pw-sub {
    font-size: 13px; color: #6C7A89;
    margin-bottom: 24px; line-height: 1.5;
  }
  .pw-input {
    width: 100%; padding: 14px 16px;
    border: 2px solid #E5E8EC; border-radius: 12px;
    font-size: 16px; color: #2B2B2B;
    outline: none; transition: border-color 0.15s;
    box-sizing: border-box;
    -webkit-appearance: none;
    margin-bottom: 10px;
  }
  .pw-input:focus { border-color: #1F3A5F; }
  .pw-input.error { border-color: #D32F2F; animation: pw-shake 0.4s; }
  @keyframes pw-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
  }
  .pw-btn {
    width: 100%; margin-top: 4px;
    padding: 14px; border: none; border-radius: 12px;
    background: #1F3A5F; color: #fff;
    font-size: 15px; font-weight: 700;
    cursor: pointer; transition: background 0.15s;
  }
  .pw-btn:hover { background: #2A4A73; }
  .pw-btn:active { background: #18304F; }
  .pw-btn:disabled { background: #9AA5B3; cursor: not-allowed; }
  .pw-err {
    color: #D32F2F; font-size: 13px;
    margin-top: 12px; min-height: 18px;
    font-weight: 600;
  }
  .pw-foot {
    margin-top: 22px; font-size: 11px; color: #9AA5B3;
    letter-spacing: 0.5px; text-transform: uppercase;
  }
