/* Virtual Tour Rumah Sakit — gaya dasar.
   Warna tema (--primary, --secondary, dst.) disuntikkan dari pengaturan lewat theme_css().
   Mode gelap aktif lewat atribut data-theme="dark" pada <html>. */
:root {
  --primary: #0E7C86; --primary-dark: #0B666E; --primary-soft: #E7F2F3; --primary-text: #0B666E; --primary-rgb: 14,124,134; --on-primary: #fff;
  --secondary: #1F3A5F; --secondary-dark: #172B47; --on-secondary: #fff;

  --bg: #F4F7F9; --surface: #FFFFFF; --surface-2: #FAFCFD; --input-bg: #FFFFFF;
  --text: #14232E; --text-2: #2E4150; --muted: #5F7180; --border: #DDE5EA; --hover: rgba(16,34,46,.05);
  --danger: #C0392B; --danger-soft: #FDECEA;
  --ok-bg: #EAF7EF; --ok-border: #BFE5CD; --ok-text: #1B5E34;
  --err-bg: #FDECEA; --err-border: #F5C6C0; --err-text: #8E2A1F;
  --warn-bg: #FFF6E5; --warn-border: #F5DDAA; --warn-text: #7A5212;
  --pill-green-bg: #E3F4E9; --pill-green: #1B6B3A;
  --pill-gray-bg: #EDF1F4; --pill-gray: #52636F;
  --pill-red-bg: #FDECEA; --pill-red: #9B2C20;
  --checker: #F2F5F7; --nav-bg: rgba(255,255,255,.94); --switch-off: #C5D0D8;
  --shadow: 0 1px 2px rgba(16,34,46,.06), 0 4px 16px rgba(16,34,46,.06);
  --shadow-lg: 0 10px 30px rgba(16,34,46,.12);

  --radius: 12px; --radius-sm: 8px;
  --nav-h: 64px; --safe-b: env(safe-area-inset-bottom, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme=dark] {
  --bg: #0E1419; --surface: #161E26; --surface-2: #1B242D; --input-bg: #111920;
  --text: #E4ECF1; --text-2: #C3D0D9; --muted: #8FA1AF; --border: #26323D; --hover: rgba(255,255,255,.06);
  --danger: #F07167; --danger-soft: rgba(240,113,103,.14);
  --ok-bg: rgba(46,160,90,.14); --ok-border: rgba(46,160,90,.35); --ok-text: #86D9A6;
  --err-bg: rgba(240,113,103,.12); --err-border: rgba(240,113,103,.35); --err-text: #F5A39C;
  --warn-bg: rgba(230,170,60,.12); --warn-border: rgba(230,170,60,.35); --warn-text: #F1C879;
  --pill-green-bg: rgba(46,160,90,.18); --pill-green: #86D9A6;
  --pill-gray-bg: rgba(255,255,255,.08); --pill-gray: #AEBBC6;
  --pill-red-bg: rgba(240,113,103,.16); --pill-red: #F5A39C;
  --checker: #1E2932; --nav-bg: rgba(18,25,32,.94); --switch-off: #3A4855;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.25);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font: 15px/1.6 var(--font); color: var(--text); background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; text-wrap: balance; }
code { font-size: .9em; background: var(--hover); padding: .1em .35em; border-radius: 4px; word-break: break-all; }
[hidden] { display: none !important; }
.icon { width: 18px; height: 18px; flex-shrink: 0; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 32px 20px 56px; }
:root[data-theme=dark] .when-light, :root:not([data-theme=dark]) .when-dark { display: none; }
.when-light, .when-dark { display: inline-flex; }

/* ---------- Tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 14px/1.2 var(--font); cursor: pointer; text-decoration: none !important; transition: background .15s, border-color .15s, color .15s; white-space: nowrap; }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .bottom-nav a:focus-visible, .bottom-nav button:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .4); outline-offset: 1px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary-text); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-ghost.danger:hover { background: var(--danger-soft); color: var(--danger); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-icon { padding: 8px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: inherit; cursor: pointer; }
.icon-btn:hover { background: var(--hover); }
.icon-btn .icon { width: 20px; height: 20px; }

/* ---------- Header publik ---------- */
.site-header { background: var(--secondary); color: var(--on-secondary); position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 10px rgba(0,0,0,.12); padding-top: env(safe-area-inset-top, 0px); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none !important; min-width: 0; }
.brand-logo { height: 42px; width: auto; max-width: 160px; object-fit: contain; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: var(--on-primary); flex-shrink: 0; }
.brand-mark .icon { width: 22px; height: 22px; }
.brand-mark-lg { width: 60px; height: 60px; border-radius: 16px; margin: 0 auto; }
.brand-mark-lg .icon { width: 32px; height: 32px; }
.brand-name { font-weight: 700; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-search { flex: 1; max-width: 380px; margin-left: auto; position: relative; }
.header-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); opacity: .7; }
.header-search input[type=search] { width: 100%; padding: 9px 14px 9px 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.12); color: inherit; font: inherit; }
.header-search input::placeholder { color: inherit; opacity: .7; }
.header-search input[type=search]:focus { background: var(--input-bg); color: var(--text); outline: none; box-shadow: none; }
.home .header-search { visibility: hidden; }
.header-nav { display: flex; align-items: center; gap: 8px; }
.site-header .icon-btn:hover { background: rgba(255,255,255,.12); }
.header-nav .btn-outline { background: transparent; color: inherit; border-color: rgba(255,255,255,.35); }
.header-nav .btn-outline:hover { background: rgba(255,255,255,.12); color: inherit; border-color: rgba(255,255,255,.6); }

/* ---------- Hero & pencarian ---------- */
.hero { position: relative; overflow: hidden; padding: 64px 0 72px; color: var(--on-secondary);
  background: radial-gradient(1200px 400px at 85% -10%, rgba(var(--primary-rgb), .55), transparent 60%), linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%); }
