/* --- Thay dòng @import cũ bằng dòng này --- */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");
:root {
  --app-height: 100dvh;
  /* iOS Safe Area (PWA/standalone). Defaults to 0 on Android/Desktop. */
  --sat: 0px; /* safe-area-inset-top */
  --sab: 0px; /* safe-area-inset-bottom */
  --sal: 0px; /* safe-area-inset-left */
  --sar: 0px; /* safe-area-inset-right */
}

@supports (padding: env(safe-area-inset-top)) {
  :root {
    --sat: env(safe-area-inset-top);
    --sab: env(safe-area-inset-bottom);
    --sal: env(safe-area-inset-left);
    --sar: env(safe-area-inset-right);
  }
}

/* --- 1. CẤU HÌNH CƠ BẢN --- */
body {
  --text-main: #ffffff;
  --text-sub: #cbd5e1;

  font-family: "Inter", sans-serif;
  color: var(--text-main);

  /* Mesh Gradient Background */
  background-color: var(--bg-base);
  background-image: var(--bg-mesh);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;

  transition: background-color 0.2s ease, color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
  height: var(--app-height);
  width: 100vw;
  overflow: hidden;
  position: fixed;
}

/* --- 2. STYLE CHO LOGO VIETINBANK 3D --- */
.vietin-logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  /* Khối kính nổi */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 6px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
.vietin-logo-img {
  width: 36px;
  height: auto;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}
