/* ============ Tema (light default, dark via [data-theme="dark"]) ============ */
:root {
  --bg-soft: #f4f7fb;
  --bg-surface: #ffffff;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --text: #1a2233;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --shadow: rgba(15, 23, 42, 0.07);
}

[data-theme="dark"] {
  --bg-soft: #0a0e1a;
  --bg-surface: #121a2b;
  --brand: #3b82f6;
  --brand-dark: #60a5fa;
  --text: #e5e9f0;
  --text-muted: #8b96ab;
  --border: #1f2a3f;
  --shadow: rgba(0, 0, 0, 0.45);
}

body {
  background: var(--bg-soft);
  color: var(--text);
  padding-bottom: 76px; /* ruang untuk bottom nav */
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  transition: background-color .15s ease, color .15s ease;
}

.app-topbar {
  background: var(--brand);
  color: #fff;
  padding: .9rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.app-topbar h1 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}
.theme-toggle {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { background: rgba(255,255,255,.25); }

.app-content {
  padding: 1rem;
  max-width: 720px;
  margin: 0 auto;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 1030;
}
.bottom-nav a {
  flex: 1;
  text-align: center;
  padding: .55rem 0 .5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .72rem;
}
.bottom-nav a .bi {
  display: block;
  font-size: 1.15rem;
  margin-bottom: .1rem;
}
.bottom-nav a.active {
  color: var(--brand);
  font-weight: 600;
}

.list-card {
  background: var(--bg-surface);
  border-radius: .6rem;
  padding: .8rem .9rem;
  margin-bottom: .6rem;
  box-shadow: 0 1px 2px var(--shadow);
}
.list-card .title {
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
}
.list-card .subtitle {
  color: var(--text-muted);
  font-size: .8rem;
}

.fab {
  position: fixed;
  right: 1rem;
  bottom: 88px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  border: none;
  font-size: 1.5rem;
  box-shadow: 0 4px 10px var(--shadow);
  z-index: 1025;
}
.fab:active { background: var(--brand-dark); }

#toastArea {
  position: fixed;
  top: .75rem;
  right: .75rem;
  z-index: 2000;
}

/* ---- Beranda pelanggan (login pakai kode customer) ---- */
#custHome {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 52px); /* 52px kira-kira tinggi app-topbar */
}
#custTop {
  flex: 0 0 50%;
  overflow-y: auto;
}
#custMap {
  flex: 1 1 50%;
  min-height: 0;
  position: relative;
}
.status-pill {
  display: inline-block;
  padding: .35rem .9rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
}

.peta-legend {
  position: absolute; z-index: 1015; bottom: .6rem; left: .6rem;
  background: var(--bg-surface); color: var(--text); border-radius: .5rem; padding: .5rem .75rem;
  box-shadow: 0 1px 4px var(--shadow); font-size: .78rem;
}
.peta-legend .dot { width:10px; height:10px; border-radius:50%; display:inline-block; margin-right:.35rem; }
