/* ===== Aplikasi Kasir — Mobile App CSS ===== */
:root {
  --primary: #667eea;
  --primary-dark: #5a67d8;
  --grad: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --nav-h: 64px; /* bottom nav height */
}

* { -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: contain;
  -webkit-font-smoothing: antialiased;
}

/* ===== App bar atas ===== */
.appbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--grad);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 12px rgba(102,126,234,.35);
}
.appbar .title { font-weight: 700; font-size: 1.05rem; }
.appbar .sub { font-size: .75rem; opacity: .85; }
.appbar .spacer { flex: 1; }
.appbar .btn-circle {
  background: rgba(255,255,255,.18);
  border: 0;
  border-radius: 50%;
  width: 38px; height: 38px;
  color: #fff;
  font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none;
}

/* ===== Konten ===== */
.app-content { padding: 16px 16px calc(var(--nav-h) + 24px); }
.card {
  background: var(--card);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

/* ===== Stat cards (terjual hari/bulan/tahun) ===== */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-box {
  background: var(--card);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
.stat-box .label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.stat-box .val { font-size: 1.05rem; font-weight: 800; color: var(--primary); margin-top: 2px; }
.stat-box .sub { font-size: .7rem; color: var(--muted); }

/* ===== Menu besar ===== */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-item {
  background: var(--card);
  border-radius: 16px;
  padding: 18px 14px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  transition: transform .08s;
}
.menu-item:active { transform: scale(.97); }
.menu-item .ico {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: #fff;
  margin-bottom: 10px;
}
.menu-item .t { font-weight: 700; font-size: .92rem; }
.menu-item .d { font-size: .74rem; color: var(--muted); margin-top: 2px; }

/* ===== Bottom nav ===== */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: #fff;
  border-top: 1px solid #eef0f3;
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 30;
}
.bottom-nav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #9aa1b0;
  text-decoration: none;
  font-size: .68rem;
  gap: 2px;
}
.bottom-nav a i { font-size: 1.25rem; }
.bottom-nav a.active { color: var(--primary); }

/* ===== Daftar (list) ===== */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: 14px;
  margin-bottom: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,.04);
}
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t2 { font-weight: 600; font-size: .9rem; }
.list-item .m2 { font-size: .75rem; color: var(--muted); }
.list-item .price { font-weight: 800; font-size: .95rem; }

/* Segmented filter */
.seg { display: flex; background: #eceeff; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button {
  flex: 1; border: 0; background: transparent;
  padding: 8px 4px; border-radius: 9px;
  font-size: .8rem; font-weight: 600; color: var(--muted);
}
.seg button.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(102,126,234,.2); }

/* Tombol penuh */
.btn-full {
  display: block; width: 100%;
  background: var(--grad);
  color: #fff; border: 0;
  border-radius: 14px;
  padding: 14px;
  font-size: 1rem; font-weight: 700;
  text-decoration: none; text-align: center;
}
.btn-full:active { opacity: .9; }
.btn-full.secondary { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }

/* Input */
.form-input {
  width: 100%;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #fff;
  outline: none;
  box-sizing: border-box;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(102,126,234,.15); }
label.f-label { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; display: block; }

/* Utility */
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.fw-700 { font-weight: 700; }
.text-success { color: var(--success)!important; }
.text-danger { color: var(--danger)!important; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; }
.text-center { text-align: center; }
.d-none { display: none; }

.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: .72rem; font-weight: 600;
}
.badge.primary { background: #eceeff; color: var(--primary); }
.badge.success { background: #d1fae5; color: var(--success); }
.badge.warning { background: #fef3c7; color: var(--warning); }

/* Toast */
.toast-msg {
  position: fixed; top: 72px; left: 16px; right: 16px;
  z-index: 40;
  border-radius: 12px; padding: 12px 16px;
  font-size: .88rem; font-weight: 600; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  display: none;
}
.toast-msg.success { background: var(--success); }
.toast-msg.danger { background: var(--danger); }
.toast-msg.warning { background: var(--warning); }