@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.gradient-bg {
  background: linear-gradient(135deg, #FDF2F8 0%, #EDE9FE 50%, #FDF2F8 100%);
}

.gradient-card {
  background: linear-gradient(135deg, #ffffff 0%, #FDF2F8 100%);
}

.gradient-btn {
  background: linear-gradient(135deg, #F472B6 0%, #A78BFA 100%);
}

.gradient-btn:hover {
  background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
}

.gradient-sidebar {
  background: linear-gradient(180deg, #FDF2F8 0%, #EDE9FE 100%);
}

.scan-line {
  position: absolute;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, #F472B6, #A78BFA, transparent);
  animation: scanAnim 2s ease-in-out infinite;
  box-shadow: 0 0 15px #F472B6;
}

@keyframes scanAnim {
  0% {
    top: 0;
  }

  50% {
    top: 100%;
  }

  100% {
    top: 0;
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 5px rgba(244, 114, 182, 0.4);
  }

  50% {
    box-shadow: 0 0 25px rgba(167, 139, 250, 0.6);
  }
}

.pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

@keyframes heartPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.heart-pop {
  animation: heartPop 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }

  to {
    transform: translateX(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

@keyframes slideOut {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(100%);
  }
}

.slide-out {
  animation: slideOut 0.3s ease-in forwards;
}

.post-card {
  transition: all 0.3s ease;
}

.post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.sidebar-link {
  transition: all 0.2s ease;
}

.sidebar-link:hover {
  background: rgba(244, 114, 182, 0.15);
}

.sidebar-link.active {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.2), rgba(167, 139, 250, 0.2));
  border-right: 3px solid #A78BFA;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: #FDF2F8;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(#F9A8D4, #C4B5FD);
  border-radius: 3px;
}

.blur-konten {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

.dark .gradient-bg {
  background: linear-gradient(135deg, #1a1025 0%, #0f0a1a 50%, #1a1025 100%);
}

.dark .gradient-sidebar {
  background: linear-gradient(180deg, #1e1230 0%, #150d22 100%);
}

.dark .bg-white,
.dark .bg-white\/80,
.dark .bg-white\/90,
.dark .bg-white\/70 {
  background-color: #1e1230 !important;
}

.dark .border-pink-100 {
  border-color: #2d1f3d !important;
}

.dark .text-gray-700,
.dark .text-gray-800 {
  color: #e2d8f0 !important;
}

.dark .text-gray-600 {
  color: #c4b5d6 !important;
}

.dark .text-gray-400 {
  color: #8b7aa0 !important;
}

.dark .text-gray-300 {
  color: #6b5a80 !important;
}

.dark input,
.dark textarea {
  background-color: #150d22 !important;
  border-color: #2d1f3d !important;
  color: #e2d8f0 !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
  color: #6b5a80 !important;
}

.dark .bg-pink-50,
.dark .bg-pink-100,
.dark .bg-green-50,
.dark .bg-green-100,
.dark .bg-purple-100,
.dark .bg-blue-50 {
  background-color: #251838 !important;
}

.dark .bg-red-50 {
  background-color: #2d1525 !important;
}

.dark ::-webkit-scrollbar-track {
  background: #150d22;
}

.dark .backdrop-blur-md {
  background-color: rgba(30, 18, 48, 0.9) !important;
}

.chat-panel {
  transition: transform 0.3s ease;
}

.chat-bubble-kiri {
  background: linear-gradient(135deg, #f0e6ff 0%, #fce7f3 100%);
  border-radius: 4px 18px 18px 18px;
}

.chat-bubble-kanan {
  background: linear-gradient(135deg, #F472B6 0%, #A78BFA 100%);
  border-radius: 18px 4px 18px 18px;
  color: white;
}

.dark .chat-bubble-kiri {
  background: linear-gradient(135deg, #251838 0%, #2d1525 100%);
}

.chat-user-item {
  transition: all 0.2s ease;
}

.chat-user-item:hover {
  background: rgba(244, 114, 182, 0.1);
}

.chat-user-item.active {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.15), rgba(167, 139, 250, 0.15));
}

.dark select {
  background-color: #150d22 !important;
  border-color: #2d1f3d !important;
  color: #e2d8f0 !important;
}

.dark .bg-white\/90 {
  background-color: rgba(30, 18, 48, 0.9) !important;
}

.dark .bg-black\/50 {
  background-color: rgba(0, 0, 0, 0.7) !important;
}

.filter-kategori {
  transition: all 0.2s ease;
}

.filter-kategori:hover {
  transform: translateY(-1px);
}

/* ========== MOBILE-SPECIFIC STYLES ========== */

/* Safe area padding for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mobile-nav-container {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Floating bottom nav */
.mobile-bottom-nav {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile nav button states */
.mobile-nav-btn {
  transition: all 0.2s ease;
  min-width: 48px;
}

.mobile-nav-btn.active {
  color: #F472B6;
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.1), rgba(167, 139, 250, 0.1));
}

.mobile-nav-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F472B6, #A78BFA);
}

/* Floating FAB button for Shop */
.mobile-fab {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mobile-fab:active {
  transform: scale(0.95);
}

/* Mobile More menu animation */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slideUp {
  animation: slideUp 0.2s ease-out forwards;
}

/* Mobile login - full screen card */
@media (max-width: 767px) {
  .mobile-login {
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  /* Mobile nav - cleaner look */
  .mobile-nav {
    border-bottom: none !important;
    box-shadow: 0 1px 10px rgba(244, 114, 182, 0.08);
  }

  /* Smooth scrolling */
  html {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
  }

  /* Better touch targets */
  button,
  a,
  input,
  textarea,
  select {
    -webkit-tap-highlight-color: transparent;
  }

  /* Post card mobile style - no hover effect, add active state */
  .post-card:hover {
    transform: none;
    box-shadow: none;
  }

  .post-card:active {
    transform: scale(0.98);
  }

  /* Mobile feed cards - edge-to-edge look */
  #kontenFeed .bg-white {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  }

  /* Product cards mobile */
  #daftarProduk .bg-white {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  }

  /* Mobile filter chips - horizontal scroll snap */
  .filter-kategori {
    scroll-snap-align: start;
    flex-shrink: 0;
  }

  /* Chat panel mobile */
  #kontenChat .bg-white {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  }

  /* Hide scrollbar on mobile for cleaner look */
  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  /* Modal bottom sheet slide-up animation */
  #modalDetailProduk>div {
    animation: slideUpModal 0.28s cubic-bezier(0.32, 0.72, 0, 1) forwards;
  }

  @keyframes slideUpModal {
    from {
      transform: translateY(30px);
      opacity: 0.7;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  /* Marketplace form: reduce padding */
  #formProduk {
    border-radius: 1rem;
  }

  /* Form fields full-width touch-friendly */
  #inputHargaProduk,
  #inputKategoriProduk {
    font-size: 16px;
    /* prevent iOS zoom */
  }

  /* Product grid edge-to-edge */
  #daftarProduk {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  /* Product card mobile */
  #daftarProduk>div {
    border-radius: 0.875rem;
  }
}

/* Scrollbar hide utility (cross-browser) */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Safe area bottom padding utility */
.pb-safe {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Dark mode additions for mobile nav */
.dark .mobile-bottom-nav {
  background-color: rgba(30, 18, 48, 0.95) !important;
  border-color: #2d1f3d !important;
  box-shadow: 0 -4px 30px rgba(124, 58, 237, 0.15);
}

.dark .mobile-nav-btn.active {
  color: #C4B5FD;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(124, 58, 237, 0.15));
}

.dark .mobile-nav-btn.active::after {
  background: linear-gradient(135deg, #C4B5FD, #7C3AED);
}

.dark #mobileMoreMenu>div {
  background-color: #1e1230 !important;
  border-color: #2d1f3d !important;
}

.dark .mobile-fab {
  box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.dark .mobile-nav {
  box-shadow: 0 1px 10px rgba(124, 58, 237, 0.08);
}

/* ========== DARK MODE: ADMIN PANEL & MODALS ========== */

/* Modal overlay */
.dark #modalAdmin>div,
.dark #modalPembayaran>div>div,
.dark #modalDetailProduk>div {
  background-color: #1e1230 !important;
  border-color: #2d1f3d !important;
}

/* Admin panel inner bg */
.dark #modalAdmin .bg-white {
  background-color: #1e1230 !important;
}

/* Header border and tab bar */
.dark #modalAdmin .border-b,
.dark #modalAdmin .border-b.border-gray-100 {
  border-color: #2d1f3d !important;
}

/* Admin tabs inactive */
.dark .admin-tab {
  color: #8b7aa0 !important;
}

.dark .admin-tab:hover {
  color: #c4b5d6 !important;
}

.dark .admin-tab.active {
  color: #F472B6 !important;
  border-bottom-color: #F472B6 !important;
}

/* Gray backgrounds inside admin panels */
.dark .bg-gray-50,
.dark .bg-gray-100,
.dark .bg-gray-200 {
  background-color: #251838 !important;
}

.dark .bg-gray-800,
.dark .bg-gray-900 {
  background-color: #0f0a1a !important;
}

/* Gray borders */
.dark .border-gray-100,
.dark .border-gray-200 {
  border-color: #2d1f3d !important;
}

/* Gray text (remaining) */
.dark .text-gray-500 {
  color: #a090b4 !important;
}

/* Hover backgrounds in admin rows */
.dark .hover\:bg-gray-50:hover,
.dark .hover\:bg-gray-100:hover {
  background-color: #251838 !important;
}

/* Admin user/product row items */
.dark #adminListUser>div,
.dark #adminListProduk>div {
  border-color: #2d1f3d !important;
  background-color: transparent;
}

.dark #adminListUser>div:hover,
.dark #adminListProduk>div:hover {
  background-color: #251838 !important;
}

/* Admin search input */
.dark #adminCariUser {
  background-color: #150d22 !important;
  border-color: #2d1f3d !important;
  color: #e2d8f0 !important;
}

/* Admin stat cards */
.dark #adminStatsGrid>div {
  background-color: #251838 !important;
  border-color: #2d1f3d !important;
}