.vietin-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.vietin-brand {
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.vietin-sub {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

/* --- 3. BỘ THEME MESH GRADIENT (MÀU LOANG & DỄ ĐỌC) --- */

/* 1. SIGNATURE (Xanh Vietin Đậm) */
/* 1. SIGNATURE (Deep Navy + Electric Cyan) */
body.theme-midnight {
  --bg-base: #050b2e;
  /* Trend: aurora/mesh gradients (soft transitions, high depth) */
  --bg-mesh: radial-gradient(at 10% 10%, rgba(56, 189, 248, 0.35) 0px, transparent 55%),
    radial-gradient(at 90% 15%, rgba(99, 102, 241, 0.28) 0px, transparent 55%),
    radial-gradient(at 40% 95%, rgba(16, 185, 129, 0.18) 0px, transparent 60%);
  --bg-panel: rgba(10, 18, 48, 0.74);
  --header-bg: rgba(6, 12, 40, 0.92);
  --border-panel: rgba(56, 189, 248, 0.20);
  --input-bg: rgba(6, 12, 40, 0.55);
  --accent: #38bdf8;
  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #22d3ee 45%, #a855f7 100%);
}


/* 2. DYNAMIC (Đỏ Trầm) */
/* 2. DYNAMIC (Tangerine Disco + Magenta Glow) */
body.theme-sunset {
  --bg-base: #1a0508;
  --bg-mesh: radial-gradient(at 12% 18%, rgba(251, 146, 60, 0.40) 0px, transparent 55%),
    radial-gradient(at 88% 12%, rgba(236, 72, 153, 0.28) 0px, transparent 55%),
    radial-gradient(at 78% 88%, rgba(249, 115, 22, 0.22) 0px, transparent 60%);
  --bg-panel: rgba(28, 10, 18, 0.74);
  --header-bg: rgba(18, 6, 10, 0.92);
  --border-panel: rgba(251, 146, 60, 0.22);
  --input-bg: rgba(18, 6, 10, 0.55);
  --accent: #fb923c;
  --accent-gradient: linear-gradient(135deg, #fb923c 0%, #f43f5e 55%, #a855f7 100%);
}


/* 3. DIGITAL (Xanh Teal) */
/* 3. DIGITAL (Mermaidcore Teal + Deep Blue) */
body.theme-ocean {
  --bg-base: #031018;
  --bg-mesh: radial-gradient(at 10% 10%, rgba(34, 211, 238, 0.34) 0px, transparent 55%),
    radial-gradient(at 90% 20%, rgba(14, 165, 233, 0.22) 0px, transparent 55%),
    radial-gradient(at 55% 92%, rgba(16, 185, 129, 0.18) 0px, transparent 60%);
  --bg-panel: rgba(6, 22, 34, 0.74);
  --header-bg: rgba(3, 16, 24, 0.92);
  --border-panel: rgba(34, 211, 238, 0.20);
  --input-bg: rgba(3, 16, 24, 0.55);
  --accent: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 55%, #2563eb 100%);
}


/* 4. PREMIUM (Xanh Đen Navy) */
/* 4. PREMIUM (Clubroom Contrast: Navy + Mint Neon) */
body.theme-mint {
  --bg-base: #061021;
  --bg-mesh: radial-gradient(at 15% 15%, rgba(16, 185, 129, 0.26) 0px, transparent 55%),
    radial-gradient(at 85% 25%, rgba(56, 189, 248, 0.20) 0px, transparent 55%),
    radial-gradient(at 60% 95%, rgba(99, 102, 241, 0.16) 0px, transparent 60%);
  --bg-panel: rgba(10, 24, 46, 0.78);
  --header-bg: rgba(6, 16, 33, 0.94);
  --border-panel: rgba(148, 163, 184, 0.18);
  --input-bg: rgba(10, 24, 46, 0.55);
  --accent: #34d399;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #22d3ee 55%, #6366f1 100%);
}


/* 5. PRIORITY (Vàng Gold) */
/* 5. PRIORITY (Emerald + Gold Luxe) */
body.theme-royal {
  --bg-base: #0a1206;
  --bg-mesh: radial-gradient(at 18% 20%, rgba(16, 185, 129, 0.26) 0px, transparent 55%),
    radial-gradient(at 85% 15%, rgba(245, 158, 11, 0.22) 0px, transparent 55%),
    radial-gradient(at 70% 90%, rgba(250, 204, 21, 0.12) 0px, transparent 60%);
  --bg-panel: rgba(12, 22, 10, 0.76);
  --header-bg: rgba(8, 16, 6, 0.92);
  --border-panel: rgba(245, 158, 11, 0.22);
  --input-bg: rgba(12, 22, 10, 0.55);
  --accent: #fbbf24;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #f59e0b 55%, #fde047 100%);
}


/* --- 3B. THEME MỞ RỘNG (THÊM) --- */

/* 6. AURORA (Xanh ngọc - Tím) */
/* 6. AURORA (Cyan - Purple - Pink, Ethereal Mesh) */
body.theme-aurora {
  --bg-base: #050717;
  --bg-mesh: radial-gradient(at 12% 8%, rgba(34, 211, 238, 0.38) 0px, transparent 55%),
    radial-gradient(at 92% 18%, rgba(168, 85, 247, 0.30) 0px, transparent 55%),
    radial-gradient(at 20% 92%, rgba(236, 72, 153, 0.18) 0px, transparent 60%);
  --bg-panel: rgba(10, 14, 34, 0.74);
  --header-bg: rgba(5, 7, 23, 0.92);
  --border-panel: rgba(34, 211, 238, 0.20);
  --input-bg: rgba(10, 14, 34, 0.55);
  --accent: #22d3ee;
  --accent-gradient: linear-gradient(135deg, #22d3ee 0%, #a855f7 55%, #ec4899 100%);
}


/* 7. GRAPHITE (Xám lạnh - Tối giản) */
body.theme-graphite {
  --bg-base: #0b1220;
  --bg-mesh: radial-gradient(
      at 0% 0%,
      hsla(215, 30%, 28%, 0.55) 0px,
      transparent 55%
    ),
    radial-gradient(
      at 100% 100%,
      hsla(220, 25%, 18%, 0.75) 0px,
      transparent 55%
    );
  --bg-panel: rgba(15, 23, 42, 0.78);
  --header-bg: rgba(2, 6, 23, 0.92);
  --border-panel: rgba(148, 163, 184, 0.18);
  --input-bg: rgba(15, 23, 42, 0.55);
  --accent: #94a3b8;
  --accent-gradient: linear-gradient(135deg, #334155 0%, #94a3b8 100%);
}

/* 8. VIOLET (Tím - Hồng) */
/* 7. VIOLET (Ultraviolet Candy: Purple + Rose + Blue) */
body.theme-violet {
  --bg-base: #0d0520;
  --bg-mesh: radial-gradient(at 15% 25%, rgba(168, 85, 247, 0.36) 0px, transparent 55%),
    radial-gradient(at 85% 18%, rgba(244, 114, 182, 0.22) 0px, transparent 55%),
    radial-gradient(at 55% 92%, rgba(59, 130, 246, 0.18) 0px, transparent 60%);
  --bg-panel: rgba(18, 10, 44, 0.74);
  --header-bg: rgba(13, 5, 32, 0.92);
  --border-panel: rgba(168, 85, 247, 0.22);
  --input-bg: rgba(18, 10, 44, 0.55);
  --accent: #a855f7;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 55%, #f472b6 100%);
}


/* 9. EMERALD (Xanh lá - Xanh ngọc) */
/* 8. EMERALD (Thermal Glow: Emerald + Cyan + Lime) */
body.theme-emerald {
  --bg-base: #04130e;
  --bg-mesh: radial-gradient(at 10% 12%, rgba(16, 185, 129, 0.34) 0px, transparent 55%),
    radial-gradient(at 90% 22%, rgba(34, 211, 238, 0.22) 0px, transparent 55%),
    radial-gradient(at 60% 92%, rgba(163, 230, 53, 0.16) 0px, transparent 60%);
  --bg-panel: rgba(6, 26, 18, 0.74);
  --header-bg: rgba(4, 19, 14, 0.92);
  --border-panel: rgba(16, 185, 129, 0.22);
  --input-bg: rgba(6, 26, 18, 0.55);
  --accent: #10b981;
  --accent-gradient: linear-gradient(135deg, #10b981 0%, #22d3ee 55%, #a3e635 100%);
}


/* 10. SAKURA (Hồng - Pastel) */
/* 9. SAKURA (Dusty Rose Pastel: Pink + Peach + Lilac) */
body.theme-sakura {
  --bg-base: #18060c;
  --bg-mesh: radial-gradient(at 16% 18%, rgba(251, 113, 133, 0.34) 0px, transparent 55%),
    radial-gradient(at 86% 22%, rgba(251, 146, 60, 0.18) 0px, transparent 55%),
    radial-gradient(at 65% 92%, rgba(168, 85, 247, 0.14) 0px, transparent 60%);
  --bg-panel: rgba(26, 10, 16, 0.74);
  --header-bg: rgba(24, 6, 12, 0.92);
  --border-panel: rgba(251, 113, 133, 0.20);
  --input-bg: rgba(26, 10, 16, 0.55);
  --accent: #fb7185;
  --accent-gradient: linear-gradient(135deg, #fb7185 0%, #fb923c 55%, #a855f7 100%);
}


/* 11. SOLAR (Cam - Vàng) */
/* 10. SOLAR (Banana Yellow + Coral Heat) */
body.theme-solar {
  --bg-base: #150c02;
  --bg-mesh: radial-gradient(at 18% 18%, rgba(253, 224, 71, 0.32) 0px, transparent 55%),
    radial-gradient(at 86% 20%, rgba(251, 146, 60, 0.26) 0px, transparent 55%),
    radial-gradient(at 70% 90%, rgba(236, 72, 153, 0.14) 0px, transparent 60%);
  --bg-panel: rgba(22, 12, 4, 0.76);
  --header-bg: rgba(21, 12, 2, 0.92);
  --border-panel: rgba(245, 158, 11, 0.24);
  --input-bg: rgba(22, 12, 4, 0.55);
  --accent: #fde047;
  --accent-gradient: linear-gradient(135deg, #fde047 0%, #fb923c 55%, #f43f5e 100%);
}


/* 12. MONO (Đen - Trắng) */
body.theme-mono {
  --bg-base: #0b0f19;
  --bg-mesh: radial-gradient(
      at 0% 0%,
      hsla(220, 15%, 18%, 0.7) 0px,
      transparent 55%
    ),
    radial-gradient(at 100% 100%, hsla(0, 0%, 100%, 0.08) 0px, transparent 55%);
  --bg-panel: rgba(17, 24, 39, 0.78);
  --header-bg: rgba(0, 0, 0, 0.88);
  --border-panel: rgba(255, 255, 255, 0.12);
  --input-bg: rgba(17, 24, 39, 0.55);
  --accent: #e5e7eb;
  --accent-gradient: linear-gradient(135deg, #111827 0%, #e5e7eb 100%);
}

/* 4. GLASS & UTILS */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--border-panel);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
  will-change: transform, opacity;
  transform: translateZ(0);
}

/* PERF: Lite glass panel for long scrolling lists (avoid heavy blur/shadow per item) */
.glass-panel-lite {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 5;
}
.glass-panel-lite.selected {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Customer list: status bar without per-item inline boxShadow */
.cust-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 6px;
  opacity: 0.9;
}
.cust-card.cust-approved::before {
  background: rgba(16, 185, 129, 0.9);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}
.cust-card.cust-pending::before {
  background: rgba(99, 102, 241, 0.9);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}
.glass-header {
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-panel);
  z-index: 40;
  will-change: transform;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .glass-panel {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
  .glass-header {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}
@keyframes modalPop {
  0% {
    transform: scale(0.96) translateY(10px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}
.modal-animate {
  animation: modalPop 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  will-change: transform, opacity;
}
.app-container {
  height: 100%;
  width: 100%;
  /* Respect iOS notch / status bar. */
  padding-top: var(--sat);
  /*
    IMPORTANT:
    Do NOT apply safe-area bottom padding at the screen container level.
    On iOS, `var(--sab)` is typically ~34px (home indicator).
    If we add bottom padding here, any bottom action buttons placed in normal
    layout flow (e.g. Home: “Bản đồ / Thêm mới”) will be pushed up and look
    “too high”.
    Instead, we apply safe-area bottom padding only to FIXED bars/overlays.
  */
  padding-bottom: 0px;
  padding-left: var(--sal);
  padding-right: var(--sar);
  box-sizing: border-box;
  height: calc(100% - var(--sat));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-main);
  position: absolute;
  top: 0;
  left: 0;
  /* Performance: keep screen transitions on compositor, isolate layout/paint */
  will-change: transform;
  contain: layout paint style;
  backface-visibility: hidden;
  /* Note: many screens also carry Tailwind's `transform` utility class.
     Tailwind will set `transform:` based on CSS variables; the rule below
     re-maps translate() -> translate3d() to keep the transition on GPU. */
  transform: translate3d(0, 0, 0);
  z-index: 1;
}

/* Smooth slide transitions for app screens (reduce jank / flicker on mobile). */
.app-container.transform {
  transform:
    translate3d(var(--tw-translate-x, 0), var(--tw-translate-y, 0), 0)
    rotate(var(--tw-rotate, 0))
    skewX(var(--tw-skew-x, 0))
    skewY(var(--tw-skew-y, 0))
    scaleX(var(--tw-scale-x, 1))
    scaleY(var(--tw-scale-y, 1));
}
.scroll-area {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  /* Reserve space for bottom action area + iOS home indicator safe-area. */
  padding-bottom: calc(140px + var(--sab));
}
.custom-scrollbar::-webkit-scrollbar {
  width: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}
input,
select,
textarea {
  color: var(--text-main) !important;
  background: var(--input-bg) !important;
  transition: all 0.2s ease;
}
input:focus {
  border-color: var(--accent) !important;
  background: rgba(0, 0, 0, 0.4) !important;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
input::placeholder {
  color: var(--text-sub) !important;
  opacity: 0.5;
}
.img-grid-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 12px;
}
.img-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 100%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-panel);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.2s;
  will-change: transform;
}
.img-wrapper:active {
  transform: scale(0.96);
}
.img-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
#loader {
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
}
#toast {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
    opacity 0.3s;
  z-index: 400;
  will-change: transform, opacity;
}
.toast-show {
  transform: translateX(-50%) translateY(0) !important;
  opacity: 1 !important;
}
.keypad-btn {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  font-size: 26px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  margin: 0 auto;
  color: white;
  backdrop-filter: blur(5px);
}
.keypad-btn:active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.95);
}
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--text-sub);
  transition: all 0.2s;
}
.pin-dot.filled {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.1);
}
.theme-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}
.theme-btn.active {
  transform: scale(1.1);
  border-color: white;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}
