:root {
  --bg-void: #03060a;
  --bg-panel: rgba(7, 14, 22, 0.84);
  --bg-panel-solid: #070e16;
  --bg-card: rgba(12, 24, 36, 0.78);
  --bg-card-hover: rgba(18, 36, 54, 0.92);
  --border-subtle: rgba(56, 242, 230, 0.16);
  --border-strong: rgba(56, 242, 230, 0.42);
  --cyan: #38f2e6;
  --cyan-dim: #1aa6b7;
  --coral: #f28b66;
  --coral-dim: #c95d3e;
  --emerald: #34d399;
  --amber: #fbbf24;
  --danger: #f87171;
  --text-main: #eef6fa;
  --text-muted: #8aa4b8;
  --text-dim: #546e82;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

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

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-void);
  color: var(--text-main);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar halus */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb { background: rgba(56, 242, 230, 0.25); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(56, 242, 230, 0.45); }

/* Canvas Neural Constellation Background */
#neural-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  display: block;
}

/* Subtle vignette overlay matching reference artwork */
.void-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    radial-gradient(circle at 50% 48%, transparent 32%, rgba(2, 5, 9, 0.72) 100%),
    radial-gradient(circle at 18% 72%, rgba(56, 242, 230, 0.05) 0%, transparent 45%),
    radial-gradient(circle at 78% 28%, rgba(242, 139, 102, 0.05) 0%, transparent 42%);
}

/* ==================== LOGIN GATE (ID & PIN) ==================== */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 5, 10, 0.62);
  backdrop-filter: blur(8px);
  padding: 20px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.login-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(6, 13, 21, 0.92);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 28px 28px 24px;
  box-shadow: 0 0 60px rgba(56, 242, 230, 0.12), 0 24px 60px rgba(0,0,0,0.8);
  position: relative;
}

.login-header {
  text-align: center;
  margin-bottom: 20px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  letter-spacing: 1.5px;
  font-size: 1.15rem;
  color: var(--text-main);
}

.brand-mark .pulse-orb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(56, 242, 230, 0.2), 0 0 14px var(--cyan);
}

.login-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.conn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  background: rgba(56, 242, 230, 0.08);
  border: 1px solid rgba(56, 242, 230, 0.25);
  color: var(--cyan);
  cursor: pointer;
}

.conn-pill.demo {
  background: rgba(242, 139, 102, 0.12);
  border-color: rgba(242, 139, 102, 0.35);
  color: var(--coral);
}

.field-group {
  margin-bottom: 14px;
}

