:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --emerald: #059669;
  --sky: #0284c7;
  --amber: #d97706;
  --slate: #64748b;
  --red: #dc2626;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.app-shell {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

.sidebar {
  width: 400px;
  max-width: 100%;
  height: 100%;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 5;
}

.sidebar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
}

.sidebar-header h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: #cbd5e1;
}

.quota-pill {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #f8fafc;
}

.panel {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.section-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #334155;
}

.center-label {
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  max-width: 195px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
}

input[type='text'],
input[type='number'],
select {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type='text']:focus,
input[type='number']:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.btn-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s, transform 0.05s;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  flex: 1.3;
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
}

.btn-secondary {
  flex: 1;
  background: #e2e8f0;
  color: #1e293b;
}

.btn-secondary:hover:not(:disabled) {
  background: #cbd5e1;
}

.btn-secondary.active {
  background: #fef3c7;
  color: #92400e;
  outline: 2px solid #f59e0b;
}

.link-btn {
  border: none;
  background: none;
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}

.status-banner {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.status-banner.info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.status-banner.warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-banner.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.kpi-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 11px;
  color: var(--muted);
}

.kpi-value {
  font-size: 19px;
  line-height: 1.25;
  color: var(--text);
}

.kpi-sub {
  font-size: 10.5px;
  color: var(--muted);
}

.quadrant-box {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.quadrant-title {
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 8px;
}

.quadrant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}

.quad-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #334155;
  margin-bottom: 3px;
}

.quad-bar {
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.quad-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.25s ease;
}

.range-group {
  margin-bottom: 6px;
}

.range-header {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 4px;
}

input[type='range'] {
  width: 100%;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
}

.list-panel {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 220px;
}

.list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 2;
}

.count-badge {
  background: var(--primary);
  color: #ffffff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
}

.place-list {
  flex: 1;
  overflow-y: auto;
}

.place-item {
  padding: 11px 18px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.12s;
}

.place-item:hover {
  background: #f8fafc;
}

.place-item.selected {
  background: #eff6ff;
  border-left: 3px solid var(--primary);
  padding-left: 15px;
}

.place-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.place-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.place-dist {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #1e40af;
  background: #dbeafe;
  padding: 2px 6px;
  border-radius: 6px;
}

.place-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  font-size: 11.5px;
  color: #475569;
}

.rating-chip {
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 11px;
  color: #ffffff;
}

.rating-top { background: var(--emerald); }
.rating-good { background: var(--sky); }
.rating-low { background: var(--amber); }
.rating-none { background: var(--slate); }

.place-addr {
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.35;
}

.empty-state {
  padding: 24px 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

.map-stage {
  position: relative;
  flex: 1;
  height: 100vh;
  min-width: 0;
}

/* Explicit height on #map container (CF2) */
#map {
  width: 100%;
  height: 100%;
}

.pick-banner {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #ffffff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.25);
  z-index: 10;
}

.pick-banner button {
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.map-legend {
  position: absolute;
  bottom: 24px;
  left: 14px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  z-index: 6;
}

.legend-title {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.legend-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 11.5px;
  color: #334155;
}

.legend-items span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  display: inline-block;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.2);
}

.dot-center { background: var(--red); }
.dot-top { background: var(--emerald); }
.dot-good { background: var(--sky); }
.dot-low { background: var(--amber); }
.dot-unrated { background: var(--slate); }