.select-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid white;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 20;
}
.select-ring svg {
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.2s;
}
.selected .select-ring {
  background: var(--accent);
  border-color: var(--accent);
}
.selected .select-ring svg {
  opacity: 1;
  transform: scale(1);
}
.glass-panel.selected {
  border-color: var(--accent) !important;
  background: rgba(99, 102, 241, 0.1) !important;
  box-shadow: 0 0 0 1px var(--accent);
}
#map-container {
  width: 100%;
  height: 100%;
  z-index: 1;
}
.leaflet-popup-content-wrapper {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(16px) saturate(180%);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  padding: 0;
}
.leaflet-popup-tip {
  background: rgba(15, 23, 42, 0.9);
}
.leaflet-popup-content {
  margin: 0;
  width: 260px !important;
}
.leaflet-container a.leaflet-popup-close-button {
  color: #fff;
  padding: 8px;
  font-size: 20px;
}
.map-popup-card {
  padding: 12px;
}
.map-popup-img {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 8px;
  background: #222;
}
.map-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 4px;
}
.map-tag.approved {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.map-tag.pending {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.marker-glow {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  position: relative;
}
.marker-glow::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 50%;
  animation: pulse 2s infinite;
  opacity: 0.5;
  z-index: -1;
}
.marker-approved {
  background: #10b981;
}
.marker-approved::after {
  background: #10b981;
  box-shadow: 0 0 15px #10b981;
}
.marker-pending {
  background: #f59e0b;
}
.marker-pending::after {
  background: #f59e0b;
  box-shadow: 0 0 15px #f59e0b;
}
@keyframes pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.5);
    opacity: 0;
  }
}
.leaflet-control-layers {
  background: rgba(15, 23, 42, 0.9) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: white !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}