.field-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-box {
  width: 100%;
  background: rgba(2, 8, 14, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: var(--font-mono);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-box:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(56, 242, 230, 0.12);
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 14px;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  background: transparent;
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.key-btn {
  background: rgba(14, 28, 42, 0.72);
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 10px 0;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.key-btn:hover {
  background: rgba(56, 242, 230, 0.14);
  border-color: var(--cyan);
}

.key-btn.action {
  font-size: 0.78rem;
  color: var(--coral);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #19b5c4, #38f2e6);
  color: #031017;
  box-shadow: 0 0 20px rgba(56, 242, 230, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-coral {
  background: linear-gradient(135deg, #d96543, #f28b66);
  color: #160703;
}

.btn-coral:hover { filter: brightness(1.08); }

.btn-ghost {
  background: rgba(14, 28, 42, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.btn-ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.btn-sm { padding: 6px 11px; font-size: 0.76rem; border-radius: 7px; }
.btn-block { width: 100%; }

.login-error {
  min-height: 20px;
  font-size: 0.78rem;
  color: var(--danger);
  text-align: center;
  margin-bottom: 10px;
}

.demo-hint {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

.demo-hint code {
  color: var(--cyan);
  font-family: var(--font-mono);
  background: rgba(56, 242, 230, 0.08);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ==================== MAIN APP SHELL ==================== */
.app-shell {
  position: relative;
  z-index: 10;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  pointer-events: none;
}

.app-shell.locked { display: none; }

/* TOP HUD BAR */
.top-hud {
  pointer-events: auto;
  height: 60px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(180deg, rgba(3, 8, 14, 0.94) 0%, rgba(3, 8, 14, 0.65) 100%);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.hud-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(8, 18, 28, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 4px;
  border-radius: 10px;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.nav-tab:hover { color: var(--text-main); }
.nav-tab.active {
  background: rgba(56, 242, 230, 0.16);
  color: var(--cyan);
  box-shadow: inset 0 0 0 1px rgba(56, 242, 230, 0.35);
}

.hud-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(10, 22, 34, 0.84);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.hud-pill:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.hud-pill.active-btn {
  border-color: var(--cyan);
  background: rgba(56, 242, 230, 0.14);
  color: var(--cyan);
}

.dot-online {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 8px var(--emerald);
}

.dot-offline {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-dim);
}

.badge-count {
  background: var(--coral);
  color: #160703;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.badge-count.zero { display: none; }

/* MAIN WORKSPACE STAGE */
.workspace-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  padding: 16px 20px 56px;
  display: flex;
  gap: 16px;
  pointer-events: none;
}

/* NEURAL RADAR OVERLAY (View 1) */
.radar-hud-overlay {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.radar-left-stack {
  width: 320px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}

.radar-right-stack {
  width: 350px;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}

.glass-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  border-radius: 13px;
  padding: 14px 16px;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.48);
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.card-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.kpi-box {
  background: rgba(4, 11, 18, 0.75);
  border: 1px solid rgba(56, 242, 230, 0.12);
  border-radius: 9px;
  padding: 10px;
}

.kpi-val {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.kpi-val.coral { color: var(--coral); }
.kpi-val.cyan { color: var(--cyan); }
.kpi-lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* CANVAS TOOLTIP */
.canvas-tooltip {
  position: fixed;
  z-index: 30;
  pointer-events: none;
  background: rgba(4, 11, 18, 0.95);
  border: 1px solid var(--cyan);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 0.78rem;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.75);
  display: none;
  max-width: 280px;
}

.canvas-tooltip .tt-title { font-weight: 700; color: var(--cyan); margin-bottom: 3px; }
.canvas-tooltip .tt-meta { color: var(--text-muted); font-size: 0.72rem; }

/* FULL CONTENT PANELS (Manual Search & Tender Feed) */
.panel-view {
  pointer-events: auto;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  background: rgba(5, 11, 18, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.65);
}

.panel-view.active { display: flex; }

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(8, 17, 27, 0.8);
}

.panel-header h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-bar {
  padding: 14px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  background: rgba(4, 9, 15, 0.65);
}

.select-box, .search-input {
  width: 100%;
  background: rgba(7, 15, 24, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 9px 11px;
  color: var(--text-main);
  font-size: 0.82rem;
  outline: none;
}

.select-box:focus, .search-input:focus { border-color: var(--cyan); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* MANUAL SEARCH SPLIT LAYOUT */
.manual-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 16px;
  height: 100%;
  overflow: hidden;
}

.manual-col {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 11px;
  background: rgba(4, 10, 16, 0.62);
}

.manual-col-head {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.manual-col-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lpse-row-card {
  background: var(--bg-card);
  border: 1px solid rgba(56, 242, 230, 0.12);
  border-radius: 10px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.18s;
}

.lpse-row-card:hover {
  border-color: var(--cyan);
  background: var(--bg-card-hover);
}

.lpse-row-info { min-width: 0; flex: 1; }
.lpse-row-name { font-size: 0.85rem; font-weight: 600; color: var(--text-main); }
.lpse-row-meta { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 6px; }

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

.tag-cyan { background: rgba(56, 242, 230, 0.13); color: var(--cyan); border: 1px solid rgba(56, 242, 230, 0.3); }
.tag-coral { background: rgba(242, 139, 102, 0.15); color: var(--coral); border: 1px solid rgba(242, 139, 102, 0.35); }
.tag-emerald { background: rgba(52, 211, 153, 0.14); color: var(--emerald); border: 1px solid rgba(52, 211, 153, 0.3); }
.tag-muted { background: rgba(148, 163, 184, 0.12); color: var(--text-muted); border: 1px solid rgba(148, 163, 184, 0.2); }

/* TENDER CARDS */
.tender-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tender-card {
  background: var(--bg-card);
  border: 1px solid rgba(56, 242, 230, 0.14);
  border-left: 3px solid var(--cyan);
  border-radius: 10px;
  padding: 13px 15px;
  transition: all 0.2s;
}

.tender-card.konstruksi { border-left-color: var(--coral); }
.tender-card.unread {
  background: rgba(20, 38, 52, 0.88);
  box-shadow: 0 0 18px rgba(56, 242, 230, 0.08);
}

.tender-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 6px;
}

.tender-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.38;
}

.tender-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
  margin: 7px 0 10px;
}

.tender-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* ==================== SLIDE-OVER DRAWERS (TEAM CHAT & NOTIF) ==================== */
.drawer {
  position: fixed;
  top: 60px;
  right: 0;
  bottom: 0;
  width: 440px;
  max-width: 96vw;
  z-index: 40;
  background: rgba(6, 13, 21, 0.96);
  border-left: 1px solid var(--border-strong);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: -18px 0 50px rgba(0,0,0,0.75);
}

.drawer.open { transform: translateX(0); }

.drawer-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--cyan);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* TEAM PRESENCE & CHAT */
.presence-strip {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  max-height: 195px;
  overflow-y: auto;
  background: rgba(3, 8, 14, 0.7);
}

.presence-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
}

.presence-item:hover { background: rgba(56, 242, 230, 0.08); }
.presence-item.active-room {
  background: rgba(56, 242, 230, 0.15);
  border: 1px solid rgba(56, 242, 230, 0.35);
}

.p-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.p-name { font-size: 0.82rem; font-weight: 600; color: var(--text-main); }
.p-sub { font-size: 0.68rem; color: var(--text-muted); }

.chat-room-banner {
  padding: 8px 14px;
  font-size: 0.74rem;
  color: var(--text-muted);
  background: rgba(12, 24, 36, 0.65);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-bubble {
  max-width: 86%;
  padding: 9px 12px;
  border-radius: 11px;
  background: rgba(14, 28, 42, 0.88);
  border: 1px solid rgba(56, 242, 230, 0.14);
  align-self: flex-start;
  font-size: 0.82rem;
  line-height: 1.45;
}

.chat-bubble.mine {
  align-self: flex-end;
  background: rgba(20, 74, 84, 0.72);
  border-color: rgba(56, 242, 230, 0.4);
}

.chat-sender {
  font-size: 0.69rem;
  font-weight: 700;
  color: var(--cyan);
  margin-bottom: 3px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.chat-time { color: var(--text-dim); font-family: var(--font-mono); font-weight: 400; }

.chat-tender-attach {
  margin-top: 7px;
  padding: 7px 9px;
  border-radius: 7px;
  background: rgba(3, 8, 14, 0.75);
  border-left: 3px solid var(--coral);
  font-size: 0.74rem;
}

.chat-tender-attach a {
  color: var(--cyan);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 4px;
}

.chat-input-bar {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  background: rgba(4, 10, 17, 0.95);
}

/* ==================== BOTTOM TELEMETRY FOOTER (REF IMAGE HOMAGE) ==================== */
.bottom-telemetry {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  padding: 10px 22px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}

.brand-signature {
  pointer-events: auto;
}

.sig-logo {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sig-cube {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, var(--cyan), #0e7490);
  border-radius: 3px;
  box-shadow: 0 0 12px rgba(56, 242, 230, 0.6);
}

.sig-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.6px;
}

.telemetry-stamp {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  border-top: 1px solid rgba(255,255,255,0.22);
  padding-top: 5px;
  color: var(--text-muted);
}

.telemetry-stamp strong { color: var(--text-main); }

/* ==================== MODAL (SETTINGS & ADMIN) ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(2, 5, 10, 0.78);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-backdrop.open { display: flex; }

.modal-box {
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  background: #071019;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.85);
}

/* ==================== TOAST NOTIFICATIONS ==================== */
.toast-container {
  position: fixed;
  top: 72px;
  right: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
}

.toast {
  background: rgba(7, 16, 26, 0.96);
  border: 1px solid var(--cyan);
  border-left: 4px solid var(--coral);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  animation: slideIn 0.25s ease;
}

@keyframes slideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-title { font-size: 0.8rem; font-weight: 700; color: var(--coral); margin-bottom: 4px; }
.toast-body { font-size: 0.78rem; color: var(--text-main); line-height: 1.4; }
.toast-link { display: inline-block; margin-top: 7px; font-size: 0.75rem; color: var(--cyan); font-weight: 600; text-decoration: none; }

@media (max-width: 960px) {
  .radar-left-stack, .radar-right-stack { width: 100%; max-width: 360px; }
  .radar-hud-overlay { flex-direction: column; overflow-y: auto; }
  .manual-grid { grid-template-columns: 1fr; }
  .top-hud { height: auto; padding: 10px 12px; flex-wrap: wrap; }
}


/* ==================== PWA & MOBILE STANDALONE ENHANCEMENTS ==================== */
.pwa-install-pill {
  border-color: rgba(56, 242, 230, 0.45);
  background: rgba(56, 242, 230, 0.12);
  color: var(--cyan);
}

.pwa-banner-stack {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 65;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: 92vw;
  pointer-events: none;
}

.pwa-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  animation: bannerFadeIn 0.22s ease;
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pwa-banner.visible { display: flex; }
.pwa-banner.offline { background: rgba(120, 42, 24, 0.94); border: 1px solid var(--coral); color: #fff1eb; }
.pwa-banner.update { background: rgba(7, 24, 36, 0.96); border: 1px solid var(--cyan); color: var(--text-main); }

.pwa-banner-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 2px 5px;
  line-height: 1;
}
.pwa-banner-close:hover { color: #ffffff; }

.pwa-guide-card {
  background: rgba(4, 11, 18, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
}

.mobile-bottom-nav { display: none; }

@media (max-width: 768px) {
  .top-hud {
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
    height: auto;
  }
  .nav-tabs { display: none; }
  #btn-sound, #btn-notif-drawer, #btn-chat-drawer { display: none; }
  .bottom-telemetry { display: none; }

  .workspace-stage {
    padding: 10px 10px calc(74px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
  }
  .radar-hud-overlay {
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    pointer-events: auto;
  }
  .radar-left-stack, .radar-right-stack {
    width: 100%;
    max-width: 100%;
    max-height: none;
  }
  .manual-grid {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .manual-col { min-height: 300px; }
  .drawer {
    top: 0;
    width: 100vw;
    max-width: 100vw;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .mobile-bottom-nav {
    pointer-events: auto;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 35;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: rgba(5, 11, 18, 0.96);
    border-top: 1px solid var(--border-strong);
    backdrop-filter: blur(16px);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 0.66rem;
    font-weight: 600;
    padding: 4px 2px;
    cursor: pointer;
  }
  .mobile-tab.active { color: var(--cyan); }
  .mobile-tab .m-ico { font-size: 1.05rem; position: relative; }
  .mobile-tab .m-badge {
    position: absolute;
    top: -4px;
    right: -10px;
    font-style: normal;
    font-size: 0.6rem;
    background: var(--coral);
    color: #160703;
    border-radius: 999px;
    padding: 0 5px;
    font-family: var(--font-mono);
    font-weight: 800;
  }
  .mobile-tab .m-badge.zero { display: none; }
}


/* ==================== INTERACTIVE INDONESIA MAP & LPSE PINS ==================== */
#indonesia-map {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  background: #06101a;
  background-image:
    linear-gradient(rgba(56, 242, 230, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 242, 230, 0.04) 1px, transparent 1px);
  background-size: 44px 44px;
}

.leaflet-container {
  background: #06101a !important;
  font-family: var(--font-sans) !important;
}

/* Map Floating Toolbar (Centered Top of Map) */
.map-toolbar {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(6, 14, 23, 0.88);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 5px 8px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.65);
  pointer-events: auto;
}

.map-tool-btn {
  background: rgba(14, 28, 42, 0.85);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}

.map-tool-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.map-tool-btn.accent {
  background: rgba(56, 242, 230, 0.15);
  border-color: rgba(56, 242, 230, 0.45);
  color: var(--cyan);
}

/* Fullscreen Map toggle hides side HUD stacks cleanly */
.radar-hud-overlay.map-fullscreen .radar-left-stack,
.radar-hud-overlay.map-fullscreen .radar-right-stack {
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.radar-left-stack, .radar-right-stack {
  transition: opacity 0.22s ease, transform 0.22s ease;
}

/* Sleeker side widths so Indonesia archipelago stays clear in center */
@media (min-width: 961px) {
  .radar-left-stack { width: 292px; }
  .radar-right-stack { width: 325px; }
}

/* Custom Glowing Map Pins */
.lpse-div-icon {
  background: transparent !important;
  border: none !important;
}

.lpse-pin {
  position: relative;
  width: 34px;
  height: 42px;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.18s ease;
}

.lpse-pin:hover {
  transform: scale(1.16) translateY(-3px);
}

.lpse-pin .pin-head {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6efbf2, #1298a8);
  border: 2px solid #04131c;
  box-shadow: 0 0 0 2px rgba(56, 242, 230, 0.55), 0 4px 14px rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.lpse-pin .pin-count {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 800;
  color: #03131b;
  letter-spacing: -0.4px;
}

.lpse-pin .pin-tip {
  width: 0;
  height: 0;
  margin-top: -3px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid #1298a8;
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.8));
}

/* National K/L Hub Pin (Gold) */
.lpse-pin.national .pin-head {
  background: radial-gradient(circle at 35% 30%, #fde68a, #d97706);
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.65), 0 4px 16px rgba(251, 191, 36, 0.35);
}
.lpse-pin.national .pin-tip { border-top-color: #d97706; }

/* Alert Pin (New Tender Detected — Coral + Radar Pulse) */
.lpse-pin.alert .pin-head {
  background: radial-gradient(circle at 35% 30%, #ffb499, #dc522c);
  box-shadow: 0 0 0 2px rgba(242, 139, 102, 0.85), 0 0 18px rgba(242, 139, 102, 0.7);
}
.lpse-pin.alert .pin-count { color: #1f0600; }
.lpse-pin.alert .pin-tip { border-top-color: #dc522c; }

.lpse-pin .pin-pulse {
  position: absolute;
  top: 0;
  left: 2px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #f28b66;
  animation: pinRadarPulse 1.8s infinite ease-out;
  z-index: 1;
}

@keyframes pinRadarPulse {
  0%   { transform: scale(1); opacity: 0.85; }
  100% { transform: scale(2.35); opacity: 0; }
}

/* Leaflet Dark Glass Tooltip & Popup */
.lpse-map-tooltip {
  background: rgba(5, 13, 21, 0.95) !important;
  border: 1px solid var(--cyan) !important;
  color: var(--text-main) !important;
  border-radius: 8px !important;
  padding: 6px 10px !important;
  font-size: 0.74rem !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.75) !important;
}
.lpse-map-tooltip::before { border-top-color: var(--cyan) !important; }

.lpse-map-popup .leaflet-popup-content-wrapper {
  background: rgba(6, 14, 23, 0.96) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 13px !important;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.82) !important;
  padding: 0 !important;
}
.lpse-map-popup .leaflet-popup-content { margin: 12px 13px !important; }
.lpse-map-popup .leaflet-popup-tip { background: rgba(6, 14, 23, 0.96) !important; border: 1px solid var(--border-strong); }
.lpse-map-popup .leaflet-popup-close-button { color: var(--text-muted) !important; top: 8px !important; right: 10px !important; }
.lpse-map-popup .leaflet-popup-close-button:hover { color: var(--cyan) !important; }

.mp-head { margin-bottom: 8px; padding-right: 16px; }
.mp-title { font-size: 0.88rem; font-weight: 700; color: var(--cyan); margin-bottom: 5px; }
.mp-sub { display: flex; gap: 6px; flex-wrap: wrap; }

.mp-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  max-height: 175px;
  overflow-y: auto;
  margin-bottom: 10px;
  padding-right: 3px;
}

.mp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(14, 28, 42, 0.78);
  border: 1px solid rgba(56, 242, 230, 0.14);
  border-radius: 7px;
  padding: 6px 8px;
}

.mp-item-name {
  font-size: 0.73rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.mp-item-acts { display: flex; gap: 4px; flex-shrink: 0; }
.mp-btn-scan, .mp-btn-link {
  font-size: 0.67rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 5px;
  text-decoration: none;
  cursor: pointer;
}
.mp-btn-scan {
  background: var(--cyan);
  color: #03121a;
  border: none;
}
.mp-btn-link {
  background: rgba(255,255,255,0.06);
  color: var(--cyan);
  border: 1px solid rgba(56,242,230,0.3);
}
.mp-no-url { font-size: 0.66rem; color: var(--text-dim); }
.mp-more { font-size: 0.7rem; color: var(--text-muted); text-align: center; padding: 3px 0; }

/* Mobile Map UX: give clear breathing room for Indonesia Map on phones */
@media (max-width: 768px) {
  .map-toolbar {
    top: auto;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    padding: 4px 6px;
    gap: 4px;
    max-width: 96vw;
    overflow-x: auto;
  }
  .map-tool-btn { font-size: 0.7rem; padding: 5px 8px; }
  .radar-hud-overlay {
    padding-top: 46vh; /* Sisakan 46% layar atas khusus untuk melihat & klik Peta Indonesia di HP */
    pointer-events: none;
  }
  .radar-hud-overlay .radar-left-stack,
  .radar-hud-overlay .radar-right-stack {
    pointer-events: auto;
  }
  .radar-hud-overlay.map-fullscreen {
    padding-top: 0;
  }
}