/* Admin action buttons (ban/premium toggle) */
.dark #adminListUser button,
.dark #adminListProduk button {
  background-color: #1e1230 !important;
  border-color: #3d2d50 !important;
}

/* Close button in modals */
.dark .bg-gray-100.rounded-full {
  background-color: #2d1f3d !important;
  color: #c4b5d6 !important;
}

.dark .bg-gray-100.rounded-full:hover {
  background-color: #3d2d50 !important;
}

/* Profile section admin area */
.dark #seksiAdmin {
  border-color: #2d1f3d !important;
}

.dark #seksiAdmin button {
  background: linear-gradient(135deg, #0f0a1a, #1e1230) !important;
  border: 1px solid #2d1f3d !important;
}

/* Payment modal dark */
.dark #modalPembayaran .bg-gray-50,
.dark #bayarStep1,
.dark #bayarStep2,
.dark #bayarStep3 {
  background-color: #1e1230 !important;
}

/* Yellow/orange warning boxes */
.dark .bg-yellow-50 {
  background-color: #2a1f10 !important;
}

.dark .border-yellow-100,
.dark .border-yellow-200 {
  border-color: #4a3520 !important;
}

/* Overflow scroll inside admin lists */
.dark #adminListUser::-webkit-scrollbar-track,
.dark #adminListProduk::-webkit-scrollbar-track {
  background: #150d22 !important;
}