.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}
/* --- 5. GLASS EFFECT UTILS (THÊM MỚI) --- */
.glass-btn {
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}
.glass-btn:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.98);
}
/* Hiệu ứng tab kính */
.glass-tab-active {
  background: rgba(255, 255, 255, 0.1) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  color: white !important;
}
.glass-tab-inactive {
  border: 1px solid transparent !important;
  color: var(--text-sub) !important;
  opacity: 0.6;
}
/* --- 6. PROFILE GLASS BOX (Thêm mới) --- */
.profile-glass-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Copy hiệu ứng từ logo VietinBank */
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 16px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  width: 100%;
  margin-bottom: 16px; /* Cách các nút bên dưới ra */
}


/* --- iOS Safe-Area fixes for fixed overlays (avoid status bar / notch overlap) --- */
#toast {
  top: calc(3rem + var(--sat)); /* Tailwind top-12 */
}
#settings-menu {
  top: calc(5rem + var(--sat)); /* Tailwind top-20 */
}
#cust-selection-bar,
#selection-bar {
  padding-bottom: calc(2rem + var(--sab)); /* Tailwind pb-8 + safe-area */
}
#lightbox button[onclick="closeLightbox()"] {
  top: calc(1.5rem + var(--sat)); /* Tailwind top-6 */
}