/* Model Usaha colors */
.dot-m-self_service, .model-badge.m-self_service, .laundry-pin.model-self_service { background: #7c3aed; }
.dot-m-hybrid, .model-badge.m-hybrid, .laundry-pin.model-hybrid { background: #db2777; }
.dot-m-kiloan, .model-badge.m-kiloan, .laundry-pin.model-kiloan { background: #2563eb; }
.dot-m-satuan, .model-badge.m-satuan, .laundry-pin.model-satuan { background: #ea580c; }
.dot-m-premium, .model-badge.m-premium, .laundry-pin.model-premium { background: #b45309; }
.dot-m-sepatu_tas, .model-badge.m-sepatu_tas, .laundry-pin.model-sepatu_tas { background: #0d9488; }
.dot-m-umum, .model-badge.m-umum, .laundry-pin.model-umum { background: #64748b; }

.model-filter-block {
  margin-top: 8px;
}

.model-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s ease;
}

.model-chip:hover {
  border-color: #94a3b8;
  background: #f1f5f9;
}

.model-chip.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #1e293b;
}

.model-chip .chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.model-chip .chip-count {
  opacity: 0.8;
  font-weight: 700;
}

.model-badge {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  padding: 1px 6px;
  border-radius: 5px;
}

.iw-model-edit {
  margin: 8px 0;
  padding-top: 7px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #475569;
}

.iw-model-edit select {
  flex: 1;
  padding: 4px 6px;
  font-size: 11.5px;
  border-radius: 6px;
}

/* Session bar, Presets, WorldPop Demographics & Minimarket Traffic */
.session-strip {
  margin-top: 10px;
  padding: 8px 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.session-badge {
  font-size: 11px;
  font-weight: 700;
  color: #065f46;
}

.session-actions {
  display: flex;
  gap: 6px;
}

.mini-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.mini-btn:hover {
  background: #f1f5f9;
}

.mini-btn-accent {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

.mini-btn-accent:hover {
  background: #1e293b;
}

.preset-bar {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.preset-label {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  color: #1e293b;
  cursor: pointer;
}

.preset-chip:hover {
  background: #e2e8f0;
}

.preset-del {
  color: #94a3b8;
  font-weight: 700;
  margin-left: 2px;
}

.preset-del:hover {
  color: #dc2626;
}

.demo-panel {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 100%);
}

.demo-year {
  font-size: 10.5px;
  font-weight: 700;
  color: #0369a1;
  background: #e0f2fe;
  padding: 2px 7px;
  border-radius: 999px;
}

.kpi-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.kpi-pop {
  background: #ffffff;
  border-color: #bae6fd;
}

.kpi-ratio {
  background: #ecfdf5;
  border-color: #6ee7b7;
}

.kpi-grid-3 .kpi-value {
  font-size: 15.5px;
}

.demo-note {
  margin: 7px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
}

.traffic-box {
  margin-top: 10px;
  padding: 9px 10px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
}

.traffic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.traffic-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #9a3412;
  margin-right: 6px;
}

.traffic-count {
  font-size: 14px;
  color: #7c2d12;
}

.traffic-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #7c2d12;
  font-weight: 600;
  cursor: pointer;
}

.traffic-brands {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
}

.brand-pill {
  font-size: 10.5px;
  font-weight: 700;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 999px;
}

.quad-pop {
  margin-top: 3px;
  font-size: 10.5px;
  color: #475569;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}

.quad-opp {
  font-size: 9.5px;
  font-weight: 700;
  color: #065f46;
  background: #d1fae5;
  padding: 1px 5px;
  border-radius: 4px;
}

.dot-sq {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
}

.dot-traffic {
  background: #e11d48;
}

/* Distinct square minimarket pin on map */
.traffic-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 20px;
  padding: 0 4px;
  border-radius: 5px;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  border: 1.5px solid #ffffff;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.35);
  cursor: pointer;
  transition: transform 0.12s ease;
  user-select: none;
}

.traffic-pin:hover {
  transform: scale(1.22);
}

/* Pro features: Quota Cap Guard, Aggregate Insights, Street View & Routes */
.muted-inline {
  color: var(--muted);
  font-size: 10.5px;
}

.quota-guard-box {
  margin-top: 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  padding: 7px 10px;
}

.quota-guard-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
}

.quota-guard-summary::-webkit-details-marker {
  display: none;
}

.guard-shield {
  color: #047857;
}

.guard-month {
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 600;
}

.quota-bars {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.qbar-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.qbar-head {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: #334155;
}

.qbar-track {
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.qbar-fill {
  height: 100%;
  background: #059669;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.qbar-fill.warn {
  background: #d97706;
}

.qbar-fill.danger {
  background: #dc2626;
}

.aggregate-box {
  margin-top: 10px;
  padding: 9px 10px;
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  border-radius: 10px;
}

.aggregate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.aggregate-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #5b21b6;
}

.aggregate-note {
  margin-top: 6px;
  font-size: 10.5px;
  color: #6d28d9;
  line-height: 1.35;
}

.aggregate-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.agg-item {
  background: #ffffff;
  border: 1px solid #e9d5ff;
  border-radius: 7px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
}

.agg-item span {
  font-size: 10px;
  color: #64748b;
}

.agg-item strong {
  font-size: 14px;
  color: #4c1d95;
}

.iw-pro-actions {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}

.iw-pro-btn {
  flex: 1;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.iw-pro-btn:hover:not(:disabled) {
  background: #e2e8f0;
}

.iw-pro-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.iw-sv-box {
  margin: 6px 0 8px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
}

.iw-sv-box img {
  display: block;
  width: 100%;
  height: auto;
}

.iw-sv-msg,
.iw-route-box {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  color: #0369a1;
  margin: 6px 0;
  line-height: 1.4;
}

/* Custom AdvancedMarkerElement pin styling */
.laundry-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 999px;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.32);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  user-select: none;
}

.laundry-pin:hover,
.laundry-pin.active {
  transform: scale(1.22);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.45);
}

.laundry-pin.tier-top { background: var(--emerald); }
.laundry-pin.tier-good { background: var(--sky); }
.laundry-pin.tier-low { background: var(--amber); }
.laundry-pin.tier-none { background: var(--slate); }

.iw-card {
  max-width: 270px;
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #0f172a;
}

.iw-title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 5px;
}

.iw-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 11.5px;
}

.iw-addr {
  font-size: 12px;
  color: #475569;
  line-height: 1.4;
  margin: 0 0 8px;
}

.iw-link {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
}

.iw-link:hover {
  text-decoration: underline;
}

/* =========================================================
   v1.2.0 — Opsi 3: Site Selection, Heatmap, BEP, Komparasi & Ulasan
   ========================================================= */

.mini-btn-compare {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.mini-btn-compare:hover {
  background: #dbeafe;
}

.compare-quick-bar {
  margin-top: 8px;
  padding: 6px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: #1e3a8a;
  font-weight: 600;
}

/* Feasibility Score Panel */
.feasibility-panel {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.target-model-select {
  width: auto;
  max-width: 175px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
}

.score-hero {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

.score-ring {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 4px solid #cbd5e1;
  background: #f8fafc;
}

.score-ring strong {
  font-size: 21px;
  line-height: 1;
  color: var(--text);
}

.score-ring span {
  font-size: 10px;
  color: var(--muted);
  margin-top: 2px;
}

.score-ring.grade-a { border-color: #059669; background: #ecfdf5; }
.score-ring.grade-a strong { color: #047857; }
.score-ring.grade-b { border-color: #2563eb; background: #eff6ff; }
.score-ring.grade-b strong { color: #1d4ed8; }
.score-ring.grade-c { border-color: #d97706; background: #fffbeb; }
.score-ring.grade-c strong { color: #b45309; }
.score-ring.grade-d { border-color: #dc2626; background: #fef2f2; }
.score-ring.grade-d strong { color: #b91c1c; }

.score-meta {
  flex: 1;
  min-width: 0;
}

.score-grade-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.score-grade-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  color: #ffffff;
  background: #64748b;
}

.score-grade-pill.grade-a { background: #059669; }
.score-grade-pill.grade-b { background: #2563eb; }
.score-grade-pill.grade-c { background: #d97706; }
.score-grade-pill.grade-d { background: #dc2626; }

.score-verdict {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text);
}

.score-summary {
  margin: 0;
  font-size: 11px;
  color: #475569;
  line-height: 1.38;
}

.score-breakdown {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sbreak-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sbreak-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #334155;
}

.sbreak-head strong {
  color: #0f172a;
}

.sbreak-track {
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.sbreak-fill {
  height: 100%;
  border-radius: 999px;
  background: #2563eb;
  transition: width 0.25s ease;
}

.sbreak-fill.high { background: #059669; }
.sbreak-fill.mid { background: #2563eb; }
.sbreak-fill.low { background: #d97706; }

.gap-box {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.gap-title {
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  margin-bottom: 5px;
}

.gap-list {
  margin: 0;
  padding-left: 16px;
  font-size: 11px;
  color: #14532d;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* Revenue & BEP Calculator Panel */
.calc-panel {
  background: #ffffff;
}

.calc-details {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  padding: 9px 11px;
}

.calc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  list-style: none;
}

.calc-summary::-webkit-details-marker {
  display: none;
}

.calc-summary-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
}

.calc-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #cbd5e1;
}

.calc-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: #475569;
  font-weight: 600;
  margin-bottom: 6px;
}

.calc-inputs {
  margin-top: 4px;
  gap: 8px;
}

.calc-inputs input[type='number'] {
  padding: 6px 8px;
  font-size: 12.5px;
}

.calc-kpis {
  margin-top: 10px;
}

.calc-kpis .kpi-card {
  background: #ffffff;
}

.calc-kpis .kpi-value {
  font-size: 15.5px;
}

.kpi-card.bep-good {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.kpi-card.bep-good .kpi-value { color: #047857; }

.kpi-card.bep-warn {
  background: #fffbeb;
  border-color: #fde68a;
}
.kpi-card.bep-warn .kpi-value { color: #b45309; }

.kpi-card.bep-bad {
  background: #fef2f2;
  border-color: #fecaca;
}
.kpi-card.bep-bad .kpi-value { color: #b91c1c; }

.calc-disclaimer {
  margin: 8px 0 0;
  font-size: 10.5px;
  color: var(--muted);
  line-height: 1.35;
}

/* Floating Map Overlay Bar (Heatmap & Quadrant Overlay) */
.map-overlay-bar {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.14);
  z-index: 7;
}

.overlay-pill {
  border: 1px solid transparent;
  background: transparent;
  color: #334155;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.overlay-pill:hover {
  background: #f1f5f9;
}

.overlay-pill.active {
  background: #0f172a;
  color: #ffffff;
}

.overlay-pill.active-heat {
  background: #dc2626;
  color: #ffffff;
}

.overlay-pill.active-quad {
  background: #059669;
  color: #ffffff;
}

.legend-extra {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed var(--border);
  font-size: 10.5px;
  color: #475569;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.heat-scale-bar {
  display: inline-block;
  width: 72px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.6) 0%, rgba(250, 204, 21, 0.85) 50%, rgba(220, 38, 38, 0.95) 100%);
  vertical-align: middle;
}

/* InfoWindow Review Sentiment Analysis */
.iw-rev-box {
  margin: 6px 0 8px;
  padding: 8px;
  border-radius: 7px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  font-size: 11px;
  line-height: 1.4;
}

.iw-rev-head {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 5px;
}

.iw-rev-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 5px;
}

.iw-rev-tag {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
}

.iw-rev-pos {
  background: #dcfce7;
  color: #166534;
}

.iw-rev-weak {
  background: #fee2e2;
  color: #991b1b;
}

.iw-rev-hint {
  font-size: 10.5px;
  color: #1e40af;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 5px;
  padding: 5px 7px;
  margin-bottom: 6px;
}

.iw-rev-snippets {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 135px;
  overflow-y: auto;
}

.iw-rev-snippet {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 5px;
  padding: 5px 6px;
  font-size: 10.5px;
  color: #334155;
}

.iw-rev-snippet-meta {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 2px;
  font-size: 10px;
}

.iw-rev-attr {
  margin-top: 5px;
  font-size: 9.5px;
  color: #64748b;
  text-align: right;
}

/* Multi-Location Comparison Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-dialog {
  width: 100%;
  max-width: 980px;
  max-height: 90vh;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #ffffff;
}

.modal-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-sub {
  margin: 3px 0 0;
  font-size: 12px;
  color: #cbd5e1;
}

.modal-close {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.compare-winner-banner {
  margin: 12px 20px 0;
  padding: 10px 12px;
  border-radius: 9px;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-size: 12.5px;
  font-weight: 600;
}

.compare-table-wrap {
  padding: 14px 20px;
  overflow: auto;
  flex: 1;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.compare-table th,
.compare-table td {
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  min-width: 155px;
}

.compare-table th.metric-col {
  width: 175px;
  min-width: 155px;
  background: #f1f5f9;
  position: sticky;
  left: 0;
  z-index: 2;
}

.compare-table td.metric-label {
  font-weight: 600;
  color: #334155;
  background: #f8fafc;
  position: sticky;
  left: 0;
  z-index: 1;
}

.compare-table td.best-cell {
  background: #ecfdf5;
  color: #065f46;
  font-weight: 700;
}

.compare-col-head {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.compare-col-actions {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}

.compare-del-btn {
  border: none;
  background: none;
  color: #dc2626;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.compare-del-btn:hover {
  text-decoration: underline;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.modal-foot-right {
  display: flex;
  gap: 8px;
}

/* =========================================================
   v1.2.1 — Sidebar Hide/Unhide & Full Export Dump Controls
   ========================================================= */

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sidebar-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.1s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.26);
}

.sidebar-toggle-btn:active {
  transform: scale(0.95);
}

.app-shell.sidebar-collapsed .sidebar {
  display: none;
}

.app-shell.sidebar-collapsed .map-stage {
  width: 100vw;
  height: 100vh;
}

.floating-show-sidebar-btn {
  position: absolute;
  top: 62px;
  left: 12px;
  z-index: 9;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.28);
  transition: background 0.14s ease, transform 0.1s ease;
}

.floating-show-sidebar-btn:hover {
  background: #1e3a8a;
}

.floating-show-sidebar-btn:active {
  transform: translateY(1px);
}

.export-dump-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-top: 6px;
  margin-top: 2px;
  border-top: 1px dashed #a7f3d0;
}

.export-dump-label {
  font-size: 10.5px;
  font-weight: 700;
  color: #065f46;
}

.export-dump-btns {
  display: flex;
  gap: 5px;
}

.mini-btn-emerald {
  background: #059669;
  color: #ffffff;
  border-color: #059669;
}

.mini-btn-emerald:hover {
  background: #047857;
}

/* =========================================================
   v1.3.0 — Market Segment Profile & Anchor Pins (Kampus/Pabrik/Kantor)
   ========================================================= */

.market-segment-box {
  margin-top: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.market-segment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.market-segment-title {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.segment-badge {
  font-size: 10.5px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  color: #ffffff;
  background: #475569;
  white-space: nowrap;
}

.segment-badge.seg-type-mahasiswa { background: #7c3aed; }
.segment-badge.seg-type-pekerja { background: #b45309; }
.segment-badge.seg-type-rumah_tangga { background: #2563eb; }
.segment-badge.seg-type-campuran { background: #0f766e; }

.segment-stack-bar {
  display: flex;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f0;
}

.seg-fill {
  height: 100%;
  transition: width 0.25s ease;
}

.seg-student { background: #7c3aed; }
.seg-worker { background: #d97706; }
.seg-household { background: #2563eb; }

.segment-legend {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 10.5px;
  color: #334155;
}

.segment-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.seg-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.segment-advice {
  margin: 6px 0 0;
  font-size: 10.5px;
  color: #475569;
  line-height: 1.4;
}

.anchor-box {
  margin-top: 10px;
  padding: 9px 10px;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
}

.anchor-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #115e59;
  margin-right: 6px;
}

.anchor-count {
  font-size: 14px;
  color: #134e4a;
}

.anchor-check {
  color: #115e59;
}

.overlay-pill.active-anchor {
  background: #0f766e;
  color: #ffffff;
}

/* Distinct badge marker pin for Market Anchors (Kampus, Pabrik, Perkantoran) */
.anchor-pin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 30px;
  height: 22px;
  padding: 0 6px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.38);
  cursor: pointer;
  transition: transform 0.12s ease;
  user-select: none;
}

.anchor-pin:hover {
  transform: scale(1.2);
}

.dot-anchor {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
  border: 1.5px solid #ffffff;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.25);
  transform: rotate(45deg) scale(0.85);
}

.dot-anchor-kampus { background: #7c3aed; }
.dot-anchor-pabrik { background: #b45309; }
.dot-anchor-perkantoran { background: #0f766e; }

/* =========================================================================
   v1.4.0: Weighting Sliders, Huff Badge, Hex Grid, Executive Summary & SES
   ========================================================================= */

.weighting-toggle-container {
  margin-top: 10px;
}

.feasibility-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
}

.btn-text-action {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-text-action:hover {
  background: #eef2ff;
  border-color: #818cf8;
  color: #3730a3;
}

.btn-exec-copy {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #065f46;
}

.btn-exec-copy:hover {
  background: #d1fae5;
  border-color: #10b981;
  color: #064e3b;
}

.exec-toast {
  margin-top: 6px;
  padding: 5px 9px;
  border-radius: 7px;
  background: #065f46;
  color: #ecfdf5;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.weights-panel {
  margin-top: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.weights-presets {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.weight-preset-btn {
  flex: 1;
  padding: 5px 6px;
  font-size: 10.5px;
  font-weight: 700;
  border-radius: 6px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.weight-preset-btn:hover {
  border-color: #6366f1;
  color: #4338ca;
}

.weight-preset-btn.active {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #ffffff;
}

.weight-slider-row {
  margin-bottom: 7px;
}

.weight-slider-row:last-child {
  margin-bottom: 0;
}

.weight-slider-row label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
}

.weight-slider-row input[type='range'] {
  width: 100%;
  accent-color: #4f46e5;
  cursor: pointer;
}

/* Huff Model Badge in Calculator */
.huff-badge-row {
  margin: 6px 0 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, #eff6ff, #f5f3ff);
  border: 1px solid #c7d2fe;
  color: #312e81;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* Hexagonal Grid Overlay Pill */
.overlay-pill.active-hex {
  background: #059669;
  color: #ffffff;
}

/* Customer SES Grade & 4-Way Model Scoring (Apique Management) */
.ses-card {
  margin-top: 10px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
}

.ses-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 8px;
}

.ses-title {
  font-size: 11.5px;
  font-weight: 800;
  color: #0f172a;
  display: block;
}

.ses-source-tag {
  display: inline-block;
  margin-top: 2px;
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}

.ses-source-tag.is-survey {
  background: #dcfce7;
  color: #166534;
}

.ses-summary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.ses-grade-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: #475569;
  flex-shrink: 0;
}

.ses-grade-badge.ses-c { background: #2563eb; }
.ses-grade-badge.ses-b { background: #7c3aed; }
.ses-grade-badge.ses-bplus { background: #ea580c; }
.ses-grade-badge.ses-a { background: #b45309; }

.ses-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 11px;
  color: #334155;
}

.ses-meta strong {
  font-size: 11.5px;
  color: #0f172a;
}

.ses-trigger-note {
  margin: 0 0 8px;
  font-size: 10.5px;
  color: #475569;
  line-height: 1.4;
}

.red-flag-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}

.red-flag-item {
  padding: 7px 9px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  font-size: 10.5px;
  line-height: 1.4;
}

.red-flag-item strong {
  display: block;
  margin-bottom: 2px;
  color: #7f1d1d;
}

.hybrid-rec-banner {
  margin-bottom: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: linear-gradient(90deg, #fefce8, #fef3c7);
  border: 1px solid #f59e0b;
  color: #78350f;
  font-size: 10.5px;
  line-height: 1.4;
}

.four-way-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.four-way-card {
  padding: 7px 8px;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.four-way-card.fw-top {
  background: #f0fdf4;
  border-color: #86efac;
}

.fw-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}

.fw-score {
  font-size: 12px;
  font-weight: 800;
}

.fw-bar-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.fw-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.fw-sub {
  margin-top: 3px;
  font-size: 9.5px;
  color: #64748b;
}

/* Micro-Survey Modal */
.modal-dialog-sm {
  max-width: 480px;
}

.survey-form-body {
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.survey-field select {
  width: 100%;
  margin-top: 4px;
}

/* Autocomplete Dropdown (0 Google Quota) */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 90;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.16);
  max-height: 240px;
  overflow-y: auto;
}

.ac-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  padding: 8px 11px;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  cursor: pointer;
  transition: background 0.1s ease;
}

.ac-item:last-of-type {
  border-bottom: none;
}

.ac-item:hover,
.ac-item.ac-active {
  background: #eff6ff;
}

.ac-title {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}

.ac-sub {
  font-size: 10.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ac-foot {
  padding: 5px 10px;
  font-size: 9.5px;
  color: #64748b;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  text-align: right;
}

.btn-pdf-deck {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.btn-pdf-deck:hover {
  background: #dbeafe;
  border-color: #3b82f6;
  color: #1e40af;
}

/* v1.5.0: Traffic Layer Pill, Batch Road Route, Review Compare 5 Best vs 5 Worst */
.overlay-pill.active-traffic {
  background: #dc2626;
  color: #ffffff;
}

.list-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.road-route-tag {
  margin-top: 4px;
  font-size: 10.5px;
  font-weight: 600;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 2px 7px;
  display: inline-block;
}

.review-compare-box {
  margin-top: 10px;
  padding: 9px 10px;
  background: #faf5ff;
  border: 1px solid #d8b4fe;
  border-radius: 10px;
}

.review-compare-result {
  margin-top: 8px;
}

.rc-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rc-col {
  padding: 8px;
  border-radius: 8px;
  font-size: 10.5px;
  line-height: 1.45;
}

.rc-col-best {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #064e3b;
}

.rc-col-worst {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #7f1d1d;
}

.rc-col-title {
  font-weight: 800;
  font-size: 11px;
  margin-bottom: 4px;
}

.rc-pill {
  display: inline-block;
  margin: 2px 3px 2px 0;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
}

/* =========================================================
   v1.6.0 — Opsi 4: Data Quality, Extra Anchors, Session Cache & Reports
   ========================================================= */

.mini-btn-excel {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

.mini-btn-excel:hover {
  background: #166534;
}

.mini-btn-pdf {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

.mini-btn-pdf:hover {
  background: #4338ca;
}

.mini-btn-extra-anchor {
  background: #fdf2f8;
  color: #be185d;
  border-color: #f9a8d4;
}

.mini-btn-extra-anchor:hover:not(:disabled) {
  background: #fce7f3;
}

.history-bar {
  margin-top: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.history-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1px solid #86efac;
  border-radius: 999px;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #14532d;
  cursor: pointer;
  transition: all 0.12s ease;
}

.history-chip:hover {
  background: #dcfce7;
}

.history-chip.active {
  background: #15803d;
  color: #ffffff;
  border-color: #15803d;
}

.history-chip .h-meta {
  font-weight: 400;
  opacity: 0.85;
  font-size: 10px;
}

.data-quality-box {
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.dq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.dq-title {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
}

.dq-score {
  font-size: 11.5px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
}

.dq-score.dq-high {
  background: #d1fae5;
  color: #065f46;
}

.dq-score.dq-mid {
  background: #fef3c7;
  color: #92400e;
}

.dq-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.dq-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  border: 1px solid transparent;
}

.dq-pill.done {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.dq-pill.missing {
  background: #ffffff;
  color: #64748b;
  border-color: #cbd5e1;
}

.dq-pill.actionable {
  cursor: pointer;
}

.dq-pill.actionable:hover {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.dot-anchor-hunian { background: #db2777; }
.dot-anchor-kesehatan { background: #e11d48; }

.calc-package-row {
  margin: 8px 0 6px;
}

.calc-package-row select {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
}

.calc-package-note {
  margin-top: 4px;
  font-size: 10.5px;
  color: #475569;
  line-height: 1.35;
}

.calc-total-strip {
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: 7px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #1e3a8a;
}

.calc-source-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

.calc-source-pill.custom {
  background: #d1fae5;
  color: #065f46;
}

@media (max-width: 860px) {
  .app-shell {
    flex-direction: column-reverse;
  }
  .sidebar {
    width: 100%;
    height: 48vh;
    border-right: none;
    border-top: 1px solid var(--border);
  }
  .map-stage {
    height: 52vh;
  }
  .app-shell.sidebar-collapsed .map-stage {
    height: 100vh;
  }
  .floating-show-sidebar-btn {
    top: 56px;
    left: 10px;
    padding: 7px 11px;
    font-size: 11.5px;
  }
  .map-overlay-bar {
    top: 8px;
    max-width: calc(100% - 16px);
    overflow-x: auto;
  }
  .map-legend {
    bottom: 10px;
    left: 10px;
    right: 10px;
  }
}

/* =========================================================
   v1.8.0 — Opsi 1: Gerbang PIN Akses (Cloudflare Workers)
   ========================================================= */
.pin-gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
}

.pin-gate-overlay[hidden] {
  display: none;
}

.pin-gate-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 16px;
  padding: 28px 24px 22px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  border: 1px solid #e2e8f0;
}

.pin-gate-icon {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 10px;
}

.pin-gate-card h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-weight: 800;
  color: #0f172a;
}

.pin-gate-sub {
  margin: 0 0 18px;
  font-size: 12.5px;
  line-height: 1.5;
  color: #475569;
}

.pin-gate-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.22em;
  font-weight: 700;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pin-gate-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pin-gate-error {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 600;
}

.pin-gate-submit {
  width: 100%;
  margin-top: 12px;
  padding: 10px 16px;
  font-size: 14px;
}

.pin-gate-foot {
  margin-top: 14px;
  font-size: 10.5px;
  color: #64748b;
}
