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

:root {
  --bg: #f0ebe0;
  --card-bg: #f5f2eb;
  --text: #1a1a1a;
  --text-muted: #6b6560;
  --green: #3d7a5a;
  --purple: #6c5ce7;
  --teal: #00897b;
  --orange: #e67e22;
  --nav-h: 72px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 2px 12px rgba(0,0,0,0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); height: 100%; overflow: hidden; overscroll-behavior: none; }
#app { height: 100vh; height: 100dvh; overflow: hidden; position: relative; }

/* SPLASH */
#splash { position: fixed; inset: 0; background: var(--bg); display: flex; align-items: center; justify-content: center; z-index: 9999; transition: opacity 0.4s, transform 0.4s; }
#splash.fade-out { opacity: 0; transform: scale(1.05); pointer-events: none; }
.splash-logo { text-align: center; }
.splash-icon { font-size: 64px; margin-bottom: 12px; animation: bounce 1s ease infinite alternate; }
.splash-logo h1 { font-size: 28px; font-weight: 800; color: var(--green); }
.splash-logo p { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* MAIN */
#main-app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
#main-app.hidden { display: none; }
.page { display: none; flex: 1; overflow: hidden; }
.page.active { display: flex; flex-direction: column; }
.page-content { flex: 1; overflow-y: auto; padding: 0 16px calc(var(--nav-h) + 20px) 16px; -webkit-overflow-scrolling: touch; }
.page-content::-webkit-scrollbar { display: none; }
.hidden { display: none !important; }

/* HEADER */
.app-header { padding: 18px 0 8px; display: flex; align-items: center; gap: 10px; }
.header-menu { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; }
.header-info { flex: 1; }
.app-header h2 { font-size: 20px; font-weight: 800; line-height: 1.2; }
.app-header p { font-size: 12px; color: var(--text-muted); }
.profile-pill { background: rgba(255,255,255,0.6); border: 1.5px solid rgba(255,255,255,0.9); border-radius: 50%; width: 36px; height: 36px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* PERIOD */
.period-bar { margin: 8px 0 14px; }
.period-tabs { display: flex; background: rgba(255,255,255,0.5); border-radius: 50px; padding: 3px; border: 1.5px solid rgba(255,255,255,0.8); }
.tab { flex: 1; padding: 7px 10px; border: none; background: none; border-radius: 50px; font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-muted); font-family: inherit; transition: all 0.2s; }
.tab.active { background: var(--green); color: white; font-weight: 700; box-shadow: 0 2px 8px rgba(61,122,90,0.3); }

/* STATS */
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.stat-card { border-radius: var(--radius); padding: 16px; border: 1.5px solid rgba(255,255,255,0.7); box-shadow: var(--shadow-card); transition: transform 0.15s; }
.stat-card:active { transform: scale(0.98); }
.stat-card.green  { background: linear-gradient(135deg,#e8f5ee,#d4eddf); }
.stat-card.purple { background: linear-gradient(135deg,#ede9ff,#ddd5ff); }
.stat-card.teal   { background: linear-gradient(135deg,#e0f5f3,#cceee9); }
.stat-card.orange { background: linear-gradient(135deg,#fff3e0,#ffe8c0); }
.stat-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.stat-icon { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.green-icon  { background: var(--green); color: white; }
.purple-icon { background: var(--purple); color: white; }
.teal-icon   { background: var(--teal); color: white; }
.orange-icon { background: var(--orange); color: white; }
.stat-badge { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 50px; }
.stat-badge.up       { background: rgba(61,122,90,0.15); color: var(--green); }
.purple-badge.up     { background: rgba(108,92,231,0.15); color: var(--purple); }
.orange-badge.up     { background: rgba(230,126,34,0.15); color: var(--orange); }
.stat-label { font-size: 10px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 4px; }
.stat-value { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }

/* CARDS */
.card { background: var(--card-bg); border-radius: var(--radius); padding: 16px; border: 1.5px solid rgba(255,255,255,0.8); box-shadow: var(--shadow-card); margin-bottom: 16px; }
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; }
.chart-wrap { position: relative; height: 160px; }
.bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 8px; }
.bestseller-card,.produksi-card { background: var(--card-bg); border-radius: var(--radius); padding: 14px; border: 1.5px solid rgba(255,255,255,0.8); box-shadow: var(--shadow-card); }
.bestseller-card h3,.produksi-card h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.bestseller-item { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.bestseller-item:last-child { border-bottom: none; }
.bestseller-emoji { font-size: 26px; }
.bestseller-name { font-size: 12px; font-weight: 600; }
.bestseller-rank { font-size: 10px; color: var(--text-muted); }
.produksi-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.produksi-item:last-child { border-bottom: none; }
.produksi-emoji { font-size: 20px; }
.produksi-name { font-size: 11px; font-weight: 600; }
.produksi-harga { font-size: 10px; color: var(--green); font-weight: 600; }
.empty-state { color: var(--text-muted); font-size: 12px; text-align: center; padding: 12px 0; }

/* ============================================================
   BOTTOM NAV — Modern SVG Icons
   ============================================================ */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(250,248,243,0.96);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
  box-shadow: 0 -2px 24px rgba(0,0,0,0.07);
}
.nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px; background: none; border: none; cursor: pointer; font-family: inherit;
  position: relative;
}
.nav-icon-wrap {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  transition: background 0.2s, transform 0.2s;
}
.nav-item.active .nav-icon-wrap { background: rgba(61,122,90,0.12); }
.nav-item.active .nav-icon-wrap svg { color: var(--green); }
.nav-icon-wrap svg { width: 22px; height: 22px; color: #a09890; transition: color 0.2s; stroke-width: 1.8; }
.nav-label { font-size: 10px; font-weight: 500; color: var(--text-muted); transition: color 0.2s; letter-spacing: 0.1px; }
.nav-item.active .nav-label { color: var(--green); font-weight: 700; }

/* Center Kasir button */
.nav-center { margin-top: -10px; }
.nav-icon-center {
  width: 54px; height: 54px;
  background: linear-gradient(145deg, #4a9068, #2d6347);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(61,122,90,0.5), 0 2px 8px rgba(0,0,0,0.12);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 2.5px solid rgba(255,255,255,0.25);
}
.nav-center:active .nav-icon-center { transform: scale(0.93); box-shadow: 0 3px 10px rgba(61,122,90,0.3); }
.nav-icon-center svg { width: 28px; height: 28px; }
.nav-center .nav-label { color: var(--green); font-weight: 600; }

/* KASIR */
.search-bar { margin: 10px 0; }
.search-bar input { width: 100%; padding: 12px 16px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,0.8); background: rgba(255,255,255,0.7); font-size: 14px; font-family: inherit; outline: none; }
.produk-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; padding-bottom: 190px; }
.produk-card-kasir { background: var(--card-bg); border-radius: var(--radius-sm); padding: 14px; border: 1.5px solid rgba(255,255,255,0.8); box-shadow: var(--shadow-card); cursor: pointer; transition: transform 0.15s; text-align: center; }
.produk-card-kasir:active { transform: scale(0.95); }
.produk-emoji { font-size: 36px; margin-bottom: 6px; }
.produk-nama { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.produk-harga { font-size: 13px; font-weight: 700; color: var(--green); }
.produk-stok { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.stok-habis { opacity: 0.4; cursor: not-allowed; }

/* CART */
.cart-panel { position: fixed; bottom: var(--nav-h); left: 0; right: 0; background: white; border-radius: var(--radius) var(--radius) 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,0.12); z-index: 50; max-height: 55vh; display: flex; flex-direction: column; transition: transform 0.3s ease; }
.cart-panel.empty { transform: translateY(calc(100% - 50px)); }
.cart-panel.collapsed { transform: translateY(calc(100% - 50px)); }
.cart-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid rgba(0,0,0,0.06); font-weight: 600; font-size: 14px; cursor: pointer; }
.cart-chevron { transition: transform 0.3s; font-size: 12px; color: var(--text-muted); }
.cart-items { flex: 1; overflow-y: auto; padding: 8px 16px; }
.cart-item { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,0.05); gap: 8px; font-size: 13px; }
.cart-item-name { flex: 1; font-weight: 500; }
.cart-item-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--green); background: none; cursor: pointer; font-size: 14px; font-weight: 700; color: var(--green); display: flex; align-items: center; justify-content: center; }
.cart-item-harga { font-weight: 600; color: var(--green); min-width: 60px; text-align: right; }
.cart-footer { padding: 10px 16px; border-top: 1px solid rgba(0,0,0,0.06); display: flex; align-items: center; gap: 12px; }
.cart-total { flex: 1; }
.cart-total span { font-size: 12px; color: var(--text-muted); }
.cart-total strong { display: block; font-size: 18px; font-weight: 800; }
.btn-bayar { background: var(--green); color: white; border: none; border-radius: 14px; padding: 12px 20px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; box-shadow: 0 4px 12px rgba(61,122,90,0.3); white-space: nowrap; }

/* KATEGORI JUAL */
.kategori-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kategori-btn { background: rgba(255,255,255,0.7); border: 2px solid rgba(0,0,0,0.08); border-radius: var(--radius-sm); padding: 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; font-family: inherit; transition: all 0.2s; }
.kategori-btn:active { transform: scale(0.96); }
.kategori-btn strong { font-size: 13px; }
.kategori-btn small { font-size: 11px; color: var(--text-muted); }
.kategori-btn.online-btn { border-color: rgba(108,92,231,0.2); background: rgba(108,92,231,0.06); }

/* BAYAR */
.metode-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.metode-tab { flex: 1; padding: 10px; border: 2px solid rgba(0,0,0,0.1); border-radius: 10px; background: none; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.metode-tab.active { border-color: var(--green); background: rgba(61,122,90,0.08); color: var(--green); }
.badge-kategori { font-size: 11px; background: rgba(61,122,90,0.12); color: var(--green); padding: 2px 8px; border-radius: 50px; font-weight: 600; }
.qris-box { background: rgba(61,122,90,0.06); border-radius: var(--radius-sm); padding: 20px; text-align: center; }
.qris-box p { font-size: 13px; color: var(--text-muted); margin: 8px 0 12px; }
.qris-total-row { display: flex; justify-content: space-between; align-items: center; background: white; border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.qris-total-row span { font-size: 13px; color: var(--text-muted); }
.qris-total-row strong { font-size: 18px; font-weight: 800; color: var(--green); }
.total-display { background: var(--green); color: white; border-radius: var(--radius-sm); padding: 16px; margin-bottom: 14px; display: flex; justify-content: space-between; align-items: center; }
.total-display span { font-size: 13px; opacity: 0.9; }
.total-display strong { font-size: 24px; font-weight: 800; }
.kembalian-display { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: rgba(61,122,90,0.1); border-radius: 10px; margin-top: 10px; }
.kembalian-display span { font-size: 13px; color: var(--text-muted); }
.kembalian-display strong { font-size: 18px; font-weight: 700; color: var(--green); }
.quick-cash { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.quick-cash button { padding: 7px 10px; background: rgba(0,0,0,0.06); border: none; border-radius: 8px; font-size: 12px; font-weight: 600; font-family: inherit; cursor: pointer; }

/* PRODUK MANAGE */
.btn-primary { width: 100%; padding: 14px; background: var(--green); color: white; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; margin: 10px 0; }
.produk-manage-list { padding-bottom: 80px; }
.produk-manage-item { background: var(--card-bg); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; border: 1.5px solid rgba(255,255,255,0.8); display: flex; align-items: center; gap: 12px; }
.produk-manage-emoji { font-size: 32px; }
.produk-manage-info { flex: 1; }
.produk-manage-nama { font-size: 14px; font-weight: 600; }
.produk-manage-detail { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.produk-manage-price { font-size: 13px; font-weight: 700; color: var(--green); margin-top: 2px; }
.produk-manage-actions { display: flex; gap: 6px; }
.btn-edit,.btn-del { border: none; border-radius: 8px; padding: 7px 10px; font-size: 12px; cursor: pointer; font-family: inherit; font-weight: 600; }
.btn-edit { background: rgba(108,92,231,0.12); color: var(--purple); }
.btn-del { background: #ffe0e0; color: #c0392b; }

/* TRANSAKSI */
.transaksi-list { padding-bottom: 80px; }
.transaksi-item { background: var(--card-bg); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 10px; border: 1.5px solid rgba(255,255,255,0.8); }
.transaksi-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
.transaksi-id { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.transaksi-time { font-size: 11px; color: var(--text-muted); }
.transaksi-items { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; line-height: 1.4; }
.transaksi-footer { display: flex; justify-content: space-between; align-items: center; }
.transaksi-total { font-size: 16px; font-weight: 700; color: var(--green); }
.transaksi-actions { display: flex; gap: 6px; }
.trx-badge { font-size: 10px; padding: 2px 8px; border-radius: 50px; font-weight: 600; display: inline-block; margin-top: 2px; }
.trx-badge.offline { background: rgba(61,122,90,0.12); color: var(--green); }
.trx-badge.online  { background: rgba(108,92,231,0.12); color: var(--purple); }
.trx-badge.tunai   { background: rgba(0,137,123,0.12); color: var(--teal); }
.trx-badge.qris    { background: rgba(230,126,34,0.12); color: var(--orange); }

/* LAPORAN */
.export-bar { display: flex; gap: 8px; margin: 10px 0 14px; }
.btn-export { flex: 1; padding: 12px 6px; border: none; border-radius: 12px; font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; transition: transform 0.15s; }
.btn-export:active { transform: scale(0.96); }
.btn-export.pdf { background: rgba(192,57,43,0.12); color: #c0392b; }
.btn-export.csv { background: rgba(61,122,90,0.12); color: var(--green); }
.btn-export.wa  { background: rgba(37,211,102,0.15); color: #128C7E; }
#laporan-wrap { padding-bottom: 20px; }

/* PROFILE */
.profile-avatar-wrap { text-align: center; padding: 20px 0 16px; }
.profile-avatar { font-size: 56px; margin-bottom: 8px; }
.profile-avatar-wrap h3 { font-size: 18px; font-weight: 700; }
.profile-avatar-wrap p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.profile-section { margin-bottom: 16px; }
.profile-section-title { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; padding: 0 4px 8px; }
.profile-item { display: flex; align-items: center; gap: 12px; background: var(--card-bg); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 8px; border: 1.5px solid rgba(255,255,255,0.8); cursor: pointer; transition: transform 0.15s; }
.profile-item:active { transform: scale(0.98); }
.profile-item-icon { font-size: 20px; width: 28px; text-align: center; }
.profile-item-info { flex: 1; }
.profile-item-label { font-size: 13px; font-weight: 600; }
.profile-item-val { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.profile-chevron { font-size: 18px; color: var(--text-muted); }
.btn-logout { width: 100%; padding: 14px; background: #ffe0e0; color: #c0392b; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; }
/* Install App button */
.btn-install-app { width: 100%; padding: 14px; background: linear-gradient(135deg,#4a9068,#3d7a5a); color: white; border: none; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 10px; box-shadow: 0 4px 14px rgba(61,122,90,0.3); }
.btn-login-google { width: 100%; padding: 14px; background: white; color: #3c4043; border: 1.5px solid #dadce0; border-radius: var(--radius-sm); font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.google-icon { width: 20px; height: 20px; }

/* MODALS */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.modal-overlay.hidden { display: none; }
.modal { background: var(--card-bg); border-radius: var(--radius) var(--radius) 0 0; width: 100%; max-width: 500px; max-height: 88vh; display: flex; flex-direction: column; animation: slideUp 0.28s ease; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.modal-header h3 { font-size: 16px; font-weight: 700; }
.modal-header button { background: rgba(0,0,0,0.08); border: none; width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 14px; }
.modal-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.modal-body label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin: 12px 0 4px; }
.modal-body label:first-child { margin-top: 0; }
.modal-body input { width: 100%; padding: 11px 14px; border: 1.5px solid rgba(0,0,0,0.1); border-radius: 10px; font-size: 14px; font-family: inherit; background: white; outline: none; }
.modal-body input:focus { border-color: var(--green); }
.modal-footer { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid rgba(0,0,0,0.08); padding-bottom: max(12px,env(safe-area-inset-bottom)); }
.btn-cancel,.btn-save { flex: 1; padding: 13px; border: none; border-radius: 12px; font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; }
.btn-cancel { background: rgba(0,0,0,0.07); color: var(--text); }
.btn-save { background: var(--green); color: white; box-shadow: 0 4px 12px rgba(61,122,90,0.25); }

/* TOAST */
.toast { position: fixed; bottom: calc(var(--nav-h) + 16px); left: 50%; transform: translateX(-50%); background: #1a1a1a; color: white; padding: 10px 20px; border-radius: 50px; font-size: 13px; font-weight: 500; z-index: 500; white-space: nowrap; box-shadow: 0 4px 20px rgba(0,0,0,0.2); transition: opacity 0.3s, transform 0.3s; }
.toast.hidden { opacity: 0; transform: translateX(-50%) translateY(8px); pointer-events: none; }
.toast.success { background: var(--green); }
.toast.error { background: #c0392b; }

/* SIDEBAR */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 300; backdrop-filter: blur(2px); }
.sidebar-overlay.hidden { display: none; }
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; background: var(--card-bg); z-index: 301; box-shadow: 4px 0 30px rgba(0,0,0,0.12); display: flex; flex-direction: column; transform: translateX(0); transition: transform 0.3s; }
.sidebar.hidden { transform: translateX(-100%); }
.sidebar-header { display: flex; align-items: center; gap: 12px; padding: 24px 20px; border-bottom: 1px solid rgba(0,0,0,0.08); }
.sidebar-logo { font-size: 36px; }
.sidebar-header strong { font-size: 16px; font-weight: 700; }
.sidebar-header p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.sidebar-menu { flex: 1; padding: 12px; }
.sidebar-menu button { width: 100%; text-align: left; padding: 13px 14px; border: none; background: none; font-size: 14px; font-weight: 500; font-family: inherit; cursor: pointer; border-radius: 10px; color: var(--text); display: flex; gap: 10px; transition: background 0.15s; }
.sidebar-menu button:hover { background: rgba(0,0,0,0.05); }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(0,0,0,0.08); }
.sidebar-footer button { width: 100%; text-align: left; padding: 12px 14px; border: none; background: none; font-size: 14px; font-family: inherit; cursor: pointer; border-radius: 10px; color: var(--text-muted); }
#offline-banner { position: fixed; top: 0; left: 0; right: 0; background: #e74c3c; color: white; text-align: center; font-size: 12px; font-weight: 600; padding: 6px; z-index: 9998; transform: translateY(-100%); transition: transform 0.3s; }
#offline-banner.show { transform: translateY(0); }

/* ===== LOGIN SCREEN v5 ===== */
#login-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  overflow-y: auto;
  padding: 24px 20px;
}
#login-screen.hidden { display: none; }

.login-wrap {
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center;
  gap: 24px;
  padding: 20px 0 40px;
}

.login-logo-box { text-align: center; }
.login-app-icon { font-size: 60px; margin-bottom: 10px; animation: splashBounce 2s ease-in-out infinite alternate; width:96px; height:96px; margin-left:auto; margin-right:auto; display:block; }
.login-app-name { font-size: 28px; font-weight: 800; color: var(--green); letter-spacing: -0.5px; }
.login-app-tagline { font-size: 13px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

.login-card {
  width: 100%;
  background: rgba(255,255,255,0.75);
  border: 1.5px solid rgba(255,255,255,0.9);
  border-radius: 24px;
  padding: 28px 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.10);
  text-align: center;
}

.login-avatar-wrap { margin-bottom: 16px; }
.login-avatar {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, #e8f5ee, #d4eddf);
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.9);
  margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-size: 38px;
  box-shadow: 0 4px 16px rgba(61,122,90,0.2);
  overflow: hidden;
}

.login-title { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.login-subtitle { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; font-weight: 500; }

.btn-login-google {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 15px 20px;
  background: white;
  border: 2px solid rgba(0,0,0,0.12);
  border-radius: 14px;
  font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; color: #444;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: all 0.2s;
  margin-bottom: 12px;
}
.btn-login-google:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.14); transform: translateY(-1px); }
.btn-login-google:active { transform: scale(0.98); }
.btn-login-google:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.google-icon { width: 22px; height: 22px; flex-shrink: 0; }

.login-note {
  font-size: 11px; color: var(--text-muted);
  line-height: 1.5; margin-top: 4px;
}

.login-footer { font-size: 11px; color: var(--text-muted); text-align: center; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ===== GOOGLE ACCOUNT BADGE (di Profile) ===== */
.google-account-badge {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255,255,255,0.8);
  border: 1.5px solid rgba(66,133,244,0.3);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}
.google-icon-sm { width: 24px; height: 24px; flex-shrink: 0; }
.google-account-info { flex: 1; text-align: left; }
.google-account-label { display: block; font-size: 11px; font-weight: 700; color: #4285F4; text-transform: uppercase; letter-spacing: 0.5px; }
.google-account-email { display: block; font-size: 13px; color: var(--text-muted); margin-top: 1px; }
.google-account-check { font-size: 18px; }

/* ===== EDIT TRANSAKSI MODAL ===== */
.edit-trx-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  background: rgba(255,255,255,0.8);
  border-radius: 10px;
  margin-bottom: 7px;
  border: 1.5px solid rgba(0,0,0,0.07);
}
.edit-trx-item-emoji { font-size: 22px; flex-shrink: 0; }
.edit-trx-item-info { flex: 1; min-width: 0; }
.edit-trx-item-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edit-trx-item-price { font-size: 11px; color: var(--green); font-weight: 600; }
.edit-trx-qty-wrap { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.edit-qty-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--green); background: none;
  color: var(--green); font-size: 16px; font-weight: 700;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.edit-qty-btn:active { background: var(--green); color: white; }
.edit-qty-val { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.edit-trx-del { background: none; border: none; font-size: 16px; cursor: pointer; padding: 4px; color: var(--red); flex-shrink: 0; }

.edit-metode-btn {
  padding: 10px 8px;
  border: 1.5px solid rgba(0,0,0,0.1);
  border-radius: 10px; background: rgba(255,255,255,0.7);
  font-size: 12px; font-weight: 600; font-family: inherit;
  cursor: pointer; color: var(--text-muted); transition: all 0.2s;
}
.edit-metode-btn.active {
  border-color: var(--green); background: var(--green-light); color: var(--green);
}

/* ===== PLATFORM BRAND BUTTONS ===== */
/* Kategori kasir — aktif state per platform */
.kategori-btn.online-btn { transition: all 0.2s; border: 2px solid transparent; }
.kategori-btn.online-btn svg { border-radius: 10px; box-shadow: 0 3px 10px rgba(0,0,0,0.18); }

/* ShopeeFood aktif */
.kategori-btn.shopee-btn.active,
.kategori-btn.shopee-btn:focus { border-color: #EE4D2D; background: #fff5f3; }
.kategori-btn.shopee-btn.active strong { color: #EE4D2D; }

/* GoFood aktif */
.kategori-btn.gofood-btn.active,
.kategori-btn.gofood-btn:focus { border-color: #00A04A; background: #f0fbf5; }
.kategori-btn.gofood-btn.active strong { color: #00A04A; }

/* GrabFood aktif */
.kategori-btn.grabfood-btn.active,
.kategori-btn.grabfood-btn:focus { border-color: #007D38; background: #f0faf4; }
.kategori-btn.grabfood-btn.active strong { color: #007D38; }

/* Badge transaksi per platform */
.trx-badge.shopeefood { background: #fff0ec; color: #EE4D2D; }
.trx-badge.gofood     { background: #edfbf3; color: #00A04A; }
.trx-badge.grabfood   { background: #eaf7ee; color: #007D38; }

/* Edit metode buttons ukuran mini */
.edit-metode-btn svg { border-radius: 6px; flex-shrink: 0; }
.shopee-metode.active  { border-color: #EE4D2D !important; background: #fff0ec !important; color: #EE4D2D !important; }
.gofood-metode.active  { border-color: #00A04A !important; background: #edfbf3 !important; color: #00A04A !important; }
.grabfood-metode.active { border-color: #007D38 !important; background: #eaf7ee !important; color: #007D38 !important; }

/* ===== EDIT TRANSAKSI MODAL ===== */
.modal-tall { max-height: 92vh; }
.edit-trx-items-list {
  background: rgba(0,0,0,0.03);
  border-radius: 12px;
  padding: 4px 0;
  margin-bottom: 10px;
  min-height: 48px;
  max-height: 200px;
  overflow-y: auto;
}
.edit-trx-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.edit-trx-item:last-child { border-bottom: none; }
.edit-trx-item-emoji { font-size: 22px; flex-shrink: 0; }
.edit-trx-item-info { flex: 1; min-width: 0; }
.edit-trx-item-name  { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.edit-trx-item-price { font-size: 11px; color: var(--green); font-weight: 600; }
.edit-trx-qty-wrap   { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.edit-qty-btn {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--green); background: none;
  cursor: pointer; font-size: 15px; font-weight: 700;
  color: var(--green); display: flex; align-items: center; justify-content: center;
}
.edit-qty-btn:active { background: var(--green); color: white; }
.edit-qty-val  { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.edit-trx-del  { background: none; border: none; font-size: 16px; cursor: pointer; padding: 4px; color: #c0392b; flex-shrink: 0; }

.edit-trx-add-row {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.edit-trx-select {
  flex: 1; padding: 10px 12px;
  border: 1.5px solid rgba(0,0,0,0.1); border-radius: 10px;
  font-size: 13px; font-family: inherit;
  background: white; outline: none;
}
.edit-trx-select:focus { border-color: var(--green); }
.edit-trx-add-btn {
  padding: 10px 16px; background: var(--green); color: white;
  border: none; border-radius: 10px;
  font-size: 13px; font-weight: 700; font-family: inherit; cursor: pointer;
  white-space: nowrap;
}

.edit-trx-total-row {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(61,122,90,0.08); border-radius: 10px;
  padding: 12px 14px; margin-bottom: 12px;
}
.edit-trx-total-row span { font-size: 13px; color: var(--text-muted); }
.edit-trx-total-row strong { font-size: 20px; font-weight: 800; color: var(--green); }

.edit-metode-row {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px;
}
.edit-metode-btn {
  padding: 8px 12px;
  border: 1.5px solid rgba(0,0,0,0.1); border-radius: 50px;
  background: none; font-size: 12px; font-weight: 600;
  font-family: inherit; cursor: pointer; transition: all 0.18s;
  color: var(--text-muted);
}
.edit-metode-btn.active {
  border-color: var(--green); background: rgba(61,122,90,0.1); color: var(--green);
}

/* ===== TRANSAKSI TOOLBAR ===== */
.trx-toolbar { display:flex; gap:8px; margin-bottom:12px; }
.trx-tool-btn { padding:9px 14px; border:none; border-radius:10px; font-size:12px; font-weight:700; font-family:inherit; cursor:pointer; background:rgba(0,0,0,0.06); color:var(--text); transition:transform .15s; }
.trx-tool-btn:active { transform:scale(.96); }
.trx-tool-btn.danger { background:rgba(192,57,43,.12); color:#c0392b; }
.trx-tool-btn.select-btn { background:rgba(61,122,90,.1); color:var(--green); }

.trx-select-bar { display:flex; align-items:center; gap:8px; background:rgba(61,122,90,.08); border-radius:12px; padding:10px 14px; margin-bottom:10px; }
.trx-select-bar span { flex:1; font-size:13px; font-weight:600; color:var(--green); }

.trx-select-check { margin-right:4px; }
.trx-checkbox { font-size:18px; cursor:pointer; }
.trx-selected { background:rgba(61,122,90,.08) !important; border-color:rgba(61,122,90,.4) !important; }

/* ===== DETAIL TRANSAKSI ===== */
.detail-header-card { background:linear-gradient(135deg,#3d7a5a,#2d6b4a); color:white; border-radius:14px; padding:16px; margin-bottom:14px; text-align:center; }
.detail-store  { font-size:18px; font-weight:800; margin-bottom:4px; }
.detail-time   { font-size:12px; opacity:.85; margin-bottom:4px; }
.detail-metode { font-size:12px; background:rgba(255,255,255,.2); display:inline-block; padding:2px 10px; border-radius:50px; }

.detail-items-list { background:rgba(0,0,0,.03); border-radius:12px; padding:4px 0; margin-bottom:12px; }
.detail-item-row { display:flex; align-items:center; gap:10px; padding:9px 14px; border-bottom:1px solid rgba(0,0,0,.05); }
.detail-item-row:last-child { border-bottom:none; }
.detail-item-emoji { font-size:22px; flex-shrink:0; }
.detail-item-info  { flex:1; }
.detail-item-name  { font-size:13px; font-weight:600; }
.detail-item-price { font-size:11px; color:var(--text-muted); }
.detail-item-sub   { font-size:13px; font-weight:700; color:var(--green); }

.detail-summary { background:rgba(0,0,0,.03); border-radius:12px; padding:10px 14px; margin-bottom:14px; }
.detail-sum-row { display:flex; justify-content:space-between; align-items:center; padding:5px 0; font-size:13px; border-bottom:1px solid rgba(0,0,0,.04); }
.detail-sum-row:last-child { border-bottom:none; }
.detail-sum-row.total { font-weight:700; font-size:15px; padding:8px 0; }
.detail-sum-row.total strong { color:var(--green); font-size:17px; }
.detail-sum-row.profit span:last-child { color:var(--green); font-weight:600; }

.share-struk-title { font-size:12px; font-weight:700; color:var(--text-muted); text-transform:uppercase; letter-spacing:.6px; margin-bottom:8px; }
.share-struk-btns  { display:flex; gap:10px; }
.btn-share-pdf, .btn-share-jpeg { flex:1; padding:13px; border:none; border-radius:12px; font-size:13px; font-weight:700; font-family:inherit; cursor:pointer; transition:transform .15s; }
.btn-share-pdf:active, .btn-share-jpeg:active { transform:scale(.96); }
.btn-share-pdf  { background:rgba(192,57,43,.12); color:#c0392b; }
.btn-share-jpeg { background:rgba(61,122,90,.12); color:var(--green); }

/* ===== LAPORAN DATE FILTER ===== */
.laporan-date-filter {
  display: flex; gap: 10px; margin: 10px 0 8px;
}
.laporan-date-row {
  flex: 1; display: flex; flex-direction: column; gap: 4px;
}
.laporan-date-row label {
  font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
}
.laporan-date-row input[type="date"] {
  width: 100%; padding: 9px 12px;
  border: 1.5px solid rgba(255,255,255,.8); border-radius: 10px;
  background: rgba(255,255,255,.7); font-size: 13px;
  font-family: inherit; outline: none; color: var(--text);
}
.laporan-date-row input[type="date"]:focus { border-color: var(--green); }

.laporan-preset-bar {
  display: flex; gap: 6px; margin-bottom: 12px;
}
.laporan-preset-bar button {
  flex: 1; padding: 7px 4px;
  background: rgba(255,255,255,.6);
  border: 1.5px solid rgba(255,255,255,.8);
  border-radius: 50px; font-size: 11px; font-weight: 700;
  font-family: inherit; cursor: pointer; color: var(--text-muted);
  transition: all .2s;
}
.laporan-preset-bar button:active,
.laporan-preset-bar button.active {
  background: var(--green); color: white; border-color: var(--green);
}

/* ===== PRODUK CSV BUTTONS ===== */
.produk-action-bar {
  display: flex; gap: 8px; align-items: center; margin: 10px 0;
}
.btn-produk-csv {
  width: 46px; height: 46px; border: none; border-radius: 12px;
  font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform .15s;
}
.btn-produk-csv:active { transform: scale(.93); }
.btn-produk-csv.export { background: rgba(61,122,90,.12); }
.btn-produk-csv.import { background: rgba(108,92,231,.12); }

/* ===== DISKON ROW (bayar modal) ===== */
#diskon-row { margin-top: 6px; }

/* ===== LAPORAN DATE FILTER (v8 fix) ===== */
.laporan-date-filter { display:flex; gap:10px; margin:10px 0 8px; }
.laporan-date-row { flex:1; display:flex; flex-direction:column; gap:4px; }
.laporan-date-row label { font-size:11px; font-weight:700; color:var(--text-muted); text-transform:uppercase; }
.laporan-date-row input[type="date"] {
  width:100%; padding:9px 12px;
  border:1.5px solid rgba(255,255,255,.8); border-radius:10px;
  background:rgba(255,255,255,.7); font-size:13px;
  font-family:inherit; outline:none; color:var(--text);
}
.laporan-date-row input[type="date"]:focus { border-color:var(--green); }
.laporan-preset-bar { display:flex; gap:6px; margin-bottom:10px; }
.laporan-preset-bar button {
  flex:1; padding:7px 4px;
  background:rgba(255,255,255,.6); border:1.5px solid rgba(255,255,255,.8);
  border-radius:50px; font-size:11px; font-weight:700;
  font-family:inherit; cursor:pointer; color:var(--text-muted); transition:all .2s;
}
.laporan-preset-bar button:active { background:var(--green); color:white; border-color:var(--green); }

/* ===== PRODUK CSV BUTTONS (v8 fix) ===== */
.produk-action-bar { display:flex; gap:8px; align-items:center; margin:10px 0; }
.btn-produk-csv {
  width:46px; height:46px; border:none; border-radius:12px;
  font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center;
  flex-shrink:0; transition:transform .15s;
}
.btn-produk-csv:active { transform:scale(.93); }
.btn-produk-csv.export { background:rgba(61,122,90,.12); }
.btn-produk-csv.import { background:rgba(108,92,231,.12); }

/* ===== SIDEBAR AVATAR v9 ===== */
.sidebar-header {
  display: flex; align-items: center; gap: 12px;
  padding: 20px; border-bottom: 1px solid rgba(0,0,0,.08);
  cursor: default;
}

/* ===== LOGO STRUK PREVIEW ===== */
#logo-preview img { display: block; }