/* === TAILWIND CRITICAL UTILITIES (SELF-HOST) ===
   Minimal subset to replace Tailwind CDN for layout/position/transition.
   Focus: prevent overlay/toolbars from stacking in normal flow.
*/
.hidden{display:none!important;}
.block{display:block;}
.inline-block{display:inline-block;}
.flex{display:flex;}
.inline-flex{display:inline-flex;}
.grid{display:grid;}
.items-center{align-items:center;}
.items-start{align-items:flex-start;}
.items-end{align-items:flex-end;}
.justify-between{justify-content:space-between;}
.justify-center{justify-content:center;}
.justify-start{justify-content:flex-start;}
.justify-end{justify-content:flex-end;}

.relative{position:relative;}
.absolute{position:absolute;}
.fixed{position:fixed;}
.sticky{position:sticky;}

.top-0{top:0;}
.bottom-0{bottom:0;}
.left-0{left:0;}
.right-0{right:0;}
.inset-0{top:0;right:0;bottom:0;left:0;}

.w-full{width:100%;}
.h-full{height:100%;}
.min-h-0{min-height:0;}

.overflow-hidden{overflow:hidden;}
.overflow-auto{overflow:auto;}
.overflow-y-auto{overflow-y:auto;}
.overflow-x-auto{overflow-x:auto;}

.pointer-events-none{pointer-events:none;}
.pointer-events-auto{pointer-events:auto;}

/* z-index (subset used across app) */
.z-0{z-index:0;}
.z-10{z-index:10;}
.z-20{z-index:20;}
.z-30{z-index:30;}
.z-40{z-index:40;}
.z-50{z-index:50;}
.z-\[60\]{z-index:60;}
.z-\[70\]{z-index:70;}
.z-\[100\]{z-index:100;}
.z-\[120\]{z-index:120;}
.z-\[300\]{z-index:300;}
.z-\[305\]{z-index:305;}
.z-\[310\]{z-index:310;}
.z-\[320\]{z-index:320;}
.z-\[400\]{z-index:400;}
.z-\[500\]{z-index:500;}
.z-\[10050\]{z-index:10050;}
.z-\[10060\]{z-index:10060;}
.z-\[10080\]{z-index:10080;}

/* transforms + slide-in bars */
.translate-y-full{transform:translateY(100%);}
.translate-y-0{transform:translateY(0);}
.-translate-y-full{transform:translateY(-100%);}
.-translate-y-0{transform:translateY(0);}

.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms;}
.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(0.4,0,0.2,1);transition-duration:150ms;}
.duration-200{transition-duration:200ms;}
.duration-300{transition-duration:300ms;}
.ease-in-out{transition-timing-function:cubic-bezier(0.4,0,0.2,1);}

/* basic spacing (only most used to keep file small) */
.gap-1{gap:.25rem;}
.gap-2{gap:.5rem;}
.gap-3{gap:.75rem;}
.gap-4{gap:1rem;}
