/* ── TOPBAR ──────────────────────────────────────────────────────────────────── */
.topbar {
  background: linear-gradient(135deg, var(--grad-start) 0%, var(--grad-end) 100%);
  padding: 14px 18px 18px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: 9px;
}
.topbar-logo-img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  object-fit: cover;
}
.topbar-name {
  font-size: 16px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.3px;
}
.topbar-tagline {
  font-size: 10px;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.lang-pill {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.35);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(4px);
}

/* ── BOTTOM NAV ──────────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 4px 10px;
  gap: 3px;
  background: none;
  color: var(--text3);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  transition: color 0.2s;
  position: relative;
}
.nav-btn.active { color: var(--brand); }
.nav-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 2.5px;
  background: var(--brand);
  border-radius: 0 0 3px 3px;
}
.nav-icon {
  font-size: 20px;
  line-height: 1;
}
/* Special center Add button */
.nav-btn.nav-primary {
  color: var(--brand);
  padding: 9px 4px 10px;
}
.nav-btn.nav-primary.active::before { display: none; }
.nav-btn.nav-primary .nav-icon-wrap {
  width: 28px;
  height: 28px;
  background: linear-gradient(145deg, #E91E63 0%, #C2185B 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(194,24,91,0.3);
  flex-shrink: 0;
  margin: 0;
}
.nav-btn.nav-primary .nav-icon-wrap svg {
  width: 14px;
  height: 14px;
  stroke: white;
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}

/* ── PAGES ──────────────────────────────────────────────────────────────────── */
.page {
  display: none;
  padding: 0 0 84px;
  min-height: calc(100vh - 60px);
  animation: fadeUp 0.18s ease;
}
.page.active { display: block; }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-body {
  padding: 16px 16px 0;
}

/* ── OVERLAY (Customer Detail) ───────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  max-width: 430px;
  left: 50%;
  margin-left: -215px;
}
.overlay.open { transform: translateX(0); }
@media (max-width: 430px) {
  .overlay { left: 0; margin-left: 0; max-width: 100%; }
}
.ov-header {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  padding: 14px 18px 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.ov-header-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.ov-back {
  width: 34px;
  height: 34px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}
.ov-title {
  font-size: 18px;
  font-weight: 800;
  color: white;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-call-btn {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1.5px solid rgba(255,255,255,0.4);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  backdrop-filter: blur(4px);
}
.ov-body { padding: 16px 16px 80px; }

/* ── MODAL ──────────────────────────────────────────────────────────────────── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.modal-bg.open { display: flex; }
.modal-sheet {
  background: var(--white);
  border-radius: 24px 24px 0 0;
  padding: 8px 20px 32px;
  width: 100%;
  max-width: 430px;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 18px;
}
.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-close {
  width: 28px;
  height: 28px;
  background: var(--surface2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text2);
  cursor: pointer;
  border: none;
}

/* ── PHOTO VIEWER ────────────────────────────────────────────────────────────── */
.pv {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
}
.pv.open { display: flex; }
.pv img { max-width: 96%; max-height: 88vh; border-radius: 12px; }
.pv-close {
  position: absolute;
  top: 14px; right: 14px;
  color: white;
  font-size: 20px;
  background: rgba(255,255,255,0.15);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}

/* ── TOAST ───────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 82px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: var(--text);
  color: white;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  z-index: 999;
  opacity: 0;
  transition: opacity 0.25s, transform 0.25s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
