/* ============================================================
   Tokoku — style.css
   Semua styling global untuk phone-frame & komponen UI
   ============================================================ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;  /* ← tambah ini */
  justify-content: flex-start;  /* ← ubah ini */
  align-items: stretch;  /* ← ubah ini */
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Page container */
#page-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding-bottom: 60px; /* sesuaikan tinggi bottom-nav */  
}


.screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f8f8f8;

}

/* ─── Page visibility ─── */
.page { 
  display: none; 
  flex-direction: column; 
  flex: 1; 
  overflow: hidden;   /* ← biarkan */
  width: 100%;
  height: 100%;
}

.page.active { 
  display: flex; 
  width: 100%;
  height: 100%; 
}

.head {
  padding-top: 60px;    /* sesuaikan tinggi topbar */
}


/* ─── Topbar ─── */
.topbar {
    position: fixed;       /* selalu menempel */
    top: 0;                /* di bagian atas */
    left: 0;
    right: 0;
    width: 100%;
    z-index: 100;         /* pastikan di atas konten */
    padding: 14px 16px 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    border-bottom: 0.5px solid #e2e8f0;
    flex-shrink: 0;
}
.topbar-logo { font-size: 17px; font-weight: 800; color: #1e293b; letter-spacing: -.5px; }
.topbar-logo span { color: #E2572C; }
.topbar-right { display: flex; gap: 6px; margin-left: auto; }
.searchbar {
  flex: 1;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 7px 14px;
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.icon-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #475569; cursor: pointer;
}

/* ─── Banner ─── */
.banner {
  margin: 12px;
  border-radius: 16px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.banner-marketplace  { background: linear-gradient(135deg, #E2572C 0%, #f97316 100%); }
.banner-tokoku { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); }
.banner-jualan { background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%); }
.banner-laporan{ background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%); }
.banner-akun {
    background: linear-gradient(135deg, #16a34a 0%, #02e655 100%);
    margin: 3px;
}

.banner-cabang {
    background: linear-gradient(135deg, #388d2d 0%, #4dfc56 100%); /* kuning */
}
.banner-text .banner-title { font-size: 16px; font-weight: 700; color: #fff; }
.banner-text .banner-sub   { font-size: 12px; color: rgba(255,255,255,.8); margin-top: 3px; }
.banner-icon { font-size: 52px; color: rgba(255,255,255,.25); }

/* ─── Category Row ─── */
.cat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px 12px;
}
.cat-item { display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; }
.cat-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.cat-label { font-size: 10px; color: #475569; text-align: center; font-weight: 500; }

/* ─── Section Label ─── */
.section-label {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  padding: 10px 14px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.section-label a { font-size: 11px; font-weight: 500; color: #E2572C; text-decoration: none; }



/* ─── Order List ─── */
.order-list { padding: 4px 12px 8px; display: flex; flex-direction: column; gap: 8px; }
.order-item {
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.order-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.order-info { flex: 1; }
.order-name { font-size: 12px; font-weight: 600; color: #1e293b; }
.order-sub  { font-size: 10px; color: #94a3b8; margin-top: 2px; }
.order-status {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
}
.s-new     { background: #dbeafe; color: #1d4ed8; }
.s-process { background: #fef9c3; color: #a16207; }
.s-done    { background: #dcfce7; color: #16a34a; }

/* ─── Bar Chart ─── */
.bar-chart-container { padding: 4px 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.bar-item { display: flex; align-items: center; gap: 10px; }
.bar-label { font-size: 11px; color: #475569; width: 68px; font-weight: 500; flex-shrink: 0; }
.bar-bg {
  flex: 1;
  background: #f1f5f9;
  border-radius: 20px;
  height: 22px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 20px;
  transition: width .7s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: flex-end;
  padding-right: 8px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  min-width: 0;
  white-space: nowrap;
}

/* ─── Akun ─── */
.akun-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px 12px;
}
.avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg,#E2572C,#f97316);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.akun-name { font-size: 15px; font-weight: 700; color: #1e293b; }
.akun-sub  { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.menu-list { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 4px; }
.menu-item {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #1e293b;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.menu-item .chev { margin-left: auto; font-size: 11px; color: #cbd5e1; }

/* Bottom nav */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    background: #ffffff;
    border-top: 0.6px solid #e2e8f0;
    border-radius: 20px 20px 0 0;  /* ← tambah ini */
    padding: 6px 4px 10px;
    flex-shrink: 0;
    backdrop-filter: blur(2px);
    box-shadow: 0 -2px 12px rgba(0,0,0,.06);  /* opsional, biar lebih rapi */
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.nav-icon-wrap {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 28px;
}
.nav-icon { font-size: 19px; color: #94a3b8; transition: color .2s; }
.nav-label { font-size: 10px; color: #94a3b8; font-weight: 500; transition: color .2s; }
.nav-item.active .nav-icon,
.nav-item.active .nav-label { color: #E2572C; }
.nav-fab {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, #E2572C, #f97316);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
  box-shadow: 0 4px 16px rgba(226,87,44,.4);
}

.nav-fab .nav-icon { color: #fff !important; font-size: 18px; }
.nav-item.active .nav-fab .nav-icon { color: #fff !important; }
.nav-dot {
  position: absolute;
  top: 2px; right: 4px;
  width: 7px; height: 7px;
  background: #E2572C;
  border-radius: 50%;
  border: 2px solid #fff;
}






/* ─── Toast ─── */
/* Animasi untuk toast */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        background-color: rgba(245, 158, 11, 0.1);
    }
    50% {
        transform: scale(1.02);
        background-color: rgba(245, 158, 11, 0.2);
    }
    100% {
        transform: scale(1);
        background-color: rgba(245, 158, 11, 0);
    }
}

.barcode-icon:hover {
    color: #f59e0b !important;
    transform: translateY(-50%) scale(1.1) !important;
    transition: all 0.2s ease;
}

.product-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}












/* ─── Image Upload ─── */
.img-preview-wrap {
  position: relative;
  width: 100%;
  height: 180px;
  background: #f8fafc;
  border-radius: 14px;
  border: 2px dashed #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  overflow: hidden;
}
.img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.img-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,.5);
  color: #fff;
  border: none;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-btn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 8px;
}
.img-btn {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.img-btn:active { background: #f1f5f9; }





/* ─── Login ─── */
.login-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

.login-card {
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
}

.login-header {
  text-align: center;
  margin-bottom: 28px;
}

.login-logo {
  font-size: 32px;
  font-weight: 800;
  color: #1e293b;
  letter-spacing: -.5px;
}

.login-logo span {
  color: #E2572C;
}

.login-sub {
  font-size: 13px;
  color: #94a3b8;
  margin-top: 6px;
}

.login-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #E2572C, #f97316);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(226,87,44,.3);
  transition: opacity .2s;
}

.login-btn-google:hover {
  opacity: .9;
}

.login-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: #cbd5e1;
}
















/* akun */


.menu-group-title{
    font-size:13px;
    font-weight:700;
    color:#64748b;
    padding:14px 16px 8px;
    display:flex;
    align-items:center;
    gap:8px;
    text-transform:uppercase;
    letter-spacing:.5px;
}

.buyer-tab{
    margin-top:10px;
}

.menu-item-seller{
    background:#16a34a !important;
    color:#fff !important;
    font-weight:600;
    border-radius:12px;
    margin-bottom:10px;
    box-shadow:0 4px 10px rgba(22,163,74,.18);
}

.menu-item-seller .chev{
    color:#fff !important;
}











/* Toko_register */

.page-register-toko{
    padding:16px;
    overflow-y:auto;
    height:100%;
    background:#f8fafc;
}

.form-card{
    background:#fff;
    border-radius:16px;
    padding:18px;
    box-shadow:0 2px 10px rgba(0,0,0,.05);
}

.form-title{
    font-size:20px;
    font-weight:700;
    margin-bottom:4px;
}

.form-sub{
    font-size:13px;
    color:#64748b;
    margin-bottom:20px;
}

.form-group {
    background: #fff;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,.05);
    margin-bottom: 20px; /* jarak antar form */
}


.form-label{
    font-size:14px;
    font-weight:600;
    margin-bottom:8px;
    display:block;
}

.form-input,
.form-select,
.form-textarea{
    width:100%;
    border:1px solid #dbe2ea;
    border-radius:12px;
    padding:12px;
    font-size:14px;
    outline:none;
    box-sizing:border-box;
}

.form-textarea{
    min-height:100px;
    resize:vertical;
}


.leaflet-tile-container {
    opacity: 1 !important;
}

.leaflet-layer {
    position: absolute !important;
    z-index: 1 !important;
}

.leaflet-map-pane {
    z-index: 1 !important;
}
.leaflet-tile {
    opacity: 1 !important;
    transition: none !important;
}

.map-wrapper {
    border-radius: 14px;
    overflow: hidden;
    margin-top: 10px;
}

#map {
    width: 100%;
    height: 300px;
}

.coordinate-box{
    margin-top:10px;
    background:#f1f5f9;
    padding:10px;
    border-radius:10px;
    font-size:13px;
    color:#334155;
}

.btn-submit{
    width:100%;
    border:none;
    background:#16a34a;
    color:#fff;
    padding:14px;
    border-radius:14px;
    font-size:15px;
    font-weight:700;
    cursor:pointer;
}





/* ============================================
   SKELETON LOADING ANIMATION - MARKETPLACE STYLE
   ============================================ */

.skeleton-wrapper {
  opacity: 0;
  transition: opacity 0.2s ease;
  animation: skeletonFadeIn 0.3s ease forwards;
}

@keyframes skeletonFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.skeleton-container {
  padding: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

/* Shimmer Animation */
.shimmer {
  background: linear-gradient(
    90deg,
    #e0e0e0 0%,
    #f5f5f5 50%,
    #e0e0e0 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Skeleton Elements */
.skeleton {
  border-radius: 12px;
}

.skeleton-banner {
  height: 180px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.skeleton-banner-sm {
  height: 120px;
  border-radius: 16px;
  margin-bottom: 20px;
}

.skeleton-profile {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 20px;
}

/* Grid Layouts */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skeleton-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.skeleton-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.skeleton-image {
  height: 160px;
  border-radius: 0;
}

.skeleton-image-sm {
  height: 120px;
  border-radius: 0;
}

.skeleton-content {
  padding: 12px;
}

.skeleton-title {
  height: 16px;
  border-radius: 4px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-price {
  height: 18px;
  border-radius: 4px;
  margin-bottom: 6px;
  width: 60%;
}

.skeleton-rating {
  height: 14px;
  border-radius: 4px;
  width: 40%;
  margin-bottom: 6px;
}

.skeleton-location {
  height: 12px;
  border-radius: 4px;
  width: 70%;
}

.skeleton-row {
  height: 16px;
  border-radius: 4px;
  margin-bottom: 8px;
}

.skeleton-row.short {
  width: 60%;
}

.skeleton-row.medium {
  width: 80%;
}

/* List Style Skeleton */
.skeleton-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.skeleton-row-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
  background: white;
  padding: 12px;
  border-radius: 12px;
}

.skeleton-avatar {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  flex-shrink: 0;
}

.skeleton-row-content {
  flex: 1;
}

/* Pulse Effect untuk loading lebih smooth */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.skeleton-wrapper.loading-pulse .skeleton {
  animation: pulse 1.2s ease-in-out infinite;
  background: #e0e0e0;
}

/* Page Fade Animation */
.page {
  animation: pageFadeIn 0.3s ease-out;
}

@keyframes pageFadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Product Card Hover Effect untuk mobile */
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:active {
  transform: scale(0.98);
}

/* Responsif untuk tablet/desktop */
@media (min-width: 768px) {
  .skeleton-grid,
  .skeleton-grid-2 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .skeleton-container {
    padding: 24px;
  }
  
  .skeleton-banner {
    height: 220px;
  }
}

/* Loading Spinner untuk transition antar halaman */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeOut 0.3s ease forwards;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid #e0e0e0;
  border-top-color: #007aff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Skeleton untuk produk kosong atau error */
.skeleton-wrapper.error-state .skeleton {
  animation: none;
  background: #f0f0f0;
}







.kategori-picker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.kategori-placeholder { color: #9ca3af; }


.kategori-item {
    cursor: pointer;
}
.kategori-item:active {
    background: #eff6ff;
    border-color: #bfdbfe;
}




/* ==============================================
   POPUP PAGE SYSTEM — Bottom Sheet
   Tambahkan ke style.css
   ============================================== */

/* Body lock saat popup terbuka */
body.popup-open {
  overflow: hidden;
}

/* Overlay gelap di belakang popup */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 200;
  pointer-events: none;
  transition: background 0.3s ease;
}
.popup-overlay.active {
  background: rgba(0, 0, 0, 0.45);
  pointer-events: all;
}

/* Popup wrapper — naik dari bawah */
.popup-page {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 92dvh;          /* maksimal 92% layar */
  min-height: 40dvh;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 32px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
  padding-bottom: 100px;

}
.popup-page.active {
  transform: translateY(0);
}
.popup-page.closing {
  transform: translateY(105%);
}

/* Handle bar (area drag) */
.popup-handle-bar {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 0 6px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.popup-handle-bar:active {
  cursor: grabbing;
}
.popup-handle {
  width: 40px;
  height: 4px;
  background: #d1d5db;
  border-radius: 99px;
}

/* Content scroll area */
.popup-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* Nested popup — sedikit lebih kecil agar terasa depth */
.popup-page + .popup-page {
  max-height: 88dvh;
}

/* ==============================================
   POPUP SKELETON LOADING
   ============================================== */
.popup-loading {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.popup-skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.popup-skeleton-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
}
.popup-skeleton-lines {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.popup-skeleton-line {
  height: 12px;
  border-radius: 6px;
  width: 100%;
}
.popup-skeleton-line.short {
  width: 60%;
}

/* ==============================================
   POPUP ERROR
   ============================================== */
.popup-error {
  padding: 32px 16px;
  text-align: center;
  color: #6b7280;
}
.popup-error p {
  margin-bottom: 12px;
  font-size: 14px;
}
.popup-error button {
  padding: 8px 20px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
}



.popup-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.popup-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.popup-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
}

.popup-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.popup-footer {
  padding: 12px 16px;
  border-top: 1px solid #f0f0f0;
  position: sticky;
  bottom: 0;
  background: #fff;
}










/* ---------------- jualan ---------------------------------*/
  /* Header Mobile */
  .pos-header {
      position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
    background: linear-gradient(135deg, #E2572C 0%, #c2410c 100%);
    padding: 6px 6px 6px 6px;
    cursor: pointer;
    transition: all 0.2s;
  }

  .pos-header:active {
    opacity: 0.9;
  }

  .cart-summary-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
  }

  .cart-info {
    flex: 1;
      align-items: center;
  }

  .cart-label {
    flex: 2; /* lebih lebar dibanding item lain */
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 4px;
  }

  .cart-total {
    font-size: 24px;
    font-weight: bold;
  }

  .cart-item-count {
    font-size: 18px;
    font-weight: 600;
  }

  .cart-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.3);
    margin: 0 16px;
  }

  .cart-icon-mobile {
    font-size: 20px;
    opacity: 0.8;
  }

  /* Search Section */
/* Search Section */
.search-section {
  position: fixed;
  top: 55px; /* Sesuaikan dengan tinggi header */
  left: 0;
  right: 0;
  z-index: 99;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.search-container {
  display: flex;
  align-items: center;
  background: #f1f5f9;       /* sama dengan topbar */
  border-radius: 20px;       /* sama dengan topbar */
  padding: 7px 14px;         /* sama dengan topbar */
  font-size: 12px;           /* sama dengan topbar */
  color: #94a3b8;
  gap: 6px;
}

.search-icon {
  font-size: 14px;
  color: #475569;  
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;   /* biar menyatu dengan container */
  font-size: 12px;
  color: #475569;
  outline: none;
}


/* Kategori Section */
.kategori-section {
  position: sticky;
  top: 110px; /* Sesuaikan dengan tinggi header + search */
  left: 0;
  right: 0;
  z-index: 98;
  background: #fff;
  border-bottom: 1px solid #f1f5f9; /* sama dengan inline style */
}

.kategori-scroll {
  display: flex;
  gap: 8px;
  padding: 10px 14px;              /* sama dengan inline style */
  overflow-x: auto;
  scrollbar-width: none;           /* hilangkan scrollbar */
}

.kategori-scroll::-webkit-scrollbar {
  display: none;                   /* hilangkan scrollbar di WebKit */
}

/* Pill kategori */
.kategori-pill {
  flex-shrink: 0;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.kategori-pill.active {
  background: #3b82f6;             /* biru sama dengan contoh */
  border-color: #3b82f6;
  color: #fff;
}


  /* Produk Grid */
  .produk-grid-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
  }

  .produk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  @media (min-width: 480px) {
    .produk-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }

  @media (min-width: 768px) {
    .produk-grid {
      grid-template-columns: repeat(4, 1fr);
    }
  }

  /* ── Modal Keranjang ──────────────────────────────────── */
@keyframes fadeIn  { from { opacity: 0 }              to { opacity: 1 } }
@keyframes slideUp { from { transform: translateY(100%) } to { transform: translateY(0) } }

.cart-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1000;
  animation: fadeIn 0.25s ease;
}
.cart-modal.active {
  display: flex;
  align-items: flex-end;
}

.cart-modal-content {
  background: #fff;
  width: 100%;
  max-height:95%;
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  border-top: 0.5px solid #e2e8f0;
  animation: slideUp 0.25s ease;
  padding-bottom: 100px;
}

/* ── Header ───────────────────────────────────────────── */
.cart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 5px;
  border-bottom: 0.5px solid #e2e8f0;
}
.cart-modal-header h3 {
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-modal-header h3 i { font-size: 16px; color: #E2572C; }

.cart-item-badge {
  font-size: 11px;
  font-weight: 500;
  background: #FAECE7;
  color: #993C1D;
  padding: 2px 8px;
  border-radius: 99px;
}

.close-modal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 0.5px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  color: #64748b;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.close-modal:hover { background: #f1f5f9; }

/* ── Body / Item List ─────────────────────────────────── */
.cart-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-modal-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 0.5px solid #e2e8f0;
}

.item-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FAECE7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.item-icon i { font-size: 18px; color: #D85A30; }

.cart-modal-item-info { flex: 1; min-width: 0; }

.cart-modal-item-name {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-modal-item-price {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.cart-modal-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 0.5px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.qty-btn:hover { background: #f8fafc; }

.cart-modal-item input[type="number"] {
  width: 36px;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  border: 0.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 4px 0;
  color: #1e293b;
  background: #fff;
}

.delete-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: none;
  background: #FAECE7;
  cursor: pointer;
  color: #993C1D;
  display: flex;
  align-items: center;
  justify-content: center;
}
.delete-btn i { font-size: 14px; }

.cart-modal-item-subtotal {
  font-size: 13px;
  font-weight: 500;
  color: #1e293b;
  min-width: 70px;
  text-align: right;
}

/* ── Footer / Summary ─────────────────────────────────── */
.cart-modal-footer {
  padding: 16px 20px 100px;
  border-top: 0.5px solid #e2e8f0;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-summary { display: flex; flex-direction: column; gap: 8px; }

.modal-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #64748b;
}

.modal-summary-bayar {
  display: flex;
  flex-direction: column; /* susun vertikal */
  gap: 8px; /* jarak antara caption dan input */
} 

.modal-summary-row span:last-child {
  color: #1e293b;
  font-weight: 500;
}
.modal-summary-row.total {
  font-size: 15px;
  font-weight: 500;
  color: #1e293b;
  border-top: 0.5px solid #e2e8f0;
  padding-top: 10px;
  margin-top: 2px;
}
.modal-summary-row.total span:last-child {
  color: #E2572C;
  font-size: 16px;
}

.diskon-input-group { display: flex; align-items: center; gap: 6px; }
.diskon-input-group input {
  padding: 4px 8px;
  border: 0.5px solid #cbd5e1;
  border-radius: 8px;
  text-align: center;
  font-size: 12px;
  color: #1e293b;
  background: #fff;
}
.diskon-input-group input:first-child { width: 52px; }
.diskon-input-group input:last-child  { width: 88px; }
.diskon-input-group > span { font-size: 11px; color: #94a3b8; }

.bayar-row { display: flex; align-items: center; gap: 10px; }
.bayar-row label { font-size: 13px; color: #64748b; white-space: nowrap; }
.bayar-row input {
  flex: 1;
  padding: 8px 12px;
  border: 0.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 13px;
  color: #1e293b;
  background: #fff;
}
.input-bayar {
  width: 100%;            /* penuh selebar container */
  font-size: 1.5rem;       /* lebih besar agar jelas */
  padding: 14px;           /* ruang dalam lebih lega */
  box-sizing: border-box;  /* padding tidak melebihi lebar */
  border: 1px solid #334155; /* abu gelap */
  border-radius: 8px;
  text-align: center;
  background-color: #5f5d5d;  /* hitam */
  color: #fff;             /* putih */
}
.input-bayar:focus {
  outline: none;
  border-color: #38bdf8;   /* biru terang saat fokus */
  box-shadow: 0 0 6px #38bdf8;
}



/* ── Payment Method ───────────────────────────────────── */
.modal-payment { display: flex; gap: 8px; }

.payment-method-btn {
  flex: 1;
  padding: 9px 6px;
  background: #f8fafc;
  border: 0.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.payment-method-btn i { font-size: 18px; }
.payment-method-btn.active {
  background: #FAECE7;
  color: #993C1D;
  border-color: #F5C4B3;
}

/* ── Checkout Button ──────────────────────────────────── */
.checkout-modal-btn {
  width: 100%;
  padding: 13px;
  background: #E2572C;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s;
}
.checkout-modal-btn:hover { background: #c94a23; }

/* ── Empty State ──────────────────────────────────────── */
.empty-cart-modal {
  text-align: center;
  padding: 48px 20px;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-cart-modal i { font-size: 40px; opacity: 0.35; }
.empty-cart-modal p  { font-size: 14px; }
  /* Landscape mode */
  .landscape-mode {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    background: #fff;
    transform: rotate(90deg);
    transform-origin: center center;
  }

  .landscape-mode {
    width: 100vh;
    height: 100vw;
  }






  .setting-group-title {
    font-weight: 700;
    margin: 18px 0 10px;
    color: #111827;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
}


.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start; /* penting: bukan center */
    gap: 12px;
}

.setting-info {
    flex: 1;           /* ambil sisa ruang */
    min-width: 0;      /* penting untuk overflow */
}

.setting-title {
    font-size: 14px;
    color: #6b7280;
}

.setting-deskripsi {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.4;
}




















.mulai-jualan-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 3rem;
  background: #fff;
}

.mj-icon-ring {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: #FAECE7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}
.mj-icon-ring i { font-size: 36px; color: #E2572C; }

.mj-title {
  font-size: 22px;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  line-height: 1.35;
  margin-bottom: .5rem;
}

.mj-sub {
  font-size: 14px;
  color: #64748b;
  text-align: center;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 300px;
}

.mj-features {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 2rem;
}

.mj-feat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 0.5px solid #e2e8f0;
}

.mj-feat-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FAECE7;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mj-feat-icon i { font-size: 16px; color: #D85A30; }

.mj-feat-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
}
.mj-feat-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.mj-btn-mulai {
  width: 100%;
  max-width: 360px;
  padding: 14px;
  background: #E2572C;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  transition: background .15s;
}
.mj-btn-mulai:hover { background: #c94a23; }
.mj-btn-mulai i { font-size: 15px; }

.mj-note {
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  margin-top: 1rem;
}



.mj-gallery-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #E2572C;
  text-align: center;
  margin-bottom: .75rem;
}

.mj-gallery-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 8px 24px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  width: 100%;
}
.mj-gallery-scroll::-webkit-scrollbar { display: none; }

.mj-ss-frame {
  flex: 0 0 auto;
  width: 140px;
  aspect-ratio: 9 / 19;
  border-radius: 20px;
  overflow: hidden;
  border: 0.5px solid #e2e8f0;
  background: #f1f5f9;
  scroll-snap-align: start;
}
.mj-ss-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mj-scroll-hint {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: -4px;
  margin-bottom: 1.75rem;
}
.mj-scroll-hint i { font-size: 12px; }





.highlight {
  color: #16a34a;          /* hijau */
  font-weight: bold;
  background: #dcfce7;     /* latar hijau muda */
  padding: 2px 6px;
  border-radius: 4px;
}
















/* css printer struk termal */
@media print {
  body * {
    visibility: hidden;
  }

  #thermalReceipt, #thermalReceipt * {
    visibility: visible;
  }

  #thermalReceipt {
    position: absolute;
    left: 0;
    top: 0;
    width: 58mm; /* ganti 80mm kalau printer besar */
  }
}

.receipt {
  width: 58mm;
  font-family: monospace;
  font-size: 11px;
  padding: 5px;
}

.center {
  text-align: center;
}

.row {
  display: flex;
  justify-content: space-between;
  margin: 2px 0;
}

.total {
  font-size: 12px;
  font-weight: bold;
}

hr {
  border: none;
  border-top: 1px dashed #000;
  margin: 5px 0;
}






/* rekap transaksi di jualan */
.trx-scroll{
  position: sticky;
  top: 160px;

  display:flex;
  gap:8px;
  overflow-x:auto;

  padding:10px 12px;

  scrollbar-width:none;
  z-index:5;

  background:#fff;
}

.trx-scroll::-webkit-scrollbar{
  display:none;
}

.trx-item{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:6px;
  background:#dcfce7; /* green-100 */
  color:#166534;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  white-space:nowrap;
}

.trx-jam{
  opacity:.8;
}

.trx-total{
  font-weight:600;
}
















  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes slideDown {
    from {
      opacity: 1;
      transform: translateY(0);
    }
    to {
      opacity: 0;
      transform: translateY(20px);
    }
  }




  /* Warning untuk menu profil akun */
.menu-item.menu-warning {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border-left: 4px solid #f59e0b;
}

.menu-item.menu-warning i {
    color: #b45309;
}







.leaflet-control-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.leaflet-control-custom:hover {
  background-color: #f0f0f0;
  transform: scale(1.1);
}

.leaflet-control-custom:active {
  transform: scale(0.95);
}