.hero::after { content: ""; position: absolute; right: -120px; bottom: -160px; width: 420px; height: 420px; border-radius: 50%; border: 60px solid rgba(255,255,255,.05); }
.hero .container { position: relative; z-index: 1; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 600; letter-spacing: .02em; }
.hero h1 { font-size: clamp(26px, 4.5vw, 44px); margin-bottom: 10px; }
.hero-sub { font-size: 17px; opacity: .85; max-width: 640px; margin: 0 0 28px; }
.hero-search { display: flex; gap: 10px; background: var(--surface); padding: 8px; border-radius: 14px; box-shadow: var(--shadow-lg); max-width: 820px; scroll-margin-top: 90px; }
.hero-search-input { flex: 1; position: relative; min-width: 0; }
.hero-search-input .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 20px; height: 20px; }
.hero-search input[type=search] { width: 100%; height: 100%; min-height: 48px; border: 0; padding: 0 14px 0 44px; font: inherit; font-size: 16px; color: var(--text); background: transparent; border-radius: 8px; box-shadow: none; }
.hero-search input:focus { outline: none; }
.hero-search select { border: 0; border-left: 1px solid var(--border); border-radius: 0; padding: 0 12px; font: inherit; color: var(--text); background: transparent; max-width: 220px; width: auto; box-shadow: none; }
.hero-search .btn { padding: 0 24px; min-height: 48px; font-size: 15px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none !important; white-space: nowrap; }
.chip span { font-size: 12px; color: var(--muted); background: var(--bg); padding: 0 7px; border-radius: 999px; }
.chip:hover { border-color: var(--primary); color: var(--primary-text); }
.chip.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.chip.active span { background: rgba(255,255,255,.22); color: inherit; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-head h2 { font-size: 20px; margin: 0; }
.link-muted { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* ---------- Kartu ruangan ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--text); text-decoration: none !important; transition: transform .2s, box-shadow .2s; border: 1px solid var(--border); }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card:active { transform: scale(.99); }
.card-thumb { position: relative; aspect-ratio: 16/10; background: var(--primary-soft); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-thumb img { transform: scale(1.05); }
.thumb-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--primary-text); background: linear-gradient(135deg, var(--primary-soft), var(--surface)); }
.thumb-placeholder .icon { width: 56px; height: 56px; opacity: .55; stroke-width: 1.4; }
.badge-360 { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; backdrop-filter: blur(4px); }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.card-body h3 { font-size: 17px; margin: 0; }
.badge { align-self: flex-start; display: inline-block; font-size: 12px; font-weight: 600; color: var(--primary-text); background: var(--primary-soft); padding: 3px 10px; border-radius: 999px; text-decoration: none !important; }
.meta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; color: var(--muted); font-size: 13.5px; margin: 0; }
.meta span, p.meta { display: inline-flex; align-items: center; gap: 5px; }
.meta .icon { width: 15px; height: 15px; }
.card-body .meta { flex-wrap: nowrap; align-items: flex-start; gap: 5px; }
.card-body .meta .icon { margin-top: 3px; }
.card-desc { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty-icon { width: 56px; height: 56px; stroke-width: 1.4; color: var(--primary-text); opacity: .6; margin: 0 auto 14px; }
.empty h3 { color: var(--text); font-size: 18px; }
.empty .btn { margin-top: 12px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pagination a { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; }
.pagination a.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* ---------- Halaman tour ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; margin-bottom: 18px; }
.back-link.center { display: flex; justify-content: center; margin: 20px 0 0; }
.tour-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.tour-head h1 { font-size: clamp(22px, 3.5vw, 34px); margin: 10px 0 8px; }
.tour-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.tour-viewer { position: relative; width: 100%; aspect-ratio: 16/9; max-height: 78vh; background: #0b1117; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.tour-viewer iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tour-viewer:fullscreen { border-radius: 0; max-height: none; }
.tour-content { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; margin-top: 28px; }
.tour-content:has(> :only-child) { grid-template-columns: 1fr; }
.tour-desc, .related { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.tour-desc h2, .related h2 { font-size: 18px; }
.prose { color: var(--text-2); max-width: 72ch; }
.related { align-self: start; }
.related-item { display: flex; gap: 12px; align-items: center; padding: 10px; margin: 0 -10px; border-radius: 10px; color: var(--text); text-decoration: none !important; }
.related-item:hover { background: var(--hover); }
.related-item strong { display: block; font-size: 14.5px; }
.related-item small { color: var(--muted); }
.related-thumb { width: 64px; height: 48px; border-radius: 8px; overflow: hidden; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; flex-shrink: 0; }
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Gedung ---------- */
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: -8px 0 24px; }
.btn-hero { background: #fff; color: var(--secondary-dark); padding: 12px 18px; border-radius: 12px; font-size: 15px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.btn-hero-alt { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); box-shadow: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-hero-alt:hover { background: rgba(255,255,255,.2); }
.btn-hero.btn-hero-alt .icon { color: #fff; }
.btn-hero-alt .btn-hero-tag { background: rgba(255,255,255,.18); color: #fff; }
:root[data-theme=dark] .btn-hero-alt { background: rgba(255,255,255,.08); color: var(--text); }
:root[data-theme=dark] .btn-hero-alt .btn-hero-tag { color: var(--text); }
.btn-hero:hover { background: #F2F6F8; }
.btn-hero .icon { color: var(--primary); width: 20px; height: 20px; }
.btn-hero-tag { font-size: 11px; font-weight: 700; background: var(--primary-soft); color: var(--primary-dark); padding: 2px 8px; border-radius: 999px; }
:root[data-theme=dark] .btn-hero { background: var(--surface); color: var(--text); }
:root[data-theme=dark] .btn-hero-tag { color: var(--primary-text); }
.badge .icon { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
.rooms-section { margin-top: 36px; scroll-margin-top: 84px; }
.buildings-section { margin-top: 0; margin-bottom: 36px; }
.building-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.building-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); text-decoration: none !important; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.building-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.building-thumb { position: relative; aspect-ratio: 16/9; display: grid; place-items: center; background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: var(--on-secondary); }
.building-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.building-thumb > .icon { width: 44px; height: 44px; opacity: .6; stroke-width: 1.4; }
.building-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.building-body strong { font-size: 15.5px; line-height: 1.3; }
.building-body small { color: var(--muted); font-size: 13px; }
.building-cover { border-radius: var(--radius); overflow: hidden; aspect-ratio: 21/9; }
.building-cover img { width: 100%; height: 100%; object-fit: cover; }
.building-desc { margin-top: 20px; }

/* ---------- Detail gedung: peta, deskripsi, daftar ruangan ---------- */
.prose-full { max-width: none; }
.building-desc h2 { font-size: 18px; }
.map-section { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.map-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 16px 20px; }
.map-head h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0; }
.map-head h2 .icon { color: var(--primary-text); }
.map-head p { margin: 2px 0 0; font-size: 13px; font-variant-numeric: tabular-nums; }
.map-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.map-frame { position: relative; aspect-ratio: 21/9; min-height: 260px; max-height: 420px; width: 100%; background: var(--hover); border-top: 1px solid var(--border); }
.count-pill { font-size: 13px; font-weight: 700; vertical-align: middle; background: var(--primary-soft); color: var(--primary-text); padding: 2px 10px; border-radius: 999px; margin-left: 4px; }
.room-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.room-toolbar .room-filter { flex: 1; max-width: 460px; }
.room-count { margin: -2px 0 12px; font-size: 13px; color: var(--muted); }
.room-results .card h3 mark { background: rgba(var(--primary-rgb), .2); color: inherit; border-radius: 3px; padding: 0 1px; }
.room-results.is-list { grid-template-columns: 1fr; gap: 12px; }
.room-results.is-list .card { flex-direction: row; }
.room-results.is-list .card-thumb { width: 240px; aspect-ratio: auto; min-height: 150px; flex-shrink: 0; }
.room-results.is-list .card:hover { transform: none; }
.room-results.is-list .card-body { justify-content: center; padding: 16px 20px; }

/* Kurung z-index internal (Leaflet 400–1000, pelindung 1100, label 360°) di dalam komponennya
   agar tidak menembus header lengket & menu bawah saat halaman digulir. */
.tour-viewer, .map-frame, .map-editor, .card-thumb, .dir-thumb, .building-thumb, .search-thumb, .related-thumb, .mini-thumb, .finder-thumb { isolation: isolate; }

/* ---------- Pelindung interaksi iframe/peta ---------- */
.interact-guard { position: absolute; inset: 0; z-index: 1100; display: flex; align-items: flex-end; justify-content: center; padding: 16px;
  background: linear-gradient(to top, rgba(5,10,15,.45), rgba(5,10,15,0) 55%); cursor: pointer; }
.interact-start { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(10,16,22,.78); color: #fff; font: 600 14px var(--font); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.interact-start:hover, .interact-guard:hover .interact-start { background: var(--primary); color: var(--on-primary); }
.interact-start:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.interact-start .icon { width: 18px; height: 18px; }
.interact-lock { position: absolute; top: 10px; right: 10px; z-index: 1100; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border: 0; border-radius: 999px; cursor: pointer;
  background: rgba(10,16,22,.78); color: #fff; font: 600 13px var(--font); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.interact-lock:hover { background: var(--primary); color: var(--on-primary); }
.interact-lock .icon { width: 15px; height: 15px; }
.map-frame .interact-lock { top: auto; bottom: 26px; right: 10px; }
.map-canvas { position: absolute; inset: 0; }
.map-editor { height: 420px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--hover); z-index: 0; position: relative; }
.map-pick button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border: 0; background: #fff; color: #14232E; font: 600 13px var(--font); cursor: pointer; white-space: nowrap; }
.map-pick button:hover { background: #f1f5f8; }
.map-pick button.is-active { background: var(--primary); color: var(--on-primary); }
.map-editor.is-picking, .map-editor.is-picking .leaflet-interactive { cursor: crosshair !important; }
.map-editor-sm { height: 320px; margin-top: 8px; }
.line-swatch { width: 28px; height: 6px; border-radius: 3px; flex-shrink: 0; }
.map-fallback { padding: 20px; color: var(--muted); font-size: 14px; }
.polygon-status { margin-top: 8px; }
.leaflet-container { font: 13px var(--font); }
.leaflet-tooltip.map-label { background: rgba(255,255,255,.92); border: 0; box-shadow: 0 2px 8px rgba(0,0,0,.2); font-weight: 700; color: #14232E; }
.leaflet-tooltip.map-label::before { display: none; }
.map-arrow { background: none; border: 0; pointer-events: none; }
.map-arrow svg { display: block; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }

/* ---------- Viewer layar penuh (Tour Global + pencarian) ---------- */
.viewer-page { background: #05080B; overflow: hidden; }
.viewer-shell { position: fixed; inset: 0; background: #05080B; }
.viewer-shell iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.viewer-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 10px; pointer-events: none;
  padding: calc(12px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-right, 0px)) 12px calc(12px + env(safe-area-inset-left, 0px)); }
.viewer-bar > * { pointer-events: auto; }
.viewer-btn, .viewer-title { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(10,16,22,.62); color: #fff; font: 600 14px var(--font); text-decoration: none !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); cursor: pointer; white-space: nowrap; }
.viewer-btn:hover, .viewer-title:hover { background: rgba(10,16,22,.82); }
.viewer-btn-primary { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.viewer-btn-primary:hover { background: var(--primary-dark); }
.viewer-btn-vr.is-active { background: #fff; color: #0B1117; border-color: #fff; }
.vr-on .viewer-title-icon { background: var(--primary); }
.finder-badge-vr { background: var(--secondary); color: var(--on-secondary); }
.viewer-title { min-width: 0; max-width: 460px; padding-left: 8px; text-align: left; }
.viewer-title-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.14); flex-shrink: 0; }
.viewer-title-icon .icon { width: 16px; height: 16px; }
.viewer-title-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.viewer-title-text strong, .viewer-title-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-title-text small { font-weight: 500; font-size: 11.5px; opacity: .72; }
.viewer-title-text small:empty { display: none; }
.viewer-actions { display: flex; gap: 8px; }
.viewer-loading { position: absolute; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 4; display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px; border-radius: 999px; background: rgba(10,16,22,.72); color: #fff; font-size: 13.5px; font-weight: 600; backdrop-filter: blur(8px); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .7s linear infinite; flex-shrink: 0; }
.spinner-sm { width: 14px; height: 14px; border-color: var(--border); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Panel peta viewer: kanan ±1/3 layar (desktop), bawah (HP) */
.viewer-shell { --vmap-w: clamp(300px, 33vw, 560px); --vmap-h: max(220px, 40vh); }
.viewer-map { position: absolute; top: 0; right: 0; bottom: 0; width: var(--vmap-w); z-index: 6; display: flex; flex-direction: column;
  background: var(--surface); color: var(--text); border-left: 1px solid var(--border); box-shadow: -8px 0 30px rgba(0,0,0,.35); animation: slide-in .18s ease; }
.viewer-map[hidden] { display: none; }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.viewer-map-head { display: flex; align-items: center; gap: 6px; padding: calc(10px + env(safe-area-inset-top, 0px)) calc(10px + env(safe-area-inset-right, 0px)) 10px 14px; border-bottom: 1px solid var(--border); }
.viewer-map-head strong { flex: 1; display: inline-flex; align-items: center; gap: 8px; font-size: 14.5px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-map-head strong .icon { color: var(--primary); }
.viewer-map-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 34px; min-width: 34px; padding: 0 9px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; }
.viewer-map-btn:hover { background: var(--hover); color: var(--text); }
.viewer-map-btn.is-active { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.viewer-map-btn .icon { width: 16px; height: 16px; }
.viewer-map-canvas { position: relative; flex: 1; min-height: 0; background: var(--surface-2); }
.viewer-map-msg { display: flex; align-items: center; justify-content: center; gap: 8px; height: 100%; margin: 0; padding: 20px; text-align: center; color: var(--muted); font-size: 13.5px; }
.labels-off .leaflet-tooltip.map-label { display: none; }
.leaflet-tooltip.map-tip { font-weight: 600; }
.map-pulse { animation: map-pulse 1.6s ease-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes map-pulse { 0% { stroke-opacity: 1; stroke-width: 3; } 100% { stroke-opacity: .15; stroke-width: 10; } }
.viewer-shell.map-open iframe { width: calc(100% - var(--vmap-w)); right: auto; }
.viewer-shell.map-open .viewer-bar { right: var(--vmap-w); }
.viewer-shell.map-open .finder-panel { right: calc(var(--vmap-w) + 12px); }
.viewer-shell.map-open .viewer-loading { left: calc((100% - var(--vmap-w)) / 2); }
.viewer-btn.is-active { background: #fff; color: #0B1117; border-color: #fff; }
/* Embed: tanpa sudut aman perangkat (iframe di dalam halaman lain) */
.is-embed .viewer-bar { padding: 10px; }

.finder { position: absolute; inset: 0; z-index: 10; }
.finder-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); animation: fade .15s ease; }
.finder-panel { position: absolute; top: calc(66px + env(safe-area-inset-top, 0px)); right: calc(12px + env(safe-area-inset-right, 0px)); width: min(420px, calc(100% - 24px));
  max-height: calc(100% - 90px - env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.45); overflow: hidden; animation: pop .16s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.finder-head { display: flex; align-items: center; gap: 8px; padding: 12px; border-bottom: 1px solid var(--border); }
.finder-input { position: relative; flex: 1; display: flex; align-items: center; }
.finder-input > .icon { position: absolute; left: 12px; color: var(--muted); }
.finder-input input[type=search] { padding: 11px 36px 11px 38px; font-size: 16px; border-radius: 10px; }
.finder-input .spinner { position: absolute; right: 12px; }
.finder-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; flex-shrink: 0; }
.finder-close:hover { background: var(--hover); color: var(--text); }
.finder-current { display: flex; align-items: center; gap: 8px; padding: 9px 14px; font-size: 13px; background: var(--surface-2); border-bottom: 1px solid var(--border); min-width: 0; }
.finder-current strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-current a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; white-space: nowrap; }
.finder-current a .icon { width: 13px; height: 13px; }
.finder-now { color: var(--muted); white-space: nowrap; }
.finder-body.is-loading { opacity: .5; pointer-events: none; transition: opacity .15s .1s; }
.finder-body { overflow-y: auto; padding: 6px 8px 10px; overscroll-behavior: contain; }
.finder-label { margin: 10px 8px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.finder-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; }
.finder-item:hover, .finder-item.is-active { background: var(--hover); }
.finder-item.is-active { box-shadow: inset 0 0 0 2px rgba(var(--primary-rgb), .45); }
.finder-thumb { width: 52px; height: 40px; border-radius: 8px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.finder-thumb img { width: 100%; height: 100%; object-fit: cover; }
.finder-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.finder-text strong { font-size: 14.5px; }
.finder-text small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-text mark { background: rgba(var(--primary-rgb), .2); color: inherit; border-radius: 3px; padding: 0 1px; }
.finder-badge { font-size: 11px; font-weight: 700; color: var(--primary-text); background: var(--primary-soft); padding: 2px 8px; border-radius: 999px; }
.finder-item.is-current { background: var(--primary-soft); }
.finder-sub { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 8px; padding: 6px 9px; font: 600 12px var(--font); cursor: pointer; flex-shrink: 0; }
.finder-sub:hover { border-color: var(--primary); color: var(--primary-text); }
.finder-sub .icon { width: 14px; height: 14px; }
.finder-back { display: inline-flex; align-items: center; gap: 6px; margin: 6px 8px 0; border: 0; background: none; color: var(--primary-text); font: 600 13px var(--font); cursor: pointer; padding: 4px 0; }
.finder-back .icon { width: 15px; height: 15px; }
.finder-empty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.finder-foot { margin: 0; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.finder-foot kbd { font: 600 11px var(--font); border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; margin: 0 2px; background: var(--surface-2); }

/* ---------- Jelajahi Gedung & Ruangan (direktori) ---------- */
.dir-head h1 { font-size: clamp(24px, 3.4vw, 32px); margin-bottom: 4px; }
.dir-head p { margin: 0 0 18px; }
.dir-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.dir-toolbar select { width: auto; max-width: 220px; }
.dir-search { flex: 1; min-width: 200px; max-width: 360px; }
.dir-toolbar-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.segmented { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--hover); border: 1px solid var(--border); }
.segmented button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--muted); font: 600 14px var(--font); padding: 7px 12px; border-radius: 8px; cursor: pointer; white-space: nowrap; }
.segmented button span { font-size: 12px; font-weight: 600; background: var(--bg); color: var(--muted); padding: 0 7px; border-radius: 999px; }
.segmented button[aria-selected=true], .segmented button[aria-pressed=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented button:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .4); }
.segmented-icon button { padding: 7px 9px; }
.dir-nearby.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.dir-nearby:disabled { opacity: .6; cursor: progress; }
.dir-status { display: block; font-size: 13.5px; color: var(--text-2); background: var(--primary-soft); border-radius: 10px; padding: 9px 12px; margin: 0 0 14px; }
.dir-status .icon { width: 15px; height: 15px; color: var(--primary-text); vertical-align: -2px; margin-right: 4px; }
.dir-status .link-btn { margin-left: 8px; }
.dir-status .spinner { display: inline-block; vertical-align: -2px; margin-right: 6px; }
.dir-status.is-error { background: var(--warn-bg); color: var(--warn-text); }
.link-btn { border: 0; background: none; padding: 0; font: 600 13.5px var(--font); color: var(--primary-text); cursor: pointer; text-decoration: underline; }
.dist { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--primary-text); font-size: 13px; }
.dist b { font-weight: 700; }
.dist.is-unknown { color: var(--muted); font-style: italic; }
.dist.is-inside { background: var(--primary); color: var(--on-primary); padding: 1px 8px; border-radius: 999px; }

.dir-more { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 0 6px; }
.dir-count { margin: 0; font-size: 13px; color: var(--muted); }
.dir-more .btn { min-width: 200px; }
.dir-more.is-loading .btn { opacity: .6; pointer-events: none; }
.dir-more.is-loading .btn::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); border-top-color: var(--primary); animation: spin .7s linear infinite; }
.dir-sentinel { width: 100%; height: 1px; }

.dir-results.is-list { display: flex; flex-direction: column; gap: 10px; }
.dir-results.is-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.dir-item { display: flex; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; box-shadow: var(--shadow); min-width: 0; }
.dir-item[hidden] { display: none !important; }
.dir-thumb { position: relative; width: 120px; aspect-ratio: 4/3; border-radius: 9px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.dir-thumb-building { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: var(--on-secondary); }
.dir-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dir-thumb > .icon { width: 34px; height: 34px; opacity: .6; stroke-width: 1.5; }
.dir-thumb .badge-360 { top: 6px; right: 6px; left: auto; width: max-content; font-size: 10.5px; padding: 2px 7px; }
.dir-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.dir-body h3 { font-size: 16px; margin: 0; }
.dir-body h3 a { color: var(--text); }
.dir-body .meta { gap: 6px 12px; }
.dir-desc { margin: 0; color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dir-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.is-grid .dir-item { flex-direction: column; align-items: stretch; padding: 0; overflow: hidden; }
.is-grid .dir-thumb { width: 100%; aspect-ratio: 16/10; border-radius: 0; }
.is-grid .dir-body { padding: 12px 14px 0; }
.is-grid .dir-actions { justify-content: flex-start; padding: 10px 14px 14px; margin-top: auto; }

/* ---------- Halaman Cari ---------- */
.search-page .header-search { visibility: hidden; }
.search-page-wrap { max-width: 760px; padding-top: 20px; }
.search-box { position: sticky; top: 76px; z-index: 5; display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); padding: 0 14px; margin-bottom: 18px; }
.search-box > .icon { color: var(--muted); width: 20px; height: 20px; }
.search-box input[type=search] { border: 0; box-shadow: none; background: transparent; font-size: 17px; padding: 14px 10px; }
.search-box input[type=search]:focus { box-shadow: none; }
.search-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18); }
.search-label { margin: 18px 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.search-label span { margin-left: 4px; background: var(--hover); padding: 1px 7px; border-radius: 999px; }
.search-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.search-list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.search-item { display: flex; align-items: center; gap: 8px; padding-right: 10px; border-bottom: 1px solid var(--border); }
.search-item:last-child { border-bottom: 0; }
.search-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--text); text-decoration: none !important; }
a.search-item.search-link { padding-right: 12px; }
.search-link:hover { background: var(--hover); }
.search-thumb { width: 52px; height: 40px; border-radius: 8px; overflow: hidden; flex-shrink: 0; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); position: relative; }
.search-thumb-building { background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: var(--on-secondary); }
.search-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.search-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.35; }
.search-text strong { font-size: 15px; }
.search-text small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-text mark { background: rgba(var(--primary-rgb), .2); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-360 { flex-shrink: 0; font-size: 12px; font-weight: 700; color: var(--primary-text); background: var(--primary-soft); padding: 6px 10px; border-radius: 999px; text-decoration: none !important; }
.search-360:hover { background: var(--primary); color: var(--on-primary); }
.search-vr { background: var(--secondary); color: var(--on-secondary); }
.search-all { margin-top: 10px; }
.search-results.is-loading { opacity: .55; transition: opacity .15s .1s; }
.search-empty { padding: 36px 10px; }
.search-error { color: var(--danger); text-align: center; padding: 20px; }
.search-chips { margin-bottom: 0; }
.search-recent .chips { margin-bottom: 0; }
.search-recent .chip { cursor: pointer; font: inherit; font-size: 14px; }
.search-global { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; border-radius: var(--radius); background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: var(--on-secondary); text-decoration: none !important; }
.search-global > .icon:first-child { width: 26px; height: 26px; }
.search-global span { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.search-global small { opacity: .8; font-size: 13px; }

/* ---------- Halaman Peta kawasan ---------- */
.map-page main { display: flex; }
.map-page .site-footer { display: none; }
.map-shell { position: relative; flex: 1; height: calc(100vh - 68px); height: calc(100dvh - 68px); display: flex; isolation: isolate; }
.map-full { flex: 1; min-width: 0; background: var(--hover); }
.map-panel { width: 340px; flex-shrink: 0; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; z-index: 2; }
.map-panel-handle { display: none; }
.map-panel-body { padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.map-panel-body .input-icon { max-width: none; }
.map-group { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.map-item { display: flex; flex-direction: column; align-items: flex-start; width: 100%; text-align: left; border: 0; background: none; color: var(--text); cursor: pointer; border-radius: 8px; padding: 7px 8px; font: 14px var(--font); }
.map-item:hover, .map-item:focus-visible { background: var(--hover); }
.map-item small { color: var(--muted); font-size: 12.5px; }
.map-item-building strong { font-size: 15px; }
.map-item-room { padding-left: 22px; position: relative; }
.map-item-room::before { content: ''; position: absolute; left: 9px; top: 13px; width: 7px; height: 7px; border-radius: 50%; background: var(--secondary); }
.map-item-room.no-pin::before { background: transparent; border: 1.5px solid var(--muted); }
.map-legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.map-legend .search-label { margin: 4px 0 2px; }
.map-legend span { display: flex; align-items: center; gap: 8px; }
.map-legend i { width: 24px; height: 5px; border-radius: 3px; }
.map-locate { position: absolute; left: 12px; bottom: 16px; z-index: 500; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; border: 0; background: var(--surface); color: var(--text); font: 600 14px var(--font); box-shadow: var(--shadow-lg); cursor: pointer; }
.map-locate .icon { color: #2563EB; }
.map-labels-toggle { position: absolute; left: 12px; bottom: 64px; z-index: 500; display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; border: 0; background: var(--surface); color: var(--text); font: 600 13.5px var(--font); box-shadow: var(--shadow-lg); cursor: pointer; }
.map-labels-toggle.is-active { background: var(--primary); color: var(--on-primary); }
.map-toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); z-index: 600; margin: 0; background: rgba(10,16,22,.85); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; max-width: calc(100% - 24px); text-align: center; }
.map-pop { display: flex; flex-direction: column; gap: 2px; min-width: 180px; font: 13px var(--font); }
.map-pop img { width: 100%; height: 90px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.map-pop strong { font-size: 14.5px; }
.map-pop small { color: #5F7180; }
.map-pop-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.map-pop-actions .btn { padding: 6px 10px; font-size: 12.5px; }
.leaflet-popup-content .btn-primary { color: var(--on-primary); }
.leaflet-control-layers { font: 13px var(--font); }

/* ---------- Leads: popup formulir & viewer terkunci ---------- */
html.lead-locked, html.lead-locked body { overflow: hidden; }
.lead-gate { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 16px; }
.lead-gate[hidden] { display: none; }
.lead-backdrop { position: absolute; inset: 0; background: rgba(8,14,20,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lead-modal { position: relative; width: 100%; max-width: 480px; max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--surface); color: var(--text); border-radius: 18px; padding: 22px; box-shadow: 0 24px 70px rgba(0,0,0,.4); animation: pop .2s ease; }
.lead-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.lead-head h2 { font-size: 19px; margin: 2px 0 4px; }
.lead-head p { margin: 0; color: var(--muted); font-size: 14px; }
.lead-fields .field { margin-bottom: 14px; }
.lead-choices { border: 0; padding: 0; margin: 0; }
.lead-choices legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; padding: 0; }
.lead-choices .checkbox { display: flex; margin-top: 6px; }
.lead-consent { align-items: flex-start; font-size: 13.5px; }
.lead-consent input { margin-top: 3px; }
.lead-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.lead-back { display: block; text-align: center; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.lead-done { text-align: center; padding: 30px 10px; font-size: 16px; font-weight: 600; }
.tour-locked { display: grid; place-items: center; background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); color: var(--on-secondary); }
.locked-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 20px; }
.locked-inner > .icon { width: 40px; height: 40px; opacity: .8; }
.locked-inner strong { font-size: 18px; }
.locked-inner span { opacity: .85; font-size: 14px; }
.locked-inner .btn { margin-top: 6px; }

/* ---------- Form builder ---------- */
.builder-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.builder-side { position: sticky; top: 84px; }
.builder-head { display: flex; justify-content: space-between; align-items: baseline; }
.builder-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.builder-card { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.builder-card-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.builder-card-head select { width: auto; flex: 1; max-width: 280px; padding: 7px 9px; }
.builder-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); font-weight: 700; font-size: 12px; flex-shrink: 0; }
.builder-tools { display: flex; gap: 2px; margin-left: auto; }
.builder-tools .btn { width: 32px; height: 32px; padding: 0; font-size: 15px; }
.builder-card-body { padding: 10px 12px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.builder-input { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.builder-input:first-child { grid-column: 1 / -1; }
.builder-input textarea, .builder-input input { font-weight: 400; }
.builder-req { grid-column: 1 / -1; font-size: 13px; }
.builder-empty { color: var(--muted); padding: 12px; text-align: center; border: 1px dashed var(--border); border-radius: 10px; }
.builder-add { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.builder-add .hint { margin: 0 4px 0 0; }
.builder-preview .panel-title { display: flex; align-items: center; gap: 6px; }
.lead-modal-preview { max-width: none; box-shadow: none; border: 1px solid var(--border); animation: none; max-height: none; padding: 18px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--secondary-dark); color: var(--on-secondary); padding: 24px 0; font-size: 14px; }
.site-footer .footer-inner { opacity: .85; text-align: center; }

/* ---------- Menu bawah (mobile, ala aplikasi) ---------- */
.bottom-nav { display: none; }
.sheet { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); animation: fade .2s ease; }
.sheet-panel { position: absolute; left: 0; right: 0; bottom: 0; max-height: 75vh; overflow-y: auto; background: var(--surface); border-radius: 20px 20px 0 0; padding: 8px 16px calc(20px + var(--safe-b)); box-shadow: var(--shadow-lg); animation: slide-up .25s ease; }
.sheet-handle { width: 40px; height: 4px; border-radius: 4px; background: var(--border); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.sheet-head h2 { font-size: 17px; margin: 0; }
.sheet-list a { display: flex; align-items: center; gap: 12px; padding: 13px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-weight: 500; }
.sheet-list a:hover, .sheet-list a:active { background: var(--hover); }
.sheet-list a .icon { color: var(--primary-text); }
.sheet-list a span { flex: 1; }
.sheet-list small { color: var(--muted); background: var(--bg); padding: 1px 9px; border-radius: 999px; font-size: 12px; }
.sheet-empty { padding: 10px; }
.sheet-label { margin: 14px 10px 4px; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sheet-list a.sheet-highlight { background: var(--primary-soft); color: var(--primary-text); margin-bottom: 4px; }
.sheet-list a.sheet-highlight small { background: var(--primary); color: var(--on-primary); }
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Alert ---------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14.5px; border: 1px solid; }
.alert-success { background: var(--ok-bg); border-color: var(--ok-border); color: var(--ok-text); }
.alert-error { background: var(--err-bg); border-color: var(--err-border); color: var(--err-text); }
.alert-warning { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }

/* ---------- Form ---------- */
.form .field { margin-bottom: 18px; }
.field label:not(.btn):not(.checkbox):not(.radio-card):not(.switch) { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.req { color: var(--danger); }
.field label .icon { width: 17px; height: 17px; vertical-align: -3px; margin-right: 2px; }

input[type=text], input[type=password], input[type=email], input[type=search], input[type=url], input[type=number], input[type=tel], input[type=date], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; color: var(--text); background: var(--input-bg); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .18); outline: none; }
input:disabled { background: var(--bg); color: var(--muted); }
textarea { resize: vertical; min-height: 44px; }
.has-error input, .has-error textarea, .has-error select { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 13px; margin: 6px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin-top: 10px; cursor: pointer; }
.checkbox input { accent-color: var(--primary); }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 14px; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui { width: 42px; height: 24px; border-radius: 999px; background: var(--switch-off); position: relative; transition: background .2s; flex-shrink: 0; }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .switch-ui { background: var(--primary); }
.switch input:checked + .switch-ui::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid rgba(var(--primary-rgb), .35); }
.switch.is-disabled { opacity: .55; cursor: not-allowed; }
.panel-sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.radio-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.radio-cards.cols-3 { grid-template-columns: repeat(3, 1fr); }
.field-sub { margin: 14px 0 6px; font-size: .85rem; font-weight: 600; color: var(--text-2, inherit); }
.radio-card strong .icon { width: 15px; height: 15px; vertical-align: -2px; margin-right: 2px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card input { margin-top: 4px; accent-color: var(--primary); }
.radio-card strong { display: block; font-size: 14px; }
.radio-card small { color: var(--muted); font-size: 12.5px; line-height: 1.4; display: block; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.form-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 20px; }
.form-actions.inline { flex-direction: row; }

/* ---------- Login ---------- */
.login-page { background: radial-gradient(900px 500px at 100% 0%, rgba(var(--primary-rgb), .35), transparent 60%), linear-gradient(135deg, var(--secondary), var(--secondary-dark)); }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; position: relative; }
.login-theme { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; color: var(--on-secondary); }
.login-theme:hover { background: rgba(255,255,255,.12); }
.login-card { width: 100%; max-width: 400px; background: var(--surface); border-radius: 16px; padding: 32px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo { max-height: 72px; width: auto; margin: 0 auto; }
.login-brand h1 { font-size: 21px; margin: 14px 0 4px; }
.login-brand p { color: var(--muted); margin: 0; font-size: 14px; }
.login-foot { color: var(--on-secondary); opacity: .7; font-size: 13px; text-align: center; margin-top: 20px; }
.captcha-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.captcha-img { border-radius: 8px; border: 1px solid var(--border); background: #F4F8FA; }
.captcha-remote { display: flex; justify-content: center; }

/* ---------- Admin ---------- */
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; flex-shrink: 0; background: var(--secondary); color: var(--on-secondary); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
.sidebar .brand { padding: 4px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.1); margin-bottom: 14px; }
.sidebar .brand-logo { height: 36px; }
.sidebar .brand-name { font-size: 15px; white-space: normal; line-height: 1.3; }
.sidebar .brand, .side-foot { flex-shrink: 0; }
/* Hanya daftar menu yang bergulir; logo & bagian bawah tetap. Scrollbar bawaan disembunyikan, diganti scrollbar kustom. */
.side-scroll { position: relative; flex: 1; min-height: 0; margin: 0 -14px; }
.side-nav { display: flex; flex-direction: column; gap: 4px; height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 2px 14px 8px; scrollbar-width: none; -ms-overflow-style: none; }
.side-nav::-webkit-scrollbar { display: none; }
.side-scroll::before, .side-scroll::after { content: ''; position: absolute; left: 0; right: 0; height: 18px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1; }
.side-scroll::before { top: 0; background: linear-gradient(var(--secondary), transparent); }
.side-scroll::after { bottom: 0; background: linear-gradient(transparent, var(--secondary)); }
.side-scroll.can-up::before, .side-scroll.can-down::after { opacity: 1; }
.side-scrollbar { position: absolute; top: 4px; bottom: 4px; right: 3px; width: 8px; z-index: 2; opacity: 0; transition: opacity .25s; }
.side-scrollbar[hidden] { display: none; }
.side-scroll:hover .side-scrollbar, .side-scroll.is-scrolling .side-scrollbar, .side-scrollbar.is-dragging { opacity: 1; }
.side-thumb { position: absolute; left: 2px; right: 2px; top: 0; min-height: 28px; border-radius: 999px; background: rgba(255,255,255,.28); cursor: grab; transition: background .15s, left .15s, right .15s; touch-action: none; }
.side-scrollbar:hover .side-thumb, .side-scrollbar.is-dragging .side-thumb { background: rgba(255,255,255,.5); left: 0; right: 0; }
.side-scrollbar.is-dragging .side-thumb { cursor: grabbing; }
.side-nav a, .side-foot a, .side-foot button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: inherit; opacity: .8; font: 500 14.5px var(--font); text-decoration: none; background: none; border: 0; width: 100%; cursor: pointer; text-align: left; }
.side-nav a:hover, .side-foot a:hover, .side-foot button:hover { background: rgba(255,255,255,.08); opacity: 1; }
.side-nav a.active { background: var(--primary); color: var(--on-primary); opacity: 1; }
.side-foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.admin-topbar h1 { font-size: 19px; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-topbar .icon-btn { color: var(--muted); }
.menu-toggle { display: none; }
.whoami { display: flex; align-items: center; gap: 10px; }
.whoami-text { display: flex; flex-direction: column; line-height: 1.25; }
.whoami-text strong { font-size: 14px; }
.whoami-text small { font-size: 12px; color: var(--muted); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.admin-content { padding: 24px 28px 40px; flex: 1; }
.admin-footer { padding: 16px 28px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.sidebar-backdrop { display: none; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; flex-shrink: 0; }
.stat-icon .icon { width: 22px; height: 22px; }
.stat strong { display: block; font-size: 22px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 13px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.panel-head p { margin: 0; max-width: 600px; font-size: 14px; }
.panel-title { font-size: 15px; margin: 4px 0 12px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.toolbar select { width: auto; }
.input-icon { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.input-icon .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.input-icon input[type=search] { padding-left: 36px; }

.table-wrap { overflow-x: auto; margin: 0 -22px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table tbody tr:hover, .table tr.is-editing { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; }
.cell-tour { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.cell-tour strong { display: block; }
.cell-tour small, .cell-sub { color: var(--muted); font-size: 13px; display: block; }
.mini-thumb { width: 56px; height: 40px; border-radius: 6px; overflow: hidden; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; flex-shrink: 0; }
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-green { background: var(--pill-green-bg); color: var(--pill-green); }
.pill-gray { background: var(--pill-gray-bg); color: var(--pill-gray); }
.pill-red { background: var(--pill-red-bg); color: var(--pill-red); }
.pill-primary { background: var(--primary-soft); color: var(--primary-text); }

.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.split-side { position: sticky; top: 84px; scroll-margin-top: 84px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.form-grid .panel { margin-bottom: 20px; }
.form-side { position: sticky; top: 84px; }
.form-narrow { max-width: 720px; }
.tour-preview { margin-top: 12px; aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: #0b1117; }
.tour-preview iframe { width: 100%; height: 100%; border: 0; }
.image-drop { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.image-drop img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

.settings-section header { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; }
.settings-section header h2 { font-size: 17px; margin: 0 0 2px; }
.settings-section header p { margin: 0; color: var(--muted); font-size: 14px; }
.section-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; flex-shrink: 0; }
.upload-box { display: flex; gap: 16px; align-items: flex-start; }
.upload-preview { flex-shrink: 0; border: 1px dashed var(--border); border-radius: 10px; display: grid; place-items: center; background: repeating-conic-gradient(var(--checker) 0 25%, var(--surface) 0 50%) 0 0/16px 16px; color: var(--muted); }
.logo-preview { width: 160px; height: 80px; padding: 8px; }
.logo-preview img { max-height: 100%; width: auto; object-fit: contain; }
.favicon-preview { width: 80px; height: 80px; }
.favicon-preview img { width: 48px; height: 48px; object-fit: contain; }
.color-field { display: flex; gap: 10px; align-items: center; }
.color-field input[type=color] { width: 48px; height: 42px; padding: 3px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); cursor: pointer; flex-shrink: 0; }
.color-field input[data-color-text] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; text-transform: uppercase; max-width: 140px; }
.swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.swatches .hint { margin: 0 4px 0 0; }
.swatch { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; padding: 0; cursor: pointer; background: none; }
.swatch span { width: 20px; height: 26px; }
.swatch:hover { box-shadow: 0 0 0 2px var(--border); }
.theme-preview { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; max-width: 460px; }
.tp-header { background: var(--tp-secondary, var(--secondary)); color: var(--tp-on-secondary, var(--on-secondary)); padding: 12px 16px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.tp-dot { width: 18px; height: 18px; border-radius: 5px; background: var(--tp-primary, var(--primary)); }
.tp-body { padding: 16px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: #fff; }
.tp-btn { background: var(--tp-primary, var(--primary)); color: var(--tp-on-primary, var(--on-primary)); padding: 8px 14px; border-radius: 8px; font-weight: 600; font-size: 13px; }
.tp-badge { background: var(--tp-primary-soft, var(--primary-soft)); color: var(--tp-primary, var(--primary)); padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tp-link { color: var(--tp-primary, var(--primary)); font-weight: 600; font-size: 14px; text-decoration: underline; }
.captcha-keys { margin-top: 6px; padding: 14px 16px 2px; background: var(--bg); border-radius: 10px; }
.captcha-keys .hint { margin: 0 0 12px; }
.sticky-actions { position: sticky; bottom: 0; padding: 14px 0; background: linear-gradient(transparent, var(--bg) 30%); display: flex; justify-content: flex-end; z-index: 5; }

/* ---------- Halaman pembaruan ---------- */
.update-log { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.update-log li { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.update-log li .icon { margin-top: 2px; }
.update-log .ok .icon { color: var(--pill-green); }
.update-log .bad { background: var(--err-bg); border-color: var(--err-border); color: var(--err-text); }
.update-log .pending .icon { color: var(--primary-text); }

/* ---------- Laporan & analitik ---------- */
.viz-root {
  --viz-surface: var(--surface);
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --series-4: #eda100; --series-5: #e87ba4;
  --viz-grid: #e1e0d9; --viz-axis: #c3c2b7; --viz-tick: #898781; --viz-muted-line: #b3b1a9;
  --hm-0: var(--surface-2); --hm-1: #b7d3f6; --hm-2: #86b6ef; --hm-3: #5598e7; --hm-4: #2a78d6; --hm-5: #1c5cab; --hm-6: #104281;
  --delta-good: #006300; --delta-bad: #d03b3b; --status-good: #0ca30c; --status-warn: #c98500;
}
:root[data-theme=dark] .viz-root {
  --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --series-4: #c98500; --series-5: #d55181;
  --viz-grid: #2a343e; --viz-axis: #3a4652; --viz-muted-line: #5d6a76;
  --hm-1: #104281; --hm-2: #1c5cab; --hm-3: #2a78d6; --hm-4: #5598e7; --hm-5: #86b6ef; --hm-6: #b7d3f6;
  --delta-good: #0ca30c; --delta-bad: #e66767; --status-warn: #fab219;
}
.an-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.seg-link { display: inline-flex; align-items: center; padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none !important; white-space: nowrap; }
.seg-link[aria-current=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.an-period { font-size: 13px; }
.an-export { position: relative; margin-left: auto; }
.an-export summary { list-style: none; cursor: pointer; }
.an-export summary::-webkit-details-marker { display: none; }
.an-export-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; display: flex; flex-direction: column; }
.an-export-menu a { padding: 8px 10px; border-radius: 6px; color: var(--text); font-size: 14px; text-decoration: none; }
.an-export-menu a:hover { background: var(--hover); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 14px 10px; display: flex; flex-direction: column; gap: 4px; overflow: hidden; }
.kpi-top { display: flex; align-items: center; gap: 8px; }
.kpi-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--primary-soft); color: var(--primary-text); }
.kpi-icon .icon { width: 16px; height: 16px; }
.kpi-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi-value { font-size: 28px; font-weight: 700; line-height: 1.15; }
.kpi-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 18px; font-size: 12.5px; }
.kpi-delta { font-weight: 700; }
.kpi-delta.is-good { color: var(--delta-good); }
.kpi-delta.is-bad { color: var(--delta-bad); }
.kpi-delta.is-flat { color: var(--muted); }
.kpi-note { color: var(--muted); }
.kpi-spark { width: 100%; height: 28px; margin-top: 4px; }

.an-card { padding: 18px 20px; }
.an-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.an-head h2 { font-size: 16px; margin: 0; }
.an-head p { margin: 2px 0 0; font-size: 13px; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.an-grid-3 { grid-template-columns: repeat(3, 1fr); }
.an-grid > .panel { margin-bottom: 16px; }

.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.viz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.key-line { display: inline-block; width: 14px; height: 2px; border-radius: 2px; }
.key-rect { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.viz-plot { position: relative; }
.line-chart { width: 100%; height: auto; display: block; overflow: visible; cursor: crosshair; }
.line-chart:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .4); border-radius: 6px; }
.viz-grid { stroke: var(--viz-grid); stroke-width: 1; vector-effect: non-scaling-stroke; }
.viz-axis { stroke: var(--viz-axis); stroke-width: 1; vector-effect: non-scaling-stroke; }
.viz-tick { fill: var(--viz-tick); font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-crosshair { stroke: var(--viz-axis); stroke-width: 1; vector-effect: non-scaling-stroke; }
.viz-tooltip { position: absolute; top: 8px; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: 12.5px; min-width: 150px; }
.tt-head { color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.tt-row { display: flex; align-items: center; gap: 8px; }
.tt-row strong { font-size: 14px; min-width: 32px; }
.tt-row span { color: var(--muted); }
.viz-table { margin-top: 10px; font-size: 13px; }
.viz-table summary { cursor: pointer; color: var(--primary-text); font-weight: 600; font-size: 13px; }
.table-scroll { overflow-x: auto; max-height: 320px; margin-top: 8px; }
.viz-table .table td, .viz-table .table th { padding: 6px 10px !important; }
.viz-empty { color: var(--muted); font-size: 14px; margin: 6px 0; }

.bar-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bar-list li { display: flex; gap: 10px; align-items: flex-start; }
.bar-rank { width: 20px; flex-shrink: 0; color: var(--muted); font-size: 12px; font-weight: 700; text-align: right; padding-top: 1px; font-variant-numeric: tabular-nums; }
.bar-main { flex: 1; min-width: 0; }
.bar-label { font-size: 14px; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-label a { color: var(--text); }
.bar-label small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.bar-track { display: flex; align-items: center; gap: 8px; }
.bar-fill { height: 12px; min-width: 3px; background: var(--series-1); border-radius: 0 4px 4px 0; }
.bar-value { font-size: 13px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }

.share-bar { display: flex; gap: 2px; height: 20px; border-radius: 4px; overflow: hidden; margin: 6px 0 12px; }
.share-seg { min-width: 4px; }
.share-legend { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.share-legend li { display: flex; align-items: center; gap: 8px; }

.heatmap { overflow-x: auto; padding-top: 4px; }
.hm-row { display: grid; grid-template-columns: 36px repeat(24, minmax(14px, 1fr)); gap: 2px; margin-bottom: 2px; min-width: 460px; }
.hm-head span { font-size: 10.5px; color: var(--viz-tick); text-align: left; font-variant-numeric: tabular-nums; }
.hm-day { font-size: 12px; color: var(--muted); align-self: center; }
.hm-cell { height: 20px; border-radius: 3px; background: var(--hm-0); outline: none; }
.hm-cell:hover, .hm-cell:focus-visible { box-shadow: 0 0 0 2px var(--text); }
.hm-cell.s1 { background: var(--hm-1); } .hm-cell.s2 { background: var(--hm-2); } .hm-cell.s3 { background: var(--hm-3); }
.hm-cell.s4 { background: var(--hm-4); } .hm-cell.s5 { background: var(--hm-5); } .hm-cell.s6 { background: var(--hm-6); }
.hm-scale { display: flex; align-items: center; gap: 3px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.hm-scale i.hm-cell { display: inline-block; width: 18px; height: 12px; }
.hm-scale span { margin: 0 4px; }
.hm-tip { top: 0; white-space: nowrap; min-width: 0; }

.status-good, .status-warn { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.status-good .icon { color: var(--status-good); width: 15px; height: 15px; }
.status-warn .icon { color: var(--status-warn); width: 15px; height: 15px; }
.zero-list, .health-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.zero-list li, .health-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; flex-wrap: wrap; }
.zero-list li:last-child, .health-list li:last-child { border-bottom: 0; }
.zero-q { font-weight: 700; }
.zero-list .btn { margin-left: auto; }
.health-list li > span:nth-child(2) { flex: 1; min-width: 180px; }
.health-list .status-good, .health-list .status-warn { width: 118px; }
.health-list li.is-ok { color: var(--muted); }
.an-unseen { margin: 12px 0 0; font-size: 13.5px; }
.an-privacy { display: flex; gap: 6px; align-items: flex-start; }
.an-privacy .icon { width: 15px; height: 15px; flex-shrink: 0; margin-top: 2px; }
.an-reset { margin-top: 6px; }

/* ---------- Role & izin ---------- */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.role-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; background: var(--surface-2); }
.role-card header { display: flex; gap: 12px; align-items: center; }
.role-card h3 { font-size: 16px; margin: 0; }
.role-card header p { margin: 0; font-size: 13px; }
.role-desc { margin: 0; font-size: 14px; color: var(--text-2); }
.role-perms { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.perm-group strong { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.perm-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; margin: 0 4px 4px 0; font-size: 12.5px; }
.perm-chip.is-all { background: var(--primary-soft); color: var(--primary-text); border-color: transparent; font-weight: 600; }
.perm-chip .icon { width: 14px; height: 14px; }
.role-card footer { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; border-top: 1px solid var(--border); }
.role-card footer form { display: inline; }
.perm-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.perm-presets .hint { margin: 0 4px 0 0; }
.perm-fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 8px 16px 12px; margin: 0 0 14px; }
.perm-fieldset legend { font-weight: 700; font-size: 14px; padding: 0 6px; display: flex; gap: 10px; align-items: center; }
.perm-check { display: flex; align-items: flex-start; gap: 10px; margin-top: 8px; }
.perm-check input { margin-top: 4px; }
.perm-check small { display: block; color: var(--muted); font-size: 11.5px; font-family: ui-monospace, Menlo, monospace; }
.perm-check.is-disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Tabel data (ala DataTables) ---------- */
.dt-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.dt-size { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.dt-size select { width: auto; padding: 6px 8px; }
.dt-search { flex: 1; min-width: 180px; max-width: 320px; margin-left: auto; }
.dt-search input[type=search] { padding-top: 8px; padding-bottom: 8px; }
.dt-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.dt-info { margin: 0; font-size: 13px; color: var(--muted); }
.dt-pages { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.dt-pages button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.dt-pages button[aria-current=page] { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.dt-pages button:disabled { opacity: .45; cursor: default; }
.dt-pages span { color: var(--muted); padding: 0 2px; }
.table th.dt-sortable { cursor: pointer; user-select: none; }
.table th.dt-sortable::after { content: '↕'; opacity: .35; margin-left: 5px; font-size: 11px; }
.table th[aria-sort=ascending]::after { content: '▲'; opacity: .9; }
.table th[aria-sort=descending]::after { content: '▼'; opacity: .9; }
.table th.dt-sortable:hover { color: var(--text); }
.table th.dt-sortable:focus-visible { outline: 2px solid rgba(var(--primary-rgb), .5); outline-offset: -2px; }
.table.dt-locked .drag-handle { visibility: hidden; }
.dt-lock-note { font-size: 13px; color: var(--warn-text); background: var(--warn-bg); border-radius: 8px; padding: 7px 10px; margin: -4px 0 10px; }

/* ---------- Urutan drag & drop ---------- */
.sort-hint { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin: -4px 0 12px; }
.sort-hint .icon { width: 16px; height: 16px; flex-shrink: 0; }
.drag-handle { display: inline-grid; place-items: center; width: 28px; height: 36px; margin-left: -6px; flex-shrink: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: grab; touch-action: none; }
.drag-handle:hover, .drag-handle:focus-visible { background: var(--hover); color: var(--text); }
.drag-handle:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .4); }
.drag-handle .icon { width: 18px; height: 18px; fill: currentColor; }
tbody.is-sorting, tbody.is-sorting * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.table tr.dragging, .table tr.dragging:hover { background: var(--surface); box-shadow: var(--shadow-lg), 0 0 0 2px var(--primary); position: relative; z-index: 3; }
.table tr.dragging td { border-bottom-color: transparent; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; z-index: 90; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; pointer-events: none; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-error { background: var(--danger); color: #fff; }

/* ---------- Responsif ---------- */
@media (max-width: 960px) {
  .tour-content, .form-grid, .split { grid-template-columns: 1fr; }
  .builder-grid { grid-template-columns: 1fr; }
  .builder-side { position: static; }
  .an-grid-3 { grid-template-columns: 1fr 1fr; }
  .form-side, .split-side { position: static; }
  .radio-cards.cols-3 { grid-template-columns: 1fr 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 70; transform: translateX(-100%); transition: transform .25s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar.open + .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 65; }
  .menu-toggle { display: inline-flex; }
}

@media (max-width: 720px) {
  .viewer-map { top: auto; left: 0; width: auto; height: var(--vmap-h); border-left: 0; border-top: 1px solid var(--border); box-shadow: 0 -8px 30px rgba(0,0,0,.35); border-radius: 16px 16px 0 0; overflow: hidden; animation-name: slide-up; }
  .viewer-map-head { padding: 8px 10px 8px 14px; }
  .viewer-map-canvas { padding-bottom: env(safe-area-inset-bottom, 0px); }
  .viewer-shell.map-open iframe { width: 100%; height: calc(100% - var(--vmap-h) + 14px); bottom: auto; }
  .viewer-shell.map-open .viewer-bar { right: 0; }
  .viewer-shell.map-open .finder-panel { right: calc(12px + env(safe-area-inset-right, 0px)); }
  .viewer-shell.map-open .viewer-loading { left: 50%; bottom: calc(var(--vmap-h) + 12px); }
  /* Menu bawah ala aplikasi */
  body.public, body.admin { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: var(--nav-bg); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-top: 1px solid var(--border); }
  .bottom-nav a, .bottom-nav button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; border: 0; background: none; padding: 6px 2px;
    color: var(--muted); font: 600 11px/1.1 var(--font); text-decoration: none; cursor: pointer; position: relative; }
  .bottom-nav .icon { width: 22px; height: 22px; }
  .bottom-nav .when-light, .bottom-nav .when-dark { display: contents; }
  :root[data-theme=dark] .bottom-nav .when-light, :root:not([data-theme=dark]) .bottom-nav .when-dark { display: none; }
  .bottom-nav a.active { color: var(--primary-text); }
  .bottom-nav a.active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--primary); }
  .bottom-nav a:active, .bottom-nav button:active { transform: scale(.94); }
  .bottom-nav a.fab .icon { width: 26px; height: 26px; padding: 10px; box-sizing: content-box; border-radius: 16px; background: var(--primary); color: var(--on-primary); margin-top: -26px; box-shadow: 0 6px 16px rgba(var(--primary-rgb), .45); }
  .bottom-nav a.fab.active::before { display: none; }
  .site-footer { padding: 18px 0; font-size: 13px; }

  .container, .section { padding-left: 16px; padding-right: 16px; }
  .section { padding-top: 24px; padding-bottom: 32px; }
  .header-inner { height: 58px; gap: 10px; }
  .header-search, .header-nav .btn { display: none; }
  .header-nav { margin-left: auto; }
  .brand-name { font-size: 15.5px; }
  .brand-logo { height: 36px; }
  .brand-mark { width: 36px; height: 36px; }
  .hero { padding: 28px 0 32px; }
  .hero-eyebrow { margin-bottom: 10px; }
  .hero-sub { font-size: 15px; margin-bottom: 20px; }
  .hero-search { flex-direction: column; gap: 6px; padding: 6px; }
  .hero-search select { border-left: 0; border-top: 1px solid var(--border); padding: 12px; max-width: none; width: 100%; }
  .hero-search-input input[type=search] { min-height: 46px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 20px; padding: 0 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .grid { grid-template-columns: 1fr; gap: 14px; }
  .card { flex-direction: row; }
  .lead-gate { place-items: end center; padding: 0; }
  .lead-modal { border-radius: 18px 18px 0 0; max-height: 92dvh; padding: 18px 16px calc(18px + var(--safe-b)); }
  .builder-card-body { grid-template-columns: 1fr; }
  .header-nav .btn.btn-dash { display: inline-flex; padding: 7px 9px; }
  .header-nav .btn-dash span { display: none; }
  .map-shell { height: calc(100vh - 58px - var(--nav-h) - var(--safe-b)); height: calc(100dvh - 58px - var(--nav-h) - var(--safe-b)); }
  .map-page.public { padding-bottom: calc(var(--nav-h) + var(--safe-b)); }
  .map-panel { position: absolute; left: 0; right: 0; bottom: 0; width: auto; max-height: 70%; border-left: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.18); transform: translateY(calc(100% - 52px)); transition: transform .25s; z-index: 700; }
  .map-panel.is-open { transform: none; }
  .map-panel-handle { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 8px 0 10px; border: 0; background: none; color: var(--text); font: 600 14px var(--font); cursor: pointer; }
  .map-panel-handle span { width: 40px; height: 4px; border-radius: 4px; background: var(--border); }
  .map-locate { bottom: 64px; }
  .map-labels-toggle { bottom: 112px; }
  .dt-search { max-width: none; margin-left: 0; flex-basis: 100%; order: -1; }
  .dt-bottom { justify-content: center; }
  .an-grid, .an-grid-3 { grid-template-columns: 1fr; gap: 0; }
  /* teks SVG ikut mengecil bersama viewBox: perbesar dalam satuan viewBox agar tetap ±11px di layar */
  .line-chart .viz-tick { font-size: 22px; }
  .line-chart circle { r: 6; }
  .kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi-value { font-size: 24px; }
  .an-export { margin-left: 0; }
  .an-card { padding: 14px; }
  .map-head { padding: 14px 16px; }
  .map-actions { width: 100%; }
  .map-actions .btn { flex: 1; }
  .map-frame { aspect-ratio: 4/3; min-height: 0; }
  .map-editor { height: 340px; }
  .map-editor-sm { height: 280px; }
  .map-pick button span { display: none; }
  .interact-start { font-size: 13px; padding: 10px 14px; }
  .room-toolbar .room-filter { max-width: none; }
  .room-results.is-list .card-thumb { width: 38%; max-width: 150px; min-height: 120px; }
  .room-results.is-list .card-body { padding: 12px 14px; }
  .room-results.is-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .room-results.is-grid .card { flex-direction: column; }
  .room-results.is-grid .card-thumb { width: 100%; max-width: none; min-height: 0; aspect-ratio: 16/10; }
  .room-results.is-grid .card-body { padding: 10px 12px 12px; }
  .room-results.is-grid .card-body h3 { font-size: 14.5px; }
  .room-results.is-grid .card-desc { display: none; }
  .search-page-wrap { padding-top: 12px; }
  .search-box { top: 66px; }
  .search-page .chips { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .dir-toolbar { gap: 8px; }
  .dir-toolbar .segmented[role=tablist] { flex: 1; }
  .dir-toolbar .segmented[role=tablist] button { flex: 1; justify-content: center; }
  .dir-search { flex-basis: 100%; max-width: none; order: 3; }
  .dir-toolbar select { flex: 1; max-width: none; order: 4; }
  .dir-toolbar-end { margin-left: 0; }
  .is-list .dir-item { flex-wrap: wrap; gap: 10px 12px; }
  .is-list .dir-thumb { width: 88px; }
  .is-list .dir-body { flex-basis: calc(100% - 100px); }
  .is-list .dir-actions { flex-basis: 100%; justify-content: stretch; }
  .is-list .dir-actions .btn { flex: 1; }
  .dir-results.is-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .is-grid .dir-body { padding: 10px 10px 0; }
  .is-grid .dir-body h3 { font-size: 14.5px; }
  .is-grid .dir-desc { display: none; }
  .is-grid .dir-actions { padding: 8px 10px 10px; gap: 4px; }
  .is-grid .dir-actions .btn { flex: 1; padding: 7px 6px; font-size: 12px; }
  .is-grid .dir-actions .btn-ghost { display: none; }
  .hero-actions { margin-top: -4px; flex-direction: column; }
  .btn-hero { width: 100%; justify-content: center; }
  .building-row { display: flex; overflow-x: auto; gap: 12px; margin: 0 -16px; padding: 2px 16px 8px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .building-row::-webkit-scrollbar { display: none; }
  .building-card { flex: 0 0 62%; max-width: 240px; scroll-snap-align: start; }
  .building-card:hover { transform: none; }
  .section-head { flex-wrap: wrap; }
  .rooms-section { margin-top: 28px; }
  .viewer-btn > span { display: none; }
  .viewer-btn { width: 42px; padding: 0; justify-content: center; }
  .viewer-bar { gap: 6px; }
  .viewer-actions { gap: 6px; }
  .viewer-title { flex: 1; max-width: none; font-size: 13px; padding-right: 12px; }
  /* Banyak tombol: judul pindah ke baris kedua agar tetap terbaca */
  .viewer-bar { flex-wrap: wrap; row-gap: 8px; }
  .viewer-title { order: 3; flex: 1 1 100%; }
  .finder-panel { top: auto; bottom: 0; right: 0; left: 0; width: 100%; max-height: 82%; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); animation: slide-up .22s ease; }
  .finder-foot { display: none; }
  .finder-item { padding: 10px 6px; }
  .card-thumb { width: 38%; max-width: 150px; aspect-ratio: auto; min-height: 120px; flex-shrink: 0; }
  .badge-360 { top: 6px; right: auto; left: 6px; font-size: 10.5px; padding: 2px 7px; }
  .card-body { padding: 12px 14px; gap: 4px; min-width: 0; }
  .card-body h3 { font-size: 15.5px; }
  .card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; }
  .card:hover { transform: none; }
  .field-row, .radio-cards, .radio-cards.cols-3 { grid-template-columns: 1fr; }
  .tour-page { padding-top: 16px; }
  .back-link { margin-bottom: 10px; }
  .tour-viewer { aspect-ratio: 3/4; max-height: 64vh; margin: 0 -16px; width: calc(100% + 32px); border-radius: 0; }
  .tour-actions { width: 100%; }
  .tour-actions .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
  .tour-content { margin-top: 18px; gap: 16px; }
  .tour-desc, .related { padding: 18px; }

  .admin-topbar { padding: 10px 12px 10px 8px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .admin-topbar h1 { font-size: 17px; }
  .admin-content { padding: 16px 12px 24px; }
  .admin-footer { display: none; }
  .whoami-text { display: none; }
  .panel { padding: 16px; }
  .panel-head > .btn-primary.fab-covered { display: none; }
  .input-icon { max-width: none; min-width: 0; flex-basis: 100%; }
  .toolbar select { flex: 1; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat { padding: 12px; gap: 10px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat strong { font-size: 19px; }
  .upload-box { flex-direction: column; }
  .sticky-actions { bottom: calc(var(--nav-h) + var(--safe-b)); }
  .toast { bottom: calc(var(--nav-h) + var(--safe-b) + 14px); }
  .drag-handle { width: 34px; height: 40px; }
  .sticky-actions .btn { width: 100%; }
  .form-actions.inline .btn { flex: 1; }

  /* Tabel menjadi kartu */
  .table-wrap { margin: 0; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; padding: 12px 14px; background: var(--surface); }
  .table tbody tr:hover { background: var(--surface); }
  .table td, .table th:first-child, .table td:first-child, .table td:last-child { padding: 4px 0; border: 0; }
  .table td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 12px; text-align: right; }
  .table td[data-label]::before { content: attr(data-label); color: var(--muted); font-size: 13px; text-align: left; font-weight: 500; }
  .table tr { position: relative; }
  .table td:first-child:not([data-label]) { padding: 0 112px 10px 0; margin-bottom: 6px; border-bottom: 1px solid var(--border); min-height: 40px; }
  .table td.actions { position: absolute; top: 8px; right: 8px; width: auto; display: flex; gap: 0; padding: 0; }
  .cell-tour { min-width: 0; }
}

@media (max-width: 420px) {
  .viewer-bar { gap: 5px; padding-left: calc(8px + env(safe-area-inset-left, 0px)); padding-right: calc(8px + env(safe-area-inset-right, 0px)); }
  .viewer-actions { gap: 5px; }
  .viewer-btn { width: 38px; height: 38px; }
  .viewer-btn .icon { width: 17px; height: 17px; }
  .viewer-title { height: 38px; padding-left: 5px; padding-right: 10px; }
  .viewer-title-icon { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Slug, kode embed, dokumentasi API ---------- */
.slug-field { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; background: var(--input-bg); overflow: hidden; }
.slug-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.slug-prefix { display: flex; align-items: center; padding: 0 4px 0 12px; color: var(--muted); font-size: 13.5px; white-space: nowrap; max-width: 45%; overflow: hidden; text-overflow: ellipsis; direction: rtl; }
.slug-field input[type=text] { border: 0 !important; box-shadow: none !important; background: transparent; padding-left: 2px; min-width: 0; }
.code-box { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); }
.form-actions-inline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.embed-preview { position: relative; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #05080B; border: 1px solid var(--border); }
.embed-preview iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.token-once { display: flex; gap: 8px; align-items: center; }
.token-once input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.api-doc { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 20px; align-items: start; }
.api-toc { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; font-size: 13.5px; }
.api-toc a { display: block; padding: 4px 8px; border-radius: 6px; color: var(--text-2); text-decoration: none; }
.api-toc a:hover { background: var(--hover); color: var(--text); }
.api-toc p { margin: 12px 8px 4px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.api-section { scroll-margin-top: 80px; }
.api-section h2 { margin-top: 0; }
.api-ep { border: 1px solid var(--border); border-radius: 12px; margin: 12px 0; overflow: hidden; scroll-margin-top: 80px; }
.api-ep > header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.api-ep > header code { background: none; padding: 0; font-size: 14px; font-weight: 600; color: var(--text); word-break: break-all; }
.api-ep > div { padding: 12px 14px; font-size: 14px; }
.api-ep table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 10px; }
.api-ep th, .api-ep td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.api-ep pre, .api-doc pre { background: #0F1720; color: #E4ECF1; padding: 12px 14px; border-radius: 10px; overflow-x: auto; font-size: 12.5px; line-height: 1.5; margin: 8px 0; }
.api-ep pre code, .api-doc pre code { background: none; color: inherit; padding: 0; word-break: normal; }
.method { display: inline-block; min-width: 58px; text-align: center; padding: 3px 8px; border-radius: 6px; font: 700 12px ui-monospace, Menlo, monospace; color: #fff; }
.method-get { background: #0E7C86; } .method-post { background: #2563EB; } .method-put, .method-patch { background: #B45309; } .method-delete { background: #B91C1C; }
.api-badge { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--text-2); }
.api-badge-public { background: #DCFCE7; color: #166534; }
:root[data-theme=dark] .api-badge-public { background: #14532D; color: #BBF7D0; }
@media (max-width: 960px) { .api-doc { grid-template-columns: 1fr; } .api-toc { position: static; max-height: none; } }

.form-grid > *, .api-doc > * { min-width: 0; }
.api-doc-mini pre { white-space: pre-wrap; word-break: break-all; }
.api-doc-mini pre { background: #0F1720; color: #E4ECF1; padding: 12px 14px; border-radius: 10px; font-size: 12.5px; line-height: 1.5; }
.api-doc-mini pre code { background: none; color: inherit; padding: 0; }
.token-created { border: 2px solid var(--primary); }
.api-ep td:first-child code { white-space: nowrap; word-break: normal; }
.api-ep td { min-width: 80px; }
/* ---------- Webhook ---------- */
.pill-amber { background: #FEF3C7; color: #92400E; }
:root[data-theme=dark] .pill-amber { background: rgba(245,158,11,.18); color: #FCD34D; }
.text-danger { color: var(--pill-red) !important; }
.wh-payload { display: inline-block; position: relative; }
.wh-payload summary { list-style: none; cursor: pointer; }
.wh-payload summary::-webkit-details-marker { display: none; }
.wh-payload[open] > pre, .wh-payload[open] > p { position: relative; z-index: 2; }
.wh-payload pre { max-width: min(560px, 80vw); max-height: 320px; overflow: auto; text-align: left; background: #0F1720; color: #E4ECF1; padding: 10px 12px; border-radius: 8px; font-size: 12px; margin: 6px 0; white-space: pre; }
/* ---------- Analitik leads ---------- */
.seg-tabs { margin-bottom: 16px; }
.seg-tabs .seg-link { gap: 6px; }
.seg-tabs .seg-link .icon { width: 16px; height: 16px; }
.kpi-link { display: contents; color: inherit; text-decoration: none !important; }
.kpi-link .kpi:hover { border-color: var(--primary); }
.conv-bar { display: inline-block; vertical-align: middle; width: 70px; height: 8px; border-radius: 4px; background: var(--viz-grid); overflow: hidden; margin-right: 6px; }
.conv-bar span { display: block; height: 100%; background: var(--series-1); border-radius: 0 4px 4px 0; }
.conv-table td, .conv-table th { white-space: nowrap; }
.recent-leads { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; }
.recent-leads li { display: flex; flex-direction: column; gap: 1px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.recent-leads li:last-child { border-bottom: 0; padding-bottom: 0; }
.an-hint { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; }
/* ---------- Petunjuk arah ---------- */
.route-box { display: flex; flex-direction: column; gap: 10px; }
.route-form { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.route-form-head { display: flex; align-items: center; justify-content: space-between; }
.route-form-head strong { display: inline-flex; align-items: center; gap: 6px; }
.route-form-head .icon { color: var(--primary); }
.route-field { display: flex; align-items: center; gap: 10px; }
.route-field select { flex: 1; min-width: 0; }
.route-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.route-dot.is-from { background: var(--route-from, #2563EB); }
.route-dot.is-to { background: var(--route-to, #DC2626); }
.route-result { display: flex; flex-direction: column; gap: 10px; }
.route-sum { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.route-sum strong { font-size: 22px; }
.route-sum span { color: var(--muted); font-size: 14px; }
.route-warn { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--warn-bg, #FEF3C7); color: var(--warn-text, #92400E); font-size: 13px; }
:root[data-theme=dark] .route-warn { background: rgba(245,158,11,.15); color: #FCD34D; }
.route-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.route-steps li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.route-steps li:last-child { border-bottom: 0; }
.route-steps li > span:last-child { display: flex; flex-direction: column; }
.route-steps small { color: var(--muted); }
.step-ico { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); flex-shrink: 0; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.route-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.route-banner { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 650; display: flex; flex-direction: column; gap: 2px; align-items: center; text-align: center;
  min-width: 240px; max-width: calc(100% - 24px); padding: 10px 16px; border-radius: 14px; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-lg); font-size: 15px; }
.route-banner span { font-size: 13px; opacity: .9; }
.route-banner[hidden] { display: none; }
/* ---------- Fasilitas: admin ---------- */
.rich-editor { min-height: 320px; background: var(--input-bg); color: var(--text); font: 15px/1.7 var(--font); }
.ql-toolbar.ql-snow { border-color: var(--border) !important; border-radius: 10px 10px 0 0; background: var(--surface-2); }
.ql-container.ql-snow { border-color: var(--border) !important; border-radius: 0 0 10px 10px; font-family: var(--font); font-size: 15px; }
.ql-editor { min-height: 320px; }
.ql-editor.ql-blank::before { color: var(--muted); font-style: normal; }
:root[data-theme=dark] .ql-snow .ql-stroke { stroke: var(--text-2); }
:root[data-theme=dark] .ql-snow .ql-fill { fill: var(--text-2); }
:root[data-theme=dark] .ql-snow .ql-picker { color: var(--text-2); }
:root[data-theme=dark] .ql-snow .ql-picker-options, :root[data-theme=dark] .ql-snow .ql-tooltip { background: var(--surface); color: var(--text); border-color: var(--border); box-shadow: var(--shadow-lg); }
.ql-snow .ql-tooltip { z-index: 5; }
.gallery-thumb { width: 96px; height: 64px; object-fit: cover; border-radius: 8px; }
.gallery-table input[type=text] { min-width: 180px; }
.upload-drop { display: flex; align-items: center; gap: 10px; padding: 16px; border: 2px dashed var(--border); border-radius: 12px; cursor: pointer; color: var(--text-2); margin-top: 12px; }
.upload-drop:hover { border-color: var(--primary); }
.upload-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-drop { position: relative; }
.new-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.new-photos img { width: 88px; height: 60px; object-fit: cover; border-radius: 6px; }
.new-photos .hint { width: 100%; margin: 0; }
.room-picker { max-height: 420px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px 10px; }
.room-picker .search-label { margin: 12px 0 4px; }
.room-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 8px; border-radius: 8px; }
.room-pick.is-on { background: var(--primary-soft); }
.room-pick[hidden] { display: none; }
.room-pick .checkbox { flex: 1; min-width: 200px; margin: 0; }
.room-pick input[type=text] { flex: 1; min-width: 160px; max-width: 260px; padding: 6px 10px; font-size: 13.5px; }

/* ---------- Fasilitas: publik ---------- */
.page-intro { margin-bottom: 20px; }
.page-intro h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.page-intro h1 .icon { color: var(--primary); }
.fac-toolbar { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.fac-toolbar .input-icon { max-width: 420px; }
.fac-toolbar .chips { margin-bottom: 0; }
.empty-inline { color: var(--muted); padding: 24px 0; text-align: center; }
.fac-card[hidden] { display: none; }
.fac-card .badge-360 { display: inline-flex; align-items: center; gap: 4px; }
.fac-card .badge-360 .icon { width: 13px; height: 13px; }
.fac-head { max-width: 820px; margin-bottom: 20px; }
.fac-head h1 { margin: 8px 0; }
.fac-lead { font-size: 17px; color: var(--text-2); margin: 0 0 14px; }
.fac-gallery { display: grid; gap: 8px; margin-bottom: 28px; border-radius: 16px; overflow: hidden; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; }
.fac-gallery.count-1 { grid-template-columns: 1fr; grid-auto-rows: 420px; }
.fac-gallery.count-2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 340px; }
.fac-gallery.count-3 .fac-shot:first-child, .fac-gallery.count-4 .fac-shot:first-child, .fac-gallery.count-5 .fac-shot:first-child { grid-column: span 2; grid-row: span 2; }
.fac-gallery.count-3 { grid-template-columns: 2fr 1fr 1fr; }
.fac-gallery.count-3 .fac-shot:first-child { grid-column: span 1; }
.fac-gallery.count-3 .fac-shot:not(:first-child) { grid-column: span 2; }
.fac-shot { position: relative; padding: 0; border: 0; background: var(--hover); cursor: zoom-in; overflow: hidden; }
.fac-shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.fac-shot:hover img { transform: scale(1.03); }
.fac-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-weight: 700; font-size: 18px; }
.fac-room { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.fac-room:last-child { border-bottom: 0; }
.fac-room .related-item { margin: 0; }
.fac-room-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 4px; }
.fac-in-room-title { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 28px 0 10px; }
.fac-in-room-title .icon { color: var(--primary); }
.fac-mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
/* Konten dari editor */
.rich-content { line-height: 1.75; font-size: 16px; overflow-wrap: anywhere; }
.rich-content h2, .rich-content h3, .rich-content h4 { margin: 1.4em 0 .5em; line-height: 1.3; }
.rich-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 10px 0; }
.rich-content iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; margin: 10px 0; }
.rich-content blockquote { margin: 1em 0; padding: 10px 16px; border-left: 4px solid var(--primary); background: var(--surface-2); border-radius: 0 10px 10px 0; color: var(--text-2); }
.rich-content ul, .rich-content ol { padding-left: 1.4em; }
.rich-content li[data-list=bullet] { list-style-type: disc; }
.rich-content .ql-align-center { text-align: center; }
.rich-content .ql-align-right { text-align: right; }
.rich-content .ql-align-justify { text-align: justify; }
.rich-content .ql-indent-1 { padding-left: 2em; } .rich-content .ql-indent-2 { padding-left: 4em; } .rich-content .ql-indent-3 { padding-left: 6em; }
.rich-content a { text-decoration: underline; }
.rich-content pre { background: var(--surface-2); padding: 12px; border-radius: 8px; overflow-x: auto; }
/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 2000; background: rgba(5,8,11,.94); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1100px, 92vw); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lightbox img { max-width: 100%; max-height: 80vh; object-fit: contain; border-radius: 8px; }
.lightbox figcaption { color: #E4ECF1; font-size: 14.5px; text-align: center; }
.lb-close { position: absolute; top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; cursor: pointer; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; font-size: 34px; cursor: pointer; }
.lb-prev { left: 12px; } .lb-next { right: 12px; }
.lb-nav[hidden] { display: none; }
.lb-count { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); color: #C3D0D9; font-size: 13px; }
.lb-open, .lb-open body { overflow: hidden; }
@media (max-width: 720px) {
  .fac-gallery, .fac-gallery.count-3 { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }
  .fac-gallery .fac-shot:first-child { grid-column: span 2 !important; grid-row: span 2; }
  .fac-gallery .fac-shot:not(:first-child) { grid-column: span 1 !important; }
  .fac-gallery.count-1 { grid-template-columns: 1fr; grid-auto-rows: 240px; }
  .fac-gallery.count-2 .fac-shot:first-child { grid-row: span 1; }
  .lb-nav { display: none; }
}
/* Cek sambungan jalur navigasi */
.net-check { margin-top: 20px; }
.net-map { height: 420px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.net-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.net-stats span { padding: 6px 12px; border-radius: 999px; background: var(--hover); font-size: 13.5px; }
.net-stats .is-bad { background: var(--pill-red-bg); color: var(--pill-red); }
.net-stats .is-good { background: var(--pill-green-bg); color: var(--pill-green); }
.net-ok { margin: 0 0 12px; color: var(--pill-green); font-weight: 600; }
.net-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 10px 0 0; font-size: 13px; color: var(--text-2); }
.net-legend li { display: flex; align-items: center; gap: 6px; }
.net-legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; }
.net-legend i.dot { width: 10px; height: 10px; border-radius: 50%; }
.net-door { display: inline-flex; color: #7F1D1D; }
.net-door .icon { width: 16px; height: 16px; }
.map-door.is-bad span { border-color: #7C3AED; background: #EDE9FE; color: #7C3AED; }
.net-issues p { margin: 10px 0 0; font-size: 14px; }
@media (max-width: 720px) { .net-map { height: 320px; } }
/* Pintu masuk gedung */
.map-door { background: none; border: 0; }
.map-door span { position: relative; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--door-other, #7F1D1D); border: 2px solid var(--door-other, #7F1D1D); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.map-door span .icon { width: 58%; height: 58%; }
.map-door.is-main span { background: var(--door-main, #7F1D1D); color: #fff; border-color: #fff; }
.map-door b { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #1F3A5F; color: #fff; font: 700 10px/16px var(--font); text-align: center; border: 1.5px solid #fff; }
.hint.is-ok { color: var(--pill-green); }
.hint.is-warn { color: #B45309; }
:root[data-theme=dark] .hint.is-warn { color: #FCD34D; }

/* Ikon langkah rute (Lucide) */
.step-ico .icon { width: 14px; height: 14px; }
.step-start .step-ico { color: var(--route-from, #2563EB); }
.step-finish .step-ico { color: var(--route-to, #DC2626); }
.step-inside .step-ico { color: #7F1D1D; }
.route-banner strong { display: inline-flex; align-items: center; gap: 6px; }
.route-banner .icon { width: 18px; height: 18px; }
.route-tours { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.route-tours p { margin: 0 0 2px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.route-tour { display: flex; align-items: center; gap: 8px; }
.route-tour .route-dot { flex-shrink: 0; }
.route-tour > span:not(.route-dot) { flex: 1; min-width: 0; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-tour .route-dot { flex: 0 0 12px; }
/* Daftar akses pintu (form gedung) */
.entrance-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.entrance-empty { display: flex; align-items: center; gap: 8px; margin: 0; }
.ent-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto auto; align-items: center; gap: 6px 8px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.ent-num { width: 24px; height: 24px; border-radius: 50%; background: #1F3A5F; color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.ent-row input[type=text] { padding: 7px 10px; font-size: 14px; }
.ent-main { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; margin: 0; }
.ent-st { grid-column: 2 / -1; display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; }
.ent-st .icon { width: 14px; height: 14px; }
.ent-st.is-ok, .icon.is-ok { color: var(--pill-green); }
.ent-st.is-warn { color: #B45309; }
:root[data-theme=dark] .ent-st.is-warn { color: #FCD34D; }
[data-shape-status] .icon, [data-coords-status] .icon { width: 15px; height: 15px; vertical-align: -3px; }
.map-pick button .icon { width: 16px; height: 16px; vertical-align: -3px; }
.map-door.is-start span { background: var(--route-from, #2563EB); color: #fff; border-color: #fff; }
.route-banner-btn { margin-top: 6px; background: #fff; color: var(--secondary-dark); }
.route-banner-btn .icon { width: 15px; height: 15px; }
/* Label gedung awal & tujuan saat rute tampil */
.leaflet-tooltip.map-label-route { background: #fff; border: 2px solid var(--route-from, #2563EB); border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.25); font-weight: 700; color: #14232E; padding: 4px 8px; }
.leaflet-tooltip.map-label-route.is-to { border-color: var(--route-to, #DC2626); }
.leaflet-tooltip.map-label-route::before { display: none; }
/* Atribusi peta ringkas & tidak menutupi popup */
.leaflet-container .leaflet-control-attribution { font-size: 10px; line-height: 1.4; padding: 1px 6px; background: rgba(255,255,255,.75); border-radius: 6px 0 0 0; transition: opacity .15s; }
.leaflet-container.has-popup .leaflet-control-attribution { opacity: 0; pointer-events: none; }
/* Kartu dengan tombol aksi (beranda & halaman gedung): seluruh kartu tetap bisa diklik lewat tautan judul yang membentang */
.card.has-actions, .building-card.has-actions { position: relative; }
.has-actions .card-link { color: inherit; text-decoration: none !important; }
.has-actions .card-link::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.has-actions .card-link:focus-visible { outline: none; }
.has-actions:has(.card-link:focus-visible) { outline: 3px solid var(--primary); outline-offset: 2px; }
.has-actions .card-body { flex: 1; }
.card-actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 10px; }
.card-actions .btn { padding: 6px 10px; font-size: 13px; }
.card-actions .btn .icon { width: 15px; height: 15px; }
.building-card .building-body { flex: 1; }
.building-card .card-actions { padding-top: 8px; }
.room-results.is-grid .card-actions .btn { flex: 1; justify-content: center; }
@media (max-width: 720px) {
  .room-results.is-grid .card-actions { flex-direction: column; }
  .room-results.is-grid .card-actions .btn { padding: 6px 8px; font-size: 12.5px; }
}
/* ---------- "Memuat virtual tour…" di atas iframe ---------- */
.has-frame-loader { position: relative; }
.frame-loading { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center;
  background: radial-gradient(circle at 50% 40%, #1d2b36, #0b1117); color: #E4ECF1; pointer-events: none; transition: opacity .35s, visibility .35s; }
.frame-loading strong { font-size: 15px; font-weight: 600; }
.is-frame-loaded > .frame-loading { opacity: 0; visibility: hidden; }
.frame-spinner { width: 38px; height: 38px; border-radius: 50%; border: 3px solid rgba(255,255,255,.18); border-top-color: var(--primary); border-right-color: var(--primary); animation: spin .8s linear infinite; }
.frame-slow { font-size: 12.5px; color: #93A4B1; max-width: 280px; opacity: 0; animation: frame-slow .3s ease 10s forwards; }
@keyframes frame-slow { to { opacity: 1; } }
.tour-preview.has-frame-loader, .rich-frame { position: relative; }
.rich-frame { margin: 10px 0; border-radius: 12px; overflow: hidden; }
.rich-frame iframe { margin: 0; display: block; }
/* Viewer layar penuh: kartu memuat di tengah */
.viewer-loading { top: 50%; bottom: auto; transform: translate(-50%, -50%); flex-direction: column; gap: 10px; text-align: center; padding: 22px 28px; border-radius: 16px; min-width: 220px; background: rgba(10,16,22,.82); }
.viewer-loading strong { font-size: 15px; font-weight: 600; }
.viewer-loading[hidden] { display: none; }
@media (max-width: 720px) {
  .viewer-shell.map-open .viewer-loading { top: calc((100% - var(--vmap-h)) / 2); bottom: auto; }
}
@media (prefers-reduced-motion: reduce) { .frame-spinner { animation-duration: 2s; } }
/* Item daftar peta yang dipilih */
.map-item.is-active { background: rgba(245,158,11,.14); box-shadow: inset 3px 0 0 #F59E0B; }
.map-item.is-active strong, .map-item.is-active span { color: var(--text); }
.net-ok { display: flex; align-items: center; gap: 6px; }
.net-ok .icon { width: 18px; height: 18px; }
.builder-tools .btn-icon .icon { width: 16px; height: 16px; }
/* Tombol kecil virtual tour di langkah awal & akhir rute */
.route-steps .step-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.step-tour { flex-shrink: 0; align-self: center; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--primary-text); font-size: 12px; font-weight: 600; text-decoration: none !important; white-space: nowrap; }
.step-tour:hover { border-color: var(--primary); background: var(--primary-soft); }
.step-tour .icon { width: 13px; height: 13px; }

/* ---------- Skeleton loader (navigasi AJAX & data) ---------- */
:root { --sk-a: #E6ECF0; --sk-b: #F4F7F9; }
:root[data-theme=dark] { --sk-a: #1C252E; --sk-b: #26313B; }
.sk { display: block; background: linear-gradient(90deg, var(--sk-a) 25%, var(--sk-b) 37%, var(--sk-a) 63%); background-size: 400% 100%; animation: sk-shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes sk-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 12px; margin: 8px 0; max-width: 100%; }
.sk-page { min-height: 70vh; }
.sk-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sk-media { aspect-ratio: 16 / 10; border-radius: 0; }
.sk-media-wide { aspect-ratio: 16 / 9; }
.sk-card-body { padding: 14px 16px 18px; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; margin-top: 16px; }
.sk-building-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.sk-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.sk-row { display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.sk-row .sk-thumb { width: 72px; height: 54px; flex-shrink: 0; border-radius: 8px; }
.sk-row-body { flex: 1; min-width: 0; }
.sk-row-body .sk-line { margin: 6px 0; }
.sk-toolbar { margin: 16px 0 4px; }
.sk-hero { width: 100%; aspect-ratio: 16 / 9; max-height: 460px; border-radius: var(--radius); margin: 18px 0; }
.sk-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; }
.sk-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.sk-hero-band { padding: 56px 0 64px; background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)); }
.sk-hero-band .sk { --sk-a: rgba(255,255,255,.1); --sk-b: rgba(255,255,255,.2); }
.sk-map { position: relative; display: flex; height: calc(100dvh - 68px); }
.sk-map-canvas { flex: 1; border-radius: 0; }
.sk-map-panel { width: 340px; padding: 14px; background: var(--surface); border-left: 1px solid var(--border); }
.sk-admin { min-height: 60vh; }
.sk-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sk-stat { display: flex; gap: 12px; align-items: center; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.sk-avatar { width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0; }
.sk-table-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sk-tr { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.sk-tr .sk-line { margin: 0; }
.sk-form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.sk-field { margin-bottom: 16px; }
@media (max-width: 960px) { .sk-detail, .sk-form { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .sk-grid { grid-template-columns: 1fr; gap: 14px; }
  .sk-map { height: calc(100dvh - 58px - var(--nav-h, 64px)); }
  .sk-map-panel { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 42%; border-left: 0; border-radius: 16px 16px 0 0; }
  .sk-hero-band { padding: 28px 0 32px; }
}
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
/* Bilah progres navigasi */
.nav-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 3000; background: var(--primary); box-shadow: 0 0 8px var(--primary); opacity: 0; pointer-events: none; }
[data-pjax][aria-busy=true] { cursor: progress; }
[data-pjax]:focus { outline: none; }
/* Gambar: kilau skeleton sampai gambar selesai dimuat */
.img-loading { background: linear-gradient(90deg, var(--sk-a) 25%, var(--sk-b) 37%, var(--sk-a) 63%) !important; background-size: 400% 100% !important; animation: sk-shimmer 1.4s ease infinite; }
.img-loading > img { opacity: 0; }
.card-thumb img, .building-thumb img, .related-thumb img, .search-thumb img, .fac-shot img, .dir-thumb img, .mini-thumb img, .finder-thumb img { transition: opacity .3s ease; }
.finder-body .sk-rows { margin: 6px 0; }
.finder-body .sk-row { background: transparent; border-color: transparent; padding: 8px 6px; }
.finder-body.is-loading { opacity: 1; }

/* Petunjuk arah: pilihan moda jalan kaki / berkendara */
.segmented button[aria-checked=true] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.segmented button[aria-checked=true] .icon { color: var(--primary); }
.route-mode { display: flex; width: 100%; }
.route-mode button { flex: 1; justify-content: center; }
.route-ask { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid rgba(var(--primary-rgb), .35); border-radius: 12px; background: rgba(var(--primary-rgb), .06); }
.route-ask p { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.route-ask p span { color: var(--muted); font-size: 13px; }
.route-ask-btns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.route-ask-btns .btn { justify-content: center; min-width: 0; padding-left: 8px; padding-right: 8px; }
.route-split { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.route-split span { display: inline-flex; align-items: center; gap: 5px; }
.route-split .icon { width: 15px; height: 15px; }
.route-note { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.step-park .step-ico { color: #2563EB; }
.map-park { display: flex; align-items: center; justify-content: center; background: #2563EB; color: #fff; border: 2px solid #fff; border-radius: 7px; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.map-park svg { width: 16px; height: 16px; }

/* Langkah petunjuk arah bisa diklik: sorot potongan jalurnya */
.route-steps li[data-step] { cursor: pointer; border-radius: 8px; transition: background .15s; }
.route-steps li[data-step]:hover { background: var(--hover); }
.route-steps li[data-step]:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .4); outline-offset: -2px; }
.route-steps li.is-active { background: color-mix(in srgb, var(--step-hl, #DB2777) 14%, transparent); box-shadow: inset 3px 0 0 var(--step-hl, #DB2777); }
.route-steps li.is-active .step-ico { color: var(--step-hl, #DB2777); }
.route-steps li[data-step] { padding-left: 6px; padding-right: 6px; }

/* Pengaturan → Peta & Navigasi: formulir + pratinjau */
.map-settings { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.map-color-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; margin: 14px 0 6px; }
.map-color-grid label small { display: block; font-weight: 400; font-size: 12px; }
.map-settings-preview { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 8px; }
.map-preview { height: 320px; border-radius: 12px; border: 1px solid var(--border); overflow: hidden; background: var(--surface-2); }
.map-preview-steps { max-height: 190px; overflow: auto; margin: 0; padding: 0 4px; border: 1px solid var(--border); border-radius: 10px; }
.map-preview-steps li { font-size: 13px; padding: 6px; }
@media (max-width: 900px) {
  .map-settings { grid-template-columns: 1fr; }
  .map-settings-preview { position: static; }
}
@media (max-width: 520px) { .map-color-grid { grid-template-columns: 1fr; } }
.route-actions { margin: 10px 0 4px; }
.route-actions .btn { flex: 1 1 auto; justify-content: center; }
.route-actions [data-route-nav] { flex: 2 1 60%; }

/* Combobox pencarian (RSVTCombo) — pengganti select titik awal/tujuan */
.route-field .combo { flex: 1; min-width: 0; }
.combo { position: relative; }
.combo-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 6px 10px 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 500 14.5px var(--font); text-align: left; cursor: pointer; flex-wrap: wrap; row-gap: 0; }
.combo-btn:hover { border-color: rgba(var(--primary-rgb), .5); }
.combo-btn:focus-visible, .combo-btn[aria-expanded=true] { outline: 3px solid rgba(var(--primary-rgb), .3); border-color: var(--primary); }
.combo-btn > .icon { width: 17px; height: 17px; color: var(--primary); flex-shrink: 0; }
.combo-value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-value.is-placeholder { color: var(--muted); }
.combo-sub { display: none; }
.combo-caret { display: flex; margin-left: auto; color: var(--muted); }
.combo-caret .icon { width: 16px; height: 16px; }
.combo-pop { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 900; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.22); overflow: hidden; max-height: 360px; }
.combo-pop[hidden] { display: none; }
.combo-head { display: none; }
.combo-search { position: relative; display: flex; align-items: center; padding: 8px; border-bottom: 1px solid var(--border); }
.combo-search > .icon { position: absolute; left: 18px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.combo-search input { width: 100%; min-height: 40px; padding: 8px 10px 8px 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: 400 15px var(--font); }
.combo-search input:focus { outline: 2px solid rgba(var(--primary-rgb), .35); border-color: var(--primary); }
.combo-list { list-style: none; margin: 0; padding: 4px; overflow-y: auto; overscroll-behavior: contain; flex: 1; min-height: 0; }
.combo-group { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.combo-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.combo-opt.is-active { background: var(--hover); }
.combo-opt.is-selected { color: var(--primary); font-weight: 600; }
.combo-ico { display: flex; width: 30px; height: 30px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 8px; background: rgba(var(--primary-rgb), .1); color: var(--primary); }
.combo-ico .icon { width: 16px; height: 16px; }
.combo-text { display: flex; flex-direction: column; min-width: 0; }
.combo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-text small { color: var(--muted); font-size: 12.5px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-empty { padding: 16px 10px; color: var(--muted); text-align: center; font-size: 14px; }
/* HP: lembar layar penuh (kolom cari di atas, keyboard tidak menutupi daftar) */
.combo-pop.is-sheet { position: fixed; inset: 0; top: 0; max-height: none; height: 100%; height: 100dvh; border-radius: 0; border: 0; z-index: 3000; box-shadow: none; }
.combo-pop.is-sheet .combo-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 4px 16px; padding-top: max(12px, env(safe-area-inset-top)); }
.combo-pop.is-sheet .combo-title { font-size: 17px; }
.combo-close { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: var(--hover); color: var(--text); cursor: pointer; }
.combo-pop.is-sheet .combo-search { padding: 8px 12px 10px; }
.combo-pop.is-sheet .combo-search > .icon { left: 24px; }
.combo-pop.is-sheet .combo-search input { min-height: 46px; font-size: 16px; } /* ≥16px: iOS tidak memperbesar halaman */
.combo-pop.is-sheet .combo-opt { padding: 11px 12px; min-height: 52px; }
.combo-pop.is-sheet .combo-list { padding: 4px 8px calc(12px + env(safe-area-inset-bottom)); }
html.combo-lock, html.combo-lock body { overflow: hidden; }
.combo-pop { z-index: 2500; }
.route-mode button { min-width: 0; padding-left: 8px; padding-right: 8px; overflow: hidden; text-overflow: ellipsis; }
.route-mode button .icon { flex-shrink: 0; }

/* Atribusi peta di HP: kiri atas (tidak menutupi panel "Daftar gedung & ruangan") */
.leaflet-container.attr-top .leaflet-control-attribution { border-radius: 0 0 6px 0; margin: 0 !important; }

/* Mode gelap otomatis untuk peta: ubin jalan (OpenStreetMap) digelapkan; satelit, garis, poligon, dan penanda tetap asli */
:root[data-theme=dark] .leaflet-container { background: #1B2228; }
:root[data-theme=dark] .leaflet-layer.tiles-street { filter: invert(1) hue-rotate(180deg) brightness(.9) contrast(.88) saturate(.55); }
:root[data-theme=dark] .leaflet-container .leaflet-control-attribution { background: rgba(20,26,32,.8); color: #9AA8B4; }
:root[data-theme=dark] .leaflet-container .leaflet-control-attribution a { color: #7DD3FC; }
:root[data-theme=dark] .leaflet-bar a, :root[data-theme=dark] .leaflet-control-layers { background: #232C34; color: #E6EDF3; border-color: #36424D; }
:root[data-theme=dark] .leaflet-bar a:hover { background: #2D3842; }
:root[data-theme=dark] .leaflet-bar { border-color: #36424D; }
:root[data-theme=dark] .leaflet-control-layers-toggle { filter: invert(1) brightness(1.4); }
:root[data-theme=dark] .leaflet-popup-content-wrapper, :root[data-theme=dark] .leaflet-popup-tip { background: #1F272E; color: #E6EDF3; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
:root[data-theme=dark] .leaflet-container a.leaflet-popup-close-button { color: #9AA8B4; }
:root[data-theme=dark] .leaflet-tooltip { background: #1F272E; color: #E6EDF3; border-color: #36424D; }
:root[data-theme=dark] .leaflet-tooltip-top::before { border-top-color: #1F272E; }
:root[data-theme=dark] .leaflet-tooltip-bottom::before { border-bottom-color: #1F272E; }
:root[data-theme=dark] .leaflet-tooltip-left::before { border-left-color: #1F272E; }
:root[data-theme=dark] .leaflet-tooltip-right::before { border-right-color: #1F272E; }
:root[data-theme=dark] .leaflet-tooltip.map-label { background: rgba(31,39,46,.92); color: #F1F5F9; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
:root[data-theme=dark] .leaflet-tooltip.map-label-route { background: #1F272E; color: #F1F5F9; }
:root[data-theme=dark] .map-pop small { color: #9AA8B4; }

/* HP: peta dikunci di antara header & menu bawah (tidak bergantung tinggi layar saat bilah URL browser muncul/hilang),
   halaman tidak bisa digulir, dan panel bawah yang tertutup tidak memanjangkan halaman */
@media (max-width: 720px) {
  .map-shell { position: fixed; left: 0; right: 0; top: calc(58px + env(safe-area-inset-top, 0px)); bottom: calc(var(--nav-h) + var(--safe-b)); height: auto; overflow: hidden; z-index: 1; }
  .map-page.public { padding-bottom: 0; }
  html:has(body.map-page), body.map-page { overflow: hidden; overscroll-behavior: none; height: 100%; }
}
.input-suffix { display: flex; align-items: stretch; }
.input-suffix input { flex: 1; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-suffix span { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--border); border-left: 0; border-radius: 0 10px 10px 0; background: var(--hover); color: var(--muted); font-size: 14px; }

/* Laporan: lokasi/browser + data kunjungan mentah */
.an-sub { font-size: 13px; font-weight: 700; color: var(--muted); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: .04em; }
.raw-search { flex: 0 1 300px; }
.raw-search .input-icon { max-width: none; }
.raw-table td { vertical-align: top; font-size: 13.5px; }
.raw-table td small { display: block; font-size: 12px; }
.raw-table code { font-size: 12.5px; }
.raw-table .nowrap { white-space: nowrap; }
.ua-cell { max-width: 280px; }
.ua-cell summary { cursor: pointer; color: var(--muted); font-size: 12.5px; list-style: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ua-cell summary::-webkit-details-marker { display: none; }
.ua-cell details[open] summary { display: none; }
.ua-cell details code { display: block; white-space: normal; word-break: break-all; font-size: 12px; line-height: 1.45; }
.raw-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.raw-pager [aria-disabled=true] { opacity: .45; pointer-events: none; }
@media (max-width: 720px) {
  .an-head:has(.raw-search) { flex-direction: column; align-items: stretch; }
  .raw-search { flex-basis: auto; }
  .ua-cell { max-width: none; }
}

/* Kartu fasilitas & alat — tampilan khusus (judul di atas foto, kategori sebagai label, jumlah ruangan di bawah) */
.fac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.fac-card { display: flex; flex-direction: column; background: var(--surface); border-radius: 18px; overflow: hidden; color: var(--text); text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.06), 0 8px 24px rgba(15,35,50,.08); border: 1px solid var(--border); transition: transform .2s, box-shadow .2s; }
.fac-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(0,0,0,.08), 0 16px 36px rgba(15,35,50,.14); }
.fac-card:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .45); outline-offset: 2px; }
.fac-card[hidden] { display: none; }
.fac-card-media { position: relative; aspect-ratio: 16 / 10; background: var(--primary-soft); overflow: hidden; }
.fac-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.fac-card:hover .fac-card-media img { transform: scale(1.04); }
.fac-card-ph { display: grid; place-items: center; height: 100%; color: var(--primary); }
.fac-card-ph .icon { width: 44px; height: 44px; opacity: .6; }
.fac-card-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,18,26,.88) 0%, rgba(8,18,26,.35) 42%, rgba(8,18,26,0) 70%); pointer-events: none; }
.fac-card-top { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.fac-card-cat { max-width: 75%; padding: 5px 10px; border-radius: 999px; background: rgba(255,255,255,.92); color: #0F2530; font-size: 12px; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.fac-card-photos { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 5px 9px; border-radius: 999px; background: rgba(8,18,26,.7); color: #fff; font-size: 12px; font-weight: 700; }
.fac-card-photos .icon { width: 13px; height: 13px; }
.fac-card-title { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; margin: 0; color: #fff; font-size: 19px; line-height: 1.25; text-shadow: 0 1px 8px rgba(0,0,0,.45);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fac-card-body { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px 16px; flex: 1; border-top: 3px solid var(--primary); }
.fac-card-body p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fac-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 13px; font-weight: 600; color: var(--muted); }
.fac-card-foot span { display: inline-flex; align-items: center; gap: 5px; }
.fac-card-foot .icon { width: 15px; height: 15px; }
.fac-card-go { color: var(--primary-text, var(--primary)); }
.fac-card:hover .fac-card-go .icon { transform: translateX(3px); }
.fac-card-go .icon { transition: transform .2s; }
.fac-section { margin-bottom: 8px; }

/* Beranda: kartu "selengkapnya" di baris gedung & tombol lihat semua ruangan */
.more-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 160px; padding: 20px; border: 2px dashed var(--border);
  border-radius: 14px; color: var(--text); text-decoration: none; text-align: center; transition: border-color .2s, background .2s; }
.more-card:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), .05); }
.more-card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: rgba(var(--primary-rgb), .12); color: var(--primary); }
.more-card > span:last-child { color: var(--primary-text, var(--primary)); font-size: 13.5px; font-weight: 600; }
.more-row { display: flex; justify-content: center; margin-top: 24px; }
@media (max-width: 720px) {
  .fac-grid { grid-template-columns: 1fr; gap: 14px; }
  .fac-card-title { font-size: 17px; }
  .building-row .more-card { flex: 0 0 62%; scroll-snap-align: start; min-height: 0; }
}

/* Pengaturan: bar tab (dalam halaman + Role & Izin + Pembaruan) */
.settings-tabs { display: flex; gap: 4px; margin: 0 0 18px; padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow-x: auto; scrollbar-width: none; position: sticky; top: 0; z-index: 5; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab { position: relative; display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 9px; color: var(--muted); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.settings-tab .icon { width: 16px; height: 16px; }
.settings-tab:hover { background: var(--hover); color: var(--text); }
.settings-tab.is-active { background: rgba(var(--primary-rgb), .12); color: var(--primary-text, var(--primary)); }
.settings-tab:focus-visible { outline: 3px solid rgba(var(--primary-rgb), .4); outline-offset: -2px; }
.settings-tab-badge { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #DC2626; color: #fff; font-size: 11px; }
.settings-section[hidden] { display: none; }
.map-center-row { gap: 8px; margin-bottom: 8px; }
.map-center-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-card strong .icon { width: 15px; height: 15px; vertical-align: -2px; margin-right: 2px; }
@media (max-width: 720px) { .settings-tabs { margin-left: -4px; margin-right: -4px; } .settings-tab { padding: 8px 11px; } }
.map-center-mark { background: none; border: 0; }
.map-center-mark span { position: relative; display: block; width: 28px; height: 28px; }
.map-center-mark span::before, .map-center-mark span::after { content: ""; position: absolute; background: #DB2777; box-shadow: 0 0 0 1.5px #fff; }
.map-center-mark span::before { left: 13px; top: 0; width: 2px; height: 28px; }
.map-center-mark span::after { top: 13px; left: 0; width: 28px; height: 2px; }

/* Halaman hasil pencarian (/cari?q=…) */
.search-full { padding-top: 20px; }
.search-full .search-box { max-width: 760px; }
.sr-head { margin: 4px 0 14px; }
.sr-head h1 { font-size: 24px; margin: 0; line-height: 1.3; }
.sr-head p { margin: 4px 0 0; font-size: 14px; }
.sr-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.sr-tabs::-webkit-scrollbar { display: none; }
.sr-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.sr-tab .icon { width: 16px; height: 16px; color: var(--muted); }
.sr-tab span { min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: 12px; line-height: 20px; text-align: center; }
.sr-tab:hover { border-color: var(--primary); }
.sr-tab.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.sr-tab.is-active .icon, .sr-tab.is-active span { color: inherit; }
.sr-tab.is-active span { background: rgba(255,255,255,.22); }
.sr-tab.is-empty { opacity: .55; }
.sr-section .section-head h2 { display: inline-flex; align-items: center; gap: 8px; }
.sr-section .section-head h2 > .icon { width: 20px; height: 20px; color: var(--primary); }
.sr-count { font-size: 13px; font-weight: 700; padding: 1px 9px; border-radius: 999px; background: rgba(var(--primary-rgb), .12); color: var(--primary-text, var(--primary)); }
.sr-none { margin-top: 20px; }
@media (max-width: 720px) {
  .search-full { padding-top: 12px; }
  .sr-head h1 { font-size: 19px; }
  .sr-tabs { margin: 0 -16px 6px; padding: 0 16px 12px; }
}

/* Hasil pencarian: jarak antar-section (buildings-section memakai margin-top 0 di beranda) */
.search-full .sr-section, .search-full .sr-section.buildings-section { margin-top: 44px; margin-bottom: 0; }
.search-full .sr-tabs + .sr-section, .search-full .sr-head + .sr-section { margin-top: 22px; }
@media (max-width: 720px) { .search-full .sr-section, .search-full .sr-section.buildings-section { margin-top: 32px; } }

/* Hero beranda dengan gambar latar (Pengaturan → Tampilan); tanpa gambar = gradasi bawaan */
.hero.has-image { background: var(--hero-img) center / cover no-repeat, var(--secondary); }
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%); opacity: var(--hero-overlay, .6); }
.hero.has-image h1, .hero.has-image .hero-sub { text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.hero-preview { position: relative; height: 150px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border);
  background: radial-gradient(600px 200px at 85% -10%, rgba(var(--primary-rgb), .55), transparent 60%), linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%); }
.hero-preview.has-image { background: var(--hero-img) center / cover no-repeat, var(--secondary); }
.hero-preview.has-image::before { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%); opacity: var(--hero-overlay, .6); }
.hero-preview-inner { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 4px; padding: 22px 20px; color: var(--on-secondary); }
.hero-preview-inner strong { font-size: 20px; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.hero-preview-inner span { font-size: 13px; opacity: .9; }
.hero-preview-inner i { display: block; width: 70%; max-width: 360px; height: 30px; margin-top: 10px; border-radius: 8px; background: var(--surface); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
input[type=range] { width: 100%; accent-color: var(--primary); }
label output { float: right; font-weight: 700; color: var(--primary-text, var(--primary)); }

/* Editor gedung: lantai (lapisan denah) + lift / eskalator / tangga */
.floor-ui { display: flex; flex-direction: column; gap: 10px; }
.floor-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.floor-tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 13.5px var(--font); cursor: pointer; }
.floor-tab .icon { width: 15px; height: 15px; }
.floor-tab:hover { border-color: #7C3AED; }
.floor-tab.is-active { background: #7C3AED; border-color: #7C3AED; color: #fff; }
.floor-tab.floor-add { border-style: dashed; color: var(--muted); }
.floor-dot { width: 9px; height: 9px; border-radius: 50%; border: 2px solid currentColor; opacity: .7; }
.floor-dot.is-own { background: currentColor; opacity: 1; }
.floor-card { padding: 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2, var(--surface)); display: flex; flex-direction: column; gap: 8px; }
.floor-card-title { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; font-size: 14px; }
.floor-card-title .icon { width: 17px; height: 17px; color: #7C3AED; }
.floor-row { display: flex; gap: 10px; flex-wrap: wrap; }
.floor-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); flex: 1; min-width: 160px; }
.floor-row label.floor-num { flex: 0 0 110px; min-width: 0; }
.floor-status { margin: 0; font-size: 13px; color: var(--muted); }
.floor-actions, .conn-add { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.floor-actions select { width: auto; padding: 6px 10px; font-size: 13px; }
.floor-del { color: #DC2626; margin-left: auto; }
.floor-gen { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.floor-gen input[type=number] { width: 76px; }
.conn-row { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--border); }
.conn-ico { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; color: #fff; }
.conn-ico .icon { width: 18px; height: 18px; }
.conn-ico.is-lift, .map-conn.is-lift span { background: #0EA5E9; }
.conn-ico.is-escalator, .map-conn.is-escalator span { background: #F97316; }
.conn-ico.is-stairs, .map-conn.is-stairs span { background: #64748B; }
.conn-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.conn-main select { width: auto; align-self: flex-start; padding: 6px 10px; font-size: 13px; }
.conn-levels { display: flex; flex-wrap: wrap; gap: 5px; }
.conn-level { position: relative; }
.conn-level input { position: absolute; opacity: 0; }
.conn-level span { display: inline-block; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; font-weight: 600; color: var(--muted); cursor: pointer; }
.conn-level input:checked + span { background: rgba(124,58,237,.12); border-color: #7C3AED; color: #7C3AED; }
.conn-level input:focus-visible + span { outline: 2px solid #7C3AED; outline-offset: 1px; }
.conn-btns { display: flex; gap: 2px; }
.map-conn { background: none; border: 0; }
.map-conn span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.map-conn span .icon { width: 16px; height: 16px; }
.map-conn.is-dim span { opacity: .35; }
.map-editor.is-picking { cursor: crosshair; }
/* Layar sempit: nama pintu satu baris penuh, kontrol di bawahnya */
@media (max-width: 560px) {
  .ent-row { grid-template-columns: 28px minmax(0, 1fr) auto auto; }
  .ent-row input[type=text] { grid-column: 2 / -1; }
  .ent-main { grid-column: 2; }
}

/* Peta publik: pemilih lantai gedung + denah lantai + lift/eskalator/tangga */
.floor-switch { display: flex; flex-direction: column; width: 148px; max-height: 48vh; overflow: hidden; background: var(--surface); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,.22); border: 1px solid var(--border); color: var(--text); font: 13px var(--font); }
.floor-switch-head { display: flex; align-items: center; gap: 6px; padding: 7px 6px 7px 10px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 12.5px; }
.floor-switch-head > .icon { width: 15px; height: 15px; color: #7C3AED; flex-shrink: 0; }
.floor-switch-head span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.floor-switch-x { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; padding: 0; }
.floor-switch-x .icon { width: 14px; height: 14px; }
.floor-switch > button { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 0; background: transparent; color: var(--text); cursor: pointer; text-align: left; font: inherit; }
.floor-switch > button + button { border-top: 1px solid var(--border); }
.floor-switch > button b { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 7px; background: var(--hover); font-size: 12.5px; }
.floor-switch > button span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.floor-switch > button:hover { background: var(--hover); }
.floor-switch > button.is-active b { background: #7C3AED; color: #fff; }
.floor-switch > button.is-active span { font-weight: 700; color: #7C3AED; }
:root[data-theme=dark] .floor-switch > button.is-active span { color: #C4B5FD; }
.floor-switch { overflow-y: auto; }
.leaflet-tooltip.map-floor-label { background: rgba(124,58,237,.9); color: #fff; border: 0; box-shadow: none; font-weight: 700; font-size: 11.5px; padding: 2px 7px; }
.leaflet-tooltip.map-floor-label::before { display: none; }
.map-conn.is-big span { width: 32px; height: 32px; border-width: 2.5px; }
.map-conn.is-big span .icon { width: 18px; height: 18px; }
.route-indoor { color: #7C3AED; }
:root[data-theme=dark] .route-indoor { color: #C4B5FD; }
.step-lift .step-ico, .step-escalator .step-ico, .step-stairs .step-ico, .step-enter .step-ico { color: #7C3AED; }
.route-banner-next { display: block; font-size: 13px; margin-top: 2px; }
@media (max-width: 720px) { .floor-switch { width: 58px; } .floor-switch-head { justify-content: center; padding: 6px 4px; } .floor-switch-head span, .floor-switch-head > .icon, .floor-switch > button span { display: none; } .floor-switch > button { justify-content: center; padding: 6px 4px; } }

/* Header: tombol utama + menu "Lainnya" (dropdown) agar header tidak penuh tombol */
.header-nav .btn-outline.is-active { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.7); }
.header-nav .btn-nav-primary { background: #FFFFFF; color: var(--secondary); border: 1px solid #FFFFFF; font-weight: 700; }
.header-nav .btn-nav-primary:hover { background: rgba(255,255,255,.9); color: var(--secondary); }
.nav-more { position: relative; }
.nav-more-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; color: inherit; font: 600 14px var(--font); cursor: pointer; list-style: none; user-select: none; }
.nav-more-btn::-webkit-details-marker { display: none; }
.nav-more-btn .icon { width: 17px; height: 17px; }
.nav-more-btn:hover, .nav-more[open] .nav-more-btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.6); }
.nav-more-btn:focus-visible { outline: 3px solid rgba(255,255,255,.55); outline-offset: 2px; }
.nav-more-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: 290px; padding: 6px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.22); display: flex; flex-direction: column; }
.nav-more-menu a { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; }
.nav-more-menu a:hover, .nav-more-menu a:focus-visible { background: var(--hover); outline: none; }
.nav-more-menu a > .icon { width: 20px; height: 20px; color: var(--primary); flex-shrink: 0; margin-top: 2px; }
.nav-more-menu a span { display: flex; flex-direction: column; gap: 1px; }
.nav-more-menu a strong { font-size: 14.5px; }
.nav-more-menu a small { font-size: 12.5px; color: var(--muted); }
.nav-more-desktop-hide { display: none !important; }
@media (max-width: 900px) {
  .nav-more-btn { border: 0; padding: 7px; border-radius: 10px; }
  .nav-more-btn span { display: none; }
  .nav-more-btn .icon { width: 22px; height: 22px; }
  .nav-more-menu { position: fixed; right: 12px; left: auto; top: 62px; width: min(320px, calc(100vw - 24px)); }
  .nav-more-desktop-hide { display: flex !important; }
}

/* Jelajahi (HP): tombol aksi & pilihan tampilan boleh turun baris — tidak melebar keluar layar */
@media (max-width: 720px) {
  .dir-toolbar-end { flex-wrap: wrap; width: 100%; gap: 8px; }
  .dir-toolbar-end .btn { flex: 1 1 auto; justify-content: center; }
  .dir-toolbar-end .segmented-icon { margin-left: auto; flex: none; }
}

/* Footer: tautan bantuan */
.footer-inner { display: flex; flex-direction: column; gap: 12px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.footer-links a { display: inline-flex; align-items: center; gap: 6px; color: inherit; opacity: .85; font-size: 14px; text-decoration: none; }
.footer-links a:hover { opacity: 1; text-decoration: underline; }
.footer-links .icon { width: 15px; height: 15px; }

/* Petunjuk penggunaan (/panduan): langkah + tangkapan layar dalam bingkai laptop & ponsel */
.guide-hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(var(--primary-rgb), .55), transparent 60%), linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%); color: var(--on-secondary); padding: 56px 0 48px; }
.guide-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 5px 12px; border-radius: 999px; background: rgba(255,255,255,.12); font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.guide-eyebrow .icon { width: 16px; height: 16px; }
.guide-hero h1 { font-size: clamp(28px, 4.5vw, 44px); margin: 0 0 10px; }
.guide-lead { font-size: 17px; opacity: .88; max-width: 720px; margin: 0 0 22px; line-height: 1.55; }
.guide-toc { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-toc .chip { background: rgba(255,255,255,.12); color: inherit; border-color: rgba(255,255,255,.3); }
.guide-toc .chip:hover { background: rgba(255,255,255,.22); }
.guide-group { font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-text, var(--primary)); margin: 48px 0 8px; padding-top: 8px; border-top: 2px solid var(--border); scroll-margin-top: 90px; }
.guide-group:first-of-type { margin-top: 8px; }
.guide-step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding: 36px 0; scroll-margin-top: 90px; }
.guide-step + .guide-step { border-top: 1px solid var(--border); }
.guide-step.is-flip .guide-text { order: 2; }
.guide-text { display: flex; flex-direction: column; gap: 12px; }
.guide-num { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: rgba(var(--primary-rgb), .12); color: var(--primary-text, var(--primary)); font-weight: 800; }
.guide-text h3 { font-size: 26px; margin: 0; line-height: 1.2; }
.guide-desc { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.6; }
.guide-list { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; line-height: 1.55; }
.guide-list li::marker { color: var(--primary); font-weight: 800; }
.guide-devices { position: relative; padding: 0 0 40px; }
.guide-devices.is-empty { display: grid; place-items: center; min-height: 220px; padding: 0; border-radius: 18px; background: rgba(var(--primary-rgb), .07); }
.guide-icon .icon { width: 72px; height: 72px; color: var(--primary); opacity: .6; }
.dev-laptop { width: 86%; }
.dev-screen { background: #1B1F24; border-radius: 16px 16px 6px 6px; padding: 2.2%; box-shadow: 0 24px 50px rgba(20,35,58,.22); }
.dev-screen img { display: block; width: 100%; height: auto; aspect-ratio: 1100 / 688; object-fit: cover; object-position: top; border-radius: 4px; background: #E7ECEF; }
.dev-base { width: 108%; margin-left: -4%; height: 18px; background: linear-gradient(180deg, #DDE2E7 0%, #A7B0BA 100%); border-radius: 0 0 18px 18px; box-shadow: 0 14px 24px rgba(20,35,58,.18); }
.dev-phone { position: absolute; right: 0; bottom: 0; width: 25%; min-width: 120px; background: #111418; border-radius: 30px; padding: 2.2% 1.6%; box-shadow: 0 24px 50px rgba(20,35,58,.32); }
.dev-phone img { display: block; width: 100%; height: auto; aspect-ratio: 360 / 779; object-fit: cover; object-position: top; border-radius: 22px; background: #E7ECEF; }
.guide-devices:not(:has(.dev-laptop)) { display: flex; justify-content: center; padding: 0; }
.guide-devices:not(:has(.dev-laptop)) .dev-phone { position: static; width: 240px; }
.guide-tips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 12px; }
.guide-tip { display: flex; gap: 16px; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
.guide-tip-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: rgba(var(--primary-rgb), .12); color: var(--primary); }
.guide-tip-icon .icon { width: 22px; height: 22px; }
.guide-tip h3 { margin: 0 0 4px; font-size: 17px; }
.guide-tip p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.guide-cta { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 40px; }
@media (max-width: 860px) {
  .guide-step { grid-template-columns: 1fr; gap: 24px; padding: 28px 0; }
  .guide-step.is-flip .guide-text { order: 0; }
  .guide-tips { grid-template-columns: 1fr; }
  .guide-hero { padding: 36px 0 32px; }
  .dev-phone { width: 30%; border-radius: 22px; }
  .dev-phone img { border-radius: 16px; }
}

/* Peta (HP): tombol Perbesar/Perkecil daftar gedung & ruangan */
.map-panel-full { display: none; }
@media (max-width: 720px) {
  .map-panel { transition: transform .25s, max-height .25s; }
  .map-panel.is-full { max-height: 100%; height: 100%; border-radius: 0; }
  .map-panel-full { display: inline-flex; align-items: center; gap: 5px; position: absolute; right: 10px; top: 8px; z-index: 2; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 12.5px var(--font); cursor: pointer; }
  .map-panel-full .icon { width: 14px; height: 14px; }
  .map-panel-full[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
  .map-panel-handle strong { padding: 0 96px; }
}
@media (max-width: 720px) { .map-panel.is-full { z-index: 1100; } }

/* Admin → QR Code gedung */
.qr-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 20px; align-items: start; }
.qr-controls { display: flex; flex-direction: column; gap: 16px; }
.qr-controls .panel-title .icon { width: 18px; height: 18px; vertical-align: -3px; color: var(--primary); }
.qr-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.qr-choices button { padding: 7px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: 600 13px var(--font); cursor: pointer; }
.qr-choices button:hover { border-color: var(--primary); }
.qr-choices button[aria-pressed=true] { background: var(--primary); border-color: var(--primary); color: var(--on-primary, #fff); }
.qr-page input[type=color] { width: 100%; height: 42px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.qr-page .field.is-dim { opacity: .45; }
.qr-ok, .qr-warn { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 12px; font-size: 13.5px; }
.qr-ok { color: var(--pill-green, #15803D); }
.qr-warn { color: #B45309; }
.qr-ok .icon, .qr-warn .icon { width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px; }
.qr-preview-col { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.qr-poster { aspect-ratio: 1240 / 1754; max-height: 78vh; margin: 0 auto; width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; background: #FBFCFC; color: #14233A; border-radius: 16px; overflow: hidden; box-shadow: 0 18px 40px rgba(20,35,58,.18); border: 1px solid var(--border); }
.qr-poster-head { align-self: stretch; display: flex; align-items: center; gap: 12px; padding: 16px 22px; background: var(--secondary); color: #fff; }
.qr-poster-head strong { font-size: 17px; }
.qr-poster-logo { height: 40px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; }
.qr-poster-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.18); }
.qr-poster-eyebrow { align-self: stretch; display: flex; align-items: center; gap: 6px; margin: 22px 26px 4px; color: var(--primary); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.qr-poster-eyebrow .icon { width: 16px; height: 16px; }
.qr-poster-title { align-self: stretch; margin: 0 26px 14px; font-size: 26px; line-height: 1.18; color: #14233A; }
.qr-poster-code { padding: 8px; background: #fff; border: 1px solid #DCE5E8; border-radius: 12px; width: 70%; aspect-ratio: 1; }
.qr-poster-code svg, .qr-poster-code canvas { width: 100% !important; height: 100% !important; display: block; }
.qr-poster-sub { margin: 16px 30px 0; text-align: center; color: #4A5568; font-size: 15px; line-height: 1.45; }
.qr-poster-url { margin: auto 0 14px; color: #6B7A8C; font-size: 12px; }
.qr-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
@media (max-width: 1100px) { .qr-page { grid-template-columns: 1fr; } .qr-preview-col { position: static; } }
@media print {
  body.qr-printing * { visibility: hidden !important; }
  body.qr-printing .qr-poster, body.qr-printing .qr-poster * { visibility: visible !important; }
  body.qr-printing .qr-poster { position: fixed; left: 0; top: 0; width: 100%; max-width: none; max-height: none; height: 100%; border: 0; border-radius: 0; box-shadow: none; }
  body.qr-printing .qr-poster-title { font-size: 34pt; }
  body.qr-printing .qr-poster-sub { font-size: 16pt; }
  @page { size: A5 portrait; margin: 0; }
}

/* Editor gedung: titik Lobby */
.lobby-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lobby-row input[type=text] { flex: 1 1 200px; }
.map-lobby { background: none; border: 0; }
.map-lobby span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #7C3AED; color: #fff; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.map-lobby span .icon { width: 18px; height: 18px; fill: currentColor; }

/* Peta: penanda "Anda berada di …" (QR Code lobby/gedung) */
.map-here span { width: 40px; height: 40px; border-width: 3px; }
.leaflet-tooltip.map-here-label { display: flex; flex-direction: column; gap: 1px; width: max-content; max-width: 230px; background: #7C3AED; color: #fff; border: 0; border-radius: 10px; padding: 7px 11px; box-shadow: 0 6px 18px rgba(0,0,0,.3); font-size: 13.5px; white-space: normal; line-height: 1.3; }
.leaflet-tooltip.map-here-label small { font-size: 11.5px; opacity: .85; font-weight: 500; }
.leaflet-tooltip-top.map-here-label::before { border-top-color: #7C3AED; }
.route-here { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(124,58,237,.1); color: var(--text); font-size: 13.5px; }
.route-here > .icon { width: 18px; height: 18px; color: #7C3AED; flex-shrink: 0; margin-top: 1px; }
.route-here span { display: flex; flex-direction: column; gap: 2px; }
.route-here small { color: var(--muted); }

/* ---------- Mode navigasi peta (gaya Google Maps): kartu belokan di atas, waktu tiba & tombol di bawah ---------- */
.nav-hud { position: absolute; inset: 0; z-index: 1150; pointer-events: none; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 12px calc(12px + var(--safe-b, 0px)); }
.nav-hud[hidden] { display: none; }
.nav-card, .nav-bar { pointer-events: auto; width: min(520px, 100%); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.nav-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 18px; background: #0E6B47; color: #fff; transition: background .3s; }
.nav-hud.is-near .nav-card { background: #0A5A3B; animation: nav-near 1.2s ease-in-out infinite alternate; }
@keyframes nav-near { to { transform: scale(1.02); } }
.nav-turn { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: rgba(255, 255, 255, .14); }
.nav-turn .icon { width: 34px; height: 34px; stroke-width: 2.4; }
.nav-card-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.nav-card-text strong { font-size: 26px; line-height: 1.1; font-weight: 800; }
.nav-card-text strong:empty { display: none; }
.nav-card-text span { font-size: 15px; line-height: 1.35; opacity: .95; }
.nav-bar { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 18px; border-radius: 18px; background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.nav-eta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nav-eta strong { font-size: 22px; line-height: 1.15; color: #0E8A55; }
.nav-eta span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.nav-btn[hidden] { display: none; }
.nav-btn .icon { width: 18px; height: 18px; }
.nav-btn:hover { background: var(--hover); }
.nav-exit { background: #DC2626; border-color: #DC2626; color: #fff; }
.nav-exit:hover { background: #B91C1C; }
@media (max-width: 480px) { .nav-btn span { display: none; } .nav-btn { width: 42px; padding: 0; justify-content: center; } }
/* Selama navigasi: peta penuh, panel & tombol peta lain disembunyikan */
.map-shell.is-navigating .map-panel, .map-shell.is-navigating .map-labels-toggle, .map-shell.is-navigating .map-locate,
.map-shell.is-navigating .leaflet-control-layers, .map-shell.is-navigating .leaflet-control-zoom, .map-shell.is-navigating .route-banner, .map-shell.is-navigating .floor-switch { display: none !important; }
/* Penanda posisi: panah biru (arah jalan) dengan denyut */
.nav-pos { position: relative; }
.nav-pos-ring { position: absolute; inset: 0; border-radius: 50%; background: rgba(37, 99, 235, .22); animation: nav-pulse 2s ease-out infinite; }
@keyframes nav-pulse { 0% { transform: scale(.55); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
.nav-pos-arrow { position: absolute; inset: 8px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.nav-pos-arrow svg { width: 22px; height: 22px; fill: #2563EB; stroke: #1D4ED8; stroke-width: 1; stroke-linejoin: round; }
/* HP: atribusi peta di kiri atas -> kartu belokan sedikit diturunkan */
.map-shell.is-navigating .attr-top ~ .nav-hud, .map-shell.is-navigating .nav-hud { padding-top: 12px; }
@media (max-width: 720px) { .map-shell.is-navigating .nav-hud { padding-top: 26px; } }
/* Laporan: ringkasan pindaian QR lobby */
.qr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.qr-stats > div { padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 2px; }
.qr-stats strong { font-size: 22px; line-height: 1.2; }
.qr-stats span { font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .qr-stats { grid-template-columns: 1fr 1fr; } }
/* Mode navigasi: daftar langkah (HP: lembar di atas bilah bawah; desktop: kartu di kiri) */
.nav-bottom { width: min(520px, 100%); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.nav-bottom .nav-bar { width: 100%; }
button.nav-eta { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.nav-list-btn[aria-expanded="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }
.nav-steps { pointer-events: auto; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
  max-height: 38vh; overflow-y: auto; overscroll-behavior: contain; }
.nav-steps[hidden] { display: none; }
.nav-steps-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 12px 16px 8px; background: var(--surface); border-bottom: 1px solid var(--border); }
.nav-steps-head strong { font-size: 15px; }
.nav-steps-head span { font-size: 13px; color: var(--muted); }
.nav-steps ol { list-style: none; margin: 0; padding: 6px; }
.nav-steps li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 10px; border-radius: 12px; cursor: pointer; transition: background .2s, opacity .2s; }
.nav-steps li:hover { background: var(--hover); }
.nav-steps li:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.nav-step-ico { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--hover); color: var(--muted); }
.nav-step-ico .icon { width: 18px; height: 18px; }
.nav-step-text { min-width: 0; font-size: 14px; line-height: 1.4; padding-top: 5px; }
.nav-step-text small { display: block; font-size: 12px; color: var(--muted); }
.nav-steps li.is-done { opacity: .5; }
.nav-steps li.is-current { background: rgba(14, 107, 71, .1); }
.nav-steps li.is-current .nav-step-ico { background: #0E6B47; color: #fff; }
.nav-steps li.is-current .nav-step-text { font-weight: 700; }
@media (min-width: 721px) {
  .nav-steps { position: absolute; left: 16px; top: 16px; bottom: 16px; width: 340px; max-height: none; }
  .nav-hud.steps-open .nav-card, .nav-hud.steps-open .nav-bottom { margin-left: 356px; width: min(520px, calc(100% - 372px)); }
}
