:root{
  --human-blue:#1677e8;--human-blue-dark:#0755b2;--human-blue-soft:#eaf4ff;--human-navy:#061a33;
  --human-ink:#0c2541;--human-muted:#688099;--human-line:#d8e4f0;--human-surface:#fff;--human-canvas:#edf4fb;
  --human-shadow:0 14px 38px rgba(6,36,72,.10);
}
html.is-embedded,html.is-embedded body{width:100%;height:100%;min-height:100%}
html.is-embedded body{margin:0!important;padding:0!important;color:var(--human-ink)!important;background:linear-gradient(180deg,#f7fbff,var(--human-canvas))!important;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important}
html.is-embedded .topbar,html.is-embedded .page-header{display:none!important}
html.is-embedded .page-shell{width:calc(100% - 24px)!important;max-width:1680px!important;margin:12px auto 30px!important}
html.is-embedded .dashboard-shell,html.is-embedded .data-shell,html.is-embedded .public-shell{width:calc(100% - 24px)!important;max-width:1680px!important;margin:12px auto 28px!important}
html.is-embedded .surface,html.is-embedded .hero-card,html.is-embedded .kpi-card,html.is-embedded .panel,html.is-embedded .card{border-color:rgba(75,145,214,.18)!important;border-radius:16px!important;background:rgba(255,255,255,.96)!important;box-shadow:var(--human-shadow)!important}
html.is-embedded .eyebrow{color:var(--human-blue)!important;font-size:9px!important;letter-spacing:.12em!important}
html.is-embedded h1,html.is-embedded h2,html.is-embedded h3{color:var(--human-ink)!important;letter-spacing:-.02em!important}
html.is-embedded p,html.is-embedded small{line-height:1.55}
html.is-embedded .button,html.is-embedded .top-button,html.is-embedded .action-button{border-radius:11px!important}
html.is-embedded .button.primary,html.is-embedded .top-button.primary,html.is-embedded .action-button.primary,html.is-embedded .btn:not(.btn-danger):not(.btn-warning):not(.btn-success):not(.btn-info){color:#fff!important;border-color:rgba(22,119,232,.55)!important;background:linear-gradient(135deg,var(--human-blue-dark),var(--human-blue))!important;box-shadow:0 9px 22px rgba(22,119,232,.18)!important}
html.is-embedded input,html.is-embedded select,html.is-embedded textarea{border-color:var(--human-line)!important;border-radius:10px!important;background:#fff!important}
html.is-embedded input:focus,html.is-embedded select:focus,html.is-embedded textarea:focus{border-color:#7db8f2!important;box-shadow:0 0 0 4px rgba(22,119,232,.08)!important}
html.is-embedded .table-wrap{border-color:var(--human-line)!important;border-radius:12px!important;background:#fff!important}
html.is-embedded th{color:#4b6680!important;background:#edf5fd!important}
html.is-embedded tbody tr:hover{background:#f4f9ff!important}
html.is-embedded .empty{border-radius:14px;background:#f7fbff}
html.is-embedded .empty strong{color:var(--human-ink)}
html.is-embedded .notice{border-color:#bedcf8!important;background:#edf6ff!important}

/* Dashboard: judul D.I dan filter lebih ringan */
html.is-embedded .dashboard-toolbar{position:sticky;z-index:12;top:0;padding:16px 18px!important;box-shadow:0 10px 28px rgba(6,36,72,.08)!important}
html.is-embedded .hero-grid{gap:12px!important}
html.is-embedded .kpi-grid{gap:10px!important}
html.is-embedded .kpi-card{min-height:96px!important}
html.is-embedded .decision-hero{background:linear-gradient(145deg,#f7fbff,#eaf4ff)!important}

/* Peta: navigasi utama sudah di kiri, maka kontrol konteks dipindah ke kanan. */
html.is-embedded .workspace{top:0!important;inset:0!important;height:100vh!important;min-height:100vh!important}
html.is-embedded .control-panel{
  top:14px!important;right:14px!important;bottom:14px!important;left:auto!important;width:332px!important;max-height:calc(100vh - 28px)!important;
  color:var(--human-ink)!important;border:1px solid rgba(100,151,202,.26)!important;border-radius:18px!important;
  background:rgba(255,255,255,.95)!important;box-shadow:0 18px 54px rgba(6,36,72,.18)!important;backdrop-filter:blur(22px)!important;
}
html.is-embedded .control-panel .panel-content{padding-right:4px}
html.is-embedded .panel-heading h1,html.is-embedded .section-heading strong,html.is-embedded .section-title,html.is-embedded .legend>strong{color:var(--human-ink)!important}
html.is-embedded .control-panel .eyebrow{color:var(--human-blue)!important}
html.is-embedded .field-label,html.is-embedded .switch-row{color:#4f6983!important}
html.is-embedded .select-shell,html.is-embedded .search-shell,html.is-embedded .stat-grid article,html.is-embedded .view-buttons button{border-color:var(--human-line)!important;background:#f7fbff!important}
html.is-embedded .select-shell select,html.is-embedded .search-shell input{color:var(--human-ink)!important;background:transparent!important}
html.is-embedded .iksi-card{border-color:#bedcf8!important;background:linear-gradient(135deg,#edf6ff,#f8fcff)!important}
html.is-embedded .iksi-score-wrap{border-color:var(--human-line)!important}
html.is-embedded .iksi-score-wrap span,html.is-embedded .iksi-detail small,html.is-embedded .stat-grid span,html.is-embedded .stat-grid small,html.is-embedded .legend{color:var(--human-muted)!important}
html.is-embedded .status-pill.neutral{color:#58718a!important;background:#edf2f7!important}
html.is-embedded .status-pill.good{color:#08704a!important;background:#dff8ed!important}
html.is-embedded .status-pill.warn{color:#96610b!important;background:#fff2d9!important}
html.is-embedded .status-pill.bad{color:#ad3040!important;background:#ffe6ea!important}
html.is-embedded .panel-section{border-color:var(--human-line)!important}
html.is-embedded .section-heading button{color:var(--human-blue)!important}
html.is-embedded .view-buttons button.active{color:#fff!important;border-color:var(--human-blue)!important;background:linear-gradient(135deg,var(--human-blue-dark),var(--human-blue))!important}
html.is-embedded .legend{border-color:var(--human-line)!important}
html.is-embedded .search-results{border-color:var(--human-line)!important;background:#fff!important;box-shadow:var(--human-shadow)!important}
html.is-embedded .search-result{color:var(--human-ink)!important;border-color:#e6eef6!important}
html.is-embedded .search-result:hover{background:#edf6ff!important}
html.is-embedded .map-hint{right:auto!important;left:16px!important;color:#35526f!important;border-color:rgba(100,151,202,.22)!important;background:rgba(255,255,255,.92)!important;box-shadow:var(--human-shadow)!important}
html.is-embedded .maplibregl-ctrl-bottom-left{left:0!important}
html.is-embedded .maplibregl-ctrl-top-right{right:356px!important}
html.is-embedded .workspace.panel-collapsed .maplibregl-ctrl-top-right{right:8px!important}
html.is-embedded .maplibregl-ctrl-group{border-color:#cfe0f0!important;background:rgba(255,255,255,.94)!important;box-shadow:0 10px 30px rgba(6,36,72,.14)!important}
html.is-embedded .maplibregl-ctrl-icon{filter:none!important;opacity:.75!important}
html.is-embedded .maplibregl-ctrl-attrib{color:#668098!important;background:rgba(255,255,255,.82)!important}
html.is-embedded .maplibregl-ctrl-attrib a{color:#47708f!important}
html.is-embedded .collapse-panel-btn,html.is-embedded .expand-panel-btn{color:var(--human-ink)!important;border-color:var(--human-line)!important;background:#fff!important}
html.is-embedded .collapse-panel-btn i{transform:rotate(180deg)}
html.is-embedded .expand-panel-btn{top:16px!important;right:16px!important;left:auto!important}
html.is-embedded .workspace.panel-collapsed .control-panel{transform:translateX(calc(100% + 28px))!important}
html.is-embedded .satria-popup .maplibregl-popup-content{color:var(--human-ink)!important;border-color:#cfe0f0!important;background:#fff!important;box-shadow:0 22px 54px rgba(6,36,72,.24)!important}
html.is-embedded .satria-popup .maplibregl-popup-tip{border-top-color:#fff!important;border-bottom-color:#fff!important}
html.is-embedded .satria-popup .maplibregl-popup-close-button{color:#36536f!important}
html.is-embedded .popup-head{background:linear-gradient(135deg,#e8f3ff,#f7fbff)!important}
html.is-embedded .popup-head span{color:var(--human-blue)!important}
html.is-embedded .popup-head strong,html.is-embedded .popup-item strong{color:var(--human-ink)!important}
html.is-embedded .popup-item{border-color:#dce8f3!important;background:#f8fbff!important}
html.is-embedded .popup-item span,html.is-embedded .popup-coordinate{color:var(--human-muted)!important}
html.is-embedded .popup-actions a{color:var(--human-blue-dark)!important;border-color:#bedcf8!important;background:#edf6ff!important}
html.is-embedded .loading-overlay{color:var(--human-ink)!important;background:rgba(240,247,255,.90)!important}
html.is-embedded .loader{border-color:#c7dff8!important;border-top-color:var(--human-blue)!important}
html.is-embedded .control-panel::after{background:linear-gradient(transparent,rgba(255,255,255,.97))!important}

/* Pusat Data: sidebar internal menjadi context bar horizontal agar shell utama tetap tunggal. */
html.is-embedded body[data-ui-page="data-center"] .app-shell{display:block!important;min-height:100vh!important;padding:12px!important;background:transparent!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar{position:sticky!important;z-index:18!important;top:0!important;width:100%!important;height:auto!important;min-height:0!important;margin:0 0 12px!important;padding:12px 14px!important;border:1px solid var(--human-line)!important;border-radius:16px!important;background:rgba(255,255,255,.97)!important;box-shadow:0 10px 30px rgba(6,36,72,.08)!important;display:grid!important;grid-template-columns:minmax(280px,420px) minmax(0,1fr)!important;gap:12px 18px!important;overflow:visible!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .di-selector{display:grid!important;grid-template-columns:auto minmax(180px,1fr)!important;align-items:center!important;column-gap:12px!important;row-gap:4px!important;margin:0!important;padding:0!important;border:0!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .di-selector .eyebrow{grid-column:1/-1!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .di-selector h1{grid-column:1/-1!important;margin:0 0 4px!important;font-size:18px!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .di-selector label{margin:0!important;white-space:nowrap!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .select-shell{height:38px!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .side-nav{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:6px!important;overflow-x:auto!important;margin:0!important;padding:3px 0!important;scrollbar-width:none!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .side-nav::-webkit-scrollbar{display:none!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .nav-item{flex:0 0 auto!important;width:auto!important;height:38px!important;min-height:38px!important;padding:0 12px!important;border:1px solid transparent!important;border-radius:10px!important;color:#55718c!important;background:transparent!important;gap:8px!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .nav-item.active{color:var(--human-blue-dark)!important;border-color:#bedcf8!important;background:#edf6ff!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .nav-item b{min-width:20px!important;height:20px!important;color:#9f3342!important;background:#ffe9ec!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .side-quality,html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .side-links{display:none!important}
html.is-embedded body[data-ui-page="data-center"] .content-shell{width:100%!important;margin:0!important;padding:0!important;min-width:0!important}

/* Editor: peta dominan, daftar aset menjadi panel kanan yang tenang. */
html.is-embedded .edit-container{width:100%!important;max-width:none!important;min-height:100vh!important;margin:0!important;border:0!important;border-radius:0!important;background:var(--human-canvas)!important;box-shadow:none!important}
html.is-embedded .edit-container .toolbar{position:sticky!important;z-index:20!important;top:0!important;padding:10px 12px!important;border-bottom:1px solid var(--human-line)!important;background:rgba(255,255,255,.97)!important;box-shadow:0 8px 24px rgba(6,36,72,.07)!important}
html.is-embedded .toolbar-title{display:none!important}
html.is-embedded .main-layout{height:calc(100vh - 76px)!important;min-height:520px!important;gap:10px!important;padding:10px!important}
html.is-embedded .map-container{border:1px solid var(--human-line)!important;border-radius:16px!important;overflow:hidden!important;box-shadow:var(--human-shadow)!important}
html.is-embedded .crud-panel{width:340px!important;border:1px solid var(--human-line)!important;border-radius:16px!important;background:#fff!important;box-shadow:var(--human-shadow)!important}
html.is-embedded .crud-header{color:var(--human-ink)!important;border-bottom:1px solid var(--human-line)!important;background:#f6faff!important}
html.is-embedded .tab-buttons{border-color:var(--human-line)!important}
html.is-embedded .tab-btn.active{color:var(--human-blue-dark)!important;background:#edf6ff!important}
html.is-embedded .asset-item{border-color:#e0ebf5!important;border-radius:12px!important;background:#f8fbff!important}
html.is-embedded .info-panel{border-top:1px solid var(--human-line)!important;background:#fff!important}

/* INSPEKTA mengikuti shell biru tanpa menghapus alur lama. */
html.is-embedded body[data-ui-page="streetview-index"],html.is-embedded .app-shell{background:var(--human-canvas)!important}

@media(max-width:900px){
  html.is-embedded .control-panel{top:auto!important;right:8px!important;bottom:8px!important;left:8px!important;width:auto!important;max-height:48vh!important}
  html.is-embedded .workspace.panel-collapsed .control-panel{transform:translateY(calc(100% + 24px))!important}
  html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar{grid-template-columns:1fr!important}
  html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .di-selector{grid-template-columns:auto minmax(0,1fr)!important}
  html.is-embedded .main-layout{height:auto!important;min-height:100vh!important;flex-direction:column!important}
  html.is-embedded .crud-panel{width:100%!important;min-height:340px!important}
}

/* V20.5 direct lock: embedded Pusat Data navigation */
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .nav-item{
  opacity:1!important;color:#27445f!important;background:#f7fbff!important;border:1px solid #c9dbea!important;
}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .nav-item i,
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .nav-item span{color:inherit!important}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .nav-item.active{
  color:#fff!important;background:linear-gradient(135deg,#0755b2,#1677e8)!important;border-color:#0755b2!important;
}
html.is-embedded body[data-ui-page="data-center"] .app-shell>.sidebar .nav-item.active *{color:#fff!important}