.dark #adminListUser::-webkit-scrollbar-thumb,
.dark #adminListProduk::-webkit-scrollbar-thumb {
  background: #3d2d50 !important;
}

/* Profile page dark extras */
.dark #kontenProfil .border-t {
  border-color: #2d1f3d !important;
}

.dark #kontenProfil .space-y-2\.5 h4 {
  color: #8b7aa0 !important;
}

/* Logout button dark */
.dark .border-red-100 {
  border-color: #4a1a2a !important;
}

.dark .text-red-400 {
  color: #f87171 !important;
}

.dark .hover\:bg-red-50:hover {
  background-color: #2d1525 !important;
}

/* ========== DARK MODE: CHECKOUT MODAL ========== */
.dark #modalCheckout>div {
  background-color: #1e1230 !important;
}

.dark #checkoutInfoProduk {
  background-color: #251838 !important;
  border-color: #2d1f3d !important;
}

.dark #checkoutAlamat,
.dark #checkoutCatatan {
  background-color: #150d22 !important;
  border-color: #2d1f3d !important;
  color: #e2d8f0 !important;
}

.dark #checkoutKontenQRIS {
  background: linear-gradient(to bottom, #251838, #1e1230) !important;
  border-color: #2d1f3d !important;
}

.dark #checkoutKontenTransfer {
  background-color: #1c1230 !important;
  border-color: #2d1f3d !important;
}

.dark #checkoutKontenTransfer .bg-white {
  background-color: #150d22 !important;
  border-color: #2d1f3d !important;
}

.dark #checkoutTabQRIS,
.dark #checkoutTabTransfer {
  background-color: #251838 !important;
  border-color: #3d2d50 !important;
  color: #c4b5d6 !important;
}

.dark #checkoutStep2 label {
  border-color: #3d2d50 !important;
  background-color: #251838 !important;
  color: #8b7aa0 !important;
}

/* ========== DARK MODE: LOGOUT MODAL ========== */
.dark #modalLogout>div {
  background-color: #1e1230 !important;
}

.dark #modalLogout .bg-red-50 {
  background-color: #2d1525 !important;
}

.dark #modalLogout .border-gray-200 {
  border-color: #2d1f3d !important;
  color: #c4b5d6 !important;
}

/* ========== STICKY ACTION BARS — safe-area for gesture nav ========== */
#aksiDetailProduk,
.checkout-action-bar {
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}

.dark #aksiDetailProduk {
  background-color: #1e1230 !important;
  border-color: #2d1f3d !important;
}

/* Product inquiry preview in chat */
.dark #produkInquiryPreview {
  background-color: #251838 !important;
  border-color: #2d1f3d !important;
}

/* Form produk bottom sheet dark (mobile) */
@media (max-width: 767px) {
  .dark #formProduk>div {
    background-color: #1e1230 !important;
    border-top: 1px solid #2d1f3d;
  }
}

/* ========== RESPONSIVE MOBILE FIXES ========== */

/* Admin Panel: fix flex layout so tabs + content scroll properly */
#modalAdmin > div {
  display: flex;
  flex-direction: column;
}

/* Admin tab content areas: take remaining space */
#adminKontenUsers,
#adminKontenProducts {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#adminListUser,
#adminListProduk {
  flex: 1;
  overflow-y: auto;
}

/* On mobile, admin-tab content scrolls inside modal */
@media (max-width: 767px) {
  #adminKontenStats {
    overflow-y: auto;
    max-height: calc(92dvh - 130px);
  }

  #adminKontenUsers,
  #adminKontenProducts {
    max-height: calc(92dvh - 130px);
  }

  /* Checkout modal: ensure image area doesn't overflow */
  #modalDetailProduk > div {
    max-height: 88dvh;
  }

  /* Verifikasi halaman: full-screen on mobile */
  #halamanVerifikasi > div .aspect-video {
    aspect-ratio: 4/3;
  }

  /* Notifikasi: flush to screen edges on mobile */
  #notifikasi > div {
    width: 100%;
  }

  /* Modal pembayaran: tighter spacing on small screens */
  #bayarStep1 .p-6,
  #bayarStep2.p-6 {
    padding: 1rem;
  }

  /* Chat height on mobile */
  #kontenChat .bg-white {
    height: calc(100dvh - 180px) !important;
  }

  /* Profile page: add bottom padding for nav */
  #kontenProfil {
    padding-bottom: 6rem;
  }

  /* Feed page: add bottom padding for nav */
  #kontenFeed {
    padding-bottom: 2rem;
  }

  /* Premium page: add bottom padding for nav */
  #kontenPremium {
    padding-bottom: 6rem;
  }

  /* Verifikasi page: add bottom padding for nav */
  #kontenVerifikasi {
    padding-bottom: 6rem;
  }

  /* Marketplace: add bottom padding for nav */
  #kontenMarketplace {
    padding-bottom: 6rem;
  }
}

/* Dark mode admin panel mobile */
.dark #modalAdmin > div {
  background-color: #1e1230 !important;
}

.dark #adminKontenStats,
.dark #adminKontenUsers,
.dark #adminKontenProducts {
  background-color: #1e1230 !important;
}